- Notifications
You must be signed in to change notification settings - Fork27
Use new binutils gdb#88
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or 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
Espressif has switched from the binutils-esp32ulp repo (the originalfork of binutils to support their microcontrollers) to their newrepo binutils-gdb. (seeespressif/esp-idf@a9bd454)The ESP-IDF also uses the esp32ulp assembler/linker from the newrepo now. The main difference is that this is now the officiallymaintained implementation. The other difference is that there are nownot different binaries for each esp32 variant, but one set of binaries.To select which esp32 variant to target, the esp32ulp-elf-as binarynow accepts the --mcpu argument, for example --mcpu=esp32s2. Thedefault is still the original esp32, so omitting the argument meansone effected selected --mcpu=esp32.Note: Because Espressif provides pre-built binaries we are no longerbuilding esp32ulp, but simply downloading the binaries and usingthose.
The examples from the testsuite are the same as in the previousbinutils-esp32ulp repo from Espressif. But since the old repowill no longer be maintained, we switch to the new one.Currently all development happens on the esp32ulp-elf-2.35 branchand master does not (yet?) contain any files related to theEspressif-adapted assembler/linker. So we use this branch for now.Given that the branch name includes what appears to be a versionnumber, it could mean Espressif might switch to a different branchdown the line. We should pay attention to this and can then chooseto switch to that branch too.
When using binutils-gdb (esp32ulp) to generate the "reference binary",which we compare against, pass --mcpu=esp32 to select the originalESP32 variant. While this is the default target of esp32-ulp-as,adding this argument makes the choice explicit and shows how to selecta variant, for when we add support the ESP32-S2 or ESP32-S3 (bothuse --mcpu=esp32s2 because their ULPs have the same binary format).
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
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.
This is a precursor step to adding support for the ULP-FSM of the ESP32-S2/S3.
This change changes where we get the esp32ulp assembler/linker from:
Espressif moved where they maintain the ULP assembler (seeespressif/esp-idf@a9bd454), and this changes switches to the new esp32ulp assembler/linker, which is also what the latest ESP-IDF uses.
Since Espressif publishes a list of pre-built tools, which includes the esp32ulp assembler/linker, we now download the pre-built binaries, rather than building them ourselves.
The new esp32ulp assembler/linker only has a single set of binaries across all esp32 variants, and esp32ulp-elf-as accepts the --mcpu argument to select the specific variant.
For now we explicitly choose --mcpu=esp32 (even though that is the default) in our existing tests, but when adding support for the S2 (and S3, which has the same binary format) we can simply specify --mcpu=esp32s2 in the tests that target the S2.