Commit Graph

33935 Commits (refactor_hal_greentea_cmake)

Author SHA1 Message Date
Lingkai Dong a16c2bf173 SFDP: Add unit tests for Sector Map Parameter Table parsing
Add tests for `sfdp_parse_sector_map_table()` which currently (at the
time of this commit) supports flash devices with
* no Sector Map Parameter Table (i.e. the whole flash is uniform and
non-configurable)
* a single descriptor in the Sector Map Parameter Table (i.e. the
flash layout is non-configurable and has multiple regions)

Support and unit tests for flashes with multiple configurable layouts
will be added in the future.

Note: The implementation of `sfdp_parse_sector_map_table()` assumes
the table to be valid if read succeeds, so the SFDP reader callback
needs to ensure it reads data correctly or return an error.
2021-08-06 15:27:28 +01:00
nazar.palamar 1d6843e538 Fixed MCU deep-sleep locking flow in CYW43XXX Cordio HCI driver. The CYW43XXX Cordio HCI driver incorrect handles lock/unlock deep-sleep entry, as results it allows to put PSoC6 in to deep-sleep when CYW43xx does not expect this (the host_wake_up pin in ACTIVE_LOW state, which means hat host must be in ACTIVE mode ).
Now, CYW43XXX Cordio HCI driver has the following MCU deep-sleep locking scenarios/flows:
a) A BT device or MCU does not support Low Power mode (MBED configuration does not include MBED_TICKLESS, DEVICE_SLEEP, DEVICE_LPTICKER or CYCFG_BT_LP_ENABLED features). In this case, CyH4TransportDriver locks deep-sleep in the initialize() function and unlocks the terminate() function.

b) A BT device and MCU support Low Power mode. In this case, the control of the unlock/lock of the deep-sleep functionality will be done in bt_host_wake_rise_irq_handler and bt_host_wake_fall_irq_handler handlers. Finally, CyH4TransportDriver unlocks the deep-sleep in terminate() function (if it was locked before) by checking the bt_host_wake_active flag.

Fixes #13076, #13700, #13295.
2021-08-06 16:41:24 +03:00
Lingkai Dong f08c3cdfb5 SFDP: TestEraseTypeAlgorithm: Move setup into test case
The test data `struct mbed::sfdp_smptbl_info smptbl` is only relevant
to `TestEraseTypeAlgorithm` and not shared with other test cases.
2021-08-06 14:30:16 +01:00
Lingkai Dong 651099225e SFDP: Set region count to 1 for no sector map
A flash device with no sector map table has uniform sectors, and we
treat the whole flash as one region. In this case the function
`sfdp_parse_sector_map_table()` sets the single region's size and high
boundary accordingly, but it lacks setting of region count to 1, so
users of the SFDP parser may not get the correct number of regions.
This commit fixes the issue.
2021-08-06 14:30:16 +01:00
Martin Kojtal e14b9617dd
Merge pull request #14980 from saheerb/master
github action fix for uppercase repository owner
2021-08-05 15:59:52 +01:00
Martin Kojtal 3244f979eb
Merge pull request #14979 from moshe-shahar/patch-1
requirements.txt - remove manifest-tool 1.5.2 and mbed-cloud-sdk
2021-08-05 14:29:35 +01:00
Saheer 7698035be9 github action fix for uppercase repository owner 2021-08-05 14:06:12 +01:00
Moshe Shahar 25838edc7a
requirements.txt - remove mbed-cloud-sdk 2021-08-05 14:15:02 +03:00
Moshe Shahar af1d44a78f
Update LICENSE.md 2021-08-05 14:13:57 +03:00
Martin Kojtal eec5a7581d
Merge pull request #14978 from jamesbeyond/fix_docker
DOCKER: fix a bug in docker building GHA
2021-08-05 10:57:56 +01:00
Moshe Shahar 93117e6483
requirements.txt - remove manifest-tool 1.5.2 2021-08-05 11:52:39 +03:00
Chun-Chieh Li 5114e4c7c2 M2354: Support PSA Firmware Update
1.  Change from single image boot to multiple image boot
2.  SDH is configured to Secure for placing update firmware. It becomes inaccessible to Mbed.
3.  Post-build script supports both multiple image boot and single image boot
4.  Update readme to reflect above change
5.  Increase forced_reset_timeout due to longer booting time for Greentea test
2021-08-05 10:14:33 +08:00
Lingkai Dong 68694255b5 SFDP: Move handling of no sector map into `if`
When a flash chip's SFDP table has no sector map, we treat the whole
flash as a single region. As an optimization, this should only be
done if there is indeed no sector map.
2021-08-04 14:03:24 +01:00
Qinghao Shi 740e52f64c DOCKER: fix a bug in docker building GHA 2021-08-04 13:30:21 +01:00
Martin Kojtal 06c9799db4
Merge pull request #14952 from saheerb/master
github actions for mbed-os-env docker management
2021-08-04 08:56:20 +01:00
Lukas Karel 727daf910b add more uarts for STM32F103xG 2021-08-04 09:05:59 +02:00
Jaeden Amero 7acd5b4091
Merge pull request #14929 from LDong-Arm/move_target_h
Unit tests: Move target_h/ stubs into libraries' test doubles
2021-08-03 16:31:10 +01:00
Saheer Babu 5b0c1df525 github actions for mbed-os-env docker management 2021-08-03 16:28:14 +01:00
Lingkai Dong 81eb6cb855 Travis: Enable maximum verbosity of pinvalidate.py
Run pinvalidate.py with -vvv to print the cause of failure, making
it easier for authors of pull requests to fix pin names.
2021-08-02 17:42:43 +01:00
Lingkai Dong 578843067b Unit tests: Fix pin validation failure
The test script pinvalidate.py requires the following which are
missing in the unit test stub PinName.h:
* A comment "MBED TARGET LIST"
* `CONSOLE_TX` and `CONSOLE_RX` in the `PinName` enum

This commit adds them.
2021-08-02 17:42:43 +01:00
Lingkai Dong dca2aa79a0 Unit tests: Remove redundant CMake target mbed-headers-base
Individual libraries' `target_h` stub headers have now all been moved
from `mbed-headers-base` to `mbed-headers-<library>`.

Note: Even though headers previously in `target_h` are technically
stubs/fakes too, they are used by not only unit tests but also regular
libraries when compiled for unit tests, because no target-specific HAL
implementation exists in this case. In order for regular library
sources to pick up `target_h` headers, those headers must

* have the same names as regular headers
* appear first in include paths

This is why those headers are part of `mbed-headers-<library>` and not
`mbed-stubs-<library>`. Before this refactoring, `mbed-headers-base`
was the first in unit tests' include paths.
2021-08-02 17:42:43 +01:00
Lingkai Dong 6731f553ce Unit tests: Fix style in hal gpio_object.h stub 2021-08-02 17:42:43 +01:00
Lingkai Dong 825e3491b0 Unit tests: Move hal target_h stubs
Stubs previously in UNITTESTS/target_h/ have the same names as
regular Mbed OS headers, intending to override the latter directly.
We move hal target_h stubs into hal/tests/UNITTESTS/doubles/.

Note: In Mbed OS, the standard include format requires each header to
be prefixed with its module name, for example "hal/gpio_api.h". This
requires headers to be organized in a module directory. But unit tests
stubs for hal correspond to what a real Mbed target would have
implemented (in a non-test scenario), and targets do not currently put
headers in hal/, so we similary put stub headers directly in
hal/tests/UNITTESTS/doubles/ instead of add a hal/ subdirectory there.
2021-08-02 17:42:43 +01:00
Lingkai Dong c775e30b2d Unit tests: Move randLIB.h
The stub header randLIB.h overrides the header of the same name in
platform/randlib/ which is an external repository vendored into
the mbed-os codebase. As the repository is synchronized regularly,
it is better not to put overrides there, so we put the randLIB.h
stub into the regular platform doubles directory.
2021-08-02 17:42:43 +01:00
Lingkai Dong e75a45d041 Unit tests: Move drivers target_h stubs 2021-08-02 17:42:43 +01:00
Lingkai Dong 5fe0f8916b Unit tests: Fix style in rtos Thread.h stubs 2021-08-02 17:42:42 +01:00
Lingkai Dong 1f99729474 Unit tests: Move rtos target_h stubs 2021-08-02 17:42:42 +01:00
Lingkai Dong 71962481a4 Unit tests: Remove mbed.h stub from target_h
The header `mbed.h` is a convenient wrapper that pre-includes some
platform headers, for use by user applications. Libraries and tests
internal to Mbed OS should not use it, and they should explicitly
include headers they need. So a stub is not needed.
2021-08-02 17:42:42 +01:00
Lingkai Dong 4011e2ef85 Unit tests: Move platform target_h stubs
Stubs previously in UNITTESTS/target_h/ have the same names as
regular Mbed OS headers, intending to override the latter directly.
We move platform target_h stubs into
platform/tests/UNITTESTS/doubles/platform/.

Note: nvic_wrapper.h is normally implemented and used by Mbed targets
as needed. But as unit tests do not have a real target, we treat it
as a stub for the platform.
2021-08-02 17:42:42 +01:00
Lingkai Dong 7e3565b5f5 Unit tests: Move cmsis target_h stubs
This creates a new mbed-headers-cmsis which is always and only used
by mbed-headers-platform, so we add the former to the laters' linked
targets.
2021-08-02 17:42:42 +01:00
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