-
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/esp32: build the SDK bootloader from source #17457
Closed
gschorcht
wants to merge
6
commits into
RIOT-OS:master
from
gschorcht:cpu/esp32/sdk-compile-bootloader
Closed
cpu/esp32: build the SDK bootloader from source #17457
gschorcht
wants to merge
6
commits into
RIOT-OS:master
from
gschorcht:cpu/esp32/sdk-compile-bootloader
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gschorcht
requested review from
cgundogan,
jia200x and
leandrolanzieri
as code owners
December 31, 2021 09:45
github-actions
bot
added
Area: build system
Area: Build system
Area: cpu
Area: CPU/MCU ports
Area: doc
Area: Documentation
Area: Kconfig
Area: Kconfig integration
Area: pkg
Area: External package ports
Area: tools
Area: Supplementary tools
Platform: ESP
Platform: This PR/issue effects ESP-based platforms
labels
Dec 31, 2021
gschorcht
added
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
CI: run tests
If set, CI server will run tests on hardware for the labeled PR
Type: new feature
The issue requests / The PR implemements a new feature for RIOT
labels
Dec 31, 2021
gschorcht
force-pushed
the
cpu/esp32/sdk-compile-bootloader
branch
from
December 31, 2021 15:09
6f9946f
to
f6c8102
Compare
gschorcht
added
State: WIP
State: The PR is still work-in-progress and its code is not in its final presentable form yet
and removed
CI: run tests
If set, CI server will run tests on hardware for the labeled PR
labels
Dec 31, 2021
gschorcht
force-pushed
the
cpu/esp32/sdk-compile-bootloader
branch
5 times, most recently
from
January 1, 2022 16:34
783f1aa
to
dcbd1fd
Compare
github-actions
bot
added
the
Area: CI
Area: Continuous Integration of RIOT components
label
Jan 1, 2022
gschorcht
force-pushed
the
cpu/esp32/sdk-compile-bootloader
branch
from
January 1, 2022 16:55
dcbd1fd
to
ad745cc
Compare
gschorcht
added
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
CI: full build
disable CI build filter
and removed
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
CI: full build
disable CI build filter
labels
Jan 1, 2022
gschorcht
force-pushed
the
cpu/esp32/sdk-compile-bootloader
branch
2 times, most recently
from
January 2, 2022 06:32
8b10670
to
08df5cc
Compare
gschorcht
removed
the
State: WIP
State: The PR is still work-in-progress and its code is not in its final presentable form yet
label
Jan 2, 2022
gschorcht
force-pushed
the
cpu/esp32/sdk-compile-bootloader
branch
from
January 4, 2022 15:02
08df5cc
to
bf770fa
Compare
github-actions
bot
added
Area: arduino API
Area: Arduino wrapper API
Area: boards
Area: Board ports
Area: sys
Area: System
labels
Jan 4, 2022
gschorcht
force-pushed
the
cpu/esp32/sdk-compile-bootloader
branch
from
January 4, 2022 15:38
bf770fa
to
acc093a
Compare
github-actions
bot
removed
Area: boards
Area: Board ports
Area: sys
Area: System
Area: arduino API
Area: Arduino wrapper API
labels
Jan 4, 2022
gschorcht
force-pushed
the
cpu/esp32/sdk-compile-bootloader
branch
from
January 7, 2022 05:02
acc093a
to
045c551
Compare
Only formatting issues solved, no content changes.
Up to now, there were four versions of prebuilt bootloaders for the ESP32 with different settings of logging and color logging. These bootloaders were manually built from the SDK and shipped with RIOT-OS source code. However there are more settings that affect the bootloader build that are relevant to the app or final board that uses this bootloader. This commit builds the `bootloader.bin` file from the ESP32 SDK source code. It is built as a module `esp_bootloader` which at the moment doesn't generate any object code for the application and only produces a `bootloader.bin` file set to the `BOOTLOADER_BIN` make variable for the `esptool.inc.mk` to flash.
In ESP-IDF archives are generated for all components. The ld script for the bootloader uses archive names of some components to place data and code to the first 64 kByte of IRAM. Since RIOT uses object files instead of archives, the ld script for the bootloader has to modified.
gschorcht
force-pushed
the
cpu/esp32/sdk-compile-bootloader
branch
from
January 24, 2022 20:25
045c551
to
713343c
Compare
This was now merged as part of #17601 right? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: build system
Area: Build system
Area: CI
Area: Continuous Integration of RIOT components
Area: cpu
Area: CPU/MCU ports
Area: doc
Area: Documentation
Area: Kconfig
Area: Kconfig integration
Area: pkg
Area: External package ports
Area: tools
Area: Supplementary tools
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Platform: ESP
Platform: This PR/issue effects ESP-based platforms
Type: new feature
The issue requests / The PR implemements a new feature for RIOT
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
As follow-up to PR #17043 this PR provides the ESP32 bootloader as module which is compiled from SDK sources.
Up to now, there were four precompiled versions of bootloaders (
bootloader.bin
) for different settings of logging and colored logging but with a fix size of flash and a fix UART baudrate. To change these parameters, the bootloader has to be recompiled. However there are more settings that affect the bootloader build that might be relevant to the app or final board that uses this bootloader.This PR builds the
bootloader.bin
file from the ESP32 SDK sourc as a moduleesp_bootloader
. It doesn't generate any object code for the application and only produces abootloader.bin
file set to theBOOTLOADER_BIN
make variable for theesptool.inc.mk
to flash.This PR includes #17455 for the moment to be compilable (commits fded044 b639123 8a84085 3b4c5e9 0c56a2d).
Testing procedure
Use command
and press RESET. The second-stage output should be seen in color. The first-stage bootloader and the application output is seen as garbage since they use a 115200 as baudrate.
Issues/PRs references
Depends on PR #17455
Follow-up to PR #17043