Commit Graph

31438 Commits (0f7d03ae1c48350ee9581c6a68cf787fb98b5498)

Author SHA1 Message Date
Hugues Kamba 0f7d03ae1c CMake: Revert mbed-trace CMake input source file to match upstream repository (#13590)
As there is currently no mbed-trace library, statements related to that
target have been commented out.
2020-11-06 17:25:20 +00:00
Martin Kojtal 47f61485b8 CMake: Fix GCC_ARM pre-linking stage (#13575)
Make it generic for all targets. It was previously hardcoded for K64F
2020-11-06 17:25:20 +00:00
Hugues Kamba 1b576c3046 CMake: Clean up platform 2020-11-06 17:25:20 +00:00
Hugues Kamba 9b8c5acb99 CMake: Fix build failure due to mbed-trace, mbed-client-randlib, and nanostack dir changes 2020-11-06 17:25:20 +00:00
Martin Kojtal 18cb55a457 CMake: Add information about the current state of support (#13551) 2020-11-06 17:25:20 +00:00
Hugues Kamba 30ec7fa901 CMake: mbed_add_cmake_directory_if_labels checks presence of CMakeLists.txt before adding subdirectory 2020-11-06 17:25:20 +00:00
Martin Kojtal 9d1ae521e8 CMake: 3.18.2 minimum version set
There are fixes in the latest version we need for ARMClang.
2020-11-06 17:25:20 +00:00
Martin Kojtal e7caa8993a CMake: use response files
As Mbed OS is built as whole, we have long paths again. This is known issue with windows. To fix the paths, we need to use response files.

Ninja is special, needs to be forced to use long paths.
2020-11-06 17:25:20 +00:00
Martin Kojtal 8aa4a85b35 CMake: use CMAKE_TOOLCHAIN_FILE
We should define CMAKE_TOOLCHAIN_FILE (as we are providing Mbed OS toolchain file). This fixes
also the issue we had with Unix makefiles where application would be without response files.

For more details, see https://gitlab.kitware.com/cmake/cmake/-/issues/21104

As the Mbed OS toolchain file is included by CMake, we need to have enabling language in the main CMake (can be executed
only once).
2020-11-06 17:25:20 +00:00
Hugues Kamba 44f9d176e8 CMake: Fix build due to hal dir move 2020-11-06 17:25:20 +00:00
Martin Kojtal 0902a17454 CMake ARMClang: use -masm=auto
Auto mode for ASM files. There might be rare cases where this fails, we will fix
them by requesting the component to use gnu syntax for assembly files.
2020-11-06 17:25:20 +00:00
Martin Kojtal 4c89f67b65 CMake cores: fix flag mpcu for asm 2020-11-06 17:25:20 +00:00
Martin Kojtal 3be2d15e2d CMake ARMClang6: use armclang for asm
Fixes the issue of armasm, passing -DMACRO={0,0} - fails to parse.

We use armclang frontend but passing -masm=armasm.
2020-11-06 17:25:20 +00:00
Hugues Kamba a0fbe2947a CMake: Fix build failure due to CMSIS restructure 2020-11-06 17:25:20 +00:00
Martin Kojtal 458ce2adfb Travis: add more examples we should support
Co-authored-by: Hugues Kamba <41612201+hugueskamba@users.noreply.github.com>
2020-11-06 17:25:20 +00:00
Hugues Kamba 0ba05246cc CMake: Fix selection of scatter file and startup file for DISCO_L475_IOT01A 2020-11-06 17:25:20 +00:00
Hugues Kamba 4fc678c30d CMake: Correct file listing for PSA 2020-11-06 17:25:20 +00:00
Hugues Kamba 3ab8179b1e CMake: Add support for K66F 2020-11-06 17:25:20 +00:00
Hugues Kamba ec376fb587 CMake: List missing files in sal-stack-nanostack 2020-11-06 17:25:20 +00:00
Hugues Kamba 0c8cb3134c CMake: Fix build failure due to PSA dir move 2020-11-06 17:25:20 +00:00
Martin Kojtal 5a1d64aae5 CMake: Fix blockdevice components source and include paths
This file paths were updated on master and this was broken after
rebasing.
2020-11-06 17:25:19 +00:00
Martin Kojtal 14c6af1558 cmake: fix sd component recent dir structure 2020-11-06 17:25:19 +00:00
Hugues Kamba f12f9adbed CMake: Fix failures due to device_key and storage dirs move 2020-11-06 17:25:19 +00:00
Hugues Kamba b3c614e921 CMake: Fix CORDIO_LL build failure
List missing CORDIO_LL source file in CMake source file.
2020-11-06 17:25:19 +00:00
Hugues Kamba 01ddb7d471 CMake: Fix NRF52840_DK build failure
* Remove duplicated ARM toolchain directory
* Link with archived cryptocell 310 libraries instead
  of adding them as source files
* Provide default MBED_BOOT_STACK_SIZE definition
  in scatter file as is done for GCC_ARM linker file
2020-11-06 17:25:19 +00:00
Martin Kojtal f856d6b0a3 CMake: Fix include path for Cryptocell 2020-11-06 17:25:19 +00:00
Hugues Kamba 67a20580cf CMake: Fix build failure due to lora, cryptocell, and nfc dirs move 2020-11-06 17:25:19 +00:00
Robert Walton 6687a6bc13 CMake: Check CMake builds CMake-capable targets in Travis 2020-11-06 17:25:19 +00:00
Hugues Kamba 7343ad6c02 CMake: Use `mbed_` prefix for CMake functions 2020-11-06 17:25:19 +00:00
Hugues Kamba fbaeae5a8e CMake: Fix failure due to MbedTLS rdir relocation 2020-11-06 17:25:19 +00:00
Hugues Kamba eb4102be48 CMake: Fix failure due to BLE component dir move 2020-11-06 17:25:19 +00:00
Hugues Kamba 933b1db1be CMake: Set language std per target using properties 2020-11-06 17:25:19 +00:00
Hugues Kamba a1259ecf22 CMake: Remove utility function dependency on mbed-os target
The utility function may be called by targets other than mbed-os
when it is broken into multiple libraries.
2020-11-06 17:25:19 +00:00
Hugues Kamba dde395c82f CMake: Do not hard code target in build profile CMake module
Provide a function in each build profile module to set the toolchain
options. All the functions have the same interface therefore the
CMake source file including the module always calls the same
function regardless of which build profile module is actually
included.
When the `mbed-os` target is broken up into multiple libraries,
a library other than `mbed-os` might need to set the toolchain
options. This will be possible by simply including the module
and calling the function with the target and toolchain for which
to set the options.
2020-11-06 17:25:19 +00:00
Hugues Kamba cb9960cb08 CMake: Do not hard code target in toolchain CMake module
Provide a function in each toolchain module to set the toolchain
specific options. All the functions have the same interface
therefore the CMake source file including the module always calls
the same function regardless of which toolchain module is actually
included.
When the `mbed-os` target is broken up into multiple libraries, a
library other than `mbed-os` might need to set the toolchain options.
This will be possible by simply including the module and calling the
function with the target for which to set the options.
2020-11-06 17:25:19 +00:00
Hugues Kamba c8b4822ed7 CMake: Remove toolchain module dependency on cpu core CMake modules
Set `CMAKE_SYSTEM_PROCESSOR` in toolchain.cmake based on
`MBED_CPU_CORE`.
This information is needed by the ARM toolchain (and possibly other
toolchains), it therefore makes sense to set in `toolchain.cmake`.
2020-11-06 17:25:19 +00:00
Hugues Kamba 400211c490 CMake: Do not hard code target in CPU core CMake module
Provide a function in each CPU core module to set toolchain options.
All the functions have the same interface therefore the CMake source
file including the module always calls the same function regardless
of which cpu core module is actually included.
When the `mbed-os` target is broken up into multiple libraries, a
library other than `mbed-os` might need to set the toolchain options.
This will be possible by simply including the module and calling the
function with the target and toolchain for which to set the options.
2020-11-06 17:25:19 +00:00
Hugues Kamba 20e19de028 CMake: Fix breakage due to BLE dir move 2020-11-06 17:25:19 +00:00
Hugues Kamba de3462dabb CMake: Remove default build type selection from top level source file 2020-11-06 17:25:19 +00:00
Hugues Kamba c30d9259e9 CMake: Fix build failure due to nanostack dir move 2020-11-06 17:25:19 +00:00
Hugues Kamba c1fa350204 CMake: Minor formatting of top level CMakeLists.txt source file 2020-11-06 17:25:18 +00:00
Hugues Kamba f1a3d690c7 CMake: Fix WIO_3G scatter file shebang to work with ARM Compiler 6 2020-11-06 17:25:18 +00:00
Hugues Kamba 5f53181f33 CMake: Fix access to usb hal source file 2020-11-06 17:25:18 +00:00
Hugues Kamba 76fd50a547 CMake: Fix access to cellular drivers 2020-11-06 17:25:18 +00:00
Hugues Kamba c876bc1d75 CMake: Fix build issue due to platform changes 2020-11-06 17:25:18 +00:00
Hugues Kamba e744208c07 CMake: Fix build failure due to drivers and lwipstack dirs move 2020-11-06 17:25:18 +00:00
Martin Kojtal 8b3cec2fa4 Update cmake/toolchain.cmake
Co-authored-by: Hugues Kamba <41612201+hugueskamba@users.noreply.github.com>
2020-11-06 17:25:18 +00:00
Martin Kojtal aac5e8082b CMake: Profile comments update
Co-authored-by: Hugues Kamba <41612201+hugueskamba@users.noreply.github.com>
2020-11-06 17:25:18 +00:00
Martin Kojtal 57f39aed01 CMake toolchain: fix options comment
Co-authored-by: Hugues Kamba <41612201+hugueskamba@users.noreply.github.com>
2020-11-06 17:25:18 +00:00
Martin Kojtal 1ebedf2709 CMake GCC ARM: use nosys specs for linker
Use retarged version (nosys.specs) for Mbed OS. To resolve an issue with debug/develop profiles.
Otherwise we get kill or getpid errors from linker, as we use nosys lib but no specs defined.
2020-11-06 17:25:18 +00:00