Commit Graph

3740 Commits (241b062cdff0f4a568882a593a67f295f2ad7f8b)

Author SHA1 Message Date
Lingkai Dong 63523bd0aa Remove _NS aliases for Musca B1/S1
In targets.json, ARM_MUSCA_B1 and ARM_MUSCA_S1 have alias target
names suffixed with `_NS`. They are identical to targets without
`_NS` and exist purely for compatibility with the old naming
convention we had. The CI builds them as separate targets and uses
extra resources.

As we are upgrading Musca targets to TF-M v1.2, it's time to clean
up the aliases.
2021-02-25 14:02:57 +00:00
Vikas Katariya 79755ea243 Add missing license header and SPDX identifier
This files are imported and part of:
a8e12dae38

Issue has been raised https://github.com/mcu-tools/mcuboot/issues/930

As these scripts are going to be part of release its important to have
licensing information.
2021-02-25 14:02:57 +00:00
Vikas Katariya 1a8386a178 Refactor: MUSCA targets post binary hook scripts
Raise an exception if there was an issue with handling any command
when signing the binaries for MUSCA targets.
2021-02-25 14:02:57 +00:00
Vikas Katariya 308ffe9e89 Remove old binary signing scripts of TF-M 1.1 2021-02-25 14:02:56 +00:00
Vikas Katariya 8648e4f4d6 Remove: ARM_MUSCA_A1 support
ARM_MUSCA_A1 is not supported since Mbed OS 6.0
Refer: https://github.com/ARMmbed/mbed-os/pull/13165

Therefore remove files from kv_config and TF-M post binary hook script.
2021-02-25 14:02:56 +00:00
Vikas Katariya ef9ed987bc Update `ARM_MUSCA_S1.py` post binary hook script
The script changes are required with respect to TF-M v1.2
integration for this target. The imgtool.py is been replaced with
`wrapper.py` which uses click command to run the signing algorithm.

The version `-v` and dependencies `-d` have been updated to resolve
upgrade issues from TF-M v1.1 --> v1.2
2021-02-25 14:02:56 +00:00
Vikas Katariya 1ac58a81a1 Update `ARM_MUSCA_B1.py` post binary hook script
The script changes are required with respect to TF-M v1.2
integration for this target. The imgtool.py is been replaced with
`wrapper.py` which uses click command to run the signing algorithm.

The version `-v` and dependencies `-d` have been updated to resolve
upgrade issues from TF-M v1.1 --> v1.2
2021-02-25 14:02:56 +00:00
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 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