-
Notifications
You must be signed in to change notification settings - Fork 3k
STM32L1 Flash API and xDot bootloader support #4640
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
@chrissnow thanks for pushing this support. I'll make a short review of it. |
return 0; | ||
} | ||
|
||
uint32_t flash_get_sector_size(const flash_t *obj, uint32_t address) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the formatting for some functions, {
for the body of the function starts on the new line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LMESTM this was taken from the L0 so should probably go there too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrissnow ok thanks !
@LMESTM results from tests
@0xc0170 formatting has been tidied as requested. |
I have a couple comments/questions:
|
@mfiore02
if MTS make their own you would just point that to your bootloader bin, the build tools then seem to find its size, sort's out the linker etc then merge it at the end. without "target.bootloader_img" nothing changes. MTS would just need to default that to your bin. The bootloader build uses mbed_app.json again but just to fix the size of the bootloader so it can be padded.
I forgot to sort out GCC + IAR linker, I will take a look tonight. I hope that makes some sense! |
@chrissnow thanks, that answers my questions. I'm OK with these changes once GCC is added as a build option. |
@chrissnow I would like to see IAR supported as well, as supporting only ARM and GCC_ARM could lead to hard to debug failures when someone attempts to use this bootloader support on IAR. |
LGTM! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only 2 comments in code to be removed or updated
|
||
uint32_t flash_get_sector_size(const flash_t *obj, uint32_t address) | ||
{ | ||
/* considering 1 sector = 1 page */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is not valid.
Tt actually comes from L4 where the assumption is true.
Then the code was copied and modified for L0 where all sectors are 32 pages - so the comment should have been removed in L0 - I will do it.
Now this is copied in L1 but is not true either - so needs to be removed
|
||
uint32_t flash_get_page_size(const flash_t *obj) | ||
{ | ||
/* considering 1 sector = 1 page */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@LMESTM comments removed as requested. |
@chrissnow I merged #4610 and it has caused a merge conflict on this PR. Could you rebase? |
@chrissnow It looks like something went wrong with your rebase. We cannot backport to a release any PRs that have merge commits on them. Could you rebase to remove that merge commit? |
@theotherjimmy yes that didn't do what I was expecting! |
I recommend marking the current branch with another branch in case things don't go as planned again. |
@theotherjimmy any suggestions for what git commands to run? I seems to be digging a bigger hole at the moment! |
I'd try git branch xDot-Bootloader-bak
git fetch origin
git rebase origin/master Assuming that origin points to ARMmbed/mbed-os. |
thoughts on this?
|
@chrissnow Something looks wrong. You should not need to apply that patch; it's already on master. |
I'm going to give it a go real quick. I'll link my branch if I succeed |
@chrissnow I think that's related to doing I corrected it by aborting the rebase ( |
@theotherjimmy I hope that is now sorted out, Thanks for the assistance. |
@chrissnow It looks like you pulled and merged instead of force pushing. |
You end up with a merge commit, and duplicate commits that way! |
Supposing that the log up to 4b59838 is correct:
checkout out the repo just before the merge commit, and after the rebase
Kill the old branch
recreate the branch using the correct head
Push the new history to this PR (supposing that chrissnow is the remote for chrissnow/mbed-os) |
b684d2a
to
4d59838
Compare
Attempt to add flash API but not working properly
45b7dd0
to
2a2d904
Compare
@theotherjimmy this should be good to go now #4666 is merged. |
@chrissnow Agreed. Removing preceding PR tag /morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
STM32L1 Flash API and xDot bootloader support
STM32L1 Flash API and xDot bootloader support
Description
Flash API for STM32L1
xDot support for bootloaders
Status
READY
in support of #4534