Commit Graph

34034 Commits (bf677aefb643b3650e9ff70213ddd805e55d098a)

Author SHA1 Message Date
Johannes Stratmann bf677aefb6 Revert "Merge branch 'fix-memmap-diff'"
This reverts commit 3d22c880d8.
2021-10-05 17:17:35 +02:00
Johannes Stratmann 750247c472 Revert "update cmake_minimum_required to 3.21.0"
This reverts commit cfa8865230.
2021-10-05 17:16:59 +02:00
Johannes Stratmann 5ae8e0eec0 replace file(copy by cmake -E copy 2021-10-05 17:16:00 +02:00
Johannes Stratmann d4062f5fcb update README for new CMake version 2021-09-28 16:59:12 +02:00
Johannes Stratmann 3d22c880d8 Merge branch 'fix-memmap-diff' 2021-09-28 16:59:00 +02:00
Johannes Stratmann cfa8865230 update cmake_minimum_required to 3.21.0 2021-09-28 16:57:49 +02:00
Johannes Stratmann 70b2193fa1 copy map file to .old before creating new one 2021-09-28 16:57:14 +02:00
Martin Kojtal d93843a694
Merge pull request #15080 from jeromecoutant/PR_F407_CAN
STM32F4: CAN issue with F407 target
2021-09-28 14:02:50 +01:00
Martin Kojtal ff6d401a86
Merge pull request #15095 from LDong-Arm/ctest_nfc
CMake: greentea: Migrate the NFC EEPROM test to CTest
2021-09-28 13:26:41 +01:00
Jerome Coutant f9010ed7a0 STM32F4: CAN issue with F407 target 2021-09-28 13:32:11 +02:00
Martin Kojtal 94c7463762
Merge pull request #15062 from jeromecoutant/PR_LORABARE
Lora drivers: explicit lib requirement
2021-09-28 11:04:55 +01:00
Martin Kojtal c8b489ea9b
Merge pull request #15075 from jeromecoutant/PR_G0_CUBE
STM32G0 update drivers version to CUBE V1.5.0
2021-09-28 11:04:36 +01:00
Jaeden Amero c4f97fc34c
Merge pull request #15098 from jeromecoutant/PR_F303
STM32F303xC: cmakelist issue
2021-09-27 17:43:06 +01:00
Jerome Coutant 998a46f775 STM32F303xC: cmakelist issue 2021-09-22 11:48:01 +02:00
Jerome Coutant d61d7aa24b STM32G0: update README 2021-09-22 11:47:05 +02:00
Jerome Coutant edd426aac7 STM32G0: update Pack manager
Add
- STM32G050K8Tx for all STM32G050x8 targets
- STM32G051K8Tx for all STM32G051x8 targets
- STM32G061K8Tx for all STM32G061x8 targets
- STM32G0B0RETx for all STM32G0B0xE targets
- STM32G0B1RETx for all STM32G0B1xE targets
2021-09-22 11:47:05 +02:00
Jerome Coutant 168f9a37a9 STM32G0: introduce sub family for custom boards
STM32G030x8
STM32G041x8
STM32G050x8
STM32G051x8
STM32G061x8
STM32G081xB
STM32G0B0xE
STM32G0B1xE
STM32G0C1xE
2021-09-22 11:46:54 +02:00
Jerome Coutant b711180838 STM32G0: update from STM32Cube_FW_G0_V1.5.0 2021-09-21 11:29:33 +02:00
Jerome Coutant e0877e4077 STM32G0: align code with CubeUpdate script 2021-09-21 11:29:33 +02:00
Lingkai Dong 58f83597b4 CMake: greentea: Migrate the NFC EEPROM test to CTest 2021-09-20 17:14:06 +01:00
Lingkai Dong cbec61adb5 targets: Declare DISCO_L475VG_IOT01A's built-in M24SR NFC 2021-09-20 17:04:51 +01:00
Lingkai Dong ce1f054bd3 CMake: connectivity: Add drivers subdirectory for tests
Greentea tests run on microcontrollers, so any required drivers need
to be available and built.

Note: Even though unit tests do not require drivers, for ease of
maintenance there's no need to exclude those drivers when building unit
tests because a driver only gets enabled when the Mbed target matches.
2021-09-20 16:28:54 +01:00
Lingkai Dong db8852c5d8 CMake: connectivity: Guard unit test directories
When unit tests or unit test stubs get added as CMake targets, they
becomes part of the "all" target and get compiled when building the
whole project. When building greentea tests we need to disable unit
tests and stubs to avoid unnecessary compilation and errors.
2021-09-20 16:28:54 +01:00
Lingkai Dong c01d417ed4 CMake: connectivity: Unify checks for unit and greentea tests
Subdirectories should always be included in the CMake "all" target when
building any tests, either unit tests or greentea tests.
2021-09-20 16:28:53 +01:00
Lingkai Dong d954841983 memap.py: Allow .a extension for Arm Compiler-generated libraries
The most common extension for static libraries is .a and CMake generates
it with both GCC and Arm toolchains. Mbed CLI 1 generates .ar files with
the Arm Compiler, but since Mbed CLI 2 uses memap.py to generate map
files too, both extensions should be permitted.

This fixes a warning when building greentea tests:

    Malformed input found when parsing ARMCC map: _deps/greentea-client-build/libclient_userio.a(greentea_test_env.o)
    Malformed input found when parsing ARMCC map: _deps/greentea-client-build/libclient_userio.a(greentea_test_env.o)
    Malformed input found when parsing ARMCC map: _deps/greentea-client-build/libclient_userio.a(greentea_test_env.o)
    ...

which repeats over 30 times per test.
2021-09-20 16:28:53 +01:00
Jaeden Amero 4cfbea43ca
Merge pull request #15078 from OpenNuvoton/nuvoton_m2354_tfm_1.4_fix
M2354: Fix TF-M 1.4
2021-09-17 11:31:25 +01:00
Chun-Chieh Li bbc5ad9505 M2354: Fix TF-M 1.4
1.  In TF-M, fix NSPE interrupt-disabled NSC call broken. Check:
    https://developer.trustedfirmware.org/T966
2.  In TF-M, enable mcuboot log enabled forcibly. This is to help check firmware update process.
3.  Update readme and script
2021-09-17 13:44:58 +08:00
mbedmain 810adf9aa8 Update Mbed version block 2021-09-16 12:15:02 +01:00
Anna Bridge 7feef5981e
Merge pull request #15061 from pan-/fix-event-queue-background-fn-change
Fix replacement of event queue background.
2021-09-16 11:34:34 +01:00
Jaeden Amero 8698a5516c
Merge pull request #15073 from rwalton-arm/fix_greentea_ctest
CMake: QSPIFBlockDevice: Guard unit test directory
2021-09-15 17:41:54 +01:00
Robert Walton fca7323f73 CMake: QSPIFBlockDevice: Guard unit test directory
In the QSPIFBlockDevice component we checked if BUILD_TESTING was
enabled before adding the QSPIFBlockDevice/UNITTESTS subdirectory. In
the parent blockdevice/CMakeLists.txt we added the QSPIFBlockDevice
subdirectory to the build under two separate conditions:

* when "QSPIF" is present in MBED_TARGET_LABELS
* when building only unit tests

This wasn't quite enough, as when we build greentea tests for some
targets QSPIF is enabled in MBED_TARGET_LABELS, causing the
QSPIFBlockDevice subdirectory and its unit tests to be added when
building greentea tests. This caused a test failure on targets which
enable QSPIF:

```
The following tests FAILED:
	 40 - qspif-unittest_NOT_BUILT (Not Run)
```

To fix this we need to specifically check that we're not building
greentea tests before adding the QSPIFBlockDevice/UNITTESTS directory to
the project.

Part of this issue is our reliance on MBED_TARGET_LABELS to pull
features in to the build. We should refactor our usage of
MBED_TARGET_LABELS and use CMake target dependencies where possible.
Then we wouldn't need to add subdirectories under various, often
conflicting, scenarios. Instead the targets would always be available
and we would just choose which ones to actually build in different cases
using CMake target linking.
2021-09-15 11:38:30 +01:00
Jaeden Amero 64a34193b1
Merge pull request #15050 from rwalton-arm/TF-Mv1.4.0
Update to TF-M v1.4.0
2021-09-15 08:38:07 +01:00
Robert Walton a43103faac TFM: MUSCA: Import partition maps from upstream
Import the latest partition headers from upstream. We no longer need to
patch the headers to define the BL2 macro as we now define it in the
scatter files for the MUSCA targets.
2021-09-14 17:32:42 +01:00
Robert Walton 33e57ee577 TFM: Remove BL2 macro workaround for mbed-cli1/ARMClang
We worked around an issue with mbed-cli1 not recognising the BL2 macro
from targets.json by adding patched versions of region_defs.h and
flash_layout.h for ARM_MUSCA targets. In the patched headers we defined
the BL2 macro to ensure it can be picked up by the ARM scatter files
that include the headers.

The current solution is not robust, because it means that the
aforementioned headers easily become out of date. A workaround of
defining the macros in the scatter files which need them was suggested
in https://github.com/ARMmbed/mbed-os/issues/14762

This commit applies the suggested changes to the ARM_MUSCA scatter
files.
2021-09-14 17:32:42 +01:00
Robert Walton 98e3730bf2 PSA: Reinstate deprecated macro
PSA_ALG_AEAD_WITH_TAG_LENGTH has been replaced with
PSA_ALG_AEAD_WITH_SHORTENED_TAG upstream. We could just update
psa_util.h to use the new macro, but we still have some targets that
only support older versions of PSA, so we reinstate the removed macro.
2021-09-14 17:32:42 +01:00
Lingkai Dong c7df1221cc psa: Include mbedtls_svc_key_id.h for TF-M
We have added definitions that are needed by Mbed TLS's PSK key exchange
but missing from TF-M's PSA to `mbedtls_svc_key_id.h`. To pick up those
definitions, TF-M's `psa/crypto_values.h' needs to include
`mbedtls_svc_key_id.h`.
2021-09-14 17:32:42 +01:00
Jaeden Amero 78b17b6717 tfm: Add mbedtls_ecc_group_to_psa.h to crypto_extra.h
Include mbedtls_ecc_group_to_psa.h from crypto_extra.h so that clients
of PSA within Mbed OS do not need to behave differently depending on
which PSA implementation they are using.

This solution is not ideal as it makes it more difficult to update the
TF-M-provided psa/crypto_extra.h. We'll have to see what other options
we have for including additional headers based on the Mbed OS
configuration.
2021-09-14 17:32:42 +01:00
Robert Walton aeee26019e targets: ARM_MUSCA: Update tfm_target_names
The directory structure upstream has changed. Now ARM_MUSCA board
support has been moved under an "arm" subdirectory. Update targets.json
with the new locations.
2021-09-14 17:32:42 +01:00
Robert Walton 56ffd54dd4 tfm: Move tfm_ns_interface.c
tfm_ns_interface.c is intended to be overriden by clients to support
different targets. We copy this file from upstream into the mbed-os
platform library. We also have a specific "strong" overridden version
for the NU_M2354 target, which is located in its target library.
Previously the implementations in the platform library were decorated
with __attribute__(weak), and we provided a strong definition for the
NU_M2354 target. This worked fine because of weak linking, the linker
will pick the first "strong" definition and use that, avoiding any ODR
violations. However, upstream have removed __attribute__(weak) from the
function definitions, which caused multiply defined symbol errors when
trying to build the NU_M2354 target.

To work around the above issue, we remove the common definition in the
platform library; instead we copy the file to the Musca B1 and Musca S1
target libaries. This means the appropriate tfm_ns_interface.c is only
included in the build when compiling for the specific target which uses
it.
2021-09-14 17:32:42 +01:00
Robert Walton 6850192508 tools: tfm: Update bin_utils 2021-09-14 17:32:42 +01:00
Robert Walton 3d17e1646c "Update secure binaries for [('NU_M2354', 'GNUARM')]" 2021-09-14 17:32:42 +01:00
Robert Walton d11bac087c "Update secure binaries for [('ARM_MUSCA_S1', 'ARMCLANG')]" 2021-09-14 17:32:42 +01:00
Robert Walton f28a6eab4f "Update secure binaries for [('ARM_MUSCA_B1', 'ARMCLANG')]" 2021-09-14 17:32:42 +01:00
Robert Walton c48361b841 "Update directory platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST" 2021-09-14 17:32:42 +01:00
Jaeden Amero eff8fda16c
Merge pull request #15067 from ARMmbed/fix_flash_overflow_callback_big_test
Greentea: Fix flash overflown issue in callback_big test
2021-09-14 17:04:13 +01:00
Rajkumar Kanagaraj 77960d351b Greentea: Fix flash overflown issue in callback_big test
The "Callback_big" greentea test has six test cases that require
a minimum above 36kb ROM to build all test cases. LPC1114 target
has only 32KB ROM memory, so the limit 6th test case to include
or exclude based on the target minimum ROM size.

Note:
In LPC1114 target, callback_big test has ROM overflow build issue
for both Mbed CLI1 and CLI2.
2021-09-14 15:28:06 +01:00
Jaeden Amero 6fd39f4d27
Merge pull request #15066 from ARMmbed/fix_platform_wait_ns_test_cmake
CMake: Fix platform wait_ns greentea test Cmake
2021-09-14 13:21:19 +01:00
Rajkumar Kanagaraj ad18cc88a6 CMake: Fix platform wait_ns greentea test Cmake
Mbed CLI 2 generates TARGET_ARM_FM macro as a string in mbed_config.cmake
under the MBED_TARGET_DEFINITIONS list. Fix the "if defined" check for
TARGET_ARM_FM by searching for the TARGET_ARM_FM string in the
MBED_TARGET_DEFINITIONS list. This allows us to skip or include the test from CMake.
2021-09-13 14:30:23 +01:00
Jaeden Amero 756830e776
Merge pull request #14989 from LDong-Arm/sfdp_sector_maps_multi
SFDP: Add support for multiple configurations and sector maps
2021-09-13 10:09:27 +01:00
Vincent Coubard db4b02c5b1 Fix replacement of event queue background.
This was discovered when EventQueue::background was called with a nullptr.
It crashes the software as it tries to call into a nullptr.
2021-09-10 12:13:09 +01:00