Commit Graph

25151 Commits (f4966c86b7948a984ac11cfe76cca44933dfb57e)

Author SHA1 Message Date
Darryl Green f4966c86b7 Add adjust-check-config script to mbedtls importer
In Mbed OS, there are configuration options with Mbed TLS that we
are more comfortable allowing than we do with Mbed TLS on its own.
Add a check-config adjusting script to enable removing or changing
options in check_config.h
2019-07-11 11:40:54 +01:00
Maciej Bocianski 7bf3b877f3 I2CTester: fix dosc 2019-07-11 11:40:54 +01:00
Maciej Bocianski 30276f27cb I2CTester: add address mismatch statistics 2019-07-11 11:40:54 +01:00
Maciej Bocianski e036b6f726 I2CTester: upgrade checksum calculation 2019-07-11 11:40:54 +01:00
Tymoteusz Bloch f7fced62a6 IAR icf linker scripts modified to use dynamic heap allocation of all available memory. 2019-07-11 11:40:54 +01:00
Tymoteusz Bloch 81fc8b4f5d Wait_ns () internal delay loop code alignment to 16 for decreasing execution time. 2019-07-11 11:40:54 +01:00
Antti Kauppila cd1c7863b7 Fixed unittests 2019-07-11 11:40:54 +01:00
Antti Kauppila 85470e759b Doubled ATHandler's BUFF_SIZE 2019-07-11 11:40:54 +01:00
George Beckstein a2e382124a Apply same resolution fix to nRF52832 targets 2019-07-11 11:40:54 +01:00
George Beckstein 634b10b864 Fix SAADC resolution set in sdk_config. analogin_read_u16 assumes 12-bit range but config was set to 10 bit range causing incorrect readings to be returned. 2019-07-11 11:40:54 +01:00
Qinghao Shi fd829c625e Tests: enable kvstore test for Fastmodel for test code coverage 2019-07-11 11:40:54 +01:00
Qinghao Shi 50077fb38a FastModel: change Fastmodel memory layout regions from 3 to 2
- change memoryzones.h
 - change linker scripts for each toolchains
2019-07-11 11:40:54 +01:00
Qinghao Shi 07ce302129 FastModel: change FVP_MPS2_M3 to FVP_MPS2 enable the MPS2 Family 2019-07-11 11:40:54 +01:00
Qinghao Shi e9ca7ed914 FastModel: enable kvstore 2019-07-11 11:40:54 +01:00
Qinghao Shi 1d98d2adc2 FastModel: enable FLASHIAP componment 2019-07-11 11:40:54 +01:00
Philipp Steiner 66ce92aa1b Solve bug: Low frequency clock will now selected by given "lf_clock_src" setting. 2019-07-11 11:40:54 +01:00
Laurent Meunier a424c4c7b2 STM32 with low level ticker wrapper require Extra Idle stack 2019-07-11 11:40:54 +01:00
Laurent Meunier 06e23fbde3 STM32: lp_ticker optim: initialize handle once only 2019-07-11 11:40:54 +01:00
Laurent Meunier 95fc693c9d STM32: lp_ticker optim: remove irq_handler variable 2019-07-11 11:40:54 +01:00
Laurent Meunier c279c97404 Update comments and fix typo 2019-07-11 11:40:54 +01:00
Laurent Meunier 16f2f0b1d3 Update warning now that C++ wrapper is not needed anymore
Now we'd rather not use this wrapper and use instead the low level
wrapper implemented in this driver.
2019-07-11 11:40:54 +01:00
Laurent Meunier f3f3ac47a0 STM32 targets: remove tickless from us ticker and delay ticker
For L0/L4/H7/F7/WB targets that have tickless enabled, remove the tickless from
us ticker and the delay ticks as the C++ wrapper layer is being removed
and replaced by the low layer handling.

For now, the few F4 targets with LPTIM are left with previous configuration
as test results are showing a few instabilities not yet understood.
2019-07-11 11:40:54 +01:00
Laurent Meunier deab60901c Manage lp_ticker delay at low level
LP TICKER mbed-os wrapper needs to be disabled as it introduces too much latencies.

LP TICKER wrapper has been disabled and we need to managed the HW constraints at low level:
- main HW constraint is that once the comparator has been programmed once,
driver cannot program it again before CMPOK HW flag is set, which takes about 3 30us cycles.

To make it even more complex, the driver also needs to cope with "LP ticker workaround"

See commit:

LP ticker workaround

    There is an errata in LPTIM specification that explains that CMP Flag
    condition is not an exact match (COUNTER = MATCH) but rather a
    comparison (COUNTER >= MATCH).

Also the disable interrupt is more complete now:
- always check sleep manager status and restore it
- remove irq_handler as comparator is always programed and might get called
eventually when LP TICK is restarted
- reset delayed_prog

Also in set_interrupt, make sure interrupt does not fire early.
If needed, we decide to slightly delay the tick to cope with the HW limitation to
make sure it will fire as soon as HW is capable.

Functions are called under critical section as they may be called from
the IRQ handler now, not only from driver layer.
2019-07-11 11:40:54 +01:00
Laurent Meunier c4073fccd5 LP ticker workaround
There is an errata in LPTIM specification that explains that CMP Flag
condition is not an exact match (COUNTER = MATCH) but rather a
comparison (COUNTER >= MATCH).

As a consequence the interrupt is firing early than expected when
programing a timestamp after the 0xFFFF wrap-around.

In order to
work-around this issue, we implement the below work-around.
In case timestamp is after the work-around, let's decide to program the
CMP value to 0xFFFF, which is the wrap-around value. There would anyway be
a wake-up at the time of wrap-around to let the OS update the system time.
When the wrap-around interrupt happen, OS will check the current time and
program again the timestamp to the proper value.
2019-07-11 11:40:54 +01:00
Mahesh Mahadevan 24efeb84fe Kinetis MCUXpresso: Update the clock drivers
Updated driver includes
1. Bug fixes
2. Formatting updates.
3. Fix for warnings
4. Better code commenting

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-11 11:40:54 +01:00
Kevin Bracey d65a7d36dc STM: Correct macro test in us_ticker_defines.h
Avoids build warning caused by #10609
2019-07-11 11:40:54 +01:00
Chun-Chieh Li e0b40a042f Fix idle thread stack underflow in debug build
In rtos/mbed_lib.json:
Enlarge idle-thread-stack-size-debug-extra for all Nuvoton targets.

In rtos/TARGET_CORTEX/mbed_rtx_conf.h:
MBED_DEBUG also must be defined for this configuration parameter to take effect.
2019-07-11 11:40:54 +01:00
Mathias Brossard 19babe2178 LPC55S69: fix cosFactor data size in header file
The file 'fsl_powerquad_data.h' declares several dctXXX_cosFactor
arrays with sizes twice larger compared to the actual definitions in
'fsl_powerquad_data.c'.
2019-07-11 11:40:54 +01:00
jeromecoutant dc6441bfc8 NUCLEO_H743ZI2 new target support 2019-07-11 11:40:54 +01:00
Sebastian Stockhammer 5f0b6dac3d Fix astyle 2019-07-11 11:40:54 +01:00
Sebastian Stockhammer b0997ad7a9 Allow IPV4V6 stack type 2019-07-11 11:40:54 +01:00
Sebastian Stockhammer 55243ae027 Require exact context type match 2019-07-11 11:40:54 +01:00
Malavika Sajikumar 4251b8cf5e Removing I2C and SPI pin names in SDP-K1 PinNames.h file. This is to ensure the use of Arduino pin names Dxx for I2C and SPI pins in programs written for SDP-K1 board. 2019-07-11 11:40:54 +01:00
Paul Thompson a6b90e30dd Make the sys_arch_protect() mutex be recursive.
Fixes #9744

Appears to be a lwIP porting bug. Comments in our porting layer say:

    This function should support recursive calls from the same task or interrupt. In other words, sys_arch_protect() could be called while already protected.
2019-07-11 11:40:54 +01:00
George Beckstein f160dd5e90 Fix alignment 2019-07-11 11:40:54 +01:00
George Beckstein 6b539e99bc Fixed bug causing Nordic drivers to use a different critical section API from Mbed. This caused conflicts when Nordic's critical section API would globally reenable interrupts while Mbed still expected to be in a critical section. 2019-07-11 11:40:54 +01:00
Kimmo Vaisanen 7a5f1984ee Fix netconn_recv_tcp_pbuf ARMC6 linker error
If "lwip.tcp-enabled" is set to false, ARMC6 compilation fails to error
Error: L6218E: Undefined symbol netconn_recv_tcp_pbuf

LWIP::socket_recv() is TCP socket specific method so implementation can be
enabled only when LWIP_TCP flag is set.
2019-07-11 11:40:54 +01:00
Kimmo Vaisanen cf7911d4d6 Increase dns-response-wait-time
In some cellular networks or with some modems, DNS response can take longer than 5 seconds to arrive.
2019-07-11 11:40:54 +01:00
mudassar-ublox 0e6e1a6309 cellular socket flags updated 2019-07-11 11:40:54 +01:00
Kevin Bracey a8fdcdee69 Remote "static" from MBED_FORCEINLINE
Static keyword causes problems when trying to use force-inlined
functions from normal inlined functions. This is not legal:

    static inline void forced() { }

    inline void normal() { forced(); }

You cannot reference internal-linkage things from external-linkage
inline functions.

Removal of the static implies that in C there would need to be a
non-inline definition in case anyone calls it non-inlined, but if the
force attribute is doing its job, that should not happen.

Only significant in-tree user of the MBED_FORCEINLINE macro is
the atomic operations - making this change permits atomic operations
from non-static inline functions.
2019-07-11 11:40:54 +01:00
Kevin Bracey d571990298 wait_ns micro-optimisation
Use `+ 1` to set the "Thumb" indicator on the `delay_loop` routine
address, rather than `| 1`. That makes it something that can be done
by the linker, rather than needing to be done at run-time.

Saves one instruction and one cycle.
2019-07-11 11:40:54 +01:00
Kevin Bracey 77877614b8 STM: optimize us_ticker
Provide new optimizations for us_ticker and wait_us.
2019-07-11 11:40:54 +01:00
Kevin Bracey 49b98a5b2a Freescale MCUXpresso: optimize us_ticker
Provide new optimizations for us_ticker and wait_us.
2019-07-11 11:40:54 +01:00
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