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

nRF5x: pass ram linker start/length from config system #7957

Merged
merged 2 commits into from Oct 1, 2018

Conversation

Projects
None yet
7 participants
@andrewleech
Contributor

andrewleech commented Sep 3, 2018

Description

The ram start and length settings can already be defined in targets.json with mbed_ram_start and mbed_ram_size etc.

These are supposed to be used in nrf5x targets to specify in the linker how much ram is set aside for the softdevice. Unfortunately the linker files have these values defined in directly so they can't be overridden by the target settings.
This PR fixes the problem by simply checking if the defines are already set before setting them in the linker scripts.

There was also a minor bug in the python config handler where these boot-loader target settings in were being overridden by a later part of the config system with None. This is also fixed.

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change
@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Sep 10, 2018

Thanks for fixing that config system bug. Nice diff!

@theotherjimmy

Just for tools changes.

@TacoGrandeTX

Looks good.

@TacoGrandeTX

This comment has been minimized.

Contributor

TacoGrandeTX commented Sep 13, 2018

@andrewleech In light of #7959 could you recommend how this should be merged?

@andrewleech

This comment has been minimized.

Contributor

andrewleech commented Sep 14, 2018

I've using both of these MR's together in my working branch, they're quite complimentary.

This MR allows the project to set where the start address should be, the other one ensures that the correct start address is passed to the softdevice.

I did consider making the other one work from this config system define rather than the linker element, but decided to leave it as the linker symbol as it's a smaller change to the existing nordic code and it should be safer, the symbol used is just in nordic linker scripts so is less likely to be accidentally changed in a breaking way than the config system symbol which is used for all targets.

@0xc0170 0xc0170 added the needs: CI label Sep 18, 2018

@0xc0170 0xc0170 added needs: work and removed needs: CI labels Sep 18, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Sep 18, 2018

This needs a rebase, will be scheduled for CI afterwards

Ensure target bootloader settings can be overridden in mbed_app.json
Values like `target.mbed_rom_start` were being replaced by None and then ignored.

@andrewleech andrewleech force-pushed the andrewleech:nrf_override_ram_linker branch from 0288af6 to f553f26 Sep 19, 2018

@andrewleech andrewleech force-pushed the andrewleech:nrf_override_ram_linker branch from f553f26 to a0d7d4e Sep 19, 2018

@andrewleech

This comment has been minimized.

Contributor

andrewleech commented Sep 20, 2018

@0xc0170 I've rebased, should be good to go.

The travis failure above looks pretty unrelated:

The command "W: Failed to fetch http://www.apache.org/dist/cassandra/debian/dists/39x/InRelease Could not connect to www.apache.org:80 (95.216.24.32), connection timed out [IP: 95.216.24.32 80]" failed. Retrying, 2 of 3.

@0xc0170 0xc0170 added needs: CI and removed needs: work labels Sep 20, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Sep 27, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Sep 27, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Sep 27, 2018

/morph mbed2-build

@cmonr cmonr added ready for merge and removed needs: CI labels Sep 28, 2018

@0xc0170 0xc0170 merged commit 0ded1fa into ARMmbed:master Oct 1, 2018

14 checks passed

ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed , RTOS ROM(+0.0%) RAM(+0.0%)
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/cloud_client_smoke_test Test job: successful
Details
travis-ci/astyle Passed, 605 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 9122 cycles (-157 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8372B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

@0xc0170 0xc0170 removed the ready for merge label Oct 1, 2018

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