Commit Graph

21247 Commits (e06b7863cc4f15161c47c9dda2012d4dea6f7003)

Author SHA1 Message Date
jeromecoutant e06b7863cc STM32F429/STM32F439 alignment 2018-12-27 22:26:04 -06:00
jeromecoutant d847d57e02 STM32 : Enable TICKLESS for targets with LPTIM 2018-12-27 22:26:04 -06:00
jeromecoutant ae3a666275 STM32: update LPTICKER_DELAY_TICKS for LPTIM targets 2018-12-27 22:26:04 -06:00
David Saada c0226febbc Fix LTO build failures due to duplicate local types 2018-12-27 22:26:04 -06:00
Seppo Takalo 934f4f108c Drop MBED_EXTENTED_TESTS flagging from network tests.
All properly working IP stacks are required to pass Mbed OS socket tests.
This have now proven with current Ethernet devices with LwIP stack.
2018-12-27 22:26:04 -06:00
mudassar-ublox 2a5e2a7a0d Ublox C030 ADC internal channels added 2018-12-27 22:26:04 -06:00
Alastair D'Silva 5b29b7e6b5 Don't use define checks on DEVICE_FOO macros (mbed code)
The DEVICE_FOO macros are always defined (either 0 or 1).

This patch replaces any instances of a define check on a DEVICE_FOO
macro with value test instead.

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2018-12-27 22:26:04 -06:00
Alastair D'Silva 93fed52c1a Remove #ifdefs for DEVICE_SERIAL & friends
DEVICE_SERIAL is always defined (either 0 or 1).
Remove the faulty checks introduces in commit
26b9a1f6a3 and replace them with
value checks as originally implemented.

Fixes #8913

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2018-12-27 22:26:04 -06:00
Desmond Chen 1cb1a49752 Fix BLE long write execution failure 2018-12-27 22:26:03 -06:00
David Saada 67ba976b30 Fix FLASHIAP_ROM_END macro for GCC_ARM & IAR toolchains
- Consider data section in GCC_ARM toolchain
- Consider init_array section in IAR toolchain
- Rename macro to FLASHIAP_APP_ROM_END_ADDR for clarity sake
2018-12-27 22:26:03 -06:00
Kevin Bracey afb504e17c Check correct ARMC6 predefine for FP codegen
For ARMC6, CMSIS headers were checking the `__ARM_PCS_VFP`, which
indicates hardfp ABI in use, when they need to check whether FP
code generation is enabled. Change this to `__ARM_FP`, so it
works for platforms using softfp ABI.

Change already present in CMSIS_5 repo, via commit
969822ae162539d50617d1e5a3634ee2fd3b60f6, but redone with local
search-and-replace.
2018-12-27 22:26:03 -06:00
j3hill 5cff9ce3b0 NRF52840_DK: QSPI check Read/Write WORD alignment, and properly set clock frequency divider
These changes are to enable QSPI functioanlity
for the NRF52840DK.
2018-12-27 22:26:03 -06:00
jeromecoutant 355807cedf STM32 LPTICKER with RTC : optimise sleep duration 2018-12-27 22:26:03 -06:00
jeromecoutant f5577c005e STM32 RTC : skip rtc_write if possible 2018-12-27 22:26:03 -06:00
Amanda Butler 35b7a06bda Make minor change in pull_request_template.md
Fix nit for precise language
2018-12-27 22:26:03 -06:00
Martin Kojtal 2ce2dab762 github: add reviewers to the PR template
Use @mention to request specific reviewers.
2018-12-27 22:26:03 -06:00
Leszek Rusinowicz c06492cbe7 Updated default M0 image to not modify UDB configuration when comming out of a deep sleep state. On Mbed this is performed only on M4 core. 2018-12-27 22:26:03 -06:00
Leszek Rusinowicz 977f84be28 Fixing merge issue for merge into master. 2018-12-27 22:26:03 -06:00
Ron Eldor 6ba60e33de Update the CC310 readme file
Update the Cryptocell 310 readme file with the binary library version
information.
2018-12-27 22:26:03 -06:00
Ron Eldor 83ac6bdcaa Update the CC310 GCC_ARM libraries
Update the cryptocell 310 GCC_ARM libraries with known version.
The libraries were built from the Cryptocell 310 release
version 1.1.0.1285, using arm-none-eabi-gcc 6.3.1 20170620 (release) (release).
2018-12-27 22:26:03 -06:00
Ron Eldor 9db8753e59 Update the CC310 ARM libraries
Update the cryptocell 310 ARM libraries with known version.
The libraries were built from the Cryptocell 310 release version
1.1.0.1285, using `ARM Compiler 5.06 update 4 (build 422)`.
2018-12-27 22:26:03 -06:00
Ron Eldor 187af9e26f Update the CC310 IAR libraries
Update the cryptocell 310 IAR libraries, since the previous ones were not
built correct. The libraries were built from the Cryptocell 310
release version 1.1.0.1285, using IAR version 7.80.1.11864.
2018-12-27 22:26:03 -06:00
ccli8 cfd8823d30 Fix crypto AC management
1. For SHA AC, use atomic flag to manage its ownership.
   (1) Nuvoton SHA AC doesn't support SHA context save & restore, so S/W
       SHA fallback has been supported before. To make non-blocking 'acquire'
       semantics clearer, introduce 'try_acquire' to substitute for 'acquire'.
   (2) No biting CPU due to mechanism above.
   (3) No deadlock due to mechanism above.
2. For AES/DES/ECC AC, change to mutex to manage their ownership.
   (1) Change crypto-misc.c to crypto-misc.cpp to utilize C++ SingletonPtr
       which guarantees thread-safe mutex construct-on-first-use.
   (2) With change to crypto-misc.cpp, add 'extern "C"' modifier to CRYPTO_IRQHandler()
       to avoid name mangling in C++.
   (3) No priority inversion because mutex has osMutexPrioInherit attribute
       bit set.
   (4) No deadlock because these AC are all locked for a short sequence
       of operations rather than the whole lifetime of mbedtls context.
   (5) For double mbedtls_internal_ecp_init() issue, it has been fixed in upper
       mbedtls layer. So no need to change ecc init/free flow.
2018-12-27 22:26:03 -06:00
ccli8 5fc51b8aa2 Fix return error code when ECC H/W acceleratioin is failed 2018-12-27 22:26:03 -06:00
Russ Butler 2ad952d29b Update MPU ram/rom split for Nuvoton M2351
Move the start of RAM from 0x10000000 to 0x20000000 on the
NUMAKER_PFM_M2351. This allows the target to work correctly.
2018-12-27 22:26:03 -06:00
Kevin Bracey 204a568abb nRF52840: Set mpu-rom-end to 0x1fffffff
So we have at least one test platform exercising the special case of
mpu-rom-end being 0x1fffffff, set that for nRF52840.
2018-12-27 22:26:03 -06:00
Kevin Bracey 342eed5f29 Fix target.mpu-rom-end setting, for ARMv8-M too
targets.json was not specifying the same macro name as the code was
checking for, so setting was ineffective.

Making this work tripped up not-supported checks in ARMv8-M - rather than deal
with making this work, support it instead.

Both ARMv7-M and ARMv8-M slightly reduce code size and runtime impact if
mpu-rom-end is 0x1fffffff, using one fewer region.

This means default setup for ARMv8-M now requires 5 regions, with
mpu-rom-end set to default 0x0fffffff, but this can be put back to 4 by
changing the setting.
2018-12-27 22:26:03 -06:00
Kevin Bracey 767c7f646e ARMv7-M MPU: correctly protect 80000000 RAM region
Subregion mask for this region was set fully disabled, instead of fully
enabled.
2018-12-27 22:26:03 -06:00
Kevin Bracey 4e992a32ce Assert MPU regions, rather than error
As we build for a specific CPU, a runtime check for number of MPU
regions in release builds is not worthwhile. Make it an assert only.
Saves a little space in develop images, a lot in release.
2018-12-27 22:26:03 -06:00
Kevin Bracey 263129a300 MPU - use higher-level calls, fix ARMv8-M error
Switch to higher-level calls and macros, and fix an error in the ARMv8-M
version - "inner" attributes were not being set correctly due to a
copy/paste error - "outer" was being set twice.

This means RAM would have been marked WTRA rather than WBWA for the
inner cache.

Slightly reduces ARMv7-M init code size by feeding region number
into RBAR instead of using RNR.
2018-12-27 22:26:03 -06:00
Kevin Bracey 60451368a8 Reduce dynamic MPU code size with a loop 2018-12-27 22:26:03 -06:00
Kevin Bracey 4f9b258a03 Fix MPU synchronisation
Synchronisation instructions were not quite right - too strict on entry,
and not quite correctly synchronising the instruction stream on exit.

References:

* https://static.docs.arm.com/dai0321/a/DAI0321A_programming_guide_memory_barriers_for_m_profile.pdf
* https://static.docs.arm.com/100699/0100/armv8m_architecture_memory_protection_unit_100699_0100_00_en.pdf
2018-12-27 22:26:02 -06:00
Russ Butler bfc3d853e4 Use MPU platform deinit rather than hal free
Use the MPU through the platform layer rather than through the HAL.
2018-12-27 22:26:02 -06:00
jeromecoutant 6f6cdc948b DNS tests: improve debug messages 2018-12-27 22:26:02 -06:00
Russ Butler 53e39edcde Fix ESP8266 "Link Type" errors after reset
As part of the ESP8266 connect sequence, ESP8266Interface::connect,
a software reset is performed. If the ESP8266 had been connected
previously then the ESP8266 will sometimes send a "WIFI DISCONNECT" OOB
message before performing the software reset. This causes the
ESP8266::_oob_connection_status to change its state (_conn_status) from
NSAPI_STATUS_DISCONNECTED to NSAPI_STATUS_CONNECTING. This causes
ESP8266Interface::_startup, called later in the boot seqeunce, to skip
ESP8266::startup. Without this call socket mux mode (CIPMUX=1) is never
enabled and all send commands using this format fail with a "Link Type"
error.

This patch fixes that problem by unconditionally calling
ESP8266::startup as part of the ESP8266 connect sequence.
2018-12-27 22:26:02 -06:00
jeromecoutant 3da0d3c0a5 WIFI test: improve debug messages 2018-12-27 22:26:02 -06:00
ccli8 a4ec28046c Change main thread stack size to default for stack size unification
NANO130 just has 16 KiB SRAM. User application may change it through "rtos.main-thread-stack-size"
configuration option.
2018-12-27 22:26:02 -06:00
ccli8 71d32ecef1 Support boot stack size configuration option 2018-12-27 22:26:02 -06:00
Kari Haapalehto c7ced9b42f Initialize the interface at the construction and make sure that it's done only once. 2018-12-27 22:26:02 -06:00
Fred.Li 64f2d5e708 Fix wrong PIN config for RTL8195AM platform
Merge from https://github.com/ARMmbed/sd-driver/pull/110
2018-12-27 22:26:02 -06:00
zhanglu@realtek-sg.com 1853db62d6 Realtek-rtl8195am-Network Socket Updates
This PR addresses the issue of #8124.
It updates and enriches the wifi connection error type to adapt the Network Socket test plan requirement.
In the meantime, it increases the heap size that allows the transmission of larger packet size.

Description
1. Increase heap size in lwipstack\mbed_lib.json to fulfill bursty TCP and UDP transmission requirement.
2. Modify and enrich wifi connection error types in TARGET_AMEBA\RTWInterface.cpp to adapt the decision logic of the wifi test cases.
3. Add new static constants in TARGET_AMEBA\RTWInterface.h, including 'SSID_MAX_LENGTH', 'PASSPHRASE_MAX_LENGTH' and 'PASSPHRASE_MIN_LENGTH' to help verifying the validity of ssid and passphrase.

Pull request type
[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
2018-12-27 22:26:02 -06:00
fluidblue 81c6402262 Removed GCC_CR toolchain for LPC11U68 2018-12-27 22:26:02 -06:00
Fluidblue 3663fe515e Prevent multiple __aeabi_atexit definition linker error (GCC_CR) 2018-12-27 22:26:02 -06:00
Fluidblue 3ca58fdb80 Prevent multiple __aeabi_atexit definition linker error (GCC_ARM) 2018-12-27 22:26:02 -06:00
kegilbert 637499c63f Add socket stat logging state change update
TCPServer was deprecated and the accept call was added to TCPSocket. Add state change update to that call
2018-12-27 22:26:02 -06:00
Mahesh Mahadevan da62237ac4 Rapid-IoT: Add support for the KW41Z side of the platform
Add support for the KW41Z side of the RapidIoT platform. This requires the latest
DAPLink binary to be programmed on the RapidIoT platform, binary can be downloaded
from the below link:
https://armmbed.github.io/DAPLink/

Also, the KW41Z side on RapidIoT does not have a serial port connected to the Debug
terminal. Therefore a SerialPassThrough program should be flashed and running on the
K64F side of RapidIoT platform for the mbed tests to pass.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-12-27 22:26:02 -06:00
Cruz Monrreal II 2c3b420606 Intervaltree version update (3.0.0) caused builds to break. Capping version to latest 2.x 2018-12-27 22:26:02 -06:00
Kevin Bracey b1c23ac15f Disable write buffer in debug builds (M3/M4)
As part of work to improve the debugging of exceptions, have
Mbed OS make an effort to make exceptions more precise in debug builds
at the cost of performance.

Related pyOCD work:

   https://github.com/mbedmicro/pyOCD/pull/430
2018-12-27 22:26:02 -06:00
Kevin Bracey c8e8912d0e CM3: Make ACTLR bit definitions conditional
The ACTLR register itself is conditional on chip revision, but its
bit definitions were always defined.

Make the the bit definitions also conditional, so it is possible to
produce portable code that sets DISDEFWBUF if available:

    #ifdef SCnSCB_ACTLR_DISDEFWBUF_Msk
       SCnSCB->ACTLR |= SCnSCB_ACTLR_DISDEFWBUF_Msk;
    #endif

(cherry-picked from CMSIS b2b04dbeece0a046556bfc320bef6b20bef3f16f)
2018-12-27 22:26:02 -06:00
David Saada d6f22193ff Adjust FAT FS tests to low memory boards
This is achieved by checking whether the board can allocate a certain memory
chunk (threshold) and skipping the test if it can't.
This should prevent these boards from failing in CI.
2018-12-27 22:26:02 -06:00