Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion .github/workflows/arduino-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@ on:
paths:
- "src/**"
- "include/**"
- "vendor/**"
- "test/core_setup/**"
- "library.properties"
- "examples/**"
- ".github/workflows/arduino-build.yml"
pull_request:
branches: [main, master]
paths:
- "src/**"
- "include/**"
- "vendor/**"
- "test/core_setup/**"
- "library.properties"
- "examples/**"
workflow_dispatch:

Expand Down Expand Up @@ -105,8 +111,26 @@ jobs:
# xtensa default and the link fails with "libstdc++.a compiled for a big endian system and
# target is little endian". (The PlatformIO build uses the older, statically-little-endian
# xtensa-esp32-elf toolchain, so wrapping is safe there.) Each example does a full compile.
# Arduino compiles a library's src/ and nothing else, and src/ is the only include path it
# gives the library. The tree keeps the entry header in include/, the vendor axis in vendor/
# and the HAL arms in test/core_setup/, so the library is staged in Arduino's layout: those
# three under src/, where every #include spelling in the tree resolves unchanged. It is the
# same set of sources the ESP-IDF component globs.
- name: Stage the library in Arduino layout
run: |
STAGE="$RUNNER_TEMP/ProtoCore"
mkdir -p "$STAGE/src/test"
cp library.properties "$STAGE/"
cp -r src/. "$STAGE/src/"
cp include/*.h "$STAGE/src/"
cp -r vendor "$STAGE/src/vendor"
cp -r test/core_setup "$STAGE/src/test/core_setup"
# Not firmware: idemIP is a host model of the IP stack, boot/ the bare-metal simulator's
# startup (its own gmtime_r, memcpy and vector table).
rm -rf "$STAGE/src/test/core_setup/idemIP" "$STAGE/src/test/core_setup/boot"
echo "PROTOCORE_LIB=$STAGE" >> "$GITHUB_ENV"
- name: Compile ${{ matrix.example.name }} (Arduino IDE, esp32 3.x)
# No --build-property / build_flags: the example's build_opt.h supplies the feature
# flags, so this is byte-for-byte how the Arduino IDE builds it.
run: |
arduino-cli compile --fqbn esp32:esp32:esp32 --library . "examples/${{ matrix.example.name }}"
arduino-cli compile --fqbn esp32:esp32:esp32 --library "$PROTOCORE_LIB" "examples/${{ matrix.example.name }}"
6 changes: 6 additions & 0 deletions .github/workflows/esp32-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
paths:
- "src/**"
- "include/**"
- "vendor/**"
- "test/core_setup/**"
- "library.json"
- "examples/**"
- "platformio.ini"
- "tools/ci_tooling/generate/example_footprints.py"
Expand All @@ -22,6 +25,9 @@ on:
paths:
- "src/**"
- "include/**"
- "vendor/**"
- "test/core_setup/**"
- "library.json"
- "examples/**"
workflow_dispatch:
schedule:
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ option(PROTOCORE_WITH_ARDUINO "Build against arduino-esp32 (Arduino-as-component
# (cmake -P) to extract REQUIRES, and CONFIGURE_DEPENDS is illegal there. The glob is therefore
# evaluated at configure time - run `idf.py reconfigure` after adding or removing a source file.
file(GLOB_RECURSE PROTOCORE_SRCS "src/*.c" "src/*.cpp" "test/core_setup/*.c" "test/core_setup/*.cpp")
# Two arms under test/core_setup/ are not firmware and carry no guard: idemIP is a host model of the
# IP stack (its headers resolve from test/core_setup/, which is not an include dir here), and boot/
# is the bare-metal simulator's startup - its own gmtime_r, memcpy and vector table, which collide
# with newlib and the IDF startup.
list(FILTER PROTOCORE_SRCS EXCLUDE REGEX "/test/core_setup/(idemIP|boot)/")

set(PROTOCORE_REQUIRES
lwip
Expand Down
2 changes: 1 addition & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
`http_parser_set_stream_hooks(begin, data, abort)` are global singletons
(last-registered-wins, so OTA / upload / WebDAV streaming are still mutually
exclusive per build). All three now take `HttpReq*`. A sink can keep
per-connection state: WebDAV holds per-slot PUT state (`s_davput.put[MAX_CONNS]` in

Check warning on line 148 in docs/ARCHITECTURE.md

View workflow job for this annotation

GitHub Actions / Spellcheck Documentation

Unknown word (davput)
`src/server/io/webdav_handler/webdav_handler.c`) and each connection streams to its own file. This
fixed the concurrent-PUT clobber (docs/BUGS.md) - HW: 4 parallel PUTs with distinct
payloads, all byte-exact.
Expand All @@ -157,7 +157,7 @@
| Socket TX | transport `ConnPool` | DONE |
| RX receive window | transport | DONE (`ConnPool.ack_consumed`, ack-on-consume) |
| RX ring read/drain | transport (read API) | DONE (`ConnPool.read*`; consumers off the ring) |
| Streaming sink state | per-slot, slot-aware | DONE (`s_davput.put[MAX_CONNS]`, slot-aware hooks) |

Check warning on line 160 in docs/ARCHITECTURE.md

View workflow job for this annotation

GitHub Actions / Spellcheck Documentation

Unknown word (davput)
| Event routing | session (owner queue) | DONE |
| Working memory | mmgr `plain` (per slot) | DONE (worker resets it per dispatch) |
| Key material | mmgr `secure` (per slot) | DONE (disjoint region; reclaiming wipes) |
Expand All @@ -174,7 +174,7 @@
stays the only place that reopens the window (per loop), so draining and ACKing
each have exactly one owner. HW: 10/10 50 KB byte-exact, backpressure 0.
3. **DONE - slot-aware streaming hooks** - `HttpStreamDataCb(HttpReq*, ...)` +
per-slot WebDAV PUT state `s_davput.put[MAX_CONNS]`; fixed the concurrent-PUT bug

Check warning on line 177 in docs/ARCHITECTURE.md

View workflow job for this annotation

GitHub Actions / Spellcheck Documentation

Unknown word (davput)
(HW: 4 parallel PUTs, distinct payloads, all byte-exact).
4. **DONE - outbound clients** - all clients (http_client / mqtt / ws_client) share
`TcpClient`, the unified client transport; brought to the same ack-on-consume
Expand Down Expand Up @@ -219,7 +219,7 @@
HTTP/2, and HTTP/3), and the response funnels back through the symmetric **TX seam** - a
per-connection `protocore_resp_sink_fn` function pointer (`http_resp_sink[slot]`, session.h) that
HTTP/2 installs at ALPN and HTTP/3 at dispatch. `send_text()` / `send_empty()` call
`http_resp_sink[slot](...)`
`http_resp_sink[slot](slot, code, content_type, payload, body_len)`
when it is set (h2 frames the reply as HEADERS+DATA on the stream; h3 as an HTTP/3 response on
its QUIC stream) and otherwise build the HTTP/1.1 message - so the response methods name no
protocol. It is the RX `ProtoHandler` seam's TX counterpart: request decode and response encode
Expand Down
24 changes: 12 additions & 12 deletions docs/FEATURES.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/HARDWARE_HOOKUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -907,8 +907,8 @@ clocking stalls that read instead of the main loop.

- **LD2410 mmWave radar, `PROTOCORE_ENABLE_LD2410`** - a 24 GHz presence sensor that sees a
still person (breathing), in the dark, through thin walls - over a UART at **256000
baud**. Cross the data wires (module TX -> ESP32 RX). `protocore_ld2410_poll()` decodes each
frame; `protocore_ld2410_present()` / `protocore_ld2410_distance_cm()` act on it. Example Ld2410.
baud**. Cross the data wires (module TX -> ESP32 RX). `Ld2410.poll()` decodes each
frame; `Ld2410.present()` / `Ld2410.distance_cm()` act on it. Example Ld2410.
- **MPR121 capacitive touch, `PROTOCORE_ENABLE_MPR121`** - turns 12 wires or pads into
touch buttons (I2C 0x5A). `protocore_mpr121_read_touched()` returns a 12-bit mask. Example
Mpr121.
Expand Down
Loading
Loading