-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
ports/esp32: Add per-board configs (same as other ports). #4991
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
Conversation
Looks good @jimmo, it'll be a useful addition to the ESP32 port! |
Do we have version numbers for MicroPython releases? This is a breaking change for anyone that uses SDKCONFIG= on their Edit: I imagine the version numbers apply to the final micropython binary and not the process of building it. So there is no way to indicate that this breaks some things in the make process. Edit2: Perfect, thanks for thinking ahead on that. |
f1bd7df
to
ce8bccb
Compare
@jimmo Its hard to tell what changes you made because you push forced the branch instead of just committing and pushing (which Github will track). Did you add the board prefix as intended? I am not seeing a difference. |
No, I added If you want to use an out-of-tree board defn, use: |
I see! Thanks for your help, this is working as I'd expect now. Where I have mpconfigboard.mk SDKCONFIG += /builder/micropython/ports/esp32/boards/sdkconfig.base
SDKCONFIG += /builder/micropython/ports/esp32/boards/sdkconfig.spiram
SDKCONFIG += $(BOARD_DIR)/../sdkconfig.crashdebug
SDKCONFIG += $(BOARD_DIR)/../sdkconfig.ipcextended
LD_FILES = $(BOARD_DIR)/../custom.ld
PART_SRC = $(BOARD_DIR)/../partitions.ident.csv mpconfigboard.h #define MICROPY_HW_BOARD_NAME "NODE"
#define MICROPY_HW_MCU_NAME "NODULE"
#define MODULE_DEEPSLEEP_STUB_ENABLED (1)
#define MICROPY_ESP32_MACHRTC_MEM_USER_MAXLEN (0) Cheers! |
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.
Really great, thanks!
ports/esp32/.gitignore
Outdated
@@ -0,0 +1 @@ | |||
build-*/ |
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.
How about we just add this to the top-level .gitignore? That would simplify other ports, eg could remove ports/stm32/.gitignore
and simplify ports/unix/.gitignore
.
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.
Done.
@@ -466,6 +494,7 @@ OBJ = $(OBJ_MP) | |||
|
|||
APP_LD_ARGS = | |||
APP_LD_ARGS += $(LDFLAGS_MOD) | |||
APP_LD_ARGS += $(addprefix -T,$(LD_FILES)) |
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.
What's LD_FILES
intended to be used for? The esp32 is very specific about the linking phase, although I guess the user could add some additional bits if they really need to.
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.
@nevercast asked for it. My guess is that it might be related to the rtc mem stuff.
@@ -0,0 +1,2 @@ | |||
#define MICROPY_HW_BOARD_NAME "GENERIC" |
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.
I think it'd be good to retain the existing name of "ESP32 module". a bit more user friendly.
OTOH using GENERIC signifies that the build is a generic one and then the user knows exactly where to locate the build settings for the build (ie in the boards/GENERIC dir).
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.
Agreed. I've changed it but kept the dir as GENERIC
. A quick grep
for "ESP32 module" will resolve any confusion I hope.
Replaces the `SDKCONFIG` makefile variable with `BOARD`. Defaults to BOARD=GENERIC. spiram can be enabled with `BOARD=GENERIC_SPIRAM` Add example definition for TINYPICO (currently identical to GENERIC_SPIRAM, but with custom board/mcu names for the uPy banner) Next step is to add board pins (i.e. make-pins.py).
ce8bccb
to
2708bd0
Compare
Rename rainbow to rainbowio
Replaces the
SDKCONFIG
makefile variable withBOARD
. Defaults to BOARD=GENERIC. spiram can be enabled withBOARD=GENERIC_SPIRAM
Add example definition for TINYPICO (currently identical to GENERIC_SPIRAM, but with custom board/mcu names for the uPy banner)
Next step is to add board pins (i.e. make-pins.py).