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 vector table relocation for NRF52 #6746

Merged
merged 1 commit into from Apr 30, 2018

Conversation

Projects
None yet
7 participants
@marcuschangarm
Contributor

marcuschangarm commented Apr 25, 2018

Description

The vector table relocation sequence depends on:

  1. Whether the SoftDevice is present.
  2. The Application is a bootloader or not.

If the SoftDevice is present and the application is a bootloader
the MBR must be initialized to trap SoftDevice service calls
before setting the new vector table address.

The SCB->VTOR must be set to point at the MBR as well.

If the SoftDevice is not present the SCB->VTOR can point at the
new vector table directly.

Pull request type

[x] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change
@marcuschangarm

This comment has been minimized.

Contributor

marcuschangarm commented Apr 25, 2018

@c1728p9

As we discussed. The MBR does not trap SoftDevice service calls if the UICR bootloader address is set hence the extra check.

@0xc0170 0xc0170 requested a review from c1728p9 Apr 26, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Apr 26, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Apr 26, 2018

Build : SUCCESS

Build number : 1863
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6746/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@marcuschangarm marcuschangarm force-pushed the marcuschangarm:fix-vector-relocation branch from 4660cdd to f98feeb Apr 26, 2018

@mbed-ci

This comment has been minimized.

@cmonr cmonr added needs: CI and removed needs: review labels Apr 27, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Apr 27, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Apr 27, 2018

Build : SUCCESS

Build number : 1869
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6746/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Apr 27, 2018

We should wait for nrf52 flash fix and restart CI right away then

Fix vector table relocation for NRF52
The vector table relocation sequence depends on:

1. Whether the SoftDevice is present.
2. The Application is a bootloader or not.

If the SoftDevice is present and the application is a bootloader
the MBR must be initialized to trap SoftDevice service calls
before setting the new vector table address.

The SCB->VTOR must be set to point at the MBR as well.

If the SoftDevice is not present the SCB->VTOR can point at the
new vector table directly.

@marcuschangarm marcuschangarm force-pushed the marcuschangarm:fix-vector-relocation branch from f98feeb to bb14051 Apr 27, 2018

@marcuschangarm

This comment has been minimized.

Contributor

marcuschangarm commented Apr 27, 2018

/morph build

1 similar comment
@cmonr

This comment has been minimized.

Contributor

cmonr commented Apr 27, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Apr 27, 2018

Build : SUCCESS

Build number : 1877
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6746/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@marcuschangarm

This comment has been minimized.

Contributor

marcuschangarm commented Apr 27, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Apr 27, 2018

Build : SUCCESS

Build number : 1879
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6746/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@marcuschangarm

This comment has been minimized.

Contributor

marcuschangarm commented Apr 28, 2018

/morph test

@mbed-ci

This comment has been minimized.

@adbridge

This comment has been minimized.

Contributor

adbridge commented Apr 30, 2018

@c1728p9 Could you please review this PR asap. Thanks

@adbridge adbridge added needs: review and removed needs: CI labels Apr 30, 2018

@theotherjimmy theotherjimmy merged commit d08c819 into ARMmbed:master Apr 30, 2018

12 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 10015 cycles (-163 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/littlefs Passed, code size is 10112B (+0.00%)
Details
travis-ci/tools Local tools testing has passed
Details
@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Apr 30, 2018

Depends on prior NRF52 stuff, going to 5.9.0-rc1

@marcuschangarm marcuschangarm deleted the marcuschangarm:fix-vector-relocation branch May 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment