You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. Open the Boards Manager (second button from the top on the left sidebar), search and install "Raspberry Pi Pico/RP2040 (Fix)" version `3.9.2-fix`.
17
+
3. Open the Boards Manager (second button from the top on the left sidebar), search and install the latest version of *"Raspberry Pi Pico/RP2040/RP2350 (TUSB Fix)"*.
18
18
- Using this fork is REQUIRED as it includes a fixed version of Adafruit's TinyUSB library. Until adafruit/Adafruit_TinyUSB_Arduino#293 is resolved, do not use the upstream *Arduino-Pico* core or install the separate Adafruit TinyUSB library.
19
19
4. Clone/extract the contents of the source repository into your system's `Arduino` folder, so that the `OpenFIREmain` folder is next to `libraries`. Open the `OpenFIREmain` sketch.
20
-
5. From the app menu up top, set the current microcontroller to your current board under *Tools->Board:->Raspberry Pi Pico/RP2040 (Fix),* set CPU speed to *133 MHz,* set Optimize to *Optimize Even More (-O3),* set Flash Size to include a 64KB file system,* and set USB Stack to *Adafruit TinyUSB* (not *Host*).
20
+
5. From the app menu up top, set the current microcontroller to your current board under *Tools->Board:->Raspberry Pi Pico/RP2040/RP2350 (TUSB Fix),* set CPU speed to *133 MHz,* set Optimize to *Optimize Even More (-O3),* set Flash Size to include at least a 64KB file system,* and set USB Stack to *Adafruit TinyUSB* (not *Host*). For RP2350 boards, *CPU Architecture* must be set to *ARM*.
21
21
6. When you're ready to build, click Verify to check for compilation errors, Upload to directly upload the binary to the microcontroller (if connected), or go to *Sketch->Export Compiled Binary* to generate a .uf2 file under `OpenFIREmain/build/rp2040.rp2040.board_name` that you can drag and drop onto your microcontroller when it's in bootloader mode (either by holding BOOTSEL on poweron, or resetting to bootloader from the OpenFIRE App).
22
22
23
23
### Arduino (-cli) Setup
24
24
Compiling from the cli can be used to automate the build process, and is used by the GitHub actions deployments for release builds.
25
25
1.[Download the Arduino-cli tool for your system](https://github.com/arduino/arduino-cli/releases/latest) and install it to where it's most convenient (or for Linux users, install from your system's package manager).
26
26
- These instructions are tailored to Linux, but Windows users can use `arduino-cli.exe` whenever the tool is referenced.
27
-
2. Install the patched RP2040 core for OpenFIRE:
27
+
2. Install the latest version of the patched RP2040/RP2350 core for OpenFIRE:
5. Find the flash value that allocates 64KB for the File System (replacing `{BOARD}` with your desired microcontroller's FQBN name). The example output below would be seen if `{BOARD}` was set to `rp2040:rp2040:rpipico`:
52
+
5. Find the flash value that allocates at least 64KB for the File System (replacing `{BOARD}` with your desired microcontroller's FQBN name). The example output below would be seen if `{BOARD}` was set to `rp2040:rp2040:rpipico`:
53
53
```bash
54
54
$ arduino-cli board details -b {BOARD}
55
55
@@ -67,7 +67,6 @@ Compiling from the cli can be used to automate the build process, and is used by
*for custom builds, feel free to configure the above build flags to your needs to enable/disable certain OpenFIREfw features.*
71
70
72
71
When successful, you will find the exported binary at `/path/to/OpenFIRE-Firmware/OpenFIREmain/build/rp2040.rp2040.{BOARD}/OpenFIREmain.ino.uf2`
73
72
@@ -77,9 +76,9 @@ Per-board build configurations for various microcontrollers, and the strings to
77
76
### Define Buttons & Timers
78
77
Tactile extras can be defined/unset by simply (un)commenting the respective defines in`OpenFIREDefines.h` - though each one of these can be simply disabled at runtime even when the firmware is "fully kitted".
79
78
80
-
If your gun is going to be hardset to player 1/2/3/4 e.g. for an arcade build, change `#define PLAYER_NUMBER` to 1, 2, 3, or 4 depending on what keys you want the Start/Select buttons to correlate to. Remember that guns can be remapped to any player number arrangement at any timeif needed by sending an `XR#`command over Serial - where # is the player number.
79
+
If your gun is going to be hardset to player 1/2/3/4 e.g. for an arcade build, uncomment and set`#define PLAYER_NUMBER` to 1, 2, 3, or 4 depending on what keys you want the Start/Select buttons to correlate to. Remember that, when this variable is unset, guns can be remapped to any player number arrangement at any timeif needed by sending an `XR#`command over Serial - where # is the player number.
81
80
82
-
These parameters are easily found and can be redefined in`OpenFIREDefines.h`:
81
+
To change the default USB ID, these parameters are easily found and can be redefined in`OpenFIREDefines.h`:
83
82
84
83
```c++
85
84
#define MANUFACTURER_NAME "OpenFIRE"
@@ -88,8 +87,9 @@ These parameters are easily found and can be redefined in `OpenFIREDefines.h`:
88
87
```
89
88
90
89
You may change these to suit whatever your heart desires - though the only parts *necessary to change formultiplayer* is the Device Vendor ID and/or Product ID (the latter is determined by either loaded preferences or Player Number,in that order). Then, just reflash the board!
90
+
Keep in mind that for App and most distros' compatibility, the Vendor ID (`DEVICE_VID`) **MUST** be kept at the default `0xF143` identifier.
91
91
92
92
Remember that the sketch uses the Arduino GPIO pin numbers; on many boards, including the Raspberry Pi Pico and the Adafruit Itsybitsy RP2040, these are the silkscreen labels on the **underside** of the microcontroller (marked GP00-29). Note that this does not apply to the analog pins (A0-A3), which are macros for GP26-29.
93
-
For boards already implemented, the OpenFIRE Desktop App has an embedded interactive *boards previewer* to view the default layoutand location of GPIO for supported microcontrollers. You can also refer to [this interactive webpage](https://pico.pinout.xyz/) for detailed information on the Pico/W's layout, or your board vendor's documentation for more information about your particular microcontroller.
93
+
For boards already implemented, the OpenFIRE Desktop App has an embedded interactive *boards previewer* to view the default layout, location, and extra capabilities of GPIO for supported microcontrollers. You can also refer to [this interactive webpage](https://pico.pinout.xyz/) for detailed information on the Pico/W's layout, or your board vendor's documentation for more information about your particular microcontroller.
94
94
95
95
The default button:pins layout used will be reflected by default in the OpenFIRE App, which can be used as reference or can be changed to any custom pins layout to suit your needs - custom settings will take priority over board defaults if enabled & detected.
0 commit comments