Commit Graph

13115 Commits (3613803a7a307c4f73d278fc511611345102a7a3)

Author SHA1 Message Date
Wolfgang Betz 3613803a7a Correct WiFi driver name to `X_NUCLEO_IDW0XX1` 2017-11-28 13:17:37 +01: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
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
deepikabhavnani e78998e117 Definition for stat was missing in header file 2017-11-22 17:41:24 -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
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
Jimmy Brisson 5e7851c9c5
Merge pull request #5521 from bcostm/dev_usbdevice_disco-f429zi
STM32: Add USB Device on DISCO_F429ZI
2017-11-22 10:17:15 -06:00
Jimmy Brisson a834425d97
Merge pull request #5516 from gorazdko/lpc546xx-fix-adc
lpc546xx: fix adc
2017-11-22 10:16:53 -06:00
Jimmy Brisson ced2f74f16
Merge pull request #5513 from bcostm/fix_adc_inited
STM32: Initialize ADC peripheral for each AnalogIn object creation
2017-11-22 10:16:14 -06:00
Jimmy Brisson cfa9e47aee
Merge pull request #5483 from maciejbocianski/heap_and_stack_tests
heap_and_stack test refactoring
2017-11-22 10:15:03 -06:00
Jimmy Brisson 308833b431
Merge pull request #5323 from maciejbocianski/malloc_tests
malloc test refactoring
2017-11-22 10:14:35 -06:00
Jimmy Brisson 23408e40d1
Merge pull request #5299 from pan-/ble-generic-event-filter
Ble: generic event filter
2017-11-22 10:14:13 -06:00
Maciej Bocianski bc99556151 threads test: increase threads heap size 2017-11-22 12:54:43 +01:00
Arto Kinnunen 02290f9dd7 Merge commit '03d1c4331350e6be4455b5234101075268431f11' into nanostack-release-candidate
* commit '03d1c4331350e6be4455b5234101075268431f11':
  Squashed 'features/nanostack/FEATURE_NANOSTACK/sal-stack-nanostack/' changes from 8f75e39..0a5ef1c
2017-11-22 11:22:16 +02:00
Arto Kinnunen 03d1c43313 Squashed 'features/nanostack/FEATURE_NANOSTACK/sal-stack-nanostack/' changes from 8f75e39..0a5ef1c
0a5ef1c Merge branch 'release_internal' into release_external
75a669a Merge remote-tracking branch 'origin/add_spdx_identifier_to_license' into release_internal
d643ab3 Merge branch 'release_internal' into release_external
0c7b56c Add SPDX identifiers to license files (#1484)
dfe1010 Add SPDX identifiers to license files
9142283 Merge pull request #1473 from ARMmbed/public_release_candidate

git-subtree-dir: features/nanostack/FEATURE_NANOSTACK/sal-stack-nanostack
git-subtree-split: 0a5ef1cfad33a5cce69789cbae94c8bab84c59d9
2017-11-22 11:22:16 +02:00
ccli8 bc9c9ca1e2 [M487] Remove trailing space in lp_ticker/us_ticker 2017-11-22 08:55:58 +00:00
ccli8 8b86d44867 [M487] Fix premature lp_ticker interrupt
Old lp_ticker handles past event, but it has a bug with premature go-off.
The bug can re-produce on mbed-os-tests-mbed_drivers-lp_timeout/mbed-os-tests-mbed_hal-lp_us_tickers (mbed-os commit: 9c1fd48529).
Because upper layer (mbed-os/hal/mbed_ticker_api.c) has handled past event, this code can be removed from lp_ticker.

The similar fix also applies to us_ticker.
2017-11-22 08:55:58 +00:00
Amanda Butler 8e7d74c91a
Update GattService.h
Fix minor typos.
2017-11-21 16:08:30 -06:00
Amanda Butler 1da844bdf9
Update GattServer.h
Copy edit, mostly for active voice and because American English treats collective nouns as singular.
2017-11-21 16:06:12 -06:00
Amanda Butler 70041c1fdc
Update GattCharacteristic.h
Make minor copy edits, mostly for American English.
2017-11-21 15:41:06 -06:00
Amanda Butler 036ea46c8f
Update GattAttribute.h
Make minor copy edits for precise language and active voice.
2017-11-21 15:03:03 -06:00
Vincent Coubard d153af332c BLE: Update GattServer documentation. 2017-11-21 18:30:08 +00:00
Kevin Bracey 9678c8052e Make UARTSerial send all data when blocking
Previously, write() was somewhat soft - it only ever made one attempt to
wait for buffer space, so it would take as much data as would fit in the
buffer in one call.

This is not the intent of a POSIX filehandle write. It should try to
send everything if blocking, and only send less if interrupted by a
signal:

 - If the O_NONBLOCK flag is clear, write() shall block the calling
   thread until the data can be accepted.

 - If the O_NONBLOCK flag is set, write() shall not block the thread.
   If some data can be written without blocking the thread, write()
   shall write what it can and return the number of bytes written.
   Otherwise, it shall return -1 and set errno to [EAGAIN].

This "send all" behaviour is of slightly limited usefulness in POSIX, as
you still usually have to worry about the interruption possibility:

  - If write() is interrupted by a signal before it writes any data, it
    shall return -1 with errno set to [EINTR].

  - If write() is interrupted by a signal after it successfully writes
    some data, it shall return the number of bytes written.

But as mbed OS does not have the possibility of signal interruption, if we
strengthen write to write everything, we can make applications' lives
easier - they can just do "write(large amount)" confident that it will
all go in one call (if no errors).

So, rework to make multiple writes to the buffer, blocking as necessary,
until all data is written.

This change does not apply to read(), which is correct in only blocking until
some data is available:

 - If O_NONBLOCK is set, read() shall return -1 and set errno to [EAGAIN].

 - If O_NONBLOCK is clear, read() shall block the calling thread until some
   data becomes available.

 - The use of the O_NONBLOCK flag has no effect if there is some data
   available.
2017-11-21 09:51:36 +02:00
Kevin Bracey 67b97d39c4 Make TCPSocket send all data when blocking
Previously, send() was somewhat soft - it only ever made one send
call to the underlying stack, so it would typically take as much data
as would fit in the buffer, and only block if it was unable to write
anything.

This is not the intent of a POSIX socket/filehandle write. It should try
to send everything if blocking, and only send less if interrupted by a
signal:

 - If the O_NONBLOCK flag is clear, write() shall block the calling
   thread until the data can be accepted.

 - If the O_NONBLOCK flag is set, write() shall not block the thread.
   If some data can be written without blocking the thread, write()
   shall write what it can and return the number of bytes written.
   Otherwise, it shall return -1 and set errno to [EAGAIN].

This "send all" behaviour is of slightly limited usefulness in POSIX, as
you still usually have to worry about the interruption possibility:

  - If write() is interrupted by a signal before it writes any data, it
    shall return -1 with errno set to [EINTR].

  - If write() is interrupted by a signal after it successfully writes
    some data, it shall return the number of bytes written.

But as mbed OS does not have the possibility of signal interruption, if we
strengthen send to write everything, we can make applications' lives
easier - they can just do "send(large amount)" confident that it will
all go in one call (if no errors).

So, rework to make multiple sends to the underlying stack, blocking as
necessary, until all data is written.

This change does not apply to recv(), which is correct in only blocking until
some data is available:

 - If O_NONBLOCK is set, read() shall return -1 and set errno to [EAGAIN].

 - If O_NONBLOCK is clear, read() shall block the calling thread until some
   data becomes available.

 - The use of the O_NONBLOCK flag has no effect if there is some data
   available.
2017-11-21 09:51:36 +02:00
Russ Butler abe431f48b Prevent traceback when memap fails to parse
If map file parsing fails then memap_instance is set to None. To
prevent a traceback when parsing fails check if this is None before
trying to access any of its fields.
2017-11-20 12:41:26 -06:00
Jimmy Brisson a519b8449b
Merge pull request #5518 from fbmrk/issue_5514
STM32F407VG: Fix RTC
2017-11-20 10:53:46 -06:00
Jimmy Brisson 800be4e90d
Merge pull request #5512 from jeromecoutant/PR_L072
DISCO_L072CZ_LRWAN1 can use LSE from LORA module
2017-11-20 10:53:20 -06:00
Jimmy Brisson ac891af2b2
Merge pull request #5503 from infinnovation/rewinddir
FATFileSystem: provide working dir_rewind and dir_seek
2017-11-20 10:52:05 -06:00
Jimmy Brisson 08f3402b7c
Merge pull request #5407 from deepikabhavnani/importer_script
Python script to add cmsis/rtx changes in mbed-os
2017-11-20 10:51:43 -06:00
Jimmy Brisson 41dcd255c3
Merge pull request #5196 from kegilbert/multicast-ipv6-2
Add IPv4 and IPv6 multicast implementation for UDPSocket
2017-11-20 10:51:07 -06:00
Jimmy Brisson 593eab2603
Merge pull request #5123 from maciejbocianski/signal_tests
Extends test set for Thread signals
2017-11-20 10:49:58 -06:00
Michael Kaplan 29ae97cd8b NUCLEO_L432KC: added SERIAL_ASYNC to targets.json 2017-11-20 15:49:35 +01:00
Michael Kaplan 8a1c29c2e5 TARGET_STM32L4: added missing #ifdef in serial_device.c 2017-11-20 15:49:18 +01:00
Maciej Bocianski bc103359f7 heap_and_stack test refactoring 2017-11-20 11:24:49 +01:00
gorazd 5c2f2c3cff lpc546xx: remove obsolete line 2017-11-18 10:44:33 +01:00
Russ Butler beb0b20e32 Use retarget defines where possible
Remove the condition code around the defines in mbed_retarget.h so
all toolchains use the defined values. Exclude a small subset of
values for GCC since these are in its standard header files.
2017-11-17 19:40:47 -06:00
Deepika 83409c5af3 Fixed: errno update failure with IAR8.2
errno (part of thread local storage) setting caused hardfault with IAR8.x
versions. TLS is not supported, hence using main thread TLS area for
all threads.
2017-11-17 13:12:39 -06:00
gorazd 8411134184 lpc546xx: correct register name (DIGIMODE) 2017-11-17 19:16:42 +01:00
Vincent Coubard c4351d31d8 BLE: Update GattAttribute documentation. 2017-11-17 14:39:39 +00:00