esp32: Have each boards' mpconfigboard.cmake include a common file.#18873
Conversation
|
Code size report: |
|
This is a nice clean up / code factoring, but I feel that doing things like: and making most boards depend on an How about factoring the common code to files like |
8685126 to
276b99b
Compare
|
Have updated to apply suggestions, this way is much more flexible! Checked the other Re-ran script to build all boards, and built and flashed a few to confirm they were working as expected. |
|
If this merges then I'll go around the open PRs which add esp32 board profiles and request them to update. |
dpgeorge
left a comment
There was a problem hiding this comment.
Thanks for updating. It looks good overall (and nice little improvement to use list(APPEND SDKCONFIG_DEFAULTS ...).
Just a few comments.
- Move the "generic" mpconfigboard.cmake files to per-chip files in the top-level board directory. - Replace all the copy-paste in other boards' mpconfigboard.cmake files to directly include those ones. - Rename sdkconfig.c3usb config file to sdkconfig.c3 as this file no longer contains any USB-specific config settings. This allowed deleting some other sdkconfig.board files which were copies of sdkconfig.c3usb. - Replace using set() to extend a list with CMake list(APPEND ...) The downside is a bit of extra complexity, and had to use a CMake function to opt-out of sdkconfig.spiram_sx on S2/S3 boards without SPIRAM. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au> Signed-off-by: Angus Gratton <angus@redyak.com.au>
276b99b to
cf80773
Compare
|
Thanks @dpgeorge. Have applied your suggestions, including a new commit to make a After you found some mistakes I ran a script to build all boards on this branch and master, and verified that the They're all identical except for |
Replaces the common practice of setting 80MHz & QIO flash in individual sdkconfig.board files. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
cf80773 to
d8c25b2
Compare
|
(Last push is only a trailing whitespace cleanup) |
dpgeorge
left a comment
There was a problem hiding this comment.
Thanks for updating, and for running a check on the sdkconfig being identical.
And good that the LOLIN_S2's are fixed.
Feel free to merge it.
Summary
This PR reduces copy-paste in the
mpconfigboard.cmakefiles, which makes it easier to apply config fixes/changes to all boards with a particular chip family.Also:
sdkconfig.c3usbconfig file tosdkconfig.c3as this file no longer contains any USB-specific config settings. This allowed deleting some othersdkconfig.boardfiles which were copies ofsdkconfig.c3usb.sdkconfig.flash_qio_80msnippet file.set()to extend a list in CMake withlist(APPEND ....)instead.This work was funded through GitHub Sponsors.
Testing
Ran a script to build all boards on this branch and master, and verified that the sdkconfig files were identical and the micropython.bin binary size was identical.
They're all identical except for LOLIN_S2_MINI and LOLIN_S2_PICO, because until now their sdkconfig.board files were not actually being applied. That's fixed now in this PR.
Trade-offs and Alternatives
sdkconfig.spiram_sxon S3 boards without SPIRAM.Possible future work