-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Update dependencies rebased #10409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update dependencies rebased #10409
Conversation
- Added TOML-based board configuration - Created generator scripts and tests - Implemented GitHub Actions workflow - Added documentation
- Added comprehensive settings.md with detailed examples - Organized pin definitions and peripheral configurations - Included test cases for frozen modules - Restructured board config files into board_config directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an interesting idea: a single config file that is a board definition.
However, there are many cases in current board definitions that are not covered in the board definitions or the script to generate the board definition. As an example, there are no provisions for pin aliases, special naming conventions, etc. For example, all GPIO pins are named GPIO<n>
which is not always the case at all. Also, for example, board.I2C()
is always included, even if there are no I2C pins.
The .mpy files in shared-module
should not be there.
I don't think TOML is a good choice for a single board definition file. Using Python or some more powerful language that could do conditionals would make more sense.
It appears that this code was generated by AI, without good review.
We would not be able to accept this PR in its current form.
Closing for now. |
Note, the Zephyr port has more minimal TOML board definitions by relying mostly on zephyr's own board definitions. See https://github.com/adafruit/circuitpython/blob/main/ports/zephyr-cp/boards/nordic/nrf5340dk/circuitpython.toml as an example. |
CircuitPython Board Configuration System
This system allows board configurations to be defined using a single
board_setting.toml
file,which is then automatically converted into the required C and Makefile configurations.
File Structure
board_setting.toml
- Main configuration filegenerate_board_config.py
- Generator scripttest_board_config.py
- Test scriptboard_template.toml
- Template with all available optionsUsage
board_setting.toml
in your board directory following the templatempconfigboard.h
mpconfigboard.mk
pins.c
board.c
GitHub Integration
The
.github/workflows/board_builder.yml
workflow will automatically:board_setting.toml
filesTesting
To test the configuration generator:
Adding a New Board
board_template.toml
toports/<port>/boards/<new_board>/board_setting.toml
Best Practices