Commit Graph

7 Commits

Author SHA1 Message Date
Krzysztof Cieślik
dca80c7821 Fix CI: use upload-artifact@v3, hardcode public Gitea hostname
All checks were successful
CI / Build firmware (push) Successful in 38s
CI / Check formatting (push) Successful in 13s
CI / Static analysis (push) Successful in 12s
CI / Build documentation (push) Successful in 14s
upload-artifact@v4 is not supported on self-hosted Gitea (GHES).
Downgrade to v3 which works with Gitea Actions.

GITHUB_SERVER_URL resolves to the internal Docker address (http://gitea:3000)
instead of the public URL, making the gh-pages push URL malformed.
Hardcode gitea.archvium.eu as the push target.
2026-05-21 23:24:15 +02:00
Krzysztof Cieślik
9c0e280fab Add firmware artifacts, memory summary, and Doxygen gh-pages deploy
Some checks failed
CI / Build firmware (push) Failing after 38s
CI / Check formatting (push) Successful in 12s
CI / Static analysis (push) Successful in 11s
CI / Build documentation (push) Failing after 13s
CMakeLists.txt: generate firmware.map via -Wl,-Map.

CI build job:
- Writes per-section size table to the Gitea job summary
  (visible in the Actions UI after each run).
- Uploads firmware.hex and firmware.map as a downloadable artifact
  named firmware-<sha>.

CI docs job:
- On push to main, force-pushes docs/html/ as an orphan commit to
  the gh-pages branch.  Gitea Pages must be enabled in site admin
  for the HTML to be served; the branch is always available via the
  repo file browser regardless.
2026-05-21 23:20:55 +02:00
Krzysztof Cieślik
7d47af12d8 Fix cppcheck and Doxygen CI failures
All checks were successful
CI / Build firmware (push) Successful in 40s
CI / Check formatting (push) Successful in 12s
CI / Static analysis (push) Successful in 12s
CI / Build documentation (push) Successful in 14s
startup.c: mark Flash source pointer as const (cppcheck constVariablePointer).
Doxyfile: remove HTML_TIMESTAMP which was dropped in Doxygen 1.9.8+.
2026-05-21 23:15:56 +02:00
Krzysztof Cieślik
ee7e5544bb Fix CI: install tools natively instead of using Docker-in-Docker
Some checks failed
CI / Build firmware (push) Successful in 37s
CI / Check formatting (push) Successful in 14s
CI / Static analysis (push) Failing after 12s
CI / Build documentation (push) Failing after 13s
Volume mounts with -v $PWD:/src fail when the runner itself runs
inside a container (the path exists in the runner container but not
on the Docker daemon host). Switch all four jobs to native apt-get
installs of the same packages that are in the Dockerfile. The
container-based just recipes remain unchanged for local use.
2026-05-21 23:12:14 +02:00
Krzysztof Cieślik
39a89036cc Add Doxygen, clang-format, cppcheck, and Gitea CI
Some checks failed
CI / Build firmware (push) Failing after 2m1s
CI / Check formatting (push) Successful in 5s
CI / Static analysis (push) Failing after 5s
CI / Build documentation (push) Successful in 4s
Doxygen:
- Doxyfile: minimal config, HTML output to docs/, no LaTeX
- @file/@brief on all source files, full @param/@return on public API
- docs/ added to .gitignore

clang-format (14, Linux brace style, 4-space, column 100):
- .clang-format added
- Applied to entire codebase; this commit is the canonical baseline
- just format rewrites in-place; just format-check is the CI gate

cppcheck (--enable=warning,style,performance,portability):
- Linker-symbol pointer comparisons in startup.c suppressed with
  inline cppcheck-suppress (false positives, not real bugs)
- just lint runs cppcheck; zero warnings required to pass

Dockerfile gains clang-format, cppcheck, doxygen packages so all
tools run inside the existing container -- host stays clean.

Gitea Actions (.gitea/workflows/ci.yml):
- Four parallel jobs: build, format, lint, docs
- All jobs use the same Dockerfile-based image
- Doxygen job fails on any warning line in output
2026-05-21 23:07:05 +02:00
Krzysztof Cieślik
0e348414f8 Implement basic radio TX on fixed channel
radio_init() configures RADIO in NRF_1Mbit proprietary mode: 8-bit
length field, 4-byte address (BASE0+PREFIX0), 2-byte CRC-16/CCITT,
0 dBm TX power, channel 20 (2420 MHz). READY->START and END->DISABLE
shortcuts let radio_tx() trigger the full ramp-up/TX/disable sequence
by writing TASKS_TXEN once, then polling EVENTS_END.

main.c sends a fixed 4-byte test frame on every button press.
FHSS and AES remain compiled but are not called.

New bitfield unions in regs.h: radio_pcnf0_t, radio_pcnf1_t,
radio_crccnf_t, radio_shorts_t.
2026-05-21 22:53:32 +02:00
Krzysztof Cieślik
438fca0ace Initial bare-metal foundation for nRF52840 PTT-FHSS
- Fully open toolchain: arm-none-eabi-gcc inside Podman/Docker container
- Platform-agnostic build via justfile (auto-detects podman vs docker)
- CMake + Ninja build system with arm-none-eabi toolchain file
- nRF52840 linker script and startup with full 64-entry vector table
- Register access via typed bitfield unions (include/regs.h)
- FHSS channel sequencer: AES-128-ECB PRNG over 40 channels (2402-2480 MHz)
- Low-power sleep via SYSTEM_ON WFI + GPIOTE wakeup on button press
- Vendor deps as shallow git submodules: nrfx, CMSIS_5, tiny-AES-c
2026-05-21 20:24:33 +02:00