-
Notifications
You must be signed in to change notification settings - Fork 3k
Add post-build hook white-list to exporters #3875
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
Add post-build hook white-list to exporters #3875
Conversation
@ilg-ul I added a white-list of supported post-binary hooks to the GNU ARM Eclipse exporter. Could you verify that It's correct? |
ffa4b15
to
72ae60d
Compare
In particular, this was triggered by the MTS_mDot_F411RE having a particularly involved post-binary hook. Old support:
New support:
|
I'm afraid I can't be of much help, I do not know when these hooks are used :-( does your patch mean that only projects with TEENSY3_1Code.binary_hook will be exported? |
Yes. Additionally, targets that do not define a post-binary hook will be exported (this should include most targets). |
The hooks are here: https://github.com/ARMmbed/mbed-os/blob/master/tools/targets.py#L337-L500 They are free to import anything though, so there may be some references to other files. |
The post-binary hooks are run by the build system after generating a |
I understand 'targets that do not define a post-binary hook', but what does the TEENSY3_1Code.binary_hook exactly do? generate the .bin file? if so, this is covered by the plug-ins, but it is not absolutely guaranteed, since the user can change the settings. I'm not familiar with your flashing procedures, is the .bin mandatory? my recommendation is to directly program the .elf, preferably with a J-Link; NUCLEO boards can be reprogrammed to implement J-Link instead of ST-LINK. |
Generates an intel hex format executable. that's it.
Most targets are capable of flashing
If you are programming directly from the |
I guess the HEX is also generated by default, with the current configuration, but you need to check.
I'm afraid these are mbed specifics, and I have no experience with them. the GNU ARM Eclipse build plug-ins do not have any requirements, by default they generate whatever the toolchain generate, which for most toolchains is .elf, and also the plug-ins provide several extra steps to generate the listing, to generate a binary and to show the size (with all last 3 being optional). the GNU ARM Eclipse debugging plug-ins (J-Link, OpenOCD and QEMU) usually take an ELF and directly program the flash, but again, this is plug-in / JTAG specific. |
Thanks @ilg-ul. Given that the intension is to use an Eclipse debugging plug-in, I'm going to add |
We have scripts (written in python) that are run after a binary image is created in the tools. These scripts are not really exportable, as they are part of the tools and may include and use any bits of python code they please. So we don't export them. This patch disables export combinations that would not work because the post-binary hook is not exported. A white-list is used for forward compatibility.
72ae60d
to
fcef9a7
Compare
/morph export-build |
you certainly know better. :-) also please note that the Eclipse debugging plug-ins know nothing about bootloaders and such special configurations, and usually not mastering these details is a certain cause of failures. |
Yeah. That's part of the motivation for this patch actually. Some bootloaders check CRCs that are added by post-binary hooks. This patch disables export for all targets like that. |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 132 All exports and builds passed! |
We have scripts (written in python) that are run after a binary image is
created in the tools. These scripts are not really exportable, as they
are part of the tools and may include and use any bits of python code
they please. So we don't export them. This patch disables export
combinations that would not work because the post-binary hook is not
exported. A white-list is used for forward compatibility.