Conversation
terrillmoore
left a comment
There was a problem hiding this comment.
Review of the 491x/51xx board support PR. The structure follows the existing board pattern correctly, but there's a build-breaking path issue and several smaller problems.
Build-breaker: Makefile path mismatch for 491x
The Makefile sets _ := platform/board/mcci/catena491x but the actual directory is platform/board/mcci/model491x/. The SOURCES_libmcci_bootloader_catena491x entries expand $_/src/... to a path that doesn't exist. This will fail at build time.
Either rename the directory from model491x to catena491x (for consistency with catena4801/catena46xx/catena51xx), or change the Makefile to _ := platform/board/mcci/model491x.
Copy-paste artifacts in end-of-file comments
Both mccibootloaderboard_catena51xx_platforminterface.c and mccibootloaderboard_model491x_platforminterface.c end with:
/**** end of mccibootloaderboard_catenaabz_platforminterface.c ****/
These should reference their own filenames. (The existing catena4801 file has the same bug, inherited from catena_abz, but new files shouldn't propagate it.)
Version bump shouldn't be in this PR
The change to mccibootloader_image_version.h (0.4.0 -> 0.5.0 and copyright year update) is unrelated to adding board support. The image tool itself didn't change. This should be a separate commit on main when you're actually ready to release 0.5.0.
Missing PR description
There's no body text explaining what the 491x and 51xx boards are, or why 491x needs the PH1 power-on sequence (cloned from 4801) while 51xx doesn't (cloned from 46xx). A brief note about the hardware differences that drove these choices would help reviewers and future readers.
Minor: confirm GPIO mapping for 491x
The 491x storagePowerOn() is identical to 4801 (enable GPIOH, drive PH1 high). Is PH1 actually the flash power control on the 491x boards, or was this copied without verifying the schematic?
Please fix the build-breaking path issue, clean up the end-of-file comments, split out the version bump, and add a PR description. The rest is structurally sound.
Board descriptions
is powered directly from +VDD — no switched power supply is involved.
The flash chip is powered through a high-side switch (SLG59M1639V), controlled by PH1 (D10).
Hardware differences driving design choices
The Model 491x uses a dual high-side switch (SLG59M1639V) to gate power to the flash and FRAM via VOUT1. PH1 drives the ON1 enable pin, which defaults low
(off) at power-on. The bootloader must drive PH1 high and wait 50ms before accessing flash. This storagePowerOn() sequence is cloned from the Catena
4801, which uses the same PH1-controlled power switching design.
The Catena 51xx connects flash VCC directly to +VDD, so flash is available as soon as the board powers up. No GPIO power-on step is needed. The
storageInit simply calls spiInit() and flashInit(), matching the Catena 46xx approach.
GPIO verification
https://github.com/mcci-catena/Arduino_Core_STM32/blob/main/variants/MODEL_4917/variant.h.
https://github.com/mcci-catena/Arduino_Core_STM32/blob/issue195/variants/CATENA_512x/variant.h.