Commit Graph

25558 Commits (eda75fd02a27d0d26bbed4953abb19ed778a5a8c)

Author SHA1 Message Date
Kevin Bracey 0d12800b9f wait_us optimization
As the timer code became more generic, coping with initialization on
demand, and variable width and speed us_ticker_api implementations,
wait_us has gradually gotten slower and slower.

Some platforms have reportedly seen overhead of wait_us() increase from
10µs to 30µs. These changes should fully reverse that drop, and even
make it better than ever.

Add fast paths for platforms that provide compile-time information about
us_ticker. Speed and code size is improved further if:

* Timer has >= 2^32 microsecond range, or better still is 32-bit 1MHz.
* Platform implements us_ticker_read() as a macro
* Timer is initialised at boot, rather than first use

The latter initialisation option is the default for STM, as this has
always been the case.
2019-07-11 11:40:54 +01:00
Maciej Bocianski cae15715f9 usb_device-msd test: OS type detection fix 2019-07-11 11:40:53 +01:00
Maciej Bocianski 7d0e7a65c7 usb_device-msd test: astyle fix 2019-07-11 11:40:53 +01:00
Maciej Bocianski b28c37684f usb_device-msd test: docs update 2019-07-11 11:40:53 +01:00
Maciej Bocianski 8a667702da usb_device-msd test: disable host side unmount on windows machines 2019-07-11 11:40:53 +01:00
Maciej Bocianski faa3fb5438 usb_device-msd test: improve error handling 2019-07-11 11:40:53 +01:00
Maciej Bocianski b4e2ea63df usb_device-msd test: fix powershell unmount script issue
Running PowerShell script on some windows machines is blocked.
To avoid this problem script was replace by the code run directly in PowerShell console.
2019-07-11 11:40:53 +01:00
Alexandre Bourdiol 22a8e19ebe STM32: pwmout_write: configure channel only when not already enabled
Fix PWM glitch on write(), TARGET_STM/pwmout_api.c, #10734
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 5e9a2a7b2a Tests: SleepManager: Fix test_check for NRF5X
Add missing `lp_ticker_clear_interrupt()` in the interrput handler used
in `test_lock_unlock_test_check()` test.
Remove redefined `us_to_ticks()`.
2019-07-11 11:40:53 +01:00
Laurent Meunier b21d0de725 Update test_lock_unlock_test_check() assertion to cope with new timings
With the DEEP_SLEEP_TEST_CHECK_WAIT_DELTA_US increased,
we now have TEST_ASSERT_UINT64_WITHIN(delta=1000, expected=1000, actual=1000)
so this assertion needed to be updated.

What we need is the deep sleep to be enabled after the programed interrupt
has fired and before a 2ms timeout expiration, which means >= 1000 and < 2000.
2019-07-11 11:40:53 +01:00
Laurent Meunier 9aa859c68d Increase DEEP_SLEEP_TEST_CHECK_WAIT_DELTA_US
now that sleep_manager_can_deep_sleep_test_check() is based on wait_ns
2019-07-11 11:40:53 +01:00
Przemyslaw Stekiel b20fb99e5d sleep_manager_can_deep_sleep_test_check(): do not use ticker common layer to count elapsed time. 2019-07-11 11:40:53 +01:00
Przemyslaw Stekiel caed5aac99 Further modifications in Sleep Manager test.
Changes:
- restore the original form of setup/teardown handlers,
- test_lock_unlock_test_check(): do not use common ticker layer (Timer, Timeout). Use only ticker HAL layer.
- Increase DEEP_SLEEP_TEST_CHECK_WAIT_DELTA_US delta.
2019-07-11 11:40:53 +01:00
Laurent Meunier d82346e5ca Remove unused variable
and avoid associated warning ...
2019-07-11 11:40:53 +01:00
Laurent Meunier 25e5f2c68c Fix compilation issue for targets without LPTICKER or USTICKER 2019-07-11 11:40:53 +01:00
Laurent Meunier 89602c87d3 Update HAL Sleep manager test to cope with STM32 LPTIM HW
In particular and as kindly suggested by Przemec S. :
1. Add setup/teardown handler’s for all cases. This disables sys-tick,
so there should be no unexpected lp ticker interrupt scheduling.
2. Modify setup/teardown handler’s: remove suspension of lp/us tickers,
so they can count as this is required by test_lock_unlock_test_check test
case.
3. Use TEST_ASSERT_TRUE(sleep_manager_can_deep_sleep_test_check()) after
setting interrupt to cope with STM specific handling (CMPOK interrupt with
deep-sleep locked). This performs wait only if needed and will not affect
other targets which do not need extra wait.
4. Move sleep_manager_lock_deep_sleep() after TEST_ASSERT_TRUE(sleep_manager_can_deep_sleep_test_check())
5. Use TEST_ASSERT_TRUE(sleep_manager_can_deep_sleep_test_check()) in
test_lock_unlock_test_check to let lower layers manage deep sleep.
2019-07-11 11:40:53 +01:00
Hugues Kamba 6576bbba93 bootloader: Fix LPC55S69 bootloader segmentation
As the build tool in mbed-os 5.13 cannot appropriately deal with a segmented
bootloader when combining it with an application, this commit adjusts the
size reserved for interrupts (via the linker file) to avoid a bootloader
segmentation due to an unpopulated ROM area.

The microcontroller has a total of 60 vector interrupts + 16 exception
handlers. The allocated ROM flash for interrupts should be (60 + 16) x word
size in bytes = 76 x 4 = 304 = 0x130.

This commit changes the interrupt reserved space from 0x140 to 0x130.
2019-07-11 11:40:53 +01:00
Laurent Meunier 0f3d2acf2b Allow target or application level definition of extra TICKLESS stack size
Adding a check to let application or target force increase idle thread
stack size.
2019-07-11 11:40:53 +01:00
Devaraj Ranganna c802042952 Remove MBEDTLS_PSA_CRYPTO_C from PSA NS targets
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-07-11 11:40:53 +01:00
Devaraj Ranganna 9bd8925042 1. Include MBEDTLS_CONFIG_FILE before evaluating MBEDTLS_PSA_CRYPTO_C 2. Remove macro MBEDTLS_PSA_CRYPTO_C from PSA targets
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-07-11 11:40:53 +01:00
Alexandre Bourdiol 08f76145e3 Add STM32H743ZI to IAR export definition 2019-07-11 11:40:53 +01:00
Antti Yli-Tokola 1eb799e4fa TLSSocket: print certificate info only when tracing is enabled
Flagging these functions out will reduce flash size more than 3k.
2019-07-11 11:40:53 +01:00
Hugues Kamba aebad5203a microlib support: Specify compiler version unable to build without the fix 2019-07-11 11:40:53 +01:00
Filip Jagodzinski 742fff4f5b K82F: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 206cc999e6 KL27Z: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 4799f3de6b K66F: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski ad48edbda0 KL43Z: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 73f4e0306e KL82Z: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 66cf982b2c KW24D: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 0ab31ca416 KW41Z: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski cde58d2a65 K24F: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski d184baf6e9 K22F: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 9a4db66bf5 STM32WB: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 9c1664f21e STM32L4: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 69582c3eed STM32H7: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 3bc4f9599f STM32F3: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski b006fe2a31 STM32L0: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 92b43947c8 STM32F0: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski a6dd6f0bde STM32F7: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski f158ac0077 K64F: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Jaeden Amero 5b47bb030a crypto: Enable use on non-PSA targets
Move PSA Crypto implementation files outside of a TARGET_PSA folder,
enabling use of PSA Crypto APIs on more Mbed OS targets.
2019-07-11 11:40:53 +01:00
Hugues Kamba 0aa289d8b2 microlib support: Fix build with Arm Compiler 6 and MicroLib
Building binaries with MicroLib and Arm compiler 6 has been failing
because of a bug in Arm compiler 6. The compiler introduces a
symbol, `__scanf_mbtowc`, which is not present in MicroLib C library.

The present commit adds a weak reference to the symbol to allow a
successful linkage. This is a temporary fix until the bug in the
compiler is fixed. It should be removed after the compiler bug is fixed.
2019-07-11 11:40:53 +01:00
Amanda Butler 9f09eb908d Edit MbedCRC.h
Review changes, and edit file while I'm at it.
2019-07-11 11:40:53 +01:00
Bartek Szatkowski 9460de5319 Extend MbedCRC class doxygen to add more operational details 2019-07-11 11:40:53 +01:00
Bartek Szatkowski d8907da90c Fix doxygen for MbedCRC 2019-07-11 11:40:53 +01:00
jeromecoutant ad3b345aa4 STM32: enable CRC for all L0/L4/F7 2019-07-11 11:40:53 +01:00
Chun-Chieh Li f81516f6d5 M23: Fix compile error with mbed fault handler
M23 doesn't implement Main Extension. So like M0/M0+, these registers HFSR/
MMFSR/BFSR/UFSR/DFSR are not present on M23. Remove access to them in mbed
fault handler for M23 targets.
2019-07-11 11:40:53 +01:00
Tymoteusz Bloch be4d40b1b3 Fixed LWIPStack socket_sendto member to fail if interface IP4/6 version differ from destination adress IP version 2019-07-11 11:40:53 +01:00
Hugues Kamba e30060a217 mem pool size: Fix calculation of memory pool size for portability
Replace the hardcoded value calculation of the memory pool block size
with the RTX preprocessor macro (via a shim layer).
This is in preparation for the replacement of the direct access of RTX
functionalities in Mbed OS with an access via CMSIS.
2019-07-11 11:40:53 +01:00
Laurent Meunier f1601b0ad7 Check Properties have been set 2019-07-11 11:40:53 +01:00