Commit Graph

34005 Commits (fix_lp1114_flash_overflow_issue)

Author SHA1 Message Date
Lingkai Dong 44cd64a3e4 Unit tests: Fix style in cellular myCellularContext.h stub 2021-08-02 13:47:57 +01:00
Lingkai Dong 57dd6812c3 Unit tests: Move cellular target_h stubs
We move test-specific files from the top-level UNITTESTS directory
into individual components' UNITTESTS/doubles subdirectories.
2021-08-02 13:47:57 +01:00
Lingkai Dong dcc240d578 Unit tests: Remove unused syslimits.h 2021-08-02 13:47:57 +01:00
Lingkai Dong 34656e8a92 Unit tests: Remove unused nsapi_ppp.h stub 2021-08-02 13:47:57 +01:00
Lingkai Dong 56d7bb9941 Unit tests: Remove unused arm_math.h 2021-08-02 13:47:57 +01:00
Martin Kojtal 7214fe9c99
Merge pull request #14970 from MubeenHCLite/USBSerial_connect_blocking_resolution
USB connect problem in non blocking mode
2021-08-02 09:52:30 +01:00
Martin Kojtal 3318720ada
Merge pull request #14941 from hazzlim/update-tests-to-use-chrono
Update references to time values to use chrono
2021-07-30 12:02:10 +01:00
Martin Kojtal 334be7bbf2
Merge pull request #14911 from DDC-NDRS/fatfs_0.14b
FatFs: upgrade to R0.14b
2021-07-30 11:46:42 +01:00
Jaeden Amero 744814f0a0
Merge pull request #14900 from 0xc0170/feature_CMSIS_5_13b9f72f2
Update CMSIS to 5.8.0
2021-07-30 09:43:11 +01:00
Martin Kojtal 049d1f145d cmsis importer: add commits for Mbed OS changes
See specific SHA for details.
2021-07-30 08:35:04 +01:00
Mohammed Mubeen b429aeb5f7 Added PCD Start so that connection is established when a host is
connected in non blocking mode (cinnect_blocking = false)
2021-07-30 10:52:00 +05:30
Martin Kojtal 5e29db6e30 rtos: fix delay with 0
Fixes error osErrorParameter that triggers our assert.
RTX delay ignored 0 previously, it now returns osErrorParameter instead.
2021-07-29 14:31:39 +01:00
Martin Kojtal 180eb75f09 cmsis: patch fpu in asm for armcc5
For FPU, use armasm to select fpu selection. This will be fixed upstream in the next version of CMSIS. Meanwhile, we use our local patch.

Taken from --cpu selection for armasm:

--cpu           | {FPU}
Cortex-M4.fp.sp | VFPv4_SP_D16
Cortex-M7.fp.sp | FPv5-SP
Cortex-M7.fp.dp | FPv5_D16

Tracking issue: https://github.com/ARM-software/CMSIS_5/issues/1266
2021-07-29 14:31:39 +01:00
Martin Kojtal 4822ac56a1 cypress: fix cy_syslib breakpoint undefined
CMSIS 5.8.0 requires for armcc to include compat header prior any other header.
See Known issues for the release.
2021-07-29 14:31:39 +01:00
Martin Kojtal c122158d49 cmsis: preprocess irq files
We use preprocessor for asm files even for Armcc. If symbol is defined it's replaced by preprocessor,
asembler would just see 1 or 0 in this case and errors:
TARGET_M33\\irq_armv8mml.S", line 31: Error: A1185E: Symbol missing

Use preprocessor instead.
2021-07-29 14:31:39 +01:00
Martin Kojtal c0187712b1 musca targets: use IsException instead of removed isIrqMode 2021-07-29 14:31:39 +01:00
Martin Kojtal dca1d5c42e cmsis: fix armcc compat header redefition of enable/disable irq
The fix will be in the 5.8.1 CMSIS, we cherry-pick it to our imported version.
See e797cca3f4
2021-07-29 14:31:39 +01:00
Martin Kojtal 00580ce3f5 cmsis: fix rtx_def inclusion in .S files for Gcc Arm
rtx_def includes two CMSIS headers that pull in C/C++ headers in our case. As I found out,
they should only define macros. We can fix it but it will require some refactoring as our targets
use mbed rtx headers to define heap using stdin header, plus some other offenders.

Workaround is to exclude the headers we do not need in irq assembly files.

Tracking issue https://github.com/ARMmbed/mbed-os/issues/14962
2021-07-29 14:31:38 +01:00
Martin Kojtal 38ca4bdce4 semihosting: add compat header where is required
ARMCC provides __semihost via compat header. As CMSIS 5.8.0 removed this compat header,
we need to explicitly include it to fix definition missing error.
2021-07-29 14:31:38 +01:00
Martin Kojtal 8bdec2b4db retarget: move compat header for ARMClang prior any cmsis headers
Reference: CMSIS 5.8.0 known issues and https://github.com/ARM-software/CMSIS_5/issues/1211

This fixes the error about redefinition of enable/disable irq. we need compat header because of
semihosting (not yet provided in CMSIS).
2021-07-29 14:31:33 +01:00
Martin Kojtal 218e93c97f cmsis: fix license header in rtx_def
Upstream fix was merged https://github.com/ARM-software/CMSIS_5/pull/1238. Included here as it will be overwritten once again updated
2021-07-29 14:29:57 +01:00
harmut01 86c2d70a5b Greentea: Remove deprecated APIs and use chrono
References to time should do so using std::chrono. We reworked tests in
connectivity and drivers to use std::chrono and new APIs in order to
remove deprecation warnings resulting from deprecated API calls.
This required addition of  a macro for test assertions using std::chrono
values.

As host test "timing_drift_auto" expects time values represented as an
integral number of microseconds, we explicitly provide this in place
using "microseconds{TICKER_TIME}.count()" in the relevant ticker tests.
We recognise this is ugly, but thought it best to descriptively convert
from std::chrono to the host test's required representation.

Co-authored-by: Hari Limaye <hari.limaye@arm.com>
2021-07-29 14:06:27 +01:00
Martin Kojtal bad4aa61ca
Merge pull request #14575 from LDong-Arm/cmake_armclang_fix
CMake: Enable improved armclang support in CMake 3.21
2021-07-29 10:32:27 +01:00
Martin Kojtal b94fe130a3
Merge pull request #14288 from boraozgen/bg96-socket-send-segmentation
BG96: Add segmentation to TCP socket send
2021-07-29 10:31:23 +01:00
Charles d13aaf408c
Allow LoRaWAN STM32WL driver debug led to be inverted (#14910) 2021-07-29 10:29:53 +01:00
Jaeden Amero 3d362641fb
Merge pull request #14944 from rwalton-arm/fix_ctest_reporting
CMake: unittests: Show all tests in CTest report
2021-07-28 11:39:18 +01:00
Robert Walton 98e25f193e unittests: Test_LoRaWANStack.acquire_rx_metadata: Fix SEGFAULT
We failed to set `LoRaMac_stub::mlme_ind_ptr` to a valid pointer. When
we tried to dereference it in `LoRaWANStack::process_reception` we hit a
SEGFAULT.
2021-07-27 21:09:39 +01:00
Robert Walton 421adc9888 unittests: Fix Test_LoRaWANStack.acquire_tx_metadata
This test was relying on the state of `LoRaMac_stub::bool_true_counter`
to be set to 1 from a previous test. When the test was ran in isolation
the `LoRaWANStack::rx_timeout_interrupt_handler` callback would fail
because we weren't returning true from the stub implementation of
`LoRaMac::nwk_joined`. Due to this
`LoRaWANStack::post_process_tx_no_reception` was never called. This
caused the LoRaWANStack object to think the "tx_metadata" was "stale"
(i.e the data hadn't changed since any previous read). So, when we
attempted to call `LoRaWANStack::acquire_tx_metadata` it returned
`LORAWAN_STATUS_METADATA_NOT_AVAILABLE` as it thought we had no new
metadata to report, causing the test assertion to fail.
2021-07-27 21:09:39 +01:00
Robert Walton 9f3069f1e1 unittests: Test_LoRaMac.post_process_mcps_req: Fix segfault
We had commented out a line where we reset LoRaPHY_stub::uint16_value to
0. This was causing an invalid array access in
LoRaMac::handle_data_frame, when trying to extract the
_mps_indication.channel from list of channel_params_t returned by
lora_phy->get_phy_channels.
2021-07-27 21:09:39 +01:00
Robert Walton b0c0fc9f66 unittests: Reduce runtime of TDBStoreModuleTest.corrupted_set_deinit_init_get
Instead of performing 10,000 "set, deinit, get" operations, let's just
perform 100. This reduces test time from 4.8s to 0.02s.
2021-07-27 21:09:39 +01:00
Robert Walton 2e75d184b6 unittests: Remove ATHandler test interdependencies
Some tests in athandlertest.cpp relied on the state of stubs set in
previous tests. This caused test failures if the tests cases were ran in
isolation. Remove the interdependencies between tests by setting stub
values in the tests that rely on them.
2021-07-27 21:09:39 +01:00
Robert Walton a09d08917b CMake: unittests: Show all tests in CTest report
Previously a test executable was recognised as a single test by CTest.
However, test executables usually contain multiple test cases, the
results of the test cases should be individually reported. With our
previous setup we could miss test case failures that didn't cause the
executable to return an error code.

This commit uses gtest_discover_test to discover all test cases in a
test executable. This enables CTest to match test passes and failures
from the googletest binary output.
2021-07-27 21:09:39 +01:00
Robert Walton 1e48a61d89 CMake: unittests: Remove trailing whitespace 2021-07-27 21:09:38 +01:00
Jaeden Amero 862a9420fe
Merge pull request #14948 from Patater/lorawan-timer-unittest-fake-fix
Fix lorawantimer unit test
2021-07-27 14:02:47 +01:00
Jaeden Amero 51b81e0629 test: Make MBED_ASSERT failures fail
Make MBED_ASSERT failures fail the unit test case. Without this, we
might not notice the assertion failure as it wouldn't be bubbled up to
googletest.
2021-07-27 10:28:12 +01:00
Jaeden Amero f0d7e24066 test: CircularBuffer: Don't push zero elements
The CircularBuffer doesn't allow pushing zero elements; you must push at
least one. Update the CircularBuffer unit test to avoid invalid use of
the CircularBuffer.
2021-07-27 10:28:12 +01:00
Jaeden Amero 0a944f0ac4 test: lorawanstack: Use valid message type
We previously made up an invalid message type, which was roughly
`MCPS_MULTICAST | 0x40`. This causes an MBED_ASSERT failure in the
handle_rx function, as it uses an assert to validate the message type
passed to it (in convert_to_msg_flag()). Use the valid message type
MCPS_MULTICAST instead in the handle_rx unit test.
2021-07-27 10:28:12 +01:00
Robert Walton 07aefbc6bc unittests: Test_LoRaWANTimer.start: Fix test failure
We weren't initialising the mocks correctly, so an MBED_ASSERT failed in
`LoRaWANTimer::start` because the "timer_id" was not set.
2021-07-27 10:28:12 +01:00
Martin Kojtal b9043fb91c cmsis: importer sha removal
I had to resolve conflicts with these sha. CMSIS 5.8.0 includes fixes and makes these changes
irrelevant.
2021-07-27 10:06:40 +01:00
Bartek Szatkowski 4744fdb2f3 CMSIS/RTX: Allow overwriting mutex ops for ARMC
(cherry picked from commit 08ab8cc47d)
2021-07-27 10:06:39 +01:00
Deepika 06b815a9d2 CMSIS/RTX: Patch to conditionally compile
tz_context.c should be compiled only for secure world,
definition of API's in tz_context.h should be part of secure
binary/bootloader when building mbed-os as non-secure

(Cherry picked from d0a43b8af0)

(cherry picked from commit fb354752eb)
2021-07-27 10:06:38 +01:00
Bartek Szatkowski 8ade0d46ec CMSIS/RTX: Patch RTX4 to preserve osThreadDef compatibility
mbed OS used older RTX4 version and with osThreadDef accepting only 3
parameters, to preserve compatibility we hardcode the 'instances'
parameter to 1.

(cherry picked from commit 428acae1b2ac15c3ad523e8d40755a9301220822)
(cherry picked from commit 4360b7bbf8)
2021-07-27 10:06:37 +01:00
Martin Kojtal 7941286531 [CMSIS_5]: Updated to 13b9f72f2 2021-07-27 10:06:34 +01:00
Martin Kojtal 6827b4275b
Merge pull request #14397 from macronix/macronix_spi_NAND
add SPI NAND Block device driver
2021-07-26 15:24:47 +02:00
Martin Kojtal e2ec3cd720
Merge pull request #14831 from jeromecoutant/PR_DISCO_WB_LED
DISCO_WB5MMG: add RGB LED
2021-07-26 13:21:09 +02:00
Lingkai Dong 257a4e551c CMake: Do not set `CMAKE_AR`
The variable for archiver is automatically set by CMake. There is
no need to explicitly set it, unless a project really needs to
override the default archiver.
2021-07-23 15:56:58 +01:00
Lingkai Dong 782375c431 CMake: Enable improved armclang support in CMake 3.21
CMake versions 3.20 and below always add compiler and linker flags
based on `CMAKE_SYSTEM_PROCESSOR`, for example `--cpu=Cortex-M33`.
This sometimes overrides flags we set in tools/cmake/cores/*.cmake
and results in link failure or unbootable binaries. To workaround
this, we added more linker flags to "counter" what CMake automatically
adds.

From CMake 3.21 onwards, CMake by default does not add flags to
armclang anymore, and it fully relies on projects to set all flags.
In this case we do not need to set `CMAKE_SYSTEM_PROCESSOR` or use
workarounds anymore. We still turn on workarounds when an older
version of CMake (3.19 and 3.20) is used, but in the future we might
require users to have at least CMake 3.21.
2021-07-23 15:56:58 +01:00
Lingkai Dong 4b6f243963 CMake: Cortex-A: Use MBED_CPU_CORE to set -mcpu
As we're moving away from the use of CMAKE_SYSTEM_PROCESSOR, use
MBED_CPU_CORE instead. They differ in cases, but both GCC and Arm
toolchains support case-insensitive CPU names.
2021-07-23 15:56:58 +01:00
Martin Kojtal efaf159ca4
Merge pull request #14945 from OpenNuvoton/nuvoton_tfm_missing_update
TFM: Add missing IPC file for PSA Firmware Update
2021-07-23 14:33:06 +02:00
Martin Kojtal 379afe794f
Merge pull request #14953 from LDong-Arm/post_build_hook_rework
Rework post-build to support multiple executables
2021-07-23 13:29:45 +02:00