Commit Graph

26648 Commits (03affe94d8064bd542f265f113747161d427ba9e)

Author SHA1 Message Date
Chun-Chieh Li 03affe94d8 Remove TRNG support
Reasons to remove TRNG support:
1.  M252 just has 32KiB SRAM and cannot afford mbedtls application.
2.  Implementing TRNG HAL with PRNG H/W has security concern.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li 7f921bc292 Add missing 'sectors' into arm_pack_manager/index.json 2019-10-16 11:58:32 +01:00
Chun-Chieh Li 14e9683d4d Add BSD-3-Clause license for BSP files 2019-10-16 11:58:32 +01:00
Chun-Chieh Li 2136567b7a Free up peripheral pins in peripheral free-up HAL API
Without free-up of peripheral pins, peripheral pins of the same peripheral may
share by multiple ports after port iteration, and this peripheral may fail with
pin interference.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li f761fe7eb1 Support GPIO input pull-high/pull-low
In Nuvoton, only new-design chips support GPIO input pull-high/pull-low modes.
Targets not supporting this feature are listed below:

- NUMAKER_PFM_NANO130
- NUMAKER_PFM_NUC472
- NUMAKER_PFM_M453
2019-10-16 11:58:32 +01:00
Chun-Chieh Li 07eb503cf1 Fix redundant call to UART IRQ handler
Honor RxIrq/TxIrq to avoid redundant call to UART IRQ handler.

This is also to fix FPGA CI test mbed_hal_fpga_ci_test_shield-uart.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li a3197f3ec9 Fix redundant SPI clock generation
Fix SPI clocks are generated redundantly at the end of transfer.

This is also to fix FPGA CI test mbed_hal_fpga_ci_test_shield-spi/
SPI - async mode.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li 7f29545a57 Fix I2C NACK error
Fix logic error on replying NACK at the end of transfer.

This is also to fix FPGA CI test mbed_hal_fpga_ci_test_shield-i2c/
i2c - test single byte read i2c API.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li a5b7048668 Fix IP initialization sequence
Better IP initialization sequence:
1. Configure IP pins
2. Select IP clock source and then enable it
3. Reset the IP (SYS_ResetModule)

NOTE1: IP reset takes effect regardless of IP clock. So it doesn't matter if
       IP clock enable is before IP reset.
NOTE2: Non-configured pins may disturb IP's state, so IP pinout first and then
       IP reset.
NOTE3: IP reset at the end of IP initialization sequence can cover unexpected
       situation.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li 3cdf84d943 Exclude USB UART from testing
USB UART is dedicated to USB COM and so must exclude from FPGA CI testing.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li a56db3697d Force enum PinName to 32-bit
NU_PINNAME_BIND(...) requires enum PinName to be 32-bit to encode module
binding information in it.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li 7245474e40 Add 'sectors' target configuration parameter 2019-10-16 11:58:32 +01:00
Chun-Chieh Li b6a29934e8 Enlarge LPTICKER_DELAY_TICKS for safe
On Nuvoton targets, lp_ticker_set_interrupt(...) needs around 3 lp-ticker
ticks to take effect. It may miss when current tick and match tick are very
close (see hal/LowPowerTickerWrapper.cpp). Enlarge LPTICKER_DELAY_TICKS to
4 from 3 to address this boundary case.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li 7c48b44488 Enlarge required deep sleep latency
This configuration is to pass wake-up from deep-sleep test such as mbedmicro-rtos-mbed-systimer.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li 9b6edba26c Override mpu-rom-end to 0x1fffffff
Without this override, mpu hal will require 5 mpu regions which exceed 4 mpu
regions supported by M252 (see hal/mpu/mbed_mpu_v8m.c). In this scenario,
we will hit assert error but we actually meet stack overrun first due to just
0x400 bytes for emitting error message. The issue doesn’t occur on other
targets such as M487 because it has 8 mpu regions.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li d111aff98b Support Nuvoton's NUMAKER_M252KG target 2019-10-16 11:58:32 +01:00
Kyle Kearney d41802fb75 Simplicy QSPIF target overrides for PSoC6
All current PSoC 6 targets support the same QSPI frequency and minimum
program size. So specify a single entry rather than duplicating for
each device.
2019-10-16 11:58:32 +01:00
mudassar-ublox d12a051068 setting timeout before send command 2019-10-16 11:58:32 +01:00
Ari Parkkila 5b9741094f Cellular: Fix CellularStateMachine to not loop on power state 2019-10-16 11:58:32 +01:00
Juhani Puurula e2d6d26ab5 Change imgtool lib import to relative import 2019-10-16 11:58:32 +01:00
Filip Jagodzinski d8b88dc5dd Tests: USB: Move control endpoint buffers to heap
This fixes the stack overflow error during the basic USB tests.

Update the ctrl_buf member of the USBTester and USBEndpointTester test
classes to be allocated on the heap. This saves 2 KB of a main stack.
2019-10-16 11:58:32 +01:00
Michal Paszta 39e17a111f Increase the timeout for DNS tests as their number increased 2019-10-16 11:58:32 +01:00
Michal Paszta 0039cfb743 Increase timeout in DNS_TIMEOUTS test for ESP8266
The test floods the device with UDP requests (it skips the 100 ms delay to simulate instant timeout). ESP8266 starts responding with "busy p..." message. It needs more time to process the data and recover for subsequent tests.
2019-10-16 11:58:32 +01:00
Ben Cooke 9145b72433 Add MTS_DRAGONFLY_F413RH platform to mbed-os 2019-10-16 11:58:32 +01:00
Ari Parkkila 2eab0fbee4 Cellular: Fix resolving of DNS server IPv4/6 address 2019-10-16 11:58:32 +01:00
Kyle Kearney 7dd86e8f48 Clean up BSP hardware configuration
- Improve block naming
- Remove unneeded items
2019-10-16 11:58:32 +01:00
Kyle Kearney 45b674623f Update CY8CPROTO-064-SB linker scripts
Update linker scripts for the latest PDL to be consistent with other Cypress targets
2019-10-16 11:58:32 +01:00
Kyle Kearney 222443ea63 Refactor serial flash support 2019-10-16 11:58:32 +01:00
Kyle Kearney 85ba6ea4f3 Simplify BSP contents
Remove some (Cypress-proprietary) BSP interfaces and hardware initialization
from the BSPs which is better implemented by a library or application firmware.
Move some remaining functionality from common to the individual targets.
2019-10-16 11:53:52 +01:00
Kyle Kearney 91131a03f7 Consolidate/clean up wifi initialization 2019-10-16 11:53:52 +01:00
Kyle Kearney 8e6c6d1d8e Avoid doubly allocating whd thread stack
Don't malloc during wifi initialization, as that could cause double allocation in some cases.
The thread stack will be allocated by cy_rtos_thread_start if necessary.
2019-10-16 11:53:52 +01:00
int_szyk 95766d71ac thread_mle_message_handler: fix null comparison.
Fixes Coverity issue about comparing nullptr.
2019-10-16 11:53:52 +01:00
int_szyk e7b5a4f32b sn_coap_builder: remove unnecessary code.
Fixes Coverity issue about unused variable.
2019-10-16 11:53:52 +01:00
int_szyk 85f104755f CellularStack: remove unnecessary assignment.
Fixes Coverity issue about unused variable.
2019-10-16 11:53:52 +01:00
int_szyk 2d2fdf7cf9 CellularUtil prefer_ipv6: check length.
Fixes Coverity issue about not checking the length of string before copying it.
2019-10-16 11:53:52 +01:00
Qinghao Shi ce73f8ecdd FASTMODEL: add a comment for TRNG simulation 2019-10-16 11:53:52 +01:00
Qinghao Shi 4e3d31540a FASTMODEL: update trng based on comments 2019-10-16 11:53:52 +01:00
Qinghao Shi 828b2f132e FASTMODEL: enable PSA tests for fastmodel 2019-10-16 11:53:52 +01:00
Qinghao Shi c81995cf56 FASTMODEL: add simulated TRNG implementation to fastmodel 2019-10-16 11:53:52 +01:00
Kevin Bracey 0a58c80b56 Tighten GCC 2-region _sbrk
When moving to the second heap region due to overflowing the first
region, the `_sbrk` implementation assumed the allocation would fit in
the second region, and didn't check for that overflowing too.

Problem revealed in `stats_heap` test with GCC 8 on K64F - the allocation
attempt for 1GiB crashed, as `_sbrk` indicated 1GiB was available at the
start of the second region.
second region.

Presumably older versions of newlib fault that allocation attempt before
passing to `_sbrk`.

While there, adjust the code to not use a separate static `bool`, saving
RAM. We can track with just one pointer, as order of the two regions is
fixed, and already relied on by newlib.
2019-10-16 11:53:52 +01:00
Ladislas de Toldi 74715c71f7 Update README with Google Test version 1.8.1 2019-10-16 11:53:52 +01:00
Ladislas de Toldi b152f4e5f1 update googletest to v1.8.1 2019-10-16 11:53:52 +01:00
Janne Kiiskila 04767f3022 AT_CellularDevice.cpp - unused variable err warning
We get this compiler warning;

Compile [  7.9%]: AT_CellularDevice.cpp
[Warning] AT_CellularDevice.cpp@206,18: variable 'err' set but not used [-Wunused-but-set-variable]

Due to the fact, that the code that would actually use this variable
is behind trace flags. Based on review feedback from Antti Kauppila and
Kimmo Väisänen, adding same flagging also for that.
- Reason being - the operation needs to be within the locks.
2019-10-16 11:53:52 +01:00
Qinghao Shi a7038fb818 TEST: change intefration fs test format and mount order 2019-10-16 11:53:52 +01:00
Ari Parkkila 78f3292036 Cellular: Fix setting of PDP context ID (cid) 2019-10-16 11:53:52 +01:00
Chris Trowbridge 89ce27b3fc EP_AGORA: Add config logic to enable BLE, cell, and LoRa by default 2019-10-16 11:53:52 +01:00
Mirela Chirica 9dab079d33 Cellular: Removed not used variable 2019-10-16 11:53:52 +01:00
Mirela Chirica d48ea364ff Cellular: Include of errno.h needed for Mac OS X 2019-10-16 11:53:52 +01:00
Kimmo Vaisanen f295272b3b LoRa: Fix build warning about _ongoing_tx_msg
_ongoing_tx_msg was incorrectly initialized before _mlme_confirmation.

Fixes following build warning:
[Warning] LoRaMac.h@691,26: 'LoRaMac::_ongoing_tx_msg' will be initialized after [-Wreorder]
[Warning] LoRaMac.h@689,28:   'loramac_mlme_confirm_t LoRaMac::_mlme_confirmation' [-Wreorder]
[Warning] LoRaMac.cpp@68,1:   when initialized here [-Wreorder]
2019-10-16 11:53:52 +01:00
Filip Jagodzinski 12e5955771 Tests: USB: Remove outdated docs from basic test 2019-10-16 11:53:52 +01:00