-
Notifications
You must be signed in to change notification settings - Fork 3k
Enable post build bootloader merging in uvision #10021
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
@bridadan, thank you for your changes. |
@bridadan This also requires the tools directory in the exported project. |
@theotherjimmy, very true. Is this currently omitted when exporting Mbed OS 5 projects from the online compiler? I realize the tools directory would not be present in Mbed OS 2 projects, but those projects can't/shouldn't be using managed bootloader? |
@bridadan Yes, there is an |
@bridadan mbed2 docs don't say anything about managed bootloader mode, but nothing is stopping them from using it. I don't think we need to worry about that though. |
Crud you're right. Well I'm open to suggestions! It may be that this is only possible to achieve offline. |
90eb3e5
to
0d77cb2
Compare
|
Actually that definitely wouldn't work as is, the post build script has dependencies in the rest of the config system. The way I see it, my options are:
Any thoughts on the above options? |
@bridadan I'm down for 3. 1 would need to require that the script is actually not duplicated. I'm not sure that 2 is a good idea. Recent refactors have taken the direction of migrating files into the Resources style of working, so adding yet another way to do the same thing feels like adding tech debt to me. |
Ok cool, I'll go with 3 then. |
Note to self: update the release notes in the PR description |
@bridadan This needs a rebase. |
0d77cb2
to
63155db
Compare
Ok @theotherjimmy, I've implemented the option we discussed above (choice 3). I've also updated the release notes to reflect these new changes. |
merge_region_list was changed to do some extra checks regarding the different regions. It only was checking the "restrict_size" parameter and not the whole config option. So this reduces the argument down to just this value. This makes it easier to serialize the data needed for post build steps after being built in an exported project.
These files are used when the post build script is enabled to support projects that are using managed bootloader mode.
Projects that are zipped are typically from the online compiler or they are meant to be used in a separate environment. Since the postbuild script requires the Mbed OS tools to present in the project, we will disable the postbuild script when the project is exported to a zipped project.
63155db
to
fb6fcc5
Compare
Ci started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Description
This PR enables the following:
This could probably use some more testing on my end. I recently had to a big rebase to get this up to speed with master and the application I was using to test is not compatible with the master branch.Fairly confident this is now in working order after doing quite a bit of testing offline. There are some other issues with the uvision exporter at the moment. Some of them are being addressed in #10045 (which this PR depends on). I've raised #10045 separately because those fixes are higher priority than the feature added in this PR.
Pull request type
Reviewers
@theotherjimmy @SenRamakri @dlfryar
Release Notes
Offline projects that use the managed bootloader mode (as is the case for all Pelion Device Management projects using the update capability) should now be able to export and debug properly in uVision. A post build script is now enabled which takes care of the header generation, binary merging, and loading of the correct symbols for your application. This only allows debugging the application, not the bootloader.
Note: This feature is only enabled when exporting offline with Mbed CLI. This is because the post build script has a dependency on the Mbed OS tools and their Python dependencies. This means projects exported from the Online Compiler will not be able to use this capability.