Commit Graph

22 Commits (73526603dc469e68b2ceb5a060e7cc92fe644760)

Author SHA1 Message Date
Lingkai Dong 257a4e551c CMake: Do not set `CMAKE_AR`
The variable for archiver is automatically set by CMake. There is
no need to explicitly set it, unless a project really needs to
override the default archiver.
2021-07-23 15:56:58 +01:00
Ladislas de Toldi fd7ea7305f
Configure memory map per target to allow multiple add_executable 2021-02-27 13:16:03 +01:00
Hugues Kamba ed09a5cc95 CMake: Refactor mapfile generation
The refactoring was necessary to remove a function call
(mbed_configure_app_target()) from application's CMakeLists.txt.
2021-02-23 11:39:00 +00:00
Jamie Smith 36288029c1 Fix some formatting issues. 2020-12-08 02:28:50 -08:00
Jamie Smith 0972738e46 Rebase linker script change properly, re-add external toolchain file support 2020-12-03 11:04:13 -08:00
Jamie Smith 6da2cbb59e Also update ARM.cmake 2020-12-03 10:58:14 -08:00
Jamie Smith 78be77ee5a Change toolchain file to load core and toolchain options *before* compilers are loaded. 2020-12-03 10:57:23 -08:00
Martin Kojtal 4e7c7eca7e CMake ARM: move map to unify with Gcc Arm 2020-12-01 19:04:32 +00:00
Martin Kojtal f97c7bd957 CMake: GCC ARM linker script fix
Fixes https://github.com/ARMmbed/mbed-os/issues/13983
Move linker script to the function mbed_set_mbed_target_linker_script.

I also moved memmap as it is needed for an app. The location might not be the best fit,
we will address this in separate pull request.
2020-11-30 11:21:53 +00:00
Martin Kojtal 214291b6be
Merge pull request #13930 from LDong-Arm/arm_compiler_macros
CMake: pass macros to ARM toolchain linker
2020-11-24 14:11:48 +00:00
Lingkai Dong 80a0a5b440 CMake: make linker option generator function toolchain-agnostic 2020-11-19 15:23:23 +00:00
Hugues Kamba 62be4efb6c CMake: Clean remnant of experiment with ARM toolchain
The removed code was testing that compiler flags could be added
to the assembler using generator expression. It was not to be
committed.
2020-11-19 12:50:27 +00:00
Hugues Kamba 0bf4683f46 CMake: Set compile defintions for supported toolchain at top level input source file
The compile defintions should always be added depending on the
selected toolchain.
mbed_set_toolchain_options() should only be called if a third-party
toolchain file has not been used as it has compile options that can
cause conflicts.
2020-11-06 17:25:23 +00:00
Hugues Kamba 3fa52b9312 CMake: Fix Microlib selection (#13871)
As the assembler does not seem to recognise the request to the
linker to use microlib, remove that instruction.
Microlib is still used as the linker selects microlib as a result
of being explicitly asked to do so.
2020-11-06 17:25:23 +00:00
Rajkumar Kanagaraj 7171f62489 Replace PUBLIC to INTERFACE keyword 2020-11-06 17:25:22 +00:00
Rajkumar Kanagaraj e7c0d93ad4 CMake: add mbed-os and mbed-baremetal targets
mbed-os consists of mbed-core and mbed-rtos
mbed-baremetal consists of mbed-core

The main change is for mbed-core. Changing from object library to be interface. This way it allows us to do the above to have 2 main targets for users to use.

This should be backward compatible change as mbed-os target we used contains the same files/options as previously set.
2020-11-06 17:25:22 +00:00
Martin Kojtal d283e69c99 CMake: fix for Gcc Arm preprocessing linker file
A linker script needs symbols (stack size, app size, etc). They are basic values or defines. Not any array like or string like macros. We should filter these, as they are not valid anyway.

The other option to fix this would be to fix all the macros but I dont think it is needed as these config values won't be used in the linker script anyway.

Not allowed in ld files macros with spaces, like MACRO={0, 2, 3} or MACRO=(4 * 2000).
2020-11-06 17:25:22 +00:00
Rajkumar Kanagaraj d84baa8fa1 CMake: Add a function to generate executable artifacts with memap (#13695)
- Add linker option to generate map file for GCC_ARM and ARM toolchain
- Add mbed_generate_map_file function to call memap.py (parse the map
file).
- Add mbed_generate_executable function to generate executable artifacts with a memory map table
2020-11-06 17:25:21 +00:00
Hugues Kamba 4c22554bed CMake: Fix TFM targets build
Add linking time pre-processor macro DOMAIN_NS
for TFM targets and TrustZone non secure targets.
2020-11-06 17:25:21 +00:00
Hugues Kamba 3b8aba1dce CMake: Add support for printf lib selection 2020-11-06 17:25:21 +00:00
Hugues Kamba 18345795cd CMake: Add support for C lib selection
Configure the selected toolchain for the selected C library
2020-11-06 17:25:21 +00:00
Hugues Kamba cac1b25465 CMake: Move modules under tools subdirectory 2020-11-06 17:25:21 +00:00