Skip to content

Commit 1c629f1

Browse files
committed
Add device compatibility, build instructions to README
1 parent 5e6fd67 commit 1c629f1

1 file changed

Lines changed: 77 additions & 0 deletions

File tree

README.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,83 @@ Replace `COMx` with your actual COM port.
9393

9494
---
9595

96+
## Device Compatibility
97+
98+
The code changes live in shared source files, so they should compile for **all Bruce-supported devices**. However, some features are hardware-dependent:
99+
100+
**Works on all devices:**
101+
- Apps menu and app launcher (uses standard SD/LittleFS + JS interpreter)
102+
- Memory improvements (PSRAM heap uses `ps_malloc` with automatic fallback for devices without PSRAM)
103+
- Menu JS module (uses Bruce's native UI — fully device-agnostic)
104+
- BLE JS module (NimBLE is available on all ESP32 variants)
105+
106+
**Hardware-dependent:**
107+
- **LED module** — Wrapped in `#ifdef HAS_RGB_LED`. Compiles on all devices but only functions on those with RGB LEDs (T-Embed CC1101, Cardputer, Bruce RF Reaper, etc.)
108+
- **NRF24 module** — Only useful on devices with NRF24 hardware connected
109+
110+
**Notes:**
111+
- LITE_VERSION builds will **not** include any of the new features (guarded by `#if !defined(LITE_VERSION) && !defined(DISABLE_INTERPRETER)`)
112+
- Only the `lilygo-t-embed-cc1101` target has been built and tested so far. Other targets should work but may need testing.
113+
114+
---
115+
116+
## Building From Source
117+
118+
### Prerequisites
119+
120+
1. **Python 3.x**https://www.python.org/downloads/
121+
2. **PlatformIO Core (CLI)** — Install via pip:
122+
```sh
123+
pip install platformio
124+
```
125+
3. **GCC (for JS header generation)** — The build uses a host GCC to pre-compile JavaScript headers.
126+
- **Windows:** Install MSYS2 (https://www.msys2.org/), then run `pacman -S mingw-w64-i686-gcc` in the MSYS2 terminal. The GCC will be at `C:\msys64\mingw32\bin\gcc.exe`.
127+
- **Linux/macOS:** GCC is usually already installed (`gcc` in PATH).
128+
4. **Git**https://git-scm.com/downloads
129+
130+
### Clone and Build
131+
132+
```sh
133+
git clone https://github.com/jsauce454/bruce-customfw.git
134+
cd bruce-customfw
135+
```
136+
137+
**Windows (PowerShell):**
138+
```powershell
139+
$env:MQJS_HOST_CC = "C:\msys64\mingw32\bin\gcc.exe"
140+
pio run -e lilygo-t-embed-cc1101
141+
```
142+
143+
**Linux / macOS:**
144+
```sh
145+
export MQJS_HOST_CC=gcc
146+
pio run -e lilygo-t-embed-cc1101
147+
```
148+
149+
The output binary will be at `Bruce-lilygo-t-embed-cc1101.bin` in the project root.
150+
151+
### Building for Other Devices
152+
153+
Replace the `-e` target with any supported Bruce environment:
154+
155+
```sh
156+
pio run -e m5stack-cardputer
157+
pio run -e m5stack-m5stickc-plus2
158+
pio run -e lilygo-t-deck
159+
pio run -e lilygo-t-embed
160+
pio run -e m5stack-core2
161+
```
162+
163+
Check `platformio.ini` for the full list of available build environments.
164+
165+
### First Build Notes
166+
167+
- The first build takes several minutes as PlatformIO downloads all toolchains and dependencies automatically.
168+
- The `patch.py` pre-build script will automatically patch `libnet80211.a` (weakens a symbol to allow custom WiFi attack code). This only runs once and creates a `.patched` flag.
169+
- If the build fails with `cannot find -lnet80211`, delete the `.patched` file in your PlatformIO framework libs directory and rebuild.
170+
171+
---
172+
96173
## Original Bruce Features
97174

98175
This fork includes **all** features from the original Bruce firmware. See the [original README](https://github.com/BruceDevices/firmware) for the full feature list, including:

0 commit comments

Comments
 (0)