Commit Graph

3884 Commits (15579bdf0c141349a7ee0db5bf2215a1eedd301f)

Author SHA1 Message Date
Lingkai Dong 23d659ef9e CMake: Add test for multiple-executable support
Add a test to build two executables in two directories under a single
project.
2021-07-22 17:31:45 +01:00
Lingkai Dong 351680fb18 Rework post-build to support multiple executables
When building greentea tests, each test is an executable with its
own output binary path. This is also the case when a user project
produces multiple executables. But the current implementation of
post-build operations always assumes there's only one executable,
at the root of the build directory.

The post-build command depends on Mbed target, and it always takes
the the executable we build as an input file. To achieve this, we
let each Mbed target (that has a post-build command) define a function

    function(mbed_post_build_function target)

which takes a CMake executable target as an argument from which it can
get its binary path using generator expressions. It generates and adds
to the passed executable target a post-build custom command.

Notes:
* The function name needs to be exact, because CMake only supports
literal function calls - CMake can't dereference a function name from
a variable. To avoid multiple definitions of this function, each Mbed
target needs to guard it with a macro to check if the user is
building this Mbed target.
* `mbed_post_build_function()` is a function, but it is usually
defined by another macro rather than a parent function, because
nesting functions would make many variables inaccessible inside the
innermost `mbed_post_build_function()`.
* There's no more need to force regenerate images. Previously, post-
build commands were custom *targets* which always got to run, so we
force regenerated images on every build to avoid patching an image
that's already been patched once on previous build. Now post-build
commands are custom *commands* of the same executable target, and they
are only run if the executable target itself is rebuilt.
2021-07-22 17:31:22 +01:00
Robert Walton fcd57b24d3 CMake: Move post build functions out of root CMakeLists.txt
The 'post build' functions are made visible by adding the mbed-os
subdirectory. This is not ideal as any components in mbed-os wishing to
call the functions must be added after the functions are defined. To
improve modularity move these functions to a separate CMake script.

We include the post build CMake script in app.cmake for now so we don't
break user's projects.
2021-07-22 11:50:43 +01:00
Jaeden Amero 662bd59973
Merge pull request #14940 from Patater/update-prettytable
python: Allow newer prettytable with newer python
2021-07-21 14:55:52 +01:00
Jaeden Amero 14d4ee3f3b python: Allow newer prettytable with newer python
This helps to allow installation of Mbed OS's Python requirements, when
CMake is used, into the same Python environment as mbed-os-tools. The
versions specified here are aligned with mbed-os-tools;
tools/cmake/requirements.txt depends on the same version of prettytable
as mbed-os-tools's requirements.txt.
2021-07-21 13:55:18 +01:00
Martin Kojtal 530c90b351
Merge pull request #14932 from ARMmbed/remove_tools_host_tests
Remove host_tests from mbed-os/tools
2021-07-21 14:51:30 +02:00
Jaeden Amero c703b0de23
Merge pull request #14880 from Patater/dont-require-icetea
Dont require icetea
2021-07-20 15:54:51 +01:00
Rajkumar Kanagaraj e75b67fada Remove host_tests from mbed-os/tools
host tests (mbedhtrun) is maintained as part of mbed-os-tools but there
is a redundant duplicate of host_tests under mbed-os/tools/ directory
this PR changes to remove those duplicates and update test_api py modules
to use host tests from mbed-host-tests
2021-07-20 05:07:28 -07:00
Jaeden Amero 45a8826ee2 icetea: Remove icetea TEST_APPS
icetea was intended to be deprecated in Mbed 6. icetea is no longer
maintained. Remove icetea-specific TEST_APPS and run_icetea tests from
Mbed OS.
2021-07-15 16:07:20 +01:00
Robert Walton e9747d7bcd CMake: greentea: Fix io issue with greentea-client
The stdio implementation of the standalone greentea-client wasn't
streaming "KiVi protocol" messages through the serial IO. Separate out
the existing implementation for greentea-client that uses
mbed_retarget.h's `read` and `write` functions so greentea tests
continue to work with the standalone client.

The IO fixture is shared between the "legacy" embedded greentea-client
and the newer standalone client.
2021-07-09 14:33:08 +01:00
Martin Kojtal 7350b03088
Merge pull request #14872 from hallard/STM32WLEx
Add STM32WLE5 for custom targets LORA_E5 and RAK3172
2021-07-08 13:25:24 +02:00
Jaeden Amero c3f3ed7661 cmake: Use namespaced greentea client library
When using an exported or installed version of greentea, it's necessary
to use the greentea namespace.
2021-07-07 14:29:14 +01:00
Jaeden Amero 4e2206e482 Use standalone greentea-client
For CMake or Mbed CLI 2, use the standalone greentea-client.
2021-07-07 14:29:14 +01:00
Charles c8fdc0a897 added STM32WLE5CCUx + version 1.1.0 2021-07-06 17:10:53 +02:00
Lingkai Dong f4d551e80e CMake: Replace MBED_TEST_LINK_LIBRARIES with MBED_TEST_BAREMETAL
Currently we have `MBED_TEST_LINK_LIBRARIES` for specifying
* Whether to link `mbed-os` or `mbed-baremetal`
* Any additional libraries we want tests to link

It's not fit for purpose anymore, because
* No flavor of Mbed OS is selected by default, but we should've
really defaulted to `mbed-os`, the full RTOS version. Build doesn't
work unless `-DMBED_TEST_LINK_LIBRARIES=<...>` is passed, which
is redundant.
* A test should never need additional libraries passed via command
line - its `CMakeLists.txt` should specify what it links.

This commit replaces `MBED_TEST_LINK_LIBRARIES` with a new option
`MBED_TEST_BAREMETAL` to build a test with either RTOS (default)
or without it (by passing `-DMBED_TEST_BAREMETAL=ON`).
2021-07-06 13:43:06 +01:00
Lingkai Dong 2a1d50f0fa app.cmake: Replace tabs with spaces
The coding standards of Mbed OS require indentation of four spaces.
2021-07-06 13:35:43 +01:00
Jaeden Amero 75808eaaf2
Merge pull request #14783 from rwalton-arm/dont_capture_stdout
tfm-post-build: Don't capture subprocess stdout
2021-07-06 12:57:45 +01:00
Martin Kojtal 80ce06fb67
Merge pull request #14876 from rwalton-arm/mbed_path_greentea
CMake: greentea: Remove dependency on global MBED_PATH
2021-07-06 13:30:25 +02:00
Robert Walton dfb4e087e3 CMake: greentea: Remove dependency on global MBED_PATH
The mbed_greentea_add_test macro required a greentea test to set an
MBED_PATH variable to the path of the mbed-os root directory, which it
attempts to add as a 'subdirectory' of the test project. We can instead
use CMake's built in CMAKE_CURRENT_LIST_DIR variable to deduce the path
to mbed-os relative to the current list file directory, removing the
need for greentea tests to set MBED_PATH.
2021-07-06 10:53:32 +01:00
Robert Walton d5a4ad1fe9 CMake: greentea: Remove call to deprecated function
mbed_greentea::mbed_greentea_add_test was calling the deprecated
`mbed_configure_app_target` function, which is currently a no-op.
2021-07-05 22:53:35 +01:00
saheerb bf84452c60 enable google and azure example application tests in ci 2021-07-05 20:30:35 +01:00
Charles ca32375228 added STM32WLE5JCIx 2021-07-05 13:08:09 +02:00
Robert Walton da6febf616 CMake: mbed_greentea: Remove trailing whitespace 2021-07-02 11:44:51 +01:00
Jaeden Amero b5c2f7079e
Merge pull request #14718 from Meano/develop
Feature: Make changes for Cortex-A5 support
2021-07-01 10:23:41 +01:00
Martin Kojtal 66a770e92e
Merge pull request #14780 from Patater/update-python-requirements
Update python requirements
2021-06-30 16:38:02 +02:00
Jaeden Amero 270ea5deb7
Merge pull request #14815 from LDong-Arm/test_psa_k64f_k66f
Enable PSA tests on K64F/K66F and fix missing PSA Crypto init in TLSSocketWrapper
2021-06-30 15:20:05 +01:00
Jaeden Amero 9b09cddf1d python: Update requirements
Update versions of urllib3, PyYAML, jinja2, cryptography.
2021-06-30 09:12:31 +01:00
Robert Walton 6d78f93b9e tfm-post-build: Don't capture subprocess stdout
subprocess.PIPE is used to enable the parent process to communicate with
the subprocess via pipes, which mean all stdout and stderr messages are
captured and returned as part of Popen.communicate's result tuple.

In our case, we want to display the error messages on the console, so we
don't need to capture the output from stdout.

Example of a typical error message before this change:
```
Traceback (most recent call last):
  File "platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts/generate_mbed_image.py", line 197, in <module>
    sign_and_merge_tfm_bin(args.tfm_target, args.target_path, args.non_secure_bin, args.secure_bin)
  File "platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts/generate_mbed_image.py", line 81, in sign_and_merge_tfm_bin
    " secure binary, Error code: " + str(retcode))
Exception: Unable to sign musca_b1 secure binary, Error code: 1
```

Example of the error message after this change:
```
Traceback (most recent call last):
  File "/mbed-os/tools/psa/tfm/bin_utils/wrapper.py", line 13, in <module>
    import click
ModuleNotFoundError: No module named 'click'
Traceback (most recent call last):
  File "platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts/generate_mbed_image.py", line 194, in <module>
    sign_and_merge_tfm_bin(args.tfm_target, args.target_path, args.non_secure_bin, args.secure_bin)
  File "platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts/generate_mbed_image.py", line 80, in sign_and_merge_tfm_bin
    raise Exception("Unable to sign " + target_name +
Exception: Unable to sign musca_b1 secure binary, Error code: 1
```

This is a significant improvement as now you can see what the reason for
the failure was.
2021-06-29 15:37:44 +01:00
Hari Limaye f95052cf6f CMake: Require TEST_SOURCES in greentea CMake file
Assumption that greentea test file is always named main.cpp is
incorrect. Updated mbed_greentea_add_test() macro to make TEST_SOURCES
parameter compulsory, which is used to specify greentea test
file(s). This allows tests to use C, or have a different name.
Therefore also updated all pre-existing greentea test CMake files to
explicity add main.cpp to TEST_SOURCES.
2021-06-29 13:33:42 +01:00
Hari Limaye defc80a13e CMake: Remove alias for TEST_NAME argument
The mbed_greentea_add_test macro previously set a variable in order to
use the un-prefixed TEST_NAME to refer to the argument in the macro
body. Whilst pair-programming with LDong, this was identified and
determined to be unecessary (maybe it was a failed attempt to fix
something, that was never reversed?) and so it has been removed.
2021-06-29 13:32:57 +01:00
Lingkai Dong 8ce87194fd test configs: Test Experimental API on K64F/K66F
When using the `mbed test` command to build and run tests, some
targets have additional configurations/overrides defined in
`tools/test_configs/`:
* `target_configs.json` lists which targets support which configs.
* `config_paths.json` maps the name of each config to the JSON file to
use.

By default, only `default_test_configuration` from
`target_configs.json` gets used when building and running tests.
Others listed in `test_configuration` need to be switched via
`--test-config <NAME>`.

This commit enables Experimental API in the default configurations of
K64F and K66F in order to test Mbed OS PSA. Any existing configs are
kept, which is why `HeapBlockDeviceAndEthernetAndExperimental.json` is
created for K64F.
2021-06-28 10:31:55 +01:00
Lingkai Dong 2d36341f41 target_configs.json: Remove unreachable nsapi entries
In `tools/test_configs/`, target-specific test configurations are
defined in `target_configs.json` and parsed by `__init__.py`. The
latter only makes use of `default_test_configuration` (default test
configuration to use) and `test_configurations` (more configurations
selectable via `mbed test --test-config <config>`. Anything else
is ignored, including nsapi, so this commit cleans up dead entries.
2021-06-28 10:31:55 +01:00
Meano 2d2d1cf956 Modify the python tools to support Cortex-A5 2021-06-23 13:39:21 +08:00
Meano ff2188150a Make changes for Cortex-A5 support 2021-06-23 13:36:55 +08:00
Meano a57b892cb8 Unify the cores/Cortex-A.cmake 2021-06-23 13:36:54 +08:00
Meano d8917a47e5 Remove unused old symbols: __MBED_CMSIS_RTOS_CM/A9 2021-06-23 13:34:16 +08:00
saheerb 5d11a1e350 run example-tls on faster K64F board (than K66F) 2021-06-17 09:43:53 +01:00
Martin Kojtal aeaac0e70c
Merge pull request #14746 from jeromecoutant/PR_WB15CC
STM32WB: introduce STM32WB15CC NUCLEO
2021-06-10 14:16:10 +02:00
jeromecoutant 9145ac5108 CMSIS pack manager: add STM32WB15CCUx
Values from Keil.STM32WBxx_DFP.1.2.0.pack
https://www.keil.com/dd2/pack/
2021-06-07 16:05:50 +02:00
Chris Swinchatt 053eb24ab0 Fix 'netsocket: several dynamic allocation results not checked' (#14210)
Incorporates PR #14223 + changes required for spellchecker
2021-06-07 14:54:37 +01:00
Martin Kojtal 543bcb5192
Merge pull request #14441 from OpenNuvoton/nuvoton_m2354_tfm
M2354: Support Nuvoton's new target
2021-06-01 11:25:59 +02:00
Chun-Chieh Li 2c3fb3d727 M2354: Reduce output image size
1.  Enable mcuboot no padding option
2.  Support output image format Intel Hex
2021-05-26 09:35:03 +08:00
Chun-Chieh Li fd8ac31537 M2354: Support TF-M
1.  Configure non-secure target name to NU_M2354 (targets/targets.json). No NU_M2354_NS alias
2.  Following template target, enable image signing and concatenating in post-build process
    (1) Add post-build script (tools/targets).
    (2) Enable TF-M custom build by centralize relevant stuff imported from TF-M (COMPONENT_TFM_S_FW).
3.  Add M2354Code.merge_secure into whitelist of uvision6 (tools/export/uvision/__init__.py).
4.  Add M2354 CMSIS pack database (tools/arm_pack_manager/index.json).
5.  Configure stdio baudrate to 115200 to match TF-M port (platform/mbed_lib.json).
6.  Define CMSIS_NVIC_VIRTUAL to override NVIC_SystemReset with TF-M version (cmsis_nvic_virtual.h).
7.  Override tfm_ns_interface_xxx(...) to enable NS secure call:
    (1) At pre-rtos stage
    (2) In SVC context
8. Implement secure function call with tfm_platform_ioctl(...).
9. Combine stddriver_secure.h/c and hal_secure.h/c into platform_extra_secure.h/c.
10. Fix peripheral base to non-secure (PeripheralNames.h) (TrustZone-unaware since Mbed OS 6.0).
11. Fix NU_PORT_BASE/NU_GET_GPIO_PIN_DATA/NU_SET_GPIO_PIN_DATA to non-secure (PinNamesCommon.h) (TrustZone-unaware since Mbed OS 6.0).
12. NSC convention for StdDriver sys/clk (both TF-M and Mbed must follow)
    (1) SYS_ResetModule
        Usage: Replaced with SYS_ResetModule_S on Mbed OS
        Action: Make it inaccessible from Mbed (neither source nor NSC). Provide SYS_ResetModule_S on Mbed via platform ioctl instead.
    (2) CLK_GetXxx
        Usage: Called in bpwm/i2s/qspi/sc/sdh and system_M2354 on Mbed OS
        Action: Make them inaccessible from Mbed (neither source nor NSC). Re-provide them on Mbed via platform ioctl instead.
13. Remove DISABLE/ENABLE macro definitions in BSP to avoid name conflict with other modules
14. Change to TMR4/5 from TMR2/3 for implementing us_ticker/lp_ticker because TMR2 is used for TF-M NSPE test
15. Support cmake

NOTE: Export(uvision6) doesn't support TF-M target. To enable it for partial compile on Keil, force below function to return true.
      is_target_supported(tools/export/uvision/__init__.py)
2021-05-26 09:35:02 +08:00
Werner Lewis bef020b0c7 cmake: Remove armasm workaround for Cortex M55 2021-05-24 13:56:19 +01:00
Saheer Babu 9b1947c332 enable aws example test in CI 2021-05-17 13:07:01 +01:00
Martin Kojtal e25e94e74a
Merge pull request #14538 from harmut01/cmake-test-mode
Cmake: Add MBED_TEST_MODE macro
2021-05-11 11:12:19 +02:00
Martin Kojtal e18d280ede
Merge pull request #14588 from Patater/mbed-libs-for-m55
Add v8.1-M architecture awareness
2021-05-10 15:13:33 +02:00
Jaeden Amero a29a5e165a cortex-m55: Workaround armasm options bug
We use armclang with `-masm=auto` to auto-select which assembler to use
based on the syntax of the file. Cortex-M55 isn't supported by armasm,
but we don't yet have GCC-syntax asm files for ARM compiler
(1dd090bd1c/CMSIS/RTOS2/RTX/Source/ARM/irq_armv8mml.s).

    $ armclang --target=arm-arm-none-eabi -mcpu=cortex-m55 -mfpu=none -masm=auto -c cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_ARM/TARGET_M33/irq_armv8mml.S
    armclang: error: armasm does not support CPU 'cortex-m55'

In the mean time, we can build C and C++ files using the
`-mcpu=cortex-m55` option, and for armasm, cancel out that choice of CPU
with a known-supported CPU type, Cortex-R7, and provide the legacy
assembler-specific option `-Wa,armasm,--cpu=cortex-m55`.

After these changes, this works:

    $ armclang --target=arm-arm-none-eabi -mcpu=cortex-m55 -mcpu=cortex-r7 -Wa,--cpu=cortex-m55 -mfpu=none -masm=auto -c cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_ARM/TARGET_M33/irq_armv8mml.S
2021-05-05 16:58:24 +01:00
harmut01 c29b561784 CMake: Refactor MBED_TEST_MODE test application 2021-04-28 14:21:33 +01:00
harmut01 fa1d9c059d Cmake: Add backward compatibilty support for MBED_TEST_MODE
Fixes #14494

MBED_TEST_MODE is required for backward compatibilty with CLI1. This
adds a test to ensure that the macro is created when using CLI2 for
testing. This also adds a test in `.travis.yml` that checks whether
CMake defines the macro when BUILD_TESTING is on.

CLI1 Reference: https://os.mbed.com/docs/mbed-os/v6.9/debug-test/greentea-for-testing-applications.html

Also, explicitly create and set the macro BUILD_TESTING to allow for
MBED_TEST_MODE to be defined by CMake. MBED_TEST_MODE is required for
backward compatibilty with CLI1.  BUILD_TESTING is used to determine
whether to define MBED_TEST_MODE.  Normally, this would be automatically
done by CTest (which we intend to add for test automation) but this
hasn't yet been added to our Greentea tests.
2021-04-28 14:21:33 +01:00
Saheer Babu 6776473879 remove cmake specific example list 2021-04-28 13:54:12 +01:00
Martin Kojtal 331473a706
Merge pull request #14589 from plan-do-break-fix/Typo-corrections
fix(docs): corrects various typos in project documentation
2021-04-28 13:36:37 +01:00
Saheer Babu 9bd4d24104 create symbolic links for all sub examples which has mbed-os.lib. 2021-04-26 10:07:28 +01:00
plan-do-break-fix 915b45af23 fix(docs): corrects various typos in project documentation 2021-04-23 23:31:11 -05:00
Martin Kojtal 3213ea8ba1
Merge pull request #14507 from saheerb/master
make target list for applications in examples_cmake.json consistent with examples.json
2021-04-15 17:46:11 +02:00
Martin Kojtal 7f42511673
Merge pull request #14529 from LDong-Arm/cmake_MULADDC
CMake: Fix Mbed TLS compilation on Cortex-M0/0+/1/M23
2021-04-15 14:29:27 +02:00
Martin Kojtal 1fd4cfd798
Merge pull request #14516 from 0xc0170/fix-cmake-project-name
CMake: remove MBED_PATH and use <PROJECT-NAME>_SOURCE_DIR/MODULE_PATH instead
2021-04-15 14:00:21 +02:00
Saheer Babu a62cd220dd disable test for example-device-key 2021-04-15 12:58:21 +01:00
Saheer Babu aa2a067c0d update cmake_examples to latest CI passing list 2021-04-15 11:18:28 +01:00
Lingkai Dong 86e7bc559b CMake: Fix Mbed TLS compilation for Cortex-M0/0+/1/M23
Due to a known issue in Mbed TLS's architecture determination
(ARMmbed/mbedtls#1077), we get the error

    error: inline assembly requires more registers than available

when compiling `bignum.c` for Cortex-M0/0+/1/M23 which do not have
the macro `__thumb2__` set by the compiler.

The workaround is to define the macro `MULADDC_CANNOT_USE_R7` which
is already defined by Mbed CLI 1 but missing in our CMake support.

Fixes ARMmbed/mbed-os-example-lorawan#220
2021-04-15 11:04:40 +01:00
Martin Kojtal a3be10c976
Merge pull request #14541 from LDong-Arm/crash-reporting-baud
Increase baud rate of mbed-os-example-crash-reporting to 115200
2021-04-14 20:16:32 +02:00
Martin Kojtal 121c8286da CMake: set CMAKE_MODULE_PATH in the Mbed OS CMakelists.txt
Update CMAKE_MODULE_PATH at once place.

Note, we update also CMAKE_MODULE_PATH in app.cmake. This is temporary until we get a proper way to include
Mbed Os (removing app.cmake need to be included by an application).
2021-04-14 13:09:28 +01:00
Martin Kojtal 65e246fe4d CMake: add mbed_ prefix to our CMake files
To avoid conflicts as we expose our CMake list files via CMAKE_MODULE_PATH. Some files already include it, this
aligns the rest of files.

I leave app.cmake as it is - it's user facing and it would be breaking change. We can clean this one for the next major version.
2021-04-14 13:09:27 +01:00
Martin Kojtal ed609f57c4 CMake app: add our cmake folder to CMAKE_MODULE_PATH
All files within tools/cmake can now include within tools/cmake. We do not expose
internal folders like core/profiles/toolchains.
They should be included via toolchain file (mbed_toolchain in our case).
2021-04-14 13:09:27 +01:00
Martin Kojtal b88d5687e2 CMake tools: use CMAKE_CURRENT_LIST_DIR instead of MBED_PATH
Excluding greentea tests, they will be fixed separately (more work needed).
2021-04-14 13:09:27 +01:00
Jaeden Amero f02fbaa061 examples: Deprecate mbed-os-example-bootloader
We no longer support the mbed-os-example-bootloader example.
2021-04-14 11:57:14 +01:00
Lingkai Dong b5893bebbb Increase baud rate of mbed-os-example-crash-reporting to 115200
At 9600 baud, a large part of the serial output of the crash reporting
example is missing on CI boards, causing the example test to fail. At
a higher serial speed (115200 baud), the entire output is intact.

This is in alignment with ARMmbed/mbed-os-example-crash-reporting#65.

Fixes #14535
2021-04-13 16:10:39 +01:00
Lingkai Dong e6610bd111 Use only NUCLEO_F401RE for the NFC examples
The repository mbed-os-example-nfc contains two examples: NFC_EEPROM
and NFC_SmartPoster. According to their respective `mbed_app.json`,
only NUCLEO_F401RE supports both examples, so we limit the compilation
test to this target only.

Compilation with an unsupported target fails (as expected) with Mbed
CLI 2 which enforces a check on a target's availability of the
required NFC controller. Mbed CLI 1 lacks such check and always
compiles.

Fixes ARMmbed/mbed-os-example-nfc#106
2021-04-09 10:38:01 +01:00
jeromecoutant 7ead194755 STM32WL: update device_name 2021-04-01 11:52:48 +02:00
jeromecoutant 81acd5d975 STM32L5: update device_name 2021-04-01 11:52:48 +02:00
jeromecoutant 7b80a441f5 STM32L4: update device_name 2021-04-01 11:52:48 +02:00
jeromecoutant 941e600f77 STM32L1: update device_name 2021-04-01 11:52:47 +02:00
jeromecoutant c6a783118f STM32L0: update device_name 2021-04-01 11:52:47 +02:00
jeromecoutant 4393d241b2 STM32H7: update device_name 2021-04-01 11:52:47 +02:00
jeromecoutant 1c375e4d90 STM32F7: update device_name 2021-04-01 11:52:47 +02:00
jeromecoutant 762d5f40c8 STM32F4: update device_name 2021-04-01 11:52:47 +02:00
jeromecoutant 5fc3975c58 STM32F3: update device_name 2021-04-01 11:52:47 +02:00
jeromecoutant d1c78a296b STM32F2: update device_name 2021-04-01 11:52:47 +02:00
jeromecoutant 78e84c94c9 STM32F1: update device_name 2021-04-01 11:52:47 +02:00
jeromecoutant e5c47f2484 STM32F0: update device_name 2021-04-01 11:45:25 +02:00
Anna Bridge 73896715e6
Merge pull request #14477 from jeromecoutant/PR_L5_PACK
STM32: Add STM32L5 in arm_pack_manager index file
2021-03-31 15:25:43 +01:00
jeromecoutant ddfde71643 STM32L5: correct arm_pack_manager index file 2021-03-26 12:01:26 +01:00
Saheer Babu d5dcc4da72 Update cmake supported example list.
Create cmake supported cloud example list.
2021-03-25 17:21:32 +00:00
Hugues Kamba b193d97532 CMake: Fix Cortex-A9 flags for GCC_ARM toolchain
The -mcpu=cortex-a9 flag conflicts with the march=armv7-a flag.
Opted to keep mcpu=cortex-a9 as it is more specific and
allows GCC to perform better optimization.

The compiler is also changed to use soft-float ABI as it
was necessary to successfully build. Without it the application
appears to be built with soft-float ABI and it conflicts with
the previous setting which was built with hard-float ABI.
This may be related to: https://gitlab.kitware.com/cmake/cmake/-/issues/21173
2021-03-12 13:21:04 +00:00
Martin Kojtal 8a19e3ecfc
Merge pull request #14362 from LDong-Arm/cypress_signing_fix
Fix imgtool import for CYTFM_064B0S2_4343W signing
2021-03-11 11:13:56 +00:00
Martin Kojtal 0ef2024a1d
Merge pull request #14401 from LDong-Arm/m33_link_fix
Workaround for Cortex-M33 Arm toochain linking
2021-03-11 11:05:10 +00:00
Lingkai Dong 6dc85e0386 Workaround for Cortex-M33 Arm toochain linking
Binaries generated for Cortex-M33 targets (e.g. Musca S1/B1) using
the Arm toolchain + CMake is unable to run, unless we instruct the
linker to not use floating points.

Note: This is a temporary workaround, because
* Ideally, the Arm linker should be able to auto detect the
  architecture support from the input object files, but it's not
  always the case. We already have a similar workaround for Cortex-M4.
* The full option to use should be `--cpu=Cortex-M33.no_dsp.no_fp`
  but `no_dsp` currently conflicts with CMake's compilation tests
  (no option to disable DSP in the test objects before linking).
2021-03-09 17:35:48 +00:00
Lingkai Dong 26abe5656b CMake README: post build now supported on TF-M targets 2021-03-08 16:38:00 +00:00
Rajkumar Kanagaraj 3695cefad3 CMake: Update readme for greentea test build procedure
- No longer need to create mbed_os.lib and soft link to mbed-os as new
 --mbed-os-path command-line removes such dependency and creates mbed_build.cmake
 when passing mbed-os path with that command line argument.
2021-03-03 03:58:59 -08:00
Lingkai Dong 5ef82f59cc Fix imgtool import for CYTFM_064B0S2_4343W signing
Fixes: #14153

The target CYTFM_064B0S2_4343W is signed using `cysecuretools` which
depends on `imgtool` managed by `pip`. However, Arm Musca targets
requires a modified/wrapped version of the image tool copied from
trusted-firmware-m + MCUboot.

To avoid conflicts in the version of `imgtool` used, we should only
add the copied version of `imgtool` to python's system path for
Musca targets instead of doing it globally for all targets.
2021-03-03 11:14:25 +00:00
Martin Kojtal 76b2902f48
Merge pull request #14354 from ARMmbed/feature-tf-m-1.2-integration
Update TF-M support to v1.2
2021-03-03 11:08:24 +00:00
Ladislas de Toldi fd7ea7305f
Configure memory map per target to allow multiple add_executable 2021-02-27 13:16:03 +01:00
Martin Kojtal eceaea54fd
Merge pull request #14299 from hugueskamba/hk_cmake_refactor_mapfile_generation
CMake: Refactor mapfile generation
2021-02-25 15:08:55 +00:00
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