esp32/Makefile: Include all driver/*.c in build. Fixes #4869#4874
esp32/Makefile: Include all driver/*.c in build. Fixes #4869#4874nevercast wants to merge 1 commit intomicropython:masterfrom
Conversation
|
It could be an improvement that more directories automatically include their .c/.o files. Not just ESPIDF_DRIVER, but I felt that was out of scope for this change. I want to keep this PR small since its blocking me downstream from being synced to #master. We can discuss making this change more generic in a follow up issue, if that is of interest. |
There was a problem hiding this comment.
How about combining this into one declaration, to avoid the need to define ESPIDF_DRIVER_C?
There was a problem hiding this comment.
Honestly, I don't know how to get make to do that in one line. It seems to evaluate the replace before the wildcard, and just breaks.
If you know how, shoot. Otherwise, I'll look in to it further.
There was a problem hiding this comment.
Try using patsubst, see py/py.mk for examples.
There was a problem hiding this comment.
Its one line now.
There was a problem hiding this comment.
patsubst needs the whole path to be satisfied which elongates the line by a substantial amount, even with the $(ESPCOMP) variable. subst, though not as safe, seems perfectly sufficient.
e2610c5 to
49f2b09
Compare
49f2b09 to
3a6fc47
Compare
|
Whoops, misunderstanding regarding real name and real email. This PR should be all good. |
|
A last minute thought, do you want me to rebase this on top of your travis changes so that we get an ESP32 build confirmation? |
No it's ok, I'll test and rebase during merging. |
Great, thanks. |
|
Thanks for the work, merged in 2f262d5 |
|
Thanks for reviewing and merging, I'm happy to say we are now tracking micropython#master again 👍 |
For RP2040 boards, we now change the default flash size based on the configured flash. We will still try to read the size from the flash first. Fixes micropython#4874
Small change to import all drivers in the ESP32 port. This allows writing modules, internally or externally with the cmodules functionality that can use these ESP32 drivers.
For me personally, this allows me to write a cmodule that uses the I2S peripheral without modifying the Makefile.
A snippet of the
makeprocess showing the files included:Here is a screenshot of me initializing the I2S hardware via MicroPython, possible due to this change. (Python & CModule library not provided)

Discussion and issue initially raised here: #4869