Commit Graph

10 Commits (4d8127223c57cbf2db82c1bda3503ab12b447387)

Author SHA1 Message Date
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