-
Notifications
You must be signed in to change notification settings - Fork 3k
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
mbed toolchain emits broken elf file for STM32H743ZI2 #14711
Comments
I think this is also responsible for the NOCP crash seen in #13050 |
cc @ARMmbed/team-st-mcd |
@ARMmbed/team-st-mcd Is this correct? We got targets that have multiple ROM and I do not recall having issues with them.
Reading the guide, https://os.mbed.com/docs/mbed-os/v6.10/program-setup/creating-and-using-a-bootloader.html#unmanaged-bootloader - are you using managed or unmanaged bootloader? |
I don’t know how to answer that. If it’s using a bootloader at all is a surprise based on that documentation. Setting |
My inference that this is because of the multiple ROM regions is based on mbed-os/tools/toolchains/mbed_toolchain.py Lines 742 to 748 in a3be10c
|
Hi From CMSIS pack (input for pyOCD), STM32H743ZITx may be considered as multiple ROM regions:
But it is the same FLASH with 2 banks. In Mbed configuration, we squash it: |
Here's the BUILD directory I don't think they're getting squashed. In |
"-DMBED_ROM_SIZE=0x200000" => this is the size of full flash (squashed) "-DMBED_ROM1_SIZE=0x100000" => MBED_ROM1_SIZE is not used at all in linker scripts |
I guess I can't blame those defines, then. I mis-assumed If I hack To confirm, removing these two properties from the from pprint import pprint
attrs = {o.split(".")[1] for o in ROM_OVERRIDES}
pprint({
k:v for (k,v) in self.target.__dict__.items() if k in attrs
}) {'app_offset': None,
'bootloader_img': None,
'header_format': None,
'header_offset': None,
'mbed_app_size': None,
'mbed_app_start': None,
'mbed_rom_size': '0x200000',
'mbed_rom_start': '0x08000000',
'restrict_size': None} |
@rotu Please close if this is not an issue anymore |
@0xc0170 It's still an issue and I have no idea how to fix it.
|
Description of defect
Mbed Studio generates an elf file that unpredictably hard-faults (usually with a segfault) when you try to debug it (with Mbed Studio, or any other elf debugger)
This is because it creates
<mytarget>_application.elf
and<mytarget>.bin
file but no self-contained<mytarget>.elf
file. When Mbed Studio loads the<mytarget>_application.elf
for debug, it is missing the bootloader, which performs necessary initialization. This is true even if the target does not have theBOOTLOADER
feature, for theSTM_H743ZI2
chip because it has multiple ROM regions.Target(s) affected by this defect ?
NUCLEO_H743ZI2. Probably many others.
Toolchain(s) (name and version) displaying this defect ?
ARMC6
What version of Mbed-os are you using (tag or sha) ?
14e5d30
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
Mbed Studio 1.6.1
How is this defect reproduced ?
Build blinky on a NUCLEO-H743ZI2 and deploy it with the debug button.
The text was updated successfully, but these errors were encountered: