Skip to content
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

Fix assembly sequence to start bootloader in GCC #64

Merged
merged 2 commits into from
Nov 13, 2015
Merged

Fix assembly sequence to start bootloader in GCC #64

merged 2 commits into from
Nov 13, 2015

Conversation

andresag01
Copy link

The assemble sequence within an mbedOS application that starts the nordic bootloader was being modified by the compiler. The result is that DFU enabled applications could never start the bootloader correctly. This is because the GCC compiler was translating a MOV instruction into a ADDS, which sets the conditional flags in APSR before a conditional branch was executed. The result of the incorrect branch caused the program to believe that it was in interrupt mode when this was not the case.
@rgrover

Andres Amaya Garcia added 2 commits November 13, 2015 10:35
The assemble sequence within an mbedOS application that starts the nordic
bootloader was being modified by the compiler. The result is that DFU enabled
applications could never start the bootloader correctly. This is because the
GCC compiler was translating a MOV instruction into a ADDS, which sets the
conditional flags in APSR before a conditional branch was executed. The result
of the incorrect branch caused the program to believe that it was in interrupt
mode when this was not the case.
Change assembly sequence that starts the Nordic bootloader to remove
MOV instruction before cheks of IPSR. The MOV might be translated into a ADDS
that could change the APSR and cause a wrong branch to be taken.
@rgrover
Copy link
Contributor

rgrover commented Nov 13, 2015

this fixes ARMmbed/ble-examples#16

@rgrover
Copy link
Contributor

rgrover commented Nov 13, 2015

@LiyouZhou : note: here's a modification/fix to a file which came from the NordicSDK

rgrover added a commit that referenced this pull request Nov 13, 2015
Fix assembly sequence to start bootloader in GCC
@rgrover rgrover merged commit ba82462 into ARMmbed:develop Nov 13, 2015
@rgrover
Copy link
Contributor

rgrover commented Nov 13, 2015

published new ble-nrf51822

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants