Commit Graph

320 Commits (11b6a4eaf9f1b047e83c693f8d1e036f16a037d4)

Author SHA1 Message Date
Martin Kojtal c6b6bab2f9
Merge pull request #6630 from OpenNuvoton/nuvoton_add_nonsecure_flash
Support secure/non-secure flash IAP for Cortex-M23/M33
2018-04-19 17:24:27 +02:00
Cruz Monrreal d680ceeba6
Merge pull request #6603 from marcuschangarm/fix-flowcontrol
Optional hardware flow control for STDOUT
2018-04-17 13:15:31 -05:00
Cruz Monrreal 7dabd247ab
Merge pull request #6510 from yossi2le/add-deprecated-doxygen-remarks
Adding missing @deprecated to function inline documentation
2018-04-17 10:53:54 -05:00
Marcus Chang 7e6538ffed Optional hardware flow control for STDOUT
Some platforms have interface chips with hardware flow control
enabled by default. This commit adds configurable flow control to
STDOUT.

Usage:

* Define pin names STDIO_UART_RTS for Rx-flow-control and
  STDIO_UART_CTS for Tx-flow-control.
* Set target.console-uart-flow-control. Valid options are:
  null, RTS, CTS, and RTSCTS.
2018-04-15 20:12:14 -07:00
ccli8 1b7b94e0ad Add MBED_NONSECURE_ENTRY for all-toolchain secure gateway functions 2018-04-16 09:38:39 +08:00
Cruz Monrreal 339283b3b8
Merge pull request #6418 from amq/poll-lowpowertimer
Add an option to use LowPowerTimer for poll
2018-04-12 18:37:22 -05:00
Senthil Ramakrishnan 194b89cce6 Fix doxygen comments to reflect the deprecated functions 2018-04-03 14:10:39 -05:00
Yossi Levy 8684a63732 Fix Travis CI docs issues 2018-04-02 13:01:21 +03:00
Yossi Levy 57b4653a98 Adding @deprecated functions to the inline documentation of deprecated functions 2018-03-29 12:05:26 +03:00
amq fc412bba5f
Include LowPowerTimer.h 2018-03-28 21:53:35 +02:00
Cruz Monrreal ddf70f1dc9
Merge pull request #6377 from scartmell-arm/feature-deep-sleep-tracing-filename-fix
Replace runtime strip_path function with compiler intrinsic equivalents
2018-03-23 10:28:25 -05:00
Cruz Monrreal 9932b4c983
Merge pull request #6309 from deepikabhavnani/peek_api
Peek API to view data of buffer without popping
2018-03-22 11:28:15 -05:00
Cruz Monrreal 3ddca11395
Merge pull request #6368 from kjbracey-arm/atomic_volatile
Sort out volatiles in the atomic functions
2018-03-21 17:03:27 -05:00
amq 2e9ff4755c Add an option to use LowPowerTimer for poll 2018-03-21 05:05:58 +00:00
Steven Cartmell ab2abcb29d Fix issues with __FILENAME__ macro
- Move macro definition to mbed_toolchain.h
- Remove double underscores from macro which are reserved.
- Fix macro for IAR until compiler flags to disable path are added again.
2018-03-20 14:29:34 +00:00
Steven Cartmell 1e3050a1df Remove superfluous compiler check in macro 2018-03-16 14:41:56 +00:00
Cruz Monrreal 9cac3b2f6b
Merge pull request #6149 from bmcdonnell-ionx/typos
Fix typos in the files
2018-03-15 10:53:03 -05:00
Steven Cartmell bd63f93984 Replace runtime strip_path function with compiler intrinsic equivalents
Sleep manager tracing strips the path from filenames and uses the result as an
identifier to track drivers that unlock/lock sleep tracing. Replace the function
that strips the path from the string, replace this function with a new macro,
__FILENAME__ which performs the same action in a compiler specific manner.

- GCC_ARM, use __builtin_strrchr which is optimized out at compile time.
- ARM, use __MODULE__ which returns the filename without path.
- IAR, specifiy the --no_path_in_file_macros compiler flag.
2018-03-15 15:49:42 +00:00
Kevin Bracey a8f75e324d Add volatile qualifiers to atomic functions
The atomic functions preserve volatile semantics - they only perform the
accesses specified. Add the volatile qualifier to the value pointer to
reflect this. This does not change existing caller code - it's
equivalent to adding a const qualifier to indicate we don't write to
a pointer - it means people can pass us qualified pointers without
casts, letting the compile check const- or volatile-correctness.

This is consistent with C11 <stdatomic.h>, which volatile-qualifies its
equivalent functions.

Note that this useage of volatile has nothing to do with the atomicity -
objects accessed via the atomic functions do not need to be volatile.
But it does permit these calls to be used on objects which have been
declared volatile.
2018-03-15 11:06:27 +02:00
Kevin Bracey f62b93926a Remove unnecessary casts
The volatile qualifier on the __LDREX/__STREX prototypes only means that
it's safe to use them on volatile objects. Doesn't mean you actually
have to pass them volatile pointers.

Adding the volatile is a bit like doing strlen((const char *) ptr)
because you've got a non-const pointer.
2018-03-15 11:06:27 +02:00
Deepika 9fa660ebde Peek API to view data of buffer without popping 2018-03-08 14:47:21 -06:00
Wolfgang Betz 3057aa71f9 Align `ATCmdParser::process_oob()` to `ATCmdParser::vrecv()`'s newline handling 2018-03-08 14:06:30 +01:00
Bartek Szatkowski d6f57bc3e8 Fix review comments and merge issues 2018-03-02 00:29:14 +00:00
Steven Cartmell 206cc299e0 Fix merge conflict mishap 2018-03-01 17:33:21 +00:00
Steven Cartmell bd23625d23 Rename SLEEP_STATS_ENABLED to SLEEP_TRACING_ENABLED 2018-03-01 17:25:33 +00:00
Steven Cartmell 74bdf1c3a3 Rename SLEEP_PROFILING_ENABLED to MBED_SLEEP_STATS_ENABLED 2018-03-01 17:25:15 +00:00
Steven Cartmell 0f6b73ae0f Add optional tracing to sleep manager lock/unlock
Add tracing output to console to track when drivers lock and unlock deep
sleep. Tracing output is enabled by configuring the
'SLEEP_PROFILING_ENABLED' at compile time.

- Wrapped sleep_manager_lock/sleep_manager_unlock in a macro to
conditionally call tracing functions when 'SLEEP_PROFILING_ENABLED' is
set.
- Define a global structure to track driver names and how many locks
they hold in the sleep manager.
2018-03-01 17:24:53 +00:00
Bartek Szatkowski 4cb47df40a Add system_reset() function to Mbed OS 2018-02-28 16:42:34 +00:00
Anna Bridge dce5a2febe
Merge pull request #6209 from pan-/improve-sleep-header
Platform: Improve mbed_sleep.h
2018-02-28 14:12:54 +00:00
Cruz Monrreal 153fa05bea
Merge pull request #6172 from adustm/l4_linkergcc
Use SRAM2 32Kbytes on STM32L475 / L476 and L486 devices
2018-02-27 13:46:26 -06:00
Vincent Coubard 56bc7fb391
Platform: Improve mbed_sleep.h
* Qualify inclusion of sleep_api.h
* use standard `inline` qualification instead of the non standard `__INLINE`
2018-02-26 11:33:17 +00:00
adustm 0efc876bb4 Call to specific _wrap_sbrk to support 2 region model for heap and stack 2018-02-22 17:36:20 +01:00
Christopher Haster 72b0a07ffe retarget: Fix path behaviour without leading slash
Current behaviour ends up undefined when the constructor leaves early.
Now FilePath just discards leading slashes and otherwise asserts if the
path is bad.
2018-02-21 14:43:53 -06:00
Brendan McDonnell c4f10aafee typos 2018-02-20 20:11:19 -05:00
Martin Kojtal e8efe11c0e
Merge pull request #6031 from OpenNuvoton/nuvoton_m2351_cthunk
M23: Fix CThunk error on Cortex-M23
2018-02-08 15:21:24 +00:00
Jimmy Brisson 7b5d48df38
Merge pull request #5571 from kjbracey-arm/retarget_fh
Complete mbed_retarget FileHandle rework
2018-02-07 17:21:09 -06:00
ccli8 e9e9b8ed5c [M23] Fix CThunk error on Cortex-M23
Cortex-M23 doesn't support ARMv8-M Main Extension and so doesn't support:
ldm  r0, {r0, r1, r2, pc}

Fix it by going Cortex-M0/M0+ way:
ldm  r0, {r0, r1, r2, r3}
bx   r3
2018-02-07 15:45:54 +08:00
Cruz Monrreal 07fce417ca
Merge pull request #5852 from maciejbocianski/scoped_lock
ScopedLock implementation
2018-02-06 12:51:21 -06:00
Kevin Bracey f79bfddcad Make stdin/stdout/stderr be FileHandles
Rework so that everything is a FileHandle, including
stdin/stdout/stderr.

Provide legacy functionality of calling serial_getc and serial_putc as
an internal "DirectSerial" FileHandle.

Add a JSON option to use UARTSerial instead.

Add hooks for target and application to provide custom FileHandles.

Allow for CRLF conversion to work on any FileHandle that isatty(),
as stdin/stdout or any other FILE. Optimise the conversion so it
doesn't force all write calls to be 1 byte. Limit the conversion
to the stdio layer, so that read() and write() work the same as
the FileHandle methods - this seems less confusing.
2018-02-06 11:07:23 +02:00
Kevin Bracey 96c709fb35 Rework retarget opening
Rationalise layers a little more to add the POSIX standard fdopen(int)
and a local open(FileHandle) to map a FileHandle to a POSIX file
descriptor.

fdopen(FileHandle) is now a composite of those two, rather than being
a primitive.
2018-02-06 11:07:21 +02:00
Cruz Monrreal b8d218038b
Merge pull request #5994 from bmcdonnell-ionx/gcc-arm-extram
allow use of external memory as heap with TOOLCHAIN_GCC_ARM
2018-02-01 23:17:29 -06:00
Cruz Monrreal d8aebba542
Merge pull request #5987 from deepikabhavnani/add_macros
Pre-processor common macro addition
2018-02-01 16:34:33 -06:00
Brendan McDonnell a47bf4595f make _sbrk() WEAK so the user can override it, e.g. to make malloc() always use external memory 2018-02-01 11:14:07 -05:00
deepikabhavnani 3977249b54 Added macro: 1. string length and 2. variable argument count 2018-01-31 14:06:16 -06:00
Kevin Bracey b5ac071b66 Add space for real stdin/out FileHandles
Index the FileHandle array from 0 - now if filehandle[0..2] is
NULL, it uses the built-in serial for stdin/stdout/stderr,
else it will use a FileHandle.

No mechanism to actually put a FileHandle in that position yet.
2018-01-29 15:29:02 +02:00
Kevin Bracey f391d8a0dc Add POSIX file functions
Fill in a gap by providing the POSIX file functions corresponding
to the FileHandle API, so FileHandles can be used from C without
going through the C library stdio layer.

This aligns with the fact we already provide POSIX directory
functions.

Fix EOF handling for ARM C Library _sys_read.
2018-01-29 15:29:02 +02:00
Michael Kaplan b3a9af49b8 CriticalSectionLock: fixing missing include
Macro MBED_DEPRECATED_SINCE is defined in platform/mbed_toolchain.h which was not included.
If someone used member functions lock or unlock (which are prefixed with MBED_DEPRECATED_SINCE since some time), there would be a compile error instead of a warning.
Including mbed_toolchain.h fixes that.
2018-01-24 08:10:35 +01:00
Amanda Butler 8f175609ae
Copy edit ScopedLock.h
Copy edit document for active voice, present tense and consistent comma use.
2018-01-17 16:56:28 -06:00
Martin Kojtal 4118542bdf critical: fix non valid configuration
If any architecture is added, needs  to update critical exclusive access.

Also fixing if exclusive access is defined, we use the value.
2018-01-17 10:36:47 +00:00
Martin Kojtal b37f24a2cd critical: fix set exclusive access if not yet defined
Fixes #5555 bug.
In case there is not yet defined __EXCLUSIVE_ACCESS, neither MBED_EXCLUSIVE_ACCESS that
we are introducing, use architecture macros to find out if MBED_EXCLUSIVE_ACCESS can be
enabled.
2018-01-17 10:36:36 +00:00