-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cpu/esp_common: fix the dependency of the flash image on the ELF file #14041
cpu/esp_common: fix the dependency of the flash image on the ELF file #14041
Conversation
Flashing an ESP board first requires the creation of a flash image from the ELF file. This is realized in the `preflash` target. However, the `preflash` target only depends on the variable `BUILD_BEFORE_FLASH` but on the ELF file. Therefore, the variable `BUILD_BEFORE_FLASH` must be set to the ELF file to ensure that when using multiple make processes, the compilation of the ELF file is completed before the flash image is created.
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.
Thank you for investigating this!
Now make -j flash
works reliable as it should.
This broke "make flash-only". |
This is on master:
|
Maybe FLASH_FILE should be the .bin? The compile worker could then create that. Lines 583 to 585 in 2444f06
|
I'm under pressure due to the online summer term so that I'm not able to spend time at the moment. Maybe, we should revert this commit for the moment and reopen issue #13492. |
Contribution description
This PR fixes the dependency of the flash image on the ELF file for the ESP* make system.
Flashing an ESP board first requires the creation of a flash image from the ELF file. This is realized in the
preflash
target. However, thepreflash
target only depends on the variableBUILD_BEFORE_FLASH
but on the ELF file. Therefore, the variableBUILD_BEFORE_FLASH
must be set to the ELF file to ensure that when using multiple make processes, the compilation of the ELF file is completed before the flash image is created.Testing procedure
examples/hello-world
runmake BOARD=esp32-wroom-32 -j flash term
.main.c
, better yet print it in awhile(1)
loop.make BOARD=esp32-wroom-32 -j flash term
againIssues/PRs references
Fixes #13492