-
-
Notifications
You must be signed in to change notification settings - Fork 81
bricks/ev3: use .elf instead of uImage #318
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
Conversation
Replace creating a uImage with using the .elf file directly for the EV3 firmware. This simplifies the build process and avoids the need for u-boot-tools. U-Boot already knows how to load the .elf file, so we can use it directly by using `bootelf` instead of `bootm` (this change was made in the pybricks/v2.0.0 release of u-boot). In order to keep the size of the .elf file small, we do not enable `-ffunction-sections` and `-fdata-sections` for the EV3 firmware. This avoids the large tables of section names that are generated by these flags, which would otherwise increase the size of the .elf file by nearly 200 kB. The .elf file is still a bit larger than the uImage because of a bit more overhead, but only by less than 4kB.
You should be able to fix this with an appropriate linker script, which can also be used to keep important functions so that they are not dropped. I can look into this later if we are really trying to keep code sizes down. |
Thanks, but I'm happy with how it turned out. |
|
My stupid mistake. Must have used the wrong sensorport (not S1)
EV3 debug console[EDIT] Maybe this should be added to issue 2256 |
Replace creating a uImage with using the .elf file directly for the EV3 firmware. This simplifies the build process and avoids the need for u-boot-tools. U-Boot already knows how to load the .elf file, so we can use it directly by using
bootelfinstead ofbootm(this change was made in the pybricks/v2.0.0 release of u-boot).In order to keep the size of the .elf file small, we do not enable
-ffunction-sectionsand-fdata-sectionsfor the EV3 firmware. This avoids the large tables of section names that are generated by these flags, which would otherwise increase the size of the .elf file by nearly 200 kB. The .elf file is still a bit larger than the uImage because of a bit more overhead, but only by less than 4kB.