Commit Graph

13544 Commits (08a4b0e4b654b68cd8754dd3e372f29fc38963cc)

Author SHA1 Message Date
Christopher Haster 08a4b0e4b6 Added COMMON folder for tests
A COMMON folder allows code reuse across different test cases. This
avoids code duplication or code enterying the application space.

The COMMON folder is uppercase to match naming conventions in Mbed OS.
2018-01-27 00:57:28 -06:00
Christopher Haster c917231427 littlefs: Fixed issue with immediate exhaustion and small unaligned storage
This was a small hole in the logic that handles initializing the
lookahead buffer. To imitate exhaustion (so the block allocator
will trigger a scan), the lookahead buffer is rewound a full
lookahead and set up to look like it is exhausted. However,
unlike normal allocation, this rewind was not kept aligned to
a multiple of the scan size, which is limited by both the
lookahead buffer and the total storage size.

This bug went unnoticed for so long because it only causes
problems when the block device is both:
1. Not aligned to the lookahead buffer (not a power of 2)
2. Smaller than the lookahead buffer

While this seems like a strange corner case for a block device,
this turned out to be very common for internal flash, especially
when a handleful of blocks are reserved for code.
2018-01-27 00:57:28 -06:00
Kevin Bracey 0cc7a9d647 NSAPI: Add Nanostack multicast membership support
Add support for recently introduced NSAPI generic socket options to
control group membership. Previously applications using Nanostack would
have had to use Nanostack's native socket options.
2018-01-27 00:57:28 -06:00
chrisyang 9e813569f7 rtl8195am - reorder some defines properly in ota header file 2018-01-27 00:57:28 -06:00
chrisyang 0e9249a381 rtl8195am - move region headers to 0xb000 and 0xc000
The new layout is as follows:

0x000000 - 0x008000  => bootloader
0x008000 - 0x00b000  => system sectors
0x00b000 - 0x00c000  => region1 header
0x00c000 - 0x00d000  => region2 header
0x00d000 - 0x010000  => reserved
0x010000 - 0x040000  => mbed file system
0x040000 - 0x120000  => region1 image
0x120000 - 0x200000  => region2 image

This is to ensure when daplink erases sections, both regions' headers
are erased properly.
2018-01-27 00:57:28 -06:00
ccli8 74fdd09939 Add gpio_is_connected 2018-01-27 00:57:27 -06:00
Vincent Coubard a786d347db BLE: Fix inclusion of BLE.h (case) 2018-01-27 00:57:27 -06:00
jeromecoutant c4bff4ef58 STM32 LPT optimisation 2018-01-27 00:57:27 -06:00
bcostm 5e85ff9133 STM32 CAN: fix wrong ID and MASK filter 2018-01-27 00:57:27 -06:00
jeromecoutant 5bdeb14424 STM32F4: STDIO_UART_TX and STDIO_UART_RX can be now user defined
NB for UBLOX targets: usb_rx and usb_tx config name are still available
in order to not break current applications.
2018-01-27 00:57:27 -06:00
jeromecoutant cd3a35e79c STM32L4: STDIO_UART_TX and STDIO_UART_RX can be now user defined 2018-01-27 00:57:25 -06:00
jeromecoutant 346d4cd986 STM32L1: STDIO_UART_TX and STDIO_UART_RX can be now user defined 2018-01-27 00:57:25 -06:00
jeromecoutant c92c7cfbc6 STM32L0: STDIO_UART_TX and STDIO_UART_RX can be now user defined 2018-01-27 00:57:25 -06:00
jeromecoutant 4edae1a028 STM32F7: STDIO_UART_TX and STDIO_UART_RX can be now user defined 2018-01-27 00:57:24 -06:00
jeromecoutant 3812bdb1bc STM32F3: STDIO_UART_TX and STDIO_UART_RX can be now user defined 2018-01-27 00:57:24 -06:00
jeromecoutant 2bf5222024 STM32F2: STDIO_UART_TX and STDIO_UART_RX can be now user defined 2018-01-27 00:57:24 -06:00
jeromecoutant fc91827a52 STM32F1: STDIO_UART_TX and STDIO_UART_RX can be now user defined 2018-01-27 00:57:24 -06:00
jeromecoutant 12106236e1 STM32F0: STDIO_UART_TX and STDIO_UART_RX can be now user defined 2018-01-27 00:57:24 -06:00
jeromecoutant 0b5fe8de99 STM32: update init procedure
- STDIO_UART define is no more used
- configuring a new serial with the same UART as STDIO is no more allowed
2018-01-27 00:57:24 -06:00
Steven Cooreman 54bd620b6f Fix for #5840
This commit fixes #5840. Fix verified by running mbed_hal-lp_ticker test suite with preloaded RTC counter such that it wrapped in the middle of the suite.
Also removes explicit sleep blocking from the us_ticker implementation, since sleep blocking for us tickers is done at mbed HAL level now. This was causing one of the lp_ticker tests to fail.
2018-01-27 00:57:23 -06:00
Christopher Haster 388041afeb littlefs: Fix block addr overflow
deepikabhavnani did the hard work in tracking this issue down.  Block
addresses are not cast to the correct type until after multiplying to
convert to byte addresses. This results in an overflow when the storage
is larger than 4 GB.
2018-01-27 00:57:23 -06:00
Steven Cooreman 3ca6c55feb Allow overriding of DCDC settings per target
Allow custom targets to override the DCDC settings by defining EMU_DCDCINIT_STK_DEFAULT to target-specific initialization values.
2018-01-27 00:57:23 -06:00
Daniel Schuler 6ca58de840 Add presentation format descriptor support for NRF52 2018-01-27 00:57:23 -06:00
Tero Jääskö e86a2b090f platform: Fix C++ allocation wrappers for GCC compilation
Fix the caller address logging on the GCC compilation too.
Previously the code logged the caller address as C++ wrapper,
not the actual caller of the C++ operator new or delete.
2018-01-27 00:57:23 -06:00
Tero Jääskö ae5a5862f1 platform: make C++ allocation wrappers log the correct caller address
The C++ "operator new" and "operator delete" (and their array
variants) were logging the the caller address wrong. In practice
if one used "operator new", the logged caller address pointed
to mbed_retarget.cpp, not to the client. Fix this by exposing
the alloc wrappers to the the retarget.

Note: this fixes only the ARMCC variants, as the GCC ones have
different different API and implementation.
2018-01-27 00:57:22 -06:00
Seppo Takalo 544d6b5d88 Clarify TCPSocket::recv() and UDPSocket::recvfrom() documentation. 2018-01-27 00:57:22 -06:00
Tero Heinonen 44bf90b716 mesh-api documentation removed
All documentation is now in Handbook
2018-01-27 00:57:22 -06:00
jeromecoutant 72c648ae62 STM32 LOWPOWERTIMER : introduce LPTIM feature
STM32L0, L4, F7 and few F4 chip are supporting LPTIM feature.
We propose to allow user to use LPTIM for MBED LowPowerTimer API instead of using RTC wakeup timers.

By default, all targets that are supporting this feature have been configured.
2018-01-27 00:57:22 -06:00
Amanda Butler 09f6c63219 Copy edit Thread.h
Copy edit file for active voice.
2018-01-27 00:57:22 -06:00
Amanda Butler 5e289cba3b Copy edit Semaphore.h
Copy edit file for active voice.
2018-01-27 00:57:22 -06:00
Amanda Butler 6d77c7fc8e Copy edit RtosTimer.h
Copy edit file for active voice.
2018-01-27 00:57:22 -06:00
Amanda Butler 06b8b8ccff Copy edit Queue.h
Copy edit file for active voice.
2018-01-27 00:57:21 -06:00
Amanda Butler b6a1662790 Copy edit Mutex.h
Copy edit file for active voice.
2018-01-27 00:57:21 -06:00
Amanda Butler 9dfa3bda4b Copy edit MemoryPool.h
Copy edit file for active voice.
2018-01-27 00:57:21 -06:00
Amanda Butler bdc21ed978 Copy edit Mail.h
Copy edit file for active voice and American English.
2018-01-27 00:57:21 -06:00
Amanda Butler 9c5536112e Copy edit EventFlags.h
Copy edit file for active voice and agreement.
2018-01-27 00:57:21 -06:00
Amanda Butler ad14bfde4e Copy edit ConditionVariable.h
Copy edit docs changes for active voice.
2018-01-27 00:57:21 -06:00
Bartek Szatkowski ddeea847c6 Add notes about ISR safety to RTOS doxygen 2018-01-27 00:57:21 -06:00
bcostm 6c3a1cb6e9 STM32F2: Remove flash functions doc 2018-01-27 00:57:20 -06:00
bcostm b2ef8fc667 STM32F2: Add Flash API support 2018-01-27 00:57:20 -06:00
jeromecoutant d1a75ecff1 DISCO_F407VG : alignment with other STM32
- clock source is now a user choice
- IAR tool chain is available
2018-01-27 00:57:20 -06:00
deepikabhavnani cbe539d1d8 Fix: Sector/Size overflow from uint32_t
FATFilesystem declares sector count and size as uint32_t and block
device class arguments are addr and size which is uint64_t
While passing arguments to program/read/write API's of block device,
multiplication of uint32_t*uint32_t was not typecasted properly to
uint64_t which resulted in MSB truncation.

Eg. If block 0x800000 is accessed with block size 0x200, addr to be
passed (0x800000*0x200)0x100000000, but actual address passed was 0x0
which resulted in over-writting the root directory, and hence corrupted
filesystem
2018-01-27 00:57:20 -06:00
Senthil Ramakrishnan a22d968996 Fix tcp_hello_world test to receive all the data from http response 2018-01-27 00:57:20 -06:00
Senthil Ramakrishnan 70c0af19b9 ESP8266 test config and tcp_echo test fix for ESP8266 2018-01-27 00:57:20 -06:00
Marcus Chang be43b20eaf Increase clock tolerance in Flash HAL test
The current 0.1% clock tolerance is too small for certain platforms
which natural variance is larger than this. This commit increases the
tolerance to 0.5% instead.

Sample output from time_cpu_cycles called repeatedly in init,
before running any flash tests:

[1515706585.63][CONN][RXD] diff: 49316
[1515706585.69][CONN][RXD] diff: 49256
[1515706585.75][CONN][RXD] diff: 49286
[1515706585.81][CONN][RXD] diff: 49256
[1515706585.87][CONN][RXD] diff: 49225
[1515706585.94][CONN][RXD] diff: 49286
[1515706585.99][CONN][RXD] diff: 49317
[1515706586.06][CONN][RXD] diff: 49255
[1515706586.12][CONN][RXD] diff: 49286
[1515706586.18][CONN][RXD] diff: 49285
[1515706586.24][CONN][RXD] diff: 49286
[1515706586.31][CONN][RXD] diff: 49347
[1515706586.36][CONN][RXD] diff: 49347
[1515706586.43][CONN][RXD] diff: 49286
[1515706586.49][CONN][RXD] diff: 49286
[1515706586.55][CONN][RXD] diff: 49256
[1515706586.61][CONN][RXD] diff: 49286
[1515706586.68][CONN][RXD] diff: 49346
[1515706586.74][CONN][RXD] diff: 49347
[1515706586.80][CONN][RXD] diff: 49256

Notice the outliers will cause intermittent CI failures.
2018-01-27 00:57:19 -06:00
Martin Kojtal 96d9a00d0a
Merge pull request #5841 from ARMmbed/release-candidate
Release candidate for mbed-os-5.7.3
2018-01-15 12:30:46 +00:00
adbridge fd07de4985 Update Mbed version block for patch release 2018-01-12 15:01:50 +00:00
Steven Cartmell dc807b632e Fix bug allowing I2C::abort_transfer to incorrectly unlock deep sleep mode
- Add flag to I2C class to track if the I2C instance has locked deep sleep mode.
- Wrap call to sleep_manager_lock_deep_sleep to only be called if I2C instance
  hasn't already locked deep sleep.
- Wrap call to sleep_manager_unlock_deep_sleep to only be called if I2C has
  currently locked deep sleep mode.
2018-01-12 15:01:49 +00:00
Steven Cartmell 27c5dfc44f Fix bug allowing SPI::abort_transfer to incorrectly unlock deep sleep mode
- Add flag to SPI class to track if the SPI instance has locked deep sleep mode.
- Wrap call to sleep_manager_lock_deep_sleep to only be called if SPI instance
  hasn't already locked deep sleep.
- Wrap call to sleep_manager_unlock_deep_sleep to only be called if SPI has
  currently locked deep sleep mode.
2018-01-12 15:01:49 +00:00
Vincent Coubard 4f331b6155 Nordic BLE: Fix stack event size
Read By group type response can return 4 descriptor discovered when the remote server have 4 descriptors with a 16 bit UUID. The handle, UUID pair get stored in a ble_gattc_desc_t that is 20 bytes long.

This PR increase buffer size to handle this use case.
2018-01-12 15:01:49 +00:00