Access MBED_TARGET_LABELS as a global variable instead of a property.
At this point the evaluation of the property MBED_TARGET_LABELS
created in the top level CMakeLists.txt results in an empty string.
Ensure the MCU core CMake module is added before the toolchain
CMake module as the latter requires CMAKE_SYSTEM_PROCESSOR
to be set when configuring the ARM toolchain.
This module was doing things that mbed-os and the application were supposed to do.
Moved the statements form the module to `mbed-os/CMakeLists.txt` and to
`<APPLICATION_ROOT>/CMakeLists.txt` .
Mbed OS also ensures the executable produced uses whatever name the application has set.
Added a command line option `-DMBEDIDE=ON` which allows using Arm
compiler shipped with Mbed Studio on local machines.
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
Update arm compiler flags which were causing build failures.
Remove `-MMD` flag as it is not recognised by the Arm compiler.
There are no common flags between compiler, assembler and linker. The
compiler expects `-mcpu` whereas assembler and linker expects `--cpu`.
The `COMMON_FLAGS` in `cmake/toolchains/ARM.cmake` are not recognised by
assembler and linker.
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
The script `cmake/env.cmake` enables languages and in the case of Arm
compiler, `CMAKE_SYSTEM_PROCESSOR` is expected to be set before a
language is enabled. `CMAKE_SYSTEM_PROCESSOR` is set in
`cmake/core.cmake`. Therefore, `cmake/core.cmake` is included before
`cmake/env.cmake`.
Similarly, `cmake/profile.cmake` sets compiler options, hence it is
included before enabling languages in `cmake/env.cmake`.
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
The version number was required previously when ARM Compiler 5
and ARM Compiler 6 were both supported. There was a significant
underlying change between the two that justified having distinct
build options settinfgs. It is very unlikely that such a major change will happen
between ARM Compiler 6 and future versions. It is therefore also very unlikely
that distinct option settings for future versions will be needed.
We should therefore avoid appending version number the same way we do not
append it to GCC toolchain configuration settings.