Commit Graph

13245 Commits (79a8bf1c8e1d70a6b5177cf5cb2bb92097363018)

Author SHA1 Message Date
andreas.larsson f2de0956b4 Updated ODIN drivers to v2.3 RC1 2017-11-28 12:22:45 +01:00
Kevin Bracey cfa6d07a3b Make LDREX/STREX CAS functions strong
The LDREX/STREX implementations of the compare-and-swap functions were
weak (they could spuriously fail when the value was expected), whereas
the critial section implementation was strong, and the documentation has
no suggestion that there might be spurious failures.

Rationalise by adding a retry loop for STREX failure, so that it only
returns false when the value is not expected.

Fixes https://github.com/ARMmbed/mbed-os/issues/5556
2017-11-28 11:56:50 +02:00
Arto Kinnunen 97cf8869da Add apache license to nanostack-interface 2017-11-28 11:52:43 +02:00
Arto Kinnunen 0c041b95f1 Remove obsolete clone_nanostack script 2017-11-28 09:45:09 +02:00
Christopher Haster ff25681a21 Separated out logical Travis jobs
Combination of mbed 2 builds (~40 minutes), littlefs testing (~15
minutes), and miscellaneous testing pushed the current CI over
Travis's limit of 1 hour per job.

However, by using Travis's matrix includes, we can spin up different
jobs for the various logical components being tested.
2017-11-27 20:39:03 -06:00
Christopher Haster 47684d89a5 Added test config for simulated block devices
Not all devices have enough heap to fit a simulated heap block device,
however using a simulated heap block device is preferred if available
(reduced flash wear, faster testing).

Added MBED_TEST_SIM_BLOCKDEVICE for tests that only need a simulated
block device (wear_leveling + resilience), and added support for targets
that are known to have enough heap.
2017-11-27 19:48:56 -06:00
Christopher Haster b52575bc65 littlefs: Added checks for __CLZ instruction in IAR 2017-11-27 19:48:56 -06:00
Vincent Coubard 6c015b98c9 BLE: Fix greater than or equal to comparision in GattCharacteristic. 2017-11-27 19:08:33 +00:00
Vincent Coubard 6f19dea656 BLE: Fix GattServer::write on Nordic targets.
GattServer::write on Nordic's targets use sd_ble_gatts_hvx to send an
handle value Notification or Indication; This function can fail if the
connection handle is invalid or if Updates are not enabled for this
connection.

This patch workaround those limitations.
2017-11-27 18:56:51 +00:00
Jimmy Brisson 70e7b40468
Merge pull request #5583 from kjbracey-arm/delete_null
Remove pointless null check in operator delete
2017-11-27 10:37:40 -06:00
Jimmy Brisson 33c972666c
Merge pull request #5526 from geky/fix-armcc-fopen-mutex-malloc
Fixed mutex assert in armcc fopen and related memory leak
2017-11-27 10:37:14 -06:00
Jimmy Brisson 20eeaf5c30
Merge pull request #5511 from artokin/nanostack_oss_release
Nanostack OSS release for mbed-os-5.7
2017-11-27 10:36:44 -06:00
Jimmy Brisson b9c3003419
Merge pull request #5466 from kjbracey-arm/write_all
Make POSIX-like writes write everything when blocking
2017-11-27 10:36:28 -06:00
Jimmy Brisson 70522bb44b
Merge pull request #5360 from maciejbocianski/thread_fix
threads test adjust to run on devices with small RAM
2017-11-27 10:35:44 -06:00
Vincent Coubard a665f3e06d Nordic: Set handle of user description descriptors. 2017-11-27 14:26:05 +00:00
bcostm 26f24ada10 DISCO_F746NG: typo in config name 2017-11-27 09:46:36 +01:00
Steven Cooreman 2becfbe2e4 Convert USB library from em_int to em_core 2017-11-25 13:03:40 +01:00
Steven Cooreman c95728f6fc Fix issue with timer timebase on EFR32
Timer code was written based on integer multiple HF clock frequencies. EFR32 doesn't conform to that (38.4), and so the timestamp ticks were off by 1%. Enough to trip up some CI tests on TB_SENSE_12 (#5496)
2017-11-25 11:23:41 +01:00
bcostm b1073c165f DISCO_F746NG: add usp_speed config 2017-11-24 16:52:59 +01:00
Steven Cooreman e900d5a04d Squash warnings by defining 'NC' as unsigned type 2017-11-24 16:14:56 +01:00
Steven Cooreman 73bd5ff5fb Remove deprecated em_int 2017-11-24 16:01:00 +01:00
Steven Cooreman 6c6e762c49 Support USARTs up to USART5 in SPI 2017-11-24 15:53:44 +01:00
Steven Cooreman 53f88b5e26 Support USARTs up to USART5 in serial 2017-11-24 15:53:09 +01:00
Steven Cooreman 3d4cae84d5 Upgrade to emlib 5.3.3 2017-11-24 15:52:20 +01:00
Steven Cooreman 21d0920068 Use mbed_sleep API instead of Silicon Labs specific sleepmode API 2017-11-24 15:36:44 +01:00
Steven Cooreman a2514fdef3 Clear TX FIFO on every transmit
Need to avoid a TX packet error from messing up the TX FIFO. Since this API will return busy if a packet is in transmission anyways, this is acceptable.
2017-11-24 14:49:53 +01:00
Steven Cooreman 812e47ca9c Add sleep mode blocking to avoid going into EM2 during RTOS idle handler 2017-11-24 14:03:10 +01:00
Steven Cooreman 76fd28c825 Upgrade RAIL to v2.1.1 2017-11-24 12:57:43 +01:00
Kevin Bracey ff6bc08c53 Remove pointless null check in operator delete
free() checks for NULL, no need to add another check.
2017-11-24 10:40:15 +02:00
Martin Kojtal 4e222952d7
Merge pull request #5561 from deepikabhavnani/retarget_fix
Definition for stat was missing in header file
2017-11-23 12:30:53 +00:00
Laurent MEUNIER 839bd642d0 STM32: SPI 3 wires mode not supported in SPI slave
This patch handles the case of SPI slave mode without MISO (NC).
In case MISO is not connected, we consider that SPI will be configured in
3 wires mode (CLK / MOSI / CS, but no MISO). In this case, the MOSI line
is bi-directional : SPI_DIRECTION_1LINE.

But as this is not supported yet in slave mode, we force it to
SPI_DIRECTION_2LINES. In this case slave SPI will receive data on MOSI
but nothing will be sent back to master as MISO is not connected.
2017-11-23 10:10:05 +01:00
deepikabhavnani e78998e117 Definition for stat was missing in header file 2017-11-22 17:41:24 -06:00
Christopher Haster 2cf4715cb6 littlefs: Increased test timeout to 4 minutes
Unfortunately there are several issues colluding to force the timeout
this high.

1. The tests push littlefs to the limits of how many errors it can
handle before failing. As a side effect this causes a massive amount
of debug/warn/error logging about the situation.

2. The logging can't be turned off for specific tests. Note: This might
change with the introduction of test-configs.

3. Logging is fixed to a baud rate of 9600. Previous testing was carried
out with a baud rate of 115200, which is the reason for the original
timeout.
2017-11-22 17:19:16 -06:00
Christopher Haster 7e45aee8a5 Fixed mutex assert in armcc fopen and related memory leak
armcc fopen allocated a mutex using the retargeted system-level
_mutex_initialize function. Interestingly, malloc also uses this
same _mutex_initialization function, which prevents a full solution
relying on malloc. The solution previously implemented involved using
the rtx mutex pool for the first 8 mutexes, then falling back on
malloc.

The previous implementation relied on osMutexNew returning an error
on out-of-memory. An unrelated change causes osMutexNew to instead
assert (except for release mode). This meant if you exceed 8 system-
level mutexes in armcc you will hit an assert. Since the filesystem
code can call fopen an unlimited number of times, this is a problem.

Solution is to keep track of which static mutexes we've allocated, so
we know before calling osMutexNew if we need to call malloc.

Also _mutex_free never deallocated the malloced mutexes, which would
cause fopen to leak memory.
2017-11-22 16:53:19 -06:00
Christopher Haster ea0fee0968 littlefs: Integrated littlefs's .travis.yml into mbed OS
Also cleaned up the central .travis.yml to better support
similar local testing in Travis CI
2017-11-22 16:40:59 -06:00
Christopher Haster 4adf75c9aa littlefs: Moved test block devices into general block devices 2017-11-22 16:02:54 -06:00
Christopher Haster 9bc4ea6504 littlefs: Removed mbed namespace leaks 2017-11-22 16:02:54 -06:00
Christopher Haster 314995f841 Add 'features/filesystem/littlefs/' from commit 'd02b3122f006aa201bca4efc699bae40971e5a00'
git-subtree-dir: features/filesystem/littlefs
git-subtree-mainline: b025ea16d6
git-subtree-split: d02b3122f0
2017-11-22 16:02:21 -06:00
Christopher Haster d02b3122f0 Removed warnings about format strings when running littlefs tests
The difference gcc targets differ with format strings in some odd
(but not against the rules) ways. Most notable, the uint32_t in
i386/x86_64 gcc uses %d, whereas on cortex-m gcc uses %ld.

This makes dealing with warnings on code that goes between the two
rather annoying.
2017-11-22 15:55:54 -06:00
Christopher Haster 91a4f443fe Enforced style consistency with mbed
see https://os.mbed.com/docs/v5.6/reference/guidelines.html#style
2017-11-22 15:55:54 -06:00
Christopher Haster 9da2475099 Cleaned up doxygen warnings 2017-11-22 15:55:54 -06:00
Christopher Haster ad07da0da0 Merge commit '3eb2f38279aadb35234c5df1fb8e54fd2a035be1' 2017-11-22 15:28:15 -06:00
Christopher Haster 3eb2f38279 Squashed 'littlefs/' changes from 996cd8a..5ee20e8
5ee20e8 Fixed pipefail issue that was preventing CI from reporting errors
bf78b09 Added directory list for synchronizing in flight directories
e169d06 Removed vestigial function declaration

git-subtree-dir: littlefs
git-subtree-split: 5ee20e8d774adf0bb538269870b3552fdfc0e046
2017-11-22 15:28:15 -06:00
Jimmy Brisson ab1b3ae8d3
Merge pull request #5454 from OpenNuvoton/trng_get_unalignment
Nuvoton: TRNG_Get support 32 bytes unalignment
2017-11-22 10:21:39 -06:00
Jimmy Brisson 1ea4e4c446
Merge pull request #5549 from pan-/ble-gatt-server-doc-update
Ble gatt server doc update
2017-11-22 10:21:11 -06:00
Jimmy Brisson b7a7d4ed1a
Merge pull request #5553 from 0xc0170/OpenNuvoton-nuvoton_fix_lpticker
Nuvoton: fix lpticker interrupt
2017-11-22 10:20:31 -06:00
Jimmy Brisson 941f5725c7
Merge pull request #5539 from c1728p9/prevent_traceback
Prevent traceback when memap fails to parse
2017-11-22 10:20:12 -06:00
Jimmy Brisson 369187cadf
Merge pull request #5535 from MikeDK/nucleo_l432kc_async_serial_fix
NUCLEO_L432KC: Fixed async serial
2017-11-22 10:19:53 -06:00
Jimmy Brisson 4b57c5818e
Merge pull request #5528 from c1728p9/simplify_retarget
Use retarget defines where possible
2017-11-22 10:18:36 -06:00
Jimmy Brisson b6e50f5ed9
Merge pull request #5525 from deepikabhavnani/errno_fix
Fixed: errno update failure with IAR8.x
2017-11-22 10:17:56 -06:00