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

Update linker scripts for bootloader target L496GZ #8508

Merged
merged 4 commits into from Oct 25, 2018

Conversation

Projects
None yet
6 participants
@micgur01
Contributor

micgur01 commented Oct 23, 2018

Description

Add MBED_APP_START and MBED_APP_SIZE to linker script so the start and size of an image can be specified. This allows the ROM to be split into a bootloader region and an application region.
Tested on NUCLEO_L496ZG, had to build bootloader as well with this fix.

Pull request type

[ ] Fix
[ ] Refactor
[x] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 23, 2018

@micgur01 Would you mind mentioning in the PR description what was updated instead of just mentioning that they were updated

@@ -1,7 +1,10 @@
if (!isdefinedsymbol(MBED_APP_START)) { define symbol MBED_APP_START = 0x08000000; }
if (!isdefinedsymbol(MBED_APP_SIZE)) { define symbol MBED_APP_SIZE = 0x80000; }

This comment has been minimized.

@jeromecoutant

jeromecoutant Oct 23, 2018

Contributor

Not 0x100000 ?

This comment has been minimized.

@micgur01

micgur01 Oct 24, 2018

Contributor

That's the previous value, maybe it's a other issue - but not familiar enough with details
The change only not to be hardcoded

This comment has been minimized.

@jeromecoutant

jeromecoutant Oct 24, 2018

Contributor

That's the previous value

No... it was 0x100000
define symbol region_ROM_end = 0x08000000 + 0x100000 - 1;

This comment has been minimized.

@micgur01

micgur01 Oct 24, 2018

Contributor

you are right, checking
maybe i took it from other target ( 429)

@cmonr cmonr added the needs: work label Oct 23, 2018

@@ -4282,7 +4282,8 @@
"detect_code": ["0823"],
"device_has_add": ["ANALOGOUT", "CAN", "CRC", "SERIAL_ASYNCH", "SERIAL_FC", "TRNG", "FLASH"],
"release_versions": ["2", "5"],
"device_name": "STM32L496ZG"
"device_name": "STM32L496ZG",
"bootloader_supported": true

This comment has been minimized.

@jeromecoutant

jeromecoutant Oct 23, 2018

Contributor

Could you add bootloader_supported to DISCO_L496AG also ?

This comment has been minimized.

@micgur01

micgur01 Oct 24, 2018

Contributor

done

@jeromecoutant

It seems also that you need to add
#! armcc -E
in ARM sct files

Thx

@micgur01

This comment has been minimized.

Contributor

micgur01 commented Oct 24, 2018

Hi
is it related to current fix? Could you explain what does it means?
I can see it not in every ARM sct files.

#! armcc -E
in ARM sct files

@jeromecoutant

This comment has been minimized.

Contributor

jeromecoutant commented Oct 24, 2018

I don't know...
But without that line, your patch can't compile.

@micgur01

This comment has been minimized.

Contributor

micgur01 commented Oct 24, 2018

Hi
Delivered latest code review fixes
Thank you very much for your comments

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 24, 2018

#! armcc -E

To run preprocessor on the linker scripts. In this case, because we got some config we want to pass to the linker script, we need this step.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 24, 2018

@micgur01 How was this tested (as ARMCC failure was not found earlier)?

@micgur01

This comment has been minimized.

Contributor

micgur01 commented Oct 24, 2018

It's my fault , first time delivering to mbed-os
I did not checked for all toolchains, run tests only for ARM_GCC

@jeromecoutant

ST CI quick test OK :

target platform_name test suite result elapsed_time (sec) copy_method
DISCO_L496AG-ARM DISCO_L496AG tests-mbed_drivers-echo OK 18.11 default
DISCO_L496AG-GCC_ARM DISCO_L496AG tests-mbed_drivers-echo OK 19.08 default
DISCO_L496AG-IAR DISCO_L496AG tests-mbed_drivers-echo OK 19.05 default
NUCLEO_L496ZG-ARM NUCLEO_L496ZG tests-mbed_drivers-echo OK 18.75 default
NUCLEO_L496ZG-GCC_ARM NUCLEO_L496ZG tests-mbed_drivers-echo OK 19.31 default
NUCLEO_L496ZG-IAR NUCLEO_L496ZG tests-mbed_drivers-echo OK 18.58 default

@0xc0170 0xc0170 added needs: CI and removed needs: work labels Oct 24, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 24, 2018

@jeromecoutant Thanks for the test results 👍

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 24, 2018

Build : SUCCESS

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

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 cmonr merged commit 140f3e2 into ARMmbed:master Oct 25, 2018

15 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 bytes) RAM(+0 bytes)
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-test Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Passed, 678 files (+0 files)
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 9959 cycles (-10 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

@cmonr cmonr removed the ready for merge label Oct 25, 2018

@adbridge

This comment has been minimized.

Contributor

adbridge commented Nov 2, 2018

Mmm something funny in this PR:
error: patch failed: targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L496xG/device/TOOLCHAIN_IAR/stm32l496xx.icf:1
error: targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L496xG/device/TOOLCHAIN_IAR/stm32l496xx.icf: patch does not apply
error: Did you hand edit your patch?
It does not apply to blobs recorded in its index.

I'll try hand patching it at the end

@cmonr

This comment has been minimized.

Contributor

cmonr commented Nov 5, 2018

For future reference, figured out the patching issue.

We need to be passing the --keep-cr flag when running git am -3

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