Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ports/esp32/Makefile: Now supports BOARD_DIR #10281

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

Closed

Conversation

chrisovergaauw
Copy link
Contributor

@chrisovergaauw chrisovergaauw commented Dec 20, 2022

in order to support a Makefile idential to esp8266 two things had to happen.

  1. Add identical Makefile changes as below.
# micropython/ports/esp8266/Makefile
BOARD_DIR ?= boards/$(BOARD)
ifeq ($(wildcard $(BOARD_DIR)/.),)
$(error Invalid BOARD specified: $(BOARD_DIR))
endif
  1. esp32/Cmakelist.txt (a file which does not exist for the esp8266 port) could not handle relative paths which is required to make the default GENERIC example work. that's why it converts relative paths to absolute ones, with PORT_DIR as base.

@chrisovergaauw chrisovergaauw force-pushed the esp32/BOARD_DIR branch 5 times, most recently from c408af8 to ff4bc12 Compare December 20, 2022 15:20
In order to support BOARD_DIR, the underlying CMakeLists.txt
now accepts relative path for BOARD_DIR.
@chrisovergaauw
Copy link
Contributor Author

There's one odd thing about BOARD_DIR support for the esp32 that would need to be documented somewhere.

The location of CONFIG_PARTITION_TABLE_CUSTOM_FILENAME in sdkconfig.board is currently relative to a variable called PROJECT_DIR when it's not a full path. It would make a lot more sense to be relative to the BOARD_DIR. You can get around it for now by using this: CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="${MICROPY_BOARD_DIR}/your-partitions.csv"

@jimmo
Copy link
Member

jimmo commented Feb 21, 2023

Thanks @chrisovergaauw -- I have integrated this into #10802 which fixes the long-standing issue of having to duplicate the board name twice when doing this on the Makefile ports.

It would make a lot more sense to be relative to the BOARD_DIR.

I'm not sure what the right answer is here. I think it should be explicit -- i.e. use ${MICROPY_BOARD_DIR} or ${MICROPY_PORT_DIR} explicitly when referring to files.

@dpgeorge
Copy link
Member

Implemented slightly differently in 742037e

@dpgeorge dpgeorge closed this Feb 22, 2023
tannewt added a commit to tannewt/circuitpython that referenced this pull request Apr 24, 2025
Increase CFG_TUH_ENUMERATION_BUFSIZE so that USB devices with long descriptors are recognized
tannewt added a commit to tannewt/circuitpython that referenced this pull request Apr 25, 2025
This frees up more RAM for other things.

RAM started overflowing with micropython#10281
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants