Commit Graph

3884 Commits (15579bdf0c141349a7ee0db5bf2215a1eedd301f)

Author SHA1 Message Date
Vikas Katariya 260a33574b core: Upgrade TFM v1.2 related files
These files have been imported/copied from:
* ARMmbed/trusted-firmware-m
* ARMmbed/tf-m-tests

These are generic files, which are required for TF-M v1.2 integration
with Mbed OS for PSA_V8M and PSA_DUAL_CORE targets.
2021-02-25 14:02:56 +00:00
Martin Kojtal 7da6100ff6
Merge pull request #14304 from hugueskamba/hk_cmake_remove_app_target_reference
CMake: Refactor post-build hook to remove APP_TARGET references
2021-02-25 10:41:44 +00:00
Martin Kojtal 737153bcc1
Merge pull request #14328 from hugueskamba/hk_cmake_fix_greentea_tests
CMake: Fix Greentea tests
2021-02-24 16:09:55 +00:00
Martin Kojtal 6c08123dff
Merge pull request #14313 from hugueskamba/hk_cmake_fix_cortex_m33_gcc
CMake: Fix Cortex-M33 GCC build
2021-02-23 14:23:01 +00:00
Hugues Kamba 1ba3b73a30 CMake: Fix Greentea tests
* Specify new Greentea tests build steps in README
* Correct path to generated CMake configuration module
2021-02-23 13:08:43 +00: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
Hugues Kamba cd6cb71c29 CMake: Fix Cortex-M33 GCC build
The GCC flag to specify the floating-point hardware (`mfpu`) does not accept
the value `none`. The default value is `auto` which causes the compiler to
select the floating-point and Advanced SIMD instructions based on the
settings of -mcpu and -march. The extension option `+nofp` has been added
to disable floating point instructions.
2021-02-22 15:21:20 +00:00
Hugues Kamba 261deae561 CMake: Fix Cortex-A9 builds with GCC_ARM
Add the `-march` flag for Cortex-A9 GCC_ARM in order to
generate instructions for the armv7-a machine type.
2021-02-22 11:28:06 +00:00
Hugues Kamba 0eae4f6c3f CMake: Refactor post-build hook to remove APP_TARGET references
There should not be a reference to APP_TARGET in Mbed OS as end-users
may decide to use a different name for the CMake variable to store their
application name.
2021-02-19 11:52:57 +00:00
Martin Kojtal 3894d73680
Merge pull request #14289 from hugueskamba/hk_cmake_refactor_cypress
CMake: Refactor Cypress targets
2021-02-16 13:43:35 +00:00
Hugues Kamba 68b6e6ff96 Fix post build mechanism with unique CMake custom targets
The CMake custom target must be unique to avoid more than one
Mbed target adding the same. Only the CMake custom command added for the
Mbed target being built is run as the custom CMake target now includes
the Mbed target name.
2021-02-15 17:39:27 +00:00
Robert Walton 0c7bfe93e3 CMake: Generate response file before adding mbed-targets
We need to generate a "response file" to pass to the C preprocessor
when we preprocess the linker script, because of path length limitations
on Windows. We set the response file and bind the path to a global
property. The MBED_TARGET being built queries this global property when
it sets the linker script.

We must set this global property before the targets subdirectory is
added to the project. This is required because the MBED_TARGET depends
on the response file. If the path to the response file is not defined
when the target requests it the config definitions will not be passed
to CPP.
2021-02-15 11:12:18 +00:00
Martin Kojtal da34eecaf6
Merge pull request #14247 from rajkan01/refactor_greentea_cmakelist
CMake: Refactor Greentea test CMakeLists.txt
2021-02-15 10:28:32 +00:00
Martin Kojtal 34627b7d53
Merge pull request #14280 from hugueskamba/hk_cmake_refactor_wiced
CMake: Refactor WIO_EMW3166 support
2021-02-15 10:28:12 +00:00
Martin Kojtal ba1e7b53d0
Merge pull request #14272 from ladislas/ladislas/feature/cmake-current-binary-dir
Change CMAKE_BINARY_DIR to CMAKE_CURRENT_BINARY_DIR
2021-02-14 19:23:46 +00:00
Hugues Kamba 01875ebb09 WICED: Move directory to WiFi driver
WICED is something is build to Cypress WiFi on multiple devices, it's a binary form. It is owned
by Seeed studio
2021-02-12 16:40:22 +00:00
Ladislas de Toldi 5a879c6a4e
Change CMAKE_BINARY_DIR to CMAKE_CURRENT_BINARY_DIR 2021-02-11 22:49:07 +01:00
Rajkumar Kanagaraj c93901a804 CMake: Update readme about new MBED_TEST_LINK_LIBRARIES command line argument 2021-02-11 11:28:51 -08:00
Hugues Kamba deeaa7970f CMake: Add post build operation support
A CMake custom target, mbed-post-build, is added as a dependency of the
application CMake target if a Mbed target adds a CMake custom target
named mbed-post-build-bin. mbed-post-build-bin is added as a dependency
of mbed-post-build. mbed-post-build-bin depends on the application binary.
This is done so a CMake custom command that executes post-build can be added.

The Python scripts that implement the operations have been modified to add
CLI entry points so they can be called from CMake. Dependency on the old
tool has been removed on those scripts by passing them exactly what they
require instead of passing old tool Python objects. A consequence of that
was to slightly amend how the old tool calls some of those Python modules.

Support has only been added for Mbed targets that currently have a requirement
for post build operations. This includes: LPC1114, LPC1768, ARCH_PRO, LPC54114,
LPC546XX, FF_LPC546XX, CY8CKIT064B0S2_4343W, CYTFM_064B0S2_4343W, CYSBSYSKIT_01

The following targets are not supported as TFM support is not yet included:
ARM_MUSCA_B1, ARM_MUSCA_B1_NS, ARM_MUSCA_S1, ARM_MUSCA_S1_NS.
2021-02-11 17:04:41 +00:00
Martin Kojtal 33c06fb346
Merge pull request #14265 from 0xc0170/cmake-fix-app-target
CMake: remove need for APP_TARGET
2021-02-11 11:49:16 +00:00
Rajkumar Kanagaraj b1c4c446d2 CMake: Greentea test CMakeLists.txt refactoring
- Added the new CMake `MBED_TEST_LINK_LIBRARIES` command-line argument support to receive
  all dependent libraries for the particular greentea test suite.
For example:
- To select mbed-os library, use cmake with -DMBED_TEST_LINK_LIBRARIES=mbed-os
- To select baremetal library, use cmake with -DMBED_TEST_LINK_LIBRARIES=mbed-baremetal
- To select baremetal with external error logging library to the test with -D "MBED_TEST_LINK_LIBRARIES=mbed-baremetal ext-errorlogging"
2021-02-11 03:03:18 -08:00
Martin Kojtal 4236db4aef
Merge pull request #14255 from 0xc0170/cmake-fix-naming-targets
CMake: fix naming targets
2021-02-11 08:02:55 +00:00
Martin Kojtal 207dcbb88b CMake: move Gcc Arm memmap to configure app
This allows us to keep all in one place and fix (removing this function later)
2021-02-10 19:37:42 +00:00
Martin Kojtal 8be5da2619 CMake: hardcode mem map name to "application" for Gcc Arm
We need to fix linker script differently, it should not need APP_TARGET. This is a series of
commits fixing APP_TARGET in our tree. We should not require it.

The linker script preprocessing will be fixed differently. "application" prefix is temporary until
we clean this up completely.
2021-02-10 14:02:04 +00:00
Martin Kojtal b9990089eb
CMake: fix wording in naming
Co-authored-by: Hugues Kamba <41612201+hugueskamba@users.noreply.github.com>
2021-02-10 12:15:48 +00:00
Martin Kojtal a6915af60d CMake readme: add naming scheme for our CMake targets
Be consistent
2021-02-10 09:43:08 +00:00
Martin Kojtal aa561ee8f5
Merge pull request #14250 from saheerb/example-psa-115200
example-psa - add MUSCA_S1 and update baudrate
2021-02-09 14:47:52 +00:00
Martin Kojtal ce6ff0ac5f
Merge pull request #14207 from JeanMarcR/STM32WL_JMR
Adding NUCLEO_WL55JC support
2021-02-08 15:56:46 +00:00
reme 6220ca5fd5 STM32WL : ADDING CORTEX-M4 LINK OPTION
Add link option in file used for compilation.
Due to a bug in mbedtools environment.
2021-02-08 09:42:51 +00:00
reme b9e2fab52a STM32WL : ADDING ARM PACK MANAGER SUPPORT
Add STM32WL information in index.json file
Adding sector
2021-02-08 09:42:51 +00:00
Saheer Babu 51d3afe04a example-psa - add MUSCA_S1 and update baudrate 2021-02-05 14:46:09 +00:00
Martin Kojtal dd33463518
Merge pull request #14205 from multiplemonomials/master
CMake: better detection of memap dependencies
2021-02-05 10:13:18 +00:00
Robert Walton 0e491cc0cf cmake: Refactor mbed_set_mbed_target_linker_script
Move the mbed_set_mbed_target_linker_script function into its own file
and make it set the linkerscript on the target passed in, rather than
setting the linkerscript on the top level mbed-core target. We use
CMake's automatic forwarding of usage requirements to forward the linker
script to the top level target.

This commit also adds a condition to check whether the MBED_TARGET is a
CMake buildsystem target. If it is we will just link to it in the
idiomatic CMake way, if it's not then we use the 'old' mechanism of
setting the linkerscript for the mbed-core target. This check will be
useful when we refactor MBED_TARGETS to be CMake buildsystem targets as
it will allow us to do the refactoring incrementally.
2021-02-04 15:26:33 +00:00
Jamie Smith 7b03aeaf98 Rebase against master 2021-02-03 14:16:07 -08:00
Jamie Smith 9e2b04e945 Whitespace formatting changes. 2021-02-03 14:12:29 -08:00
Jamie Smith 0a67fef995 Add intelhex version info (same as #14201) 2021-02-03 14:12:29 -08:00
Jamie Smith df60d42aed Realized that companion Python script is actually not needed at all, can be replaced with command line 2021-02-03 14:12:28 -08:00
Jamie Smith 8eca0cffb2 Fix incorrect comment in tools/cmake/python_packagecheck.py
Co-authored-by: Hugues Kamba <41612201+hugueskamba@users.noreply.github.com>
2021-02-03 14:12:28 -08:00
Jamie Smith e61a45a0c3 Add extra lines as requested 2021-02-03 14:12:27 -08:00
Jamie Smith 049f1a7bf6 Fix indentation error in tools/cmake/CheckPythonPackage.cmake
Co-authored-by: Hugues Kamba <41612201+hugueskamba@users.noreply.github.com>
2021-02-03 14:12:27 -08:00
Jamie Smith fafb08c1b7 Reformat tools/cmake/CheckPythonPackage.cmake
Co-authored-by: Hugues Kamba <41612201+hugueskamba@users.noreply.github.com>
2021-02-03 14:12:27 -08:00
Jamie Smith 947c804295 Parse requirements.txt in CMake 2021-02-03 14:12:26 -08:00
Jamie Smith c667747309 Fix license header 2021-02-03 14:11:54 -08:00
Jamie Smith c193527305 Add intelhex to requirements.txt as it's a dependency of memap. 2021-02-03 14:11:54 -08:00
Jamie Smith 029486e640 Add FindPythonPackage and use it to detect memap dependencies 2021-02-03 14:11:53 -08:00
Martin Kojtal 733975220d
Merge pull request #14228 from ARMmbed/rename_greentea_test_macro
CMake: rename greentea test macro
2021-02-03 14:17:20 +00:00
Martin Kojtal 24f035ef3e
Merge pull request #14204 from multiplemonomials/cmake-exe-suffix
Set executable suffix in CMake
2021-02-03 14:17:00 +00:00
Martin Kojtal 6dd44e7ec7
Merge pull request #14190 from 0xc0170/fix_ns_cores
CMake cores: fix NS cores
2021-02-03 10:17:21 +00:00
Martin Kojtal d48cc295f2
Merge pull request #14213 from 0xc0170/dev_add_cortexm55
Add cortex-m55 to CMake support
2021-02-03 09:39:32 +00:00
Rajkumar Kanagaraj 6824b14e48 CMake: rename greentea test macro 2021-02-02 07:43:40 -08:00
Martin Kojtal 2e964006b7
Merge pull request #14196 from 0xc0170/fix-cores-gcc
CMake cores: fix cpu/fpu flags
2021-02-02 14:18:13 +00:00
Martin Kojtal 276e835e4b
Merge pull request #14181 from hugueskamba/hk_cmake_greentea_mbedtls
CMake: Add support for Mbed TLS Greentea tests
2021-02-02 14:17:18 +00:00
Jamie Smith 7f2abe6673 Add newline 2021-01-29 09:00:35 -08:00
Martin Kojtal 0bcd1f770f Add cortex-m55 to CMake support 2021-01-28 16:46:18 +00:00
Jamie Smith 068358d8d6 Set executable suffix in CMake 2021-01-27 15:53:56 -08:00
Martin Kojtal 0a990e702a CMake cores: align fpu settings
Move the fpu settings across all cores so they are aligned.
Some cores did not have fpu set for ARMClang. I matched here both toolchains to set up
the fpu the same (Only exception is soft vs hard - that is separate issue I would not like to touch
in this series).
2021-01-27 12:30:21 +00:00
Martin Kojtal 8e2c9575be CMake cores: remove dsp as it is on by default 2021-01-27 12:20:48 +00:00
Martin Kojtal 5d8d2bae76 CMake cores: fix dsp for M33FE (enabling it)
I realized we specified nodsp for M33 core but had march for FE parts enabled with dsp.
This fixes it.

M33F has no dsp. M33FE cores have dsp enabled.
2021-01-27 10:30:28 +00:00
Martin Kojtal 15acc009a0 CMake cores: remove march, not needed if we use mcpu 2021-01-27 10:25:48 +00:00
Martin Kojtal 30065905b8 CMake cores: fix cpu flag
Couple of cores did not have common flag `--mcpu` set
2021-01-26 14:13:19 +00:00
Martin Kojtal 747de9f849 CMake cores: fix NS cores
Set DOMAIN_NS=1 only for _NS cores. We had it otherway around.
I verified one non NS target that was failing to build, plus also checked the old tools
that had this definitions:

```
   91:     "Cortex-M23-NS":   ["__CORTEX_M23", "ARM_MATH_ARMV8MBL", "DOMAIN_NS=1",
   92                          "__CMSIS_RTOS", "__MBED_CMSIS_RTOS_CM"],
   93      "Cortex-M23":      ["__CORTEX_M23", "ARM_MATH_ARMV8MBL", "__CMSIS_RTOS",
   94                          "__MBED_CMSIS_RTOS_CM"],
```
2021-01-25 12:21:40 +00:00
Hugues Kamba 9a1c24e254 CMake: Add support for Mbed TLS Greentea tests
The Mbed TLS Greentea tests can now be built with CMake.
2021-01-25 10:48:15 +00:00
Hugues Kamba db189bae6d CMake: Correct ARM toolchain MCU core flags
Some armasm flags are passed to the ASM whilst we actually use armclang to invoke it. This causes build failures as armclang is not compatible with armasm flags.
This commit passes the same flags to all tools in the chain.
2021-01-22 10:54:47 +00:00
jeromecoutant 541c6817c1 CMAKE : correct "Cortex-M7F" link options for ARM 2021-01-20 10:34:07 +01:00
Martin Kojtal fa2101c48d
Merge pull request #14155 from jeromecoutant/PR_M33_CMAKE
CMAKE / M33 : DOMAIN_NS issue
2021-01-20 08:04:46 +00:00
Hugues Kamba 53cc382a96 CMake: Fix Cortex-M33-NS and Cortex-M33 ASM flags
The ASM flags were not supported by armclang, use the armclang alternatives.
Removed armlink --cpu flag as they generate a CMake configuration
time error. Furthermore, it is not necessary to specify the
processor or architecture as the linker auto-detects it from
the input object files.
See: https://developer.arm.com/documentation/101754/0615/armlink-Reference/armlink-Command-line-Options/--cpu-name--armlink-
2021-01-18 17:50:15 +00:00
Hugues Kamba c51b78fbe5 Add support for all ARM SSG Mbed targets 2021-01-18 17:39:13 +00:00
jeromecoutant e6ec31108e CMAKE / M33 : DOMAIN_NS issue 2021-01-15 11:28:46 +01:00
paul.szczepanek@arm.com 497504dde1 remove deprecated examples 2021-01-07 14:10:03 +00:00
Rajkumar Kanagaraj eb9bb7bf33 Apply suggestions from code review
Co-authored-by: Hugues Kamba <41612201+hugueskamba@users.noreply.github.com>
2021-01-05 06:52:44 -08:00
Rajkumar Kanagaraj 634d3be5f0 Incorporating the review comments 2021-01-05 06:52:12 -08:00
Rajkumar Kanagaraj bcbd243b1b Create Greentea CMake Macro 2021-01-05 06:52:12 -08:00
Harrison Mutai f8805df55b CMake: add cmake support for Toshiba targets 2021-01-05 09:20:41 +00:00
Harrison Mutai 7cb2407446 CMake: add support for Nordic targets 2020-12-18 10:53:57 +00:00
Martin Kojtal d4a1b5a803
Merge pull request #14064 from saheerb/example_applications_build_data
examples:create build_data after example application build
2020-12-17 15:38:02 +00:00
Hugues Kamba fc4e43557d CMake: Add support Ambiq targets 2020-12-17 11:13:42 +00:00
Saheer Babu 34f5efa184 examples:create build_data after example application build 2020-12-17 10:53:05 +00:00
Martin Kojtal 626168adcb
Merge pull request #14021 from harmut01/port_rz_targets
CMake: Add support for Renesas targets
2020-12-17 10:28:28 +00:00
Martin Kojtal 006eff5330 CMake: Add requirements.txt file for required Python modules
The memmap script depends on external Python modules.
The added file captures the required packages to
be installed.
2020-12-16 13:45:57 +00:00
Harrison Mutai ddf2f01b0a CMake: Add Renesas to list of supported targets 2020-12-11 16:52:18 +00:00
Anna Bridge 36df9d1043
Merge pull request #13946 from jainvikas8/update-mbed-cli-2-cmds
Update to reflect Mbed CLI 2 changes
2020-12-11 14:32:30 +00:00
Martin Kojtal 7c70a0c494 Merge branch 'port_analog_devices' of https://github.com/harmut01/mbed-os into dev_cmake_targets 2020-12-10 13:40:38 +00:00
Martin Kojtal a1ec4ed198 Merge branch 'hk_cmake_add_samsung' of https://github.com/hugueskamba/mbed-os into dev_cmake_targets 2020-12-10 13:36:18 +00:00
Martin Kojtal ae74aa6acd Merge branch 'hk_cmake_wiced_suppport' of https://github.com/hugueskamba/mbed-os into hugueskamba-hk_cmake_wiced_suppport 2020-12-10 13:32:20 +00:00
Harrison Mutai 613f7f00af Add Analog Devices to list of supported targets 2020-12-10 12:35:26 +00:00
Hugues Kamba 743563ca6f CMake: List NXP targets as supported in README 2020-12-10 11:29:39 +00:00
Hugues Kamba ea6661caf3 CMake: Fix GCC_ARM Cortex-M33 and Cortex-M33-NS support
Add missing toolchain option to specify the CPU core
2020-12-10 11:29:07 +00:00
Hugues Kamba 59da1e952c CMake: Fix GCC_ARM Cortex-M3 support
Add missing toolchain option to specify the CPU core
2020-12-10 11:28:08 +00:00
Hugues Kamba 229b9ad43b CMake: Fix GCC_ARM Cortex-M0 support
Add missing toolchain option to specify the CPU core
2020-12-10 11:26:19 +00:00
Martin Kojtal cca6652163
Merge pull request #13987 from multiplemonomials/cmake-global-options
CMake: Set required toolchain and processor flags globally, instead of per-target
2020-12-10 11:01:01 +00:00
Hugues Kamba 87e8c0bfac CMake: Add Samsung to the list of supported targets 2020-12-10 09:40:25 +00:00
Hugues Kamba 7c3cfabfb6 CMake: Fix Cortex M7 flag passed to assembler 2020-12-10 09:39:38 +00:00
Jamie Smith 975a8713bd Make sure all _INIT flags end with a space to fix ARMClang build error. 2020-12-09 22:27:28 -08:00
Hugues Kamba 1005b7c20d CMake: Add Silicon Labs in the list of supported targets 2020-12-09 15:31:20 +00:00
Jamie Smith 36288029c1 Fix some formatting issues. 2020-12-08 02:28:50 -08:00
Hugues Kamba f13e4959c9 CMake: Add support for GigaDevice targets
Add CMakeLists.txt files to list all the target sources and include directories
2020-12-07 11:25:12 +00:00
Martin Kojtal 660b964bb2
Merge pull request #13970 from hugueskamba/hk_cmake_add_maxim_support
CMake: Add support for all Maxim Mbed targets
2020-12-07 11:01:13 +00:00
Martin Kojtal 65281b9db7
Merge pull request #13934 from hugueskamba/hk_cmake_add_cypress_targets
CMake: Add support for Cypress targets
2020-12-07 09:08:06 +00: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 f07c0cd7e6 Fix variable name conflict with toolchain file 2020-12-03 10:58:41 -08:00
Jamie Smith bb7391a37b Remove core.cmake 2020-12-03 10:58:15 -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 a847ab3708
Merge pull request #13985 from 0xc0170/cmake-fix-13983
CMake: fix memory map generation
2020-12-03 09:00:46 +00:00
Martin Kojtal 4e7c7eca7e CMake ARM: move map to unify with Gcc Arm 2020-12-01 19:04:32 +00:00
Hugues Kamba 0c41cca92a CMake: Add Cypress in the list of supported targets 2020-12-01 15:17:41 +00:00
Hugues Kamba 19abde6f6a CMake: Add Maxim to the list of supported targets 2020-12-01 15:11:35 +00:00
Hugues Kamba b4bc521f13 CMake: Add support for WICED target
* Add CMakeLists.txt file
* Update the list of supported target
2020-12-01 15:05:28 +00:00
Vikas Katariya 8b70ae1d83 docs: Update to reflect Mbed CLI 2 changes
Due to the recent release of Mbed CLI 2, the command line options
have been renamed to ensure good usability and harmonize with the old
tools.

These are the following changes done:
* Minimum Cmake - 3.19.0 is required
* Minimum Mbed-tools - 4.0.0 is required
* mbed-tools cmd `init` to `new`
* mbed-tools cmd `build` to `compile`
* Removed whitespaces
2020-12-01 14:57:24 +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
Hugues Kamba be84b8cb0f CMake: Add Freescale in the list of supported targets 2020-11-26 16:14:06 +00:00
Hugues Kamba def23e18e0 Add ARM FM in the list of supported targets 2020-11-26 11:31:20 +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
Martin Kojtal 50262876c6
Merge pull request #13928 from hugueskamba/hk_cmake_clean_arm_toolchain_support
Clean remnant of experiment with ARM toolchain
2020-11-24 14:11:26 +00:00
Martin Kojtal a1fc9cdad5
Merge pull request #13915 from 0xc0170/cmake-stm32
CMake: add all TARGET_STM targets
2020-11-24 14:09:28 +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
Martin Kojtal 46673daabf CMake: update readme - all STM32 targets supported 2020-11-18 12:16:36 +00:00
Martin Kojtal fad7f344e7
Merge pull request #13870 from rajkan01/feature-cmake-review-comment
CMake: Address review comment from PR#13566
2020-11-18 09:42:09 +00:00
Martin Kojtal 66c05ddbf8
Merge pull request #13887 from hugueskamba/hk_cmake_update_build_instructions
CMake: Specify mbedtools in the build instructions
2020-11-12 13:50:46 +00:00
Rajkumar Kanagaraj 991b02ca7e CMake: Replace mbed_set_language_standard with target_compile_features and remove MBED_TARGET_LABELS variable resetting 2020-11-12 11:27:10 +00:00
Martin Kojtal a937a43edb
Merge pull request #13891 from ARMmbed/examples
Remove nanostack border router from examples list
2020-11-12 08:49:58 +00:00
Martin Kojtal 9c40d1fcd8
Merge pull request #13895 from hugueskamba/hk_cmake_fix_subsequent_runs
CMake: Fix error that prevented re-build
2020-11-12 08:19:45 +00:00
Hugues Kamba a70edcda0a CMake: Fix error that prevented re-build
Promote MBED_TOOLCHAIN_FILE_USED to cache variable so
its previous state can be recalled when re-building. This
is because CMAKE_TOOLCHAIN_FILE is also a cache variable and its
value is set on first run when it has not been set.
2020-11-10 19:54:47 +00:00
Hugues Kamba 97c7a38bec CMake: Specify mbedtools in the build instructions
mbedtools provides a more user friendly UX for
building application.
2020-11-10 18:54:30 +00:00
Martin Kojtal afb37068ea
Merge pull request #13847 from harmut01/pbl_scancode_fix
Add workaround for files with permissive binary licenses
2020-11-10 16:38:38 +00:00
adbridge 3cdc0f4b3d Remove nanostack border router from examples list
nanostack border router is now owned by ISG and has been moved
out of ARMmbed and into their organisation. ISG will be
responsible for updating and testing this example going forward.
2020-11-10 11:52:47 +00:00
Qinghao Shi 776ad7aa90 TEST: update cmake example on ble examples 2020-11-09 15:39:29 +00:00
Hugues Kamba 66f65c0e89 CMake: Fix third party toolchain file suppport
Compile defintions are always included. However, functions that set compile options
are only called if a third party toolchain file is not used
2020-11-06 17:25:23 +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 46c35965c5 CMake: Create separate function to set MCU core compile defintions
The new function (mbed_set_cpu_core_definitions()) should always be
called as it has defintions needed by Mbed OS to work with that
particular MCU core.
mbed_set_cpu_core_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
Hugues Kamba e80fa8b715 CMake: Rename Mbed OS path variable for consistency
Rename the CMake variable expected from applications from MBED_ROOT to
MBED_PATH to be consistent with the naming used for the configuration file
(MBED_CONFIG_PATH) also expected from applications.
2020-11-06 17:25:23 +00:00
Ladislas de Toldi 76cf2f7232 Activate ccache for CMake 2020-11-06 17:25:23 +00:00
Martin Kojtal 7a32e42a60 CMake readme: update mbed-tools to 3.4 2020-11-06 17:25:23 +00:00
Martin Kojtal e77c5324eb CMake: 3.19.0 update to fix ARMClang ASM defines 2020-11-06 17:25:23 +00:00
Martin Kojtal 9faeadc522 CMake: ninja reponse files disabled for ARMClang on Windows
Issue https://gitlab.kitware.com/cmake/cmake/-/issues/21093

Until this is fixed, we should disable response files for ARMClang + ninja on Windows.
Other toolchains and host systems should benefit from response files thus not disabling them
completely.

This fixes the issue with not finding includes. It's not trivial to find the root cause, it took me a while to figure out why ARMClang can't find the paths.

I moved the check to Mbed OS main cmake. It should not be in the toolchain file as it is not
related to the toolchain but to generator. We need toolchain properly set up first.

Note, I had to protect setting CMAKE_NINJA_FORCE_RESPONSE_FILE. If I set it to 0, ninja
would still use rsp files so I rather protected it and define that variable only when
required, not always.

Co-authored-by: Hugues Kamba <41612201+hugueskamba@users.noreply.github.com>
2020-11-06 17:25:23 +00:00
Qinghao Shi bf552af039 TEST: use mbed-tools build wrapper replace cmake build commands 2020-11-06 17:25:23 +00:00
Qinghao Shi 3558a7aa0e restrict BLE example only build BLE_LED 2020-11-06 17:25:23 +00:00
Qinghao Shi c391accc1b TEST: fix a bug on example scripts 2020-11-06 17:25:23 +00:00
Qinghao Shi 411ea55716 TEST: add BLE example to cmake example json 2020-11-06 17:25:23 +00:00
Qinghao Shi 2d67c670b8 TEST: update example scripts for cmake 2020-11-06 17:25:23 +00:00
Rajkumar Kanagaraj 7171f62489 Replace PUBLIC to INTERFACE keyword 2020-11-06 17:25:22 +00:00
Hugues Kamba e0aa49ffcf CMake: Add support for NUCLEO_F303K8
Added the board so it can be used for testing the bare-metal profile on a Mbed 2 board
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 c9cacaf080 CMake: fix application config
These settings like enable_language should be done in the application and just once.
We hit the issue when you expose sources to an app (interface or public), CMake errors as some of the internal settings have not been configured.
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 8016a53400 CMake: replace usage of the mbed_add_cmake_directory_if_labels() function (#13754)
Directories that start with special prefixes (TARGET_, FEATURE_, COMPONENT_)  are added to the build based on Mbed target configuration from targets.json instead of calling utility function mbed_add_cmake_directory_if_labels().
2020-11-06 17:25:21 +00:00
Hugues Kamba fa98689639 CMake: Componentize Mbed OS into multiple CMake targets (#13732)
Aside from the core mbed-os CMake target, a number of targets have been created so they can optionally be included by application executables that require them using `target_link_libraries()`.

Co-authored-by: Martin Kojtal <martin.kojtal@arm.com>
Co-authored-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@arm.com>
2020-11-06 17:25:21 +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 22dd57b35b CMake: Add support for NUCLEO_F401RE 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
Harrison Mutai e93a3e2beb Refactor workaround for scancode evaluation of PBL
Add function "has_binary_license" to check if a file has a
non-permissive license contains one. PBL is not recognized by scancode,
causing it to be flagged as a non-permissive license. CI doesn't allow
any non-permissive licenses, although, files flageed as SPDX are
allowed. Workaround causes all files with a valid PBL to be flagged as
missing an SPDX.

Add condition in "has_spdx_text_in_scancode_output" to ignore any spdx
identifier with "unknown" in the name. Scancode erroneously matches PBL
to matched_rule.identifer "spdx-license-identifier: unknown-spdx". This
prevents the workaround from working.
2020-11-06 16:23:57 +00:00
Harrison Mutai d085e9f1ed Add workaround for files with permissive binary licenses
Add function "has_binary_license" to check if a file has a non-permissive license contains one. PBL is not recognized by scancode,
causing it to be flagged as a non-permissive license. CI doesn't allow
any non-permissive licenses, although, files flageed as SPDX are
allowed. Workaround causes all files with a valid PBL to be flagged as
missing an SPDX.

Add condition in "has_spdx_text_in_scancode_output" to ignore any spdx
identifier with "unknown" in the name. Scancode erroneously matches PBL to matched_rule.identifer "spdx-license-identifier: unknown-spdx". This prevents the workaround from working.
2020-11-04 11:26:23 +00:00
Martin Kojtal 0bb4ff04c6 cmsis: remove math header file
It was removed in 6.0 (see reference below), and it was reintroduced when we updated
cmsis from the upstream. We missed to remove the commit adding the file in the cmsis
importer. This fixes it and the file should not be introduced again.

Fixes #13823

Already removed in 6.0: https://github.com/ARMmbed/mbed-os/pull/12055
2020-11-02 10:23:45 +00:00
Paul Szczeanek 440aea67c5 fix ble exemple names 2020-10-28 16:32:38 +00:00
Paul Szczeanek 6427b2ab84 remove missing examples 2020-10-23 16:17:56 +01:00
Martin Kojtal c6997bcb9d
Merge pull request #13771 from saheerb/split_examples
Separate cloud example configurations to another file
2020-10-19 15:53:48 +01:00
Martin Kojtal 61d88dd617 scancode: fix SPDX check - only warning
SPDX are not yet done in our codebase. We suggest them to be present but 3rd party
drivers have not yet been updated. The check as it was causes problems when updating
3rd party drivers (red flags in the PR).

Proper fix will be to clean up SPDX id in the codebase.
2020-10-19 11:01:11 +01:00
Martin Kojtal eb382989de
Merge pull request #13745 from hugueskamba/hk_evaluate_code_fix
Scancode: Fix false positive reported by scancode output analyser script
2020-10-16 16:22:29 +01:00
Saheer Babu e3857b2431 update cloud-example config 2020-10-16 11:22:03 +01:00
Saheer Babu ae18f4434a separate cloud examples from examples.json 2020-10-16 11:13:08 +01:00
Martin Kojtal aa0cd631a2
Merge pull request #13655 from jeromecoutant/PR_GENPERIPH_1_17
STM32_gen_PeripheralPins.py v1.17
2020-10-16 09:08:27 +01:00
Hugues Kamba 4ce6c8ac62 Scancode: Fix false positive reported by scancode output analyser script
ScanCode can possibly return many licenses found for a single file scanned.
This commit ensures that the file is not reported as lacking a permissive license
if at least one license found in it is permissive.
Previously the script was reporting an issue if it found at least one license
in a file that was not permissive.

Additionally catch more errors and provide specific details about failures.
Provide unitest.
2020-10-15 17:33:56 +01:00
Harrison Mutai 6fa88f4247 Fix false positive error in script checking license notices
Remove code block from license_check that evalutes whether a files
licenses are permissive and that there is a SPDX notice. Scancode
sometimes incorrectly attributes a single license notice to permissive
and non-permissive licenses. Removed code block results in many false
positives because it labels any file that has a "non-permissive" license
as such even when there is a permissive license.

Add function spdx_check to scancode-evaluate.py to improve analysis of
copyright and license notice tests.
2020-10-15 17:32:56 +01:00
Harrison Mutai e6c31514c6 Add unit test for script that checks copyright and license notice
Add unit test and dependent stubs for testing of scancode-evaluate.py.
license_check takes a JSON as argument and checks for source missing
copyright or license notices.

Each JSON represents a separate test case, and stubs are added for test case
3 and 4 where license_check looks for an spdx notice in the source file.
2020-10-15 17:32:56 +01:00
jeromecoutant 7eb43b104a STM32_gen_PeripheralPins.py move to TARGET_STM 2020-10-15 12:08:25 +02:00
Lingkai Dong a3c3808c5e Use NUCLEO_F429ZI for Azure IoT Hub and Google IoT Core examples 2020-10-08 16:50:13 +01:00
jeromecoutant 2d25882d1f STM32_gen_PeripheralPins.py v1.17
- GPIO xml parsing correction (#13711)
- Octo SPI support
- bug correction
- warning style correction
- new TIM_MST choice algo
- full PinNames.h file creation
- output directory is now
    targets_custom/TARGET_STM/TARGET_STM32XX/TARGET_STM32XXXX
2020-10-05 17:55:58 +02:00
Anna Bridge 2691b4e700
Merge pull request #13592 from rajkan01/update_examples_azure_google_cloud
Add test examples.json config for Azure and Google Cloud
2020-09-11 12:20:43 +01:00
Martin Kojtal 6bfd89e656
Merge pull request #13196 from gbrtth/musca_s1_support_mbed6
Add ARM_MUSCA_S1 as a new target platform
2020-09-10 16:53:14 +01:00
Martin Kojtal fc6fbd9f6a
Merge pull request #13580 from jamesbeyond/cmake_exp
TEST: Update example scripts for cmake feature
2020-09-10 15:05:12 +01:00
Rajkumar Kanagaraj 74536e7fb3 Add test examples.json config for Azure and Google Cloud 2020-09-10 14:31:49 +01:00
Gabor Toth bdf2306f16 Add platform support to Musca S1
Change-Id: Iebdd4bc402446caba6b7bd894eddb0a85ed884d8
Signed-off-by: Mark Horvath <mark.horvath@arm.com>
Signed-off-by: Gabor Toth <gabor.toth@arm.com>
2020-09-10 14:53:41 +02:00
Qinghao Shi d86a97b21c TEST: update example script update function 2020-09-10 13:06:39 +01:00
Martin Kojtal 5d245ad553
Revert "Always build both .hex and .bin files" 2020-09-10 10:19:04 +01:00
Qinghao Shi e9e53e4ba3 TEST: change to overwrite instead of remove 2020-09-09 18:38:05 +01:00
Qinghao Shi f1e885f491 TEST: add a cmake option in example testing script 2020-09-09 18:26:17 +01:00
Martin Kojtal 2fe10ddb21
Merge pull request #13516 from romanjoe/pr/064b0s2_rename
Cypress: Rename CY8CKIT_064B0S2_4343W to CY8CKIT064B0S2_4343W
2020-09-09 09:49:19 +01:00
Roman Okhrimenko 877078003c Rename CY8CKIT_064B0S2_4343W to CY8CKIT064B0S2_4343W, which fits in 20 characters limit 2020-09-07 08:25:31 +03:00
Qinghao Shi a7b2ad89a3 TEST: remove MUSCA_B1 from attestation example test 2020-09-03 14:35:05 +01:00
Martin Kojtal f4536be936
Merge pull request #13524 from norbert-david/patch-1
device_management.py supports application access keys
2020-09-03 13:25:26 +01:00
Rajkumar Kanagaraj abdee9267c Update test examples.json aws config to refer renamed mbed-os-example-for-aws repo 2020-09-02 15:01:02 +01:00
Martin Kojtal 90ca583e79
Merge pull request #13464 from hugueskamba/hk_cmsis_restructure
adr: Recommend CMSIS component source structure
2020-09-02 09:18:07 +01:00
Norbert Dávid bf1ba52083
device_management.py supports application access keys 2020-09-02 08:47:47 +03:00
Hugues Kamba 5535eee91b CMSIS: Update upstream importer to import to new directory structure
See docs/adr/0001_cmsis_component_source_structure_recommendations.md
2020-08-28 22:15:15 +01:00
Martin Kojtal 555c7dbe1a
Merge pull request #13416 from dustin-crossman/pr/cysbsyskit_update_6.2.0
Update CYSBSYSKIT_01
2020-08-26 07:14:46 +01:00
Anna Bridge 4ba1a5433f
Merge pull request #13433 from LDong-Arm/refactor_device_key
Refactor device_key
2020-08-24 12:56:10 +01:00
Martin Kojtal 08ef04d027
Merge pull request #13468 from urutva/add-ccache-to-travis
Add ccache to travis
2020-08-24 08:47:27 +01:00
Martin Kojtal 7829238c61
Merge pull request #13469 from LDong-Arm/spellignore
Support ignore list for spell checks
2020-08-21 14:29:33 +01:00
Devaraj Ranganna fef4454359 ci: Enable `ccache` in Travis
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-08-21 14:17:13 +01:00
Martin Kojtal 76d51a5b80
Merge pull request #13435 from urutva/fix-arm-none-eab-gcc-version
ci: Update `arm-none-eabi-` version
2020-08-21 13:50:44 +01:00
Lingkai Dong 8c610a6544 Spell checker: add an argument to pass file containing ignored patterns 2020-08-20 17:23:17 +01:00
Dustin Crossman fbeae966b2 Add sectors info for CYSBSYSKIT to arm_pack_manager/index.json. 2020-08-18 09:45:47 -07:00
RyoheiHagimoto db3cec4398 Added GR-MANGO to be a target.
Passed GreenTea CI.
Added RZ_A2XX and GR_MANGO to targets.json.
Added RZ_A2XX to mbedlib.json in lwipstack and netsocket/ppp.
Added TARGET_RZ_A2XX directory to targets/TARGET_RENESAS.
Added TARGET_RENESAS_EMAC directory to features/netsocket/emac-drivers.
Moved TARGET_RZ_A1_EMAC directory into the TARGET_RENESAS_EMAC directory below and renamed to TARGET_RZ_A1XX.
Added TARGET_RZ_A2XX directory to features/netsocket/emac-drivers/TARGET_RENESAS_EMAC.
2020-08-18 10:48:48 +09:00
Devaraj Ranganna 85e0199dd5 ci: Update `arm-none-eabi-` version
The `arm-none-eabi-` version is updated from version 6 to version 9.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-08-17 16:11:33 +01:00
Lingkai Dong a59bace6f2 Add technical terms to spell checker ignore list 2020-08-17 10:13:53 +01:00