Repository navigation
M0: firmware2 skeleton, DxCore CI, and Rev C pin map - #8
Merged
Merged
Conversation
The AVR128DA48 stub builds with arduino-cli and DxCore 1.6.2. Host tests lock the pin header to spec sections 2.1 and 2.2, including the uncommitted power-rework nets. Co-authored-by: Jason Milldrum <NT7S@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Milestone M0 of the OpenBeacon 2 Rev C firmware spec (draft 3.5). New tree only. The SAMD21 firmware under
firmware/is untouched, and this does not choose a project license. Not for merge until review.What landed
firmware2/sketch stub for the AVR128DA48, pin header, and a host test that locks the pin table..github/workflows/firmware2.yml) builds with arduino-cli + DxCore and runs the host tests.arduino-cli is the build tool because spec §4.1 names it, and §4.11 uploads with arduino-cli/avrdude over the CP2102N. The board options (chip, 24 MHz internal, millis on TCB2, Optiboot on USART0 PA0/PA1) are DxCore menu ids, passed as the FQBN. PlatformIO would wrap the same core through another package.
FQBN:
Pinned to arduino-cli 1.5.1 and DxCore 1.6.2.
drazzy.com's TLS certificate expired on 20 Oct 2026, so CI uses Spence Konde's GitHub copy ofpackage_drazzy.com_index.json.CI
Green. Both jobs passed on
b9d9abb: https://github.com/etherkit/OpenBeacon2/actions/runs/40562158534DxCore AVR128DA48 compile log:
The 130560 maximum is the Optiboot image (512 bytes reserved). The 168 bytes of SRAM are DxCore's
digital_pin_to_*tables plustimingStruct. The pin-name strings are not linked into the image.Host unit tests job (
ctest):ctest only prints the doctest summary on failure. The same binary run locally reports:
The three cases are the power-rework disclaimer, the 48-pin table against §2.1/§2.2, and the USART2/USART3/CLK4/SPI1 constraints. doctest 2.4.11 is vendored under
firmware2/third_party/doctest/with doctest's own MIT license. That is not a license for this repo.Pin header vs spec §2.1 / §2.2
firmware2/OpenBeacon2/ob2_pins.h. DxCore numbers were checked against DxCore 1.6.2variants/48pin-standard/pins_arduino.hand arestatic_asserted inob2_pin_check.cpp. Every D-number the spec prints matchesPIN_Pxx. Committed nets were read off U9 atpcb-layout88e9a62(pin endpoints to global labels). Where that commit and §2.2 differ, the header follows §2.2 and says the rework hardware is not in the repo.LED_BUILTINis this pin, not SYNC and not the TX LED. Stub does not use it.J5, AIN0. Stays on J5 after the rework.Nothing in that table was renumbered to hide a mismatch. The four rework nets are the §2.2 change the header was asked to carry.
Other flags (not edited into the pin numbers)
clock=24internalwrites FREQSEL only (CLKCTRL_OSCHFCTRLA = 0x09 << 2inwiring.c) and has no autotune menu. The stub does not setAUTOTUNE. That needs the crystal running and belongs with the timebase.SPI.begin()does not take those pins.pins_arduino.h,digital_pin_to_bit_mask[]comments call PF2–PF5 AIN12–AIN15. The macrosPIN_A18–PIN_A21are PF2–PF5, anddigitalPinToAnalogInput(PF2)returns 18.analogChannelToDigitalPin(18)returnsNOT_A_PIN(channels 18–21 fall through a< 22hole). AIN9/10/11, which the spec names, round-trip.digital_pin_to_timer[]comments number PC0 as pin 16; the slot is index 14 (D14).