Skip to content
Commit 8dd38e8b authored by Lingkai Dong's avatar Lingkai Dong Committed by Rob Walton
Browse files

Use CMSIS startup file and add example linker scripts



The CMSIS_5 repository provides a reference startup file and for each
Cortex-M core. We add a library `cmsis-startup-cortex-m` which pulls in
a startup file from CMSIS_5 based on `CMAKE_SYSTEM_PROCESSOR`. Currently
only Cortex-M55 has been added as we have only one platform at the time
of writing.

While a startup file is generic to the Cortex core, a linker script is
specific to the memory layout of the hardware and the application. We
add to each non-TF-M example `an552_armclang.sct` for ARMClang and
`an552_gcc.ld` for GCC. Both files are based on the ones from
`Device/ARM/ARMCM55/Source` inside CMSIS_5 (git tag: 5.8.0) with memory
layout edited to match AN552. Having linker scripts inside each example
reflects what an actual user project would do. Note that the TF-M
examples need linker scripts from the trusted-firmware-m repository and
will be handled by a subsequent commit.

By pointing each executable's `LINK_DEPENDS` property to its linker
script, we instruct CMake to redo linking upon modification of the
linker script.

Signed-off-by: Lingkai Dong's avatarLingkai Dong <lingkai.dong@arm.com>
parent 91358f94
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment