Commit Graph

21308 Commits (44cd38cdfeb8303b4fe86ee8d7304698d583d45a)

Author SHA1 Message Date
ThunderSoft_mbed_os 803458ad8a Update us_ticker.c 2018-12-27 22:29:10 -06:00
panyz0725@thundersoft.com 3502fad243 Add platform TT_M3HQ 2018-12-27 22:29:09 -06:00
cyliangtw 458e79a035 Fix NUC472 hard fault in SMCC tests 2018-12-27 22:26:04 -06:00
Derek Miller 05c2beb3a8 Bug fix for UART issue on LPC54608 - issue #7398 2018-12-27 22:26:04 -06:00
Kevin Bracey 2e3776487e Revert "STM32 RTC : skip rtc_write if possible"
`rtc_write` must start the RTC. `time()` uses `rtc_write(0)` to start
the RTC if it is not already enabled, but this check made that not
work.

There's no point trying to optimise this case in a HAL - if we wanted
`set_time()` to protect against users making pointless adjustments, the
implementation should be there. But even then, you might want different
levels of hysteresis depending on application, so it's probably best
left to applications.

This reverts commit 9da5e48941.
2018-12-27 22:26:04 -06:00
Juhani Puurula f2941e018a Fix to unit test losing process output due to timing issue 2018-12-27 22:26:04 -06:00
Ashok Rao a332a90586 MTB_ODIN_v2_fixes
1. Removed redundant code comments. Added relevant ones for MTB pins.
2. More SPI_CS pins added for peripherals on the MTB.
3. Disabled LSE_Clock as it is not present on the MTB in targets.json
2018-12-27 22:26:04 -06:00
Senthil Ramakrishnan c04cd4eefb Disable printf in crash reporting for release builds 2018-12-27 22:26:04 -06:00
deepikabhavnani 2c5ae4aac2 Added test case for verification 2018-12-27 22:26:04 -06:00
deepikabhavnani dabd15f597 Corrected destructor loop to clear all pending events
In `equeue_destroy` the external loop was for main events linked
list and internal loop for siblings.
Siblings start was not initialized correctly for each main link
2018-12-27 22:26:04 -06:00
deepikabhavnani fa39d6ffe7 Old pointers of sibling were not cleared
When adding sibling at the head of linked list, the head if pointing
to something in linked list was not updated, hence a loop was formed
in linked list

Element0 - First addition to linked list
Element1 - Has higher delay hence added to back
0 ->(next) 1
Element2 - Delay is same as Element0, hence should be sibling of 0
           Shall be added at head

Expected:
2    ------------->(next) 1
|(sibling)
0

Bug: (Resolved with this)
2    ------------->(next) 1
|(sibling)
0    ------------->(next) 1

If we add more elements and next pointer of sibling is updated, old
references will cause issues
Element3 added

Expected:
2    ------------->(next) 3  ------------->(next) 1
|(sibling)
0

Bug: (Resolved with this)
2    ------------->(next) 3  ------------->(next) 1
|(sibling)
0    ------------->(next) 1
***Both siblings here point to different next***
2018-12-27 22:26:04 -06:00
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