Commit Graph

590 Commits (6ebc5be0f06e66ea9ec0f566af6e63c3f8ca3a9f)

Author SHA1 Message Date
Deepika 05d8c74aee Separate version header file to get version updates in Mbed OS 2018-07-11 09:41:30 -05:00
Senthil Ramakrishnan b6179d281d Remove error reporting for release builds 2018-07-06 10:15:07 -05:00
Senthil Ramakrishnan a29eee4e73 Don't print error reports in release builds 2018-07-06 09:56:34 -05:00
Senthil Ramakrishnan a443e9bb47 Fix wrong config binding 2018-07-03 14:00:46 -05:00
Cruz Monrreal 7e0f75e831
Merge pull request #7331 from TomoYamanaka/improve_bootloader
Improve the process for Cortex-A9 in mbed_application
2018-07-03 07:37:19 -05:00
Martin Kojtal ffcb6ecfb5 platform: astyle update 2018-06-29 10:38:44 +01:00
Senthil Ramakrishnan 0e25447b78 Fix error history related comments 2018-06-27 15:32:38 -05:00
TomoYamanaka 9c99d7eb17 Improve the process for Cortex-A9 in mbed_application
I added the powerdown func by GIC in mbed_application because Cortex-A9 use GIC instead of NVIC.
This process prevent unexpected interrupt when updating software by using bootloader.
2018-06-26 19:17:59 +09:00
Cruz Monrreal ea47342f81
Merge pull request #7214 from SenRamakri/sen_ErrorOptimAndConfig
Error handling configuration updates and Optimization for exception handling
2018-06-25 10:10:49 -05:00
TomoYamanaka 5c036cb1ba Add the process for Cortex-A in mbed_applicaion
I added the process for Cortex-A in mbed_application.c because this process was for only Cortex-M.
Also I enabled the macro of MBED_APPLICATION_SUPPORT for Cortex-A.
2018-06-22 10:47:23 +09:00
Senthil Ramakrishnan baa44eb3f2 Limit error filename capture to 64 chars, wrapping tests with right configs and astyle fixes. 2018-06-20 11:56:32 -05:00
Senthil Ramakrishnan cbb12e326d Updates to configuration flags used in error handling implementation.
The new configuration make Error history tracking switched off by default and enabled by using the config flag MBED_CONF_PLATFORM_ERROR_HIST_ENABLED.
Config flag MBED_CONF_PLATFORM_ERROR_ALL_THREADS_INFO enables printing info of all threads. This will be turned off by default.
2018-06-20 11:56:31 -05:00
Cruz Monrreal dabb112ebd
Merge pull request #7117 from OpenNuvoton/nuvoton_fix_armc6_memtrace2
Fix compile error with MBED_MEM_TRACING_ENABLED and ARMC6
2018-06-14 10:14:46 -05:00
Cruz Monrreal 38f9519ccc
Merge pull request #6949 from OpenNuvoton/nuvoton_m23_bootloader
Support mbed_start_application for Cortex-M23
2018-06-07 10:10:46 -05:00
Martin Kojtal 4f90f4c735 error: fix undeclared memcpy
Some targets do not get string header file in, results in the warning:
implicit declaration of function 'memcpy'
2018-06-06 09:00:27 +01:00
ccli8 0597998d91 Fix compile error with MBED_MEM_TRACING_ENABLED and ARMC6 2018-06-05 17:34:28 +08:00
Cruz Monrreal 50cd664628
Merge pull request #7050 from SenRamakri/sen_ErrorHandlingFilenameFix
Fix for filename capture not working
2018-06-04 10:43:56 -05:00
Senthil Ramakrishnan 576bd61d96 Do not capture filename for release builds 2018-05-31 11:30:33 -05:00
Senthil Ramakrishnan 68e59a11b9 Fix for error report not printing when calling error API 2018-05-31 11:27:20 -05:00
Senthil Ramakrishnan 07a6ab0864 Fix for filename capture not working 2018-05-31 10:39:58 -05:00
deepikabhavnani d764a7c627 OS version is not available in code, need a fix for this in next patch release 2018-05-30 08:57:47 -05:00
ccli8 23dcd82fab Remove superfluous MOVT in mbed_start_application/start_new_application 2018-05-30 09:39:07 +08:00
ccli8 3c14cb6332 Fix mbed_start_application on Cortex-M23
1. M23 doesn't support ICTR and supports up to 240 external interrupts.
2. Fix reset of SHPR
3. Fix inline assembly compile error with ARMC6
2018-05-28 11:43:27 +08:00
Bartek Szatkowski efd307fa79 Rename new occurrences of LOWPOWERTIMER to LPTICKER 2018-05-25 12:33:43 -05:00
Senthil Ramakrishnan 92e0cbfaef Doxygen fixes 2018-05-23 13:27:57 -05:00
Senthil Ramakrishnan 5ef6728c08 Splitting MBED_ERROR macros to support ones with/without error value argument 2018-05-23 12:21:28 -05:00
Senthil Ramakrishnan 693a6c40bb Refactor error reporting 2018-05-23 12:21:11 -05:00
Senthil Ramakrishnan d4fe75731d Adding mbed prefixes to all macros and functions to avoid namespace conflicts 2018-05-23 12:21:10 -05:00
Senthil Ramakrishnan 147d9cac4e Test application/cases optimization for some low memory targets, macro changes and test fixes 2018-05-23 12:21:10 -05:00
Senthil Ramakrishnan f9c25612ae Fix test failures when trap errors are enabled and other fixes 2018-05-23 12:21:10 -05:00
Senthil Ramakrishnan cbfc06577b Fixes to align with naming conventions 2018-05-23 12:21:09 -05:00
Senthil Ramakrishnan 92df68b1ea Changed variable names for registers to avoid namespace conflicts, build fixes, macros and other fixes 2018-05-23 12:21:09 -05:00
Senthil Ramakrishnan 530e9d323f Changed variable names for registers to avoid namespace conflicts and rtos disabled build fixes 2018-05-23 12:21:09 -05:00
Senthil Ramakrishnan 2e28dd95e1 Change set_error/set_error_fatal to warning/error, add itm support and other changes 2018-05-23 12:21:08 -05:00
Senthil Ramakrishnan 7c6c718f75 Fixed entity reporting and comments 2018-05-23 12:21:08 -05:00
Senthil Ramakrishnan 839fef0ad1 Added more tests for error log and error reporting, updated doxygen comments 2018-05-23 12:21:07 -05:00
Senthil Ramakrishnan 9041b475c6 Error handling/logging implementation and tests 2018-05-23 12:21:07 -05:00
Martin Kojtal 23d8085174
Merge pull request #6878 from bulislaw/rtc_lp_ticker
Add low power timer fallback for platforms without RTC
2018-05-22 14:35:18 +02:00
Martin Kojtal 5d027f4e27
Merge pull request #6857 from deepikabhavnani/cpu_stats
CPU Statistics
2018-05-22 14:30:21 +02:00
Martin Kojtal 02af950f62
Merge pull request #6336 from geky/fat-errors
fatfs: Update error code mapping
2018-05-22 14:27:01 +02:00
Cruz Monrreal a301db5d43
Merge pull request #6791 from kjbracey-arm/fcntl
Add POSIX fcntl flag support
2018-05-21 17:17:02 -05:00
ccli8 646f61400a Fix start_new_application compile error on Cortex-M23
With "mov r2, #0", compile OK with GCC_ARM, but failed with ARMC6.
With "ldr r2, =0", compile OK with ARMC6, but failed with GCC_ARM.
Finally, with "movw r2, #0"/"movt r2, #0", compile OK with both ARMC6 and GCC_ARM.
2018-05-21 17:39:09 +08:00
ccli8 b3f17a9e01 Support mbed_start_application for Cortex-M23 2018-05-18 17:33:05 +08:00
Christopher Haster effdc6571b retarget: Added workaround for conflicting definitions of error_t
The errno.h header file defines the type error_t, unfortunately this
is a common type name that may be defined in user code. For at least GCC
we can work around this by telling errno that the error_t is already
defined.
2018-05-17 10:26:33 -05:00
Christopher Haster 78992a4c26 retarget: Added include errno.h
Unfortunately, some toolchains don't define the same errno codes that
are used fairly consistently on Linux based platforms, which means they
also don't match the errno codes used in the retarget layer.

If a user includes errno.h after mbed.h, the errno codes can be
redefined incorrectly.

Adding an include of errno.h in mbed.h forces the order to be fixed.
2018-05-17 10:26:33 -05:00
Deepika 029237b683 Addressed review comments
1. LP ticker limiation note
2. Use read_us in mbed_uptime function
3. Doxygen recommendations
4. Use us_timestamp_t instead uint64_t
5. Astyle changes
2018-05-15 11:36:08 -05:00
deepikabhavnani 3420ff7f9c CPU statistics addition
API to get CPU stats like sleep/deepsleep time, uptime and idle time.
These can be used by application to know the CPU Usage runtime.
2018-05-15 11:20:52 -05:00
Deepika 1961428c1b OS version added + CPUID for cortex-M only
CPUID base register is available for Cortex-M processors only.
Cortex-A devices have Main ID Register, which can be used in future to
get processor info.
2018-05-15 10:22:13 -05:00
deepikabhavnani c08b3e3d3d System Info API addition
API added to get the system information like CPU ID, compiler ID and
compiler version.
2018-05-15 10:17:40 -05:00
Bartek Szatkowski ac9276499f Add low power timer fallback for platforms without RTC
Low power timer will be used as RTC for platforms that don't have HW RTC
capabilities.
2018-05-14 12:07:59 +01:00
deepikabhavnani 97c88188d0 Cleanup
1. Enable watermark to get stack space information
2. Restructured code
3. Throw error if MBED_THREAD_STATS_ENABLED is not set
4. Astyle changes
2018-05-11 10:06:44 -05:00
deepikabhavnani f43b16ffd9 Cleaup and review comments addressed
1. Removed prefix thread_ from all elements of mbed_stats_thread_t
2. #if conditions aligned to rest of the file
2018-05-11 10:05:35 -05:00
deepikabhavnani 1dad73949c Thread statistics addition.
API to get all system threads information and states.
2018-05-11 10:05:32 -05:00
Cruz Monrreal ab7a856657
Merge pull request #6784 from deepikabhavnani/mbed_stats_fix
Add common define MBED_ALL_STATS_ENABLED to enable all statistics
2018-05-10 23:25:23 -05:00
Cruz Monrreal a2370d57fa
Merge pull request #6809 from deepikabhavnani/add_assert
Mbed Stats: Assert if NULL pointer passed as arg
2018-05-09 10:50:10 -05:00
Cruz Monrreal 68ad00ffb8
Merge pull request #6645 from woodsking2/master
mbed_wait_api: add comments to warn the func will lock deep sleep
2018-05-08 10:54:48 -05:00
Cruz Monrreal 39fd120064
Merge pull request #6797 from OpenNuvoton/nuvoton_fix_noserial
Fix compile error with DirectSerial in serial-less build
2018-05-07 10:27:27 -05:00
deepikabhavnani 0f0a4c0a50 Check for NULL pointer before access 2018-05-03 11:23:12 -05:00
Kevin Bracey cf91b1c6d7 Add POSIX fcntl to control blocking
Add the POSIX fcntl call, but only implementing F_SETFL and F_GETFL
for O_NONBLOCK, so users can control the blocking flag of streams
with only the integer file descriptor.

Necessary to portably control the blockingness of the console:

    int flags = fcntl(STDOUT_FILENO, F_GETFL);
    fcntl(STDOUT_FILENO, F_SETFL, flags | O_NONBLOCK);
2018-05-03 15:40:26 +03:00
Kevin Bracey a8ab233a1a retarget: distinguish FileHandle and descriptor
Avoid using `fh` for the integer descriptor numbers, reserving
that for the `FileHandle` objects - use `fildes` or `fd`,
matching POSIX.
2018-05-03 15:40:26 +03:00
Kevin Bracey 59f49e2b96 Add `is_blocking()` method to FileHandle
There was no way to check current blocking state, so no way to modify
and restore status.

Also have default FileHandle::set_blocking() used by real files return a
correct error code when asked for non-blocking, and success when asked
for blocking.

These were minor omissions that are required to implement POSIX fcntl
properly.

fixup! Add `is_blocking()` method to FileHandle
2018-05-03 15:38:33 +03:00
ccli8 bfe9ee7777 Fix compile error with DirectSerial in serial-less build 2018-05-03 10:52:09 +08:00
James Wang c9b2640f70 mbed_wait_api: wait_ms() wait() wait_us() add "If the RTOS is present" comments 2018-05-03 10:22:32 +08:00
deepikabhavnani a228fd0f3b Add common define to enable all statistics
As part of Device Health requirement, all mbed OS statistics should be
enabled with single macro `MBED_ALL_STATS_ENABLED`
2018-05-02 14:14:07 -05:00
ccli8 89622378d8 Fix compile error with MBED_MEM_TRACING_ENABLED and ARMC6 2018-04-27 14:19:12 +08:00
Kevin Bracey 39fa676993 Make poll() use RTOS tick count
RTOS maintains a tick count - use it, avoiding issues with sleep and low
power timers.
2018-04-23 14:42:59 +03:00
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
James Wang 27ce443a70 accept Amanda Butler's review. change to "This function always spins to get the exact number of microseconds, which potentially affects power (such as preventing deep sleep) and multithread performance. You can avoid it by using Thread::wait()." 2018-04-18 10:22:50 +08: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
James Wang 04627992db Accept Kevin Bracey's review, "wait_ms() and wait(float) always spin to get an exact number of microseconds, potentially impacting power and multi-thread performance. Again, avoided by Thread::wait()". 2018-04-17 18:11:59 +08:00
James Wang efc228ff06 accept Cruz Monrreal's review 2018-04-17 15:23:15 +08:00
James Wang 4c69419e2e mbed_wait_api: add comments to warn the func will lock deep sleep 2018-04-16 18:13:15 +08: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
Cruz Monrreal 671c2d7e90
Merge pull request #5346 from scartmell-arm/feature-hal-spec-critical-section
Add Critical Section HAL API specification
2018-01-16 12:49:38 -06:00
Martin Kojtal 280d491ff2
Merge pull request #5456 from TeroJaasko/fix_cpp_alloc_wrappers
platform: make C++ allocation wrappers log the correct caller address
2018-01-15 15:29:54 +00:00
Maciej Bocianski a3c9c124f7 platform: Add ScopedLock 2018-01-15 09:34:05 +01:00
Cruz Monrreal c0c501c70f
Merge pull request #5768 from deepikabhavnani/storage_stats
Added statvfs API to get storage statistics
2018-01-11 10:25:41 -06:00
Steven Cartmell 061795c489 Move in_critical_section implementation into the HAL
- Add function to HAL hal_in_critical_section()
- Wrap assert in FEATURE_UVISOR macro
2018-01-09 10:41:29 +00:00
Deepika d5cf4a6a6a fsblkcnt_t is available in GCC, but adding it for all compilers 2018-01-08 10:42:41 -06:00
Tero Jääskö b81be1e34c 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-08 16:09:39 +02:00
Tero Jääskö 1cf5c45615 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-08 16:09:32 +02:00
Steven Cartmell e14bee5209 Fix potential race condition in critical section HAL API
Call underlying HAL implementation to enter critical section/disable interrupts
before incrementing the global critical section counter.

Modify HAL implementations to track first entrances to the critical section and
only update the saved state on first enter.
2018-01-05 14:55:58 +00:00
Steven Cartmell a07c07fa63 Update HAL API header information 2018-01-05 14:55:57 +00:00
Steven Cartmell 84391f0b64 Remove invalid assert and move uVisor warning to correct function 2018-01-05 14:55:57 +00:00
Steven Cartmell 07a394ee8b Add Critical Section HAL API specification
- Define header functions for Critical Section HAL API
  - hal_critical_section_enter()
  - hal_critical_section_exit()

- Add weak default implementation for HAL API. The default implementation
  matches the previous behaviour stored in mbed_critical:
  - The first call to enter a critical section stores the state of interrupts
    before disabling and each successive call re-disables interrupts.
  - The last call (non-nested) will restore the IRQ state that was set on the
    enter to the critical section. Nested calls are ignored.

- Add function 'core_util_in_critical_section' to User facing API to determine
  if the program is currently in a critical section, instead of depending on
  'core_util_interrupts_enabled'.
2018-01-05 14:53:51 +00:00
Deepika 7a90be0ce1 Added statvfs API to get storage statistics
The API is as per posix standard, but does not provide stats for file/directory.
Stats buffer (block size, total block count, free block count) is filled for
entire mounted filesystem.
2017-12-29 16:42:31 -06:00
Anna Bridge eda0acc5da
Merge pull request #5621 from maciejbocianski/critical_section_imp2
CriticalSectionLock class improvement
2017-12-29 14:37:00 +00:00
Anna Bridge 1b53aabc5c
Merge pull request #5733 from deepikabhavnani/non_rtos_serial_fix
Access to serial device is allowed when DEVICE_SERIAL is defined
2017-12-29 14:28:15 +00:00
Maciej Bocianski aa22ef1e1e platform: fix mem_trace trace_level guard 2017-12-23 09:20:35 +01:00
Maciej Bocianski ad67904daa platform: CriticalSectionLock class improvement 2017-12-23 09:18:37 +01:00
Seppo Takalo 6c3f307257 Fix PR5578 2017-12-21 12:22:11 +02:00
Deepika 5bc33b94f8 Access to serial device is allowed when DEVICE_SERIAL is defined 2017-12-20 09:59:06 -06:00
Martin Kojtal b89cf3ff75
Merge pull request #5578 from mprse/CircularBuffer_tests
CircularBuffer class modification and test
2017-12-20 14:51:44 +00:00
Martin Kojtal bea41d1ebb
Merge pull request #5635 from c1728p9/fix_lazy_init
Protect local static object construction in ARMCC
2017-12-12 17:41:21 +00:00
Martin Kojtal be52ba2156
Merge pull request #5363 from mprse/extended_rtc
Add support and tests for extended RTC
2017-12-12 17:36:44 +00:00
Russ Butler c63a627868 Protect local static object construction in ARMCC
Implement the functions __cxa_guard_acquire, __cxa_guard_release
and __cxa_guard_abort for ARMCC so local static object construction is
thread safe.
2017-12-01 11:14:58 -06:00
Przemyslaw Stekiel dc5a66dc5c Add support for extended RTC.
Provide support to use whole 32-bit range (unsigned int) to hold time since UNIX epoch.
The suppoerted time range is now from the 1st of January 1970 at 00:00:00 to the 7th of February 2106 at 06:28:15.
Add support for two types of RTC devices:
- RTCs which handles all leap years in the mentioned year range correctly. Leap year is determined by checking if the year counter value is divisible by 400, 100, and 4.
- RTCs which handles leap years correctly up to 2100. The RTC does a simple bit comparison to see if the two lowest order bits of the year counter are zero. In this case 2100 year will be considered incorrectly as a leap year, so the last valid point in time will be 28.02.2100 23:59:59 and next day will be 29.02.2100 (invalid). So after 28.02.2100 the day counter will be off by a day.
2017-12-01 17:07:34 +01:00
Martin Kojtal b076565ac0
Merge pull request #5596 from kjbracey-arm/strong_cas
Make LDREX/STREX CAS functions strong
2017-11-30 18:04:14 +00:00
Przemyslaw Stekiel c962913ed9 Add assertion to make CounterType consistent with BufferSize.
CounterType is used to define type of _head and _tail counters. This may cause the following problems:
- counters are used as array indexes so only unsigned types should be used for counters,
- CounterType must be consistent with BufferSize and BufferSize is of uint32_t type (i.e. Circular Buffer with the following parameters: BufferSize = 1000, CounterType = unsigned char will not work properly).
2017-11-29 11:26:23 +01:00
Kevin Bracey 59508d46a6 Explicitly note that CAS is strong in docs
Add a note to each CAS making explicit that the functions are strong.

Minor wording change to expectedCurrentValue - use of "still updated"
about the failure case suggested that it might be written to on success.
For some uses it's critically important that expectedCurrentValue only
be written on failure, so change wording to "instead updated".
2017-11-28 14:02:28 +02: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
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 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
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
deepikabhavnani e78998e117 Definition for stat was missing in header file 2017-11-22 17:41:24 -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
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
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
Martin Kojtal 4198695fab
Merge pull request #5485 from pan-/non-copyable-warning
Platform: Allow copy of non copyable objects
2017-11-16 16:14:42 +00:00
Martin Kojtal 41eb565d9c
Merge pull request #5342 from ARMmbed/feature_cortex_a
Update CMSIS/RTX with Cortex-A support
2017-11-15 11:24:36 +00:00
Vincent Coubard 80c9f8bd2f Platform: Turn NonCopyable compile time error into warnings.
Turn the compile time error issued when a NonCopyable resource is copied
into a compile time and runtime warning.

If the application is compiled with the debug profile the compile time
error remains.

The compile time error can be enforced by setting the library option
force-non-copyable-error to true.
2017-11-14 10:09:07 +00:00
Vincent Coubard 5310451c8f Platform: Add MBED_PRETTY_FUNCTION macro.
This macro yields a string literal of the enclosing function name.
2017-11-14 10:07:30 +00:00
Vincent Coubard 3aa4bf4346 Platform: fix end of line whitespace 2017-11-14 10:06:38 +00:00
Bartosz Szatkowski 048a896741 Update definitions of CPSR modes 2017-11-10 09:53:41 +00:00
Bartek Szatkowski 855844f5a1 Update CThunk to support new CMSIS Cortex A ops 2017-11-10 09:53:41 +00:00
Martin Kojtal 589d76e59f
Merge pull request #5058 from 0x6d61726b/patch-2
CircularBuffer(): get available transactions
2017-11-09 16:54:59 +00:00
Martin Kojtal fbd9e7eaf2
Merge pull request #5372 from SenRamakri/sen_PlatformDoxygenUpdates
Doxygen comments fixes
2017-11-09 16:38:45 +00:00
Jimmy Brisson 6912a9dc0d
Merge pull request #5393 from c1728p9/call_chain_deprecation
Deprecate CallChain and InterruptManager
2017-11-02 11:10:52 -05:00
Jimmy Brisson 551a2a3c66
Merge pull request #5373 from ARMmbed/g-fix-nodev-errno
fs: Correct errno when not finding a mounted filesystem
2017-11-02 10:40:19 -05:00
0x6d61726b 830db6a5a0
code style adopted 2017-10-31 16:07:33 +01:00
Senthil Ramakrishnan 37214ab695 Fix comments on mbed_assert.h 2017-10-27 15:38:44 -05:00
Russ Butler 891b06e61b Deprecate CallChain
This patch deprecates the CallChain class since it is an
internal API (not in mbed.h) and is only being used by
InterruptManager which is also deprecated.
2017-10-27 14:55:49 -05:00
Senthil Ramakrishnan 3ad298488c Doxygen comment updates and fixes 2017-10-26 15:36:26 -05:00
Christopher Haster 400c25466d fs: Corrected errno when not finding a mounted filesystem 2017-10-24 11:52:06 -05:00
0x6d61726b c1ab43ce76 Code style updated 2017-10-20 22:06:01 +02:00
Christopher Haster 32faaf65ee Change FileSystemHandle group to platform
Was drivers, should be platform, wasn't updated during move
2017-10-16 17:46:40 -05:00
Jimmy Brisson 493e3788e3 Merge pull request #5216 from kjbracey-arm/UARTSerial_wait
Avoid wait_ms() spin
2017-10-13 09:20:41 -05:00
Jimmy Brisson a67737f993 Merge pull request #5086 from pan-/systick_sleep_fix
Sleep: Disallow sleep for targets turning off the systick clock at sleep entry
2017-10-13 09:19:10 -05:00
Jimmy Brisson fad67559ae Merge pull request #5028 from c1728p9/ticker_api_changes
Update ticker to map closely to hardware
2017-10-13 09:18:02 -05:00
Anna Bridge 7b2b18f92f Merge pull request #5204 from geky/fix-retarget-defs
fs: Add missing retarget definitions for ARM/IAR
2017-10-06 11:53:05 +01:00
0x6d61726b 69e6f11c2d updates according to comments in pull request 2017-10-05 20:47:31 +02:00
Russ Butler 6452821e2e Add default implementation of timer info
Add weak implementations of *_ticker_get_info which returns 1MHz and
a width of 32 bits. This allows the updated Ticker API to work with
existing devices.

Note - in the future when all targets have implemented
*_ticker_get_info these weak functions will be removed.
2017-10-05 11:57:34 -05:00
Jimmy Brisson 0dc264fa86 Merge pull request #5212 from SenRamakri/sen_ATCmdParserChanges2
Merging changes from ATParser towards parser unification
2017-10-05 11:14:37 -05:00
Jimmy Brisson da138f20d7 Merge pull request #5203 from geky/fix-fstat-newlib
fs: Fix fstat retarget for regular files
2017-10-05 11:13:42 -05:00
Jimmy Brisson a0b624b62e Merge pull request #5038 from chrissnow/LPC1768-Bootloader
Lpc1768 bootloader support
2017-10-05 11:11:08 -05:00
Kevin Bracey de4ced33a6 Make poll() use wait(1) rather than yield()
Spinning while polling is overly CPU intensive, and inconsistent with
the current blocking behaviour of UARTSerial.

Change to use Thread::wait(1) to match UARTSerial.
2017-10-03 10:56:19 +03:00
Christopher Haster e9cd239ac3 fs: Added in missing retarget definitions for ARM/IAR
- missing O_ flags
- missing S_IF flags
- missing system types
- missing stat structure
- exhaustive list of errno codes
2017-10-02 16:12:22 -05:00
Russ Butler f0ac234da7 Prevent DeepSleepLock from leaving sleep locked
Add _lock_count to DeepSleepLock and use this to prevent deep sleep
from staying locked when the DeepSleepLock objected is destroyed after
an unbalanced number of calls to lock and unlock.
2017-10-02 11:34:56 -05:00
Senthil Ramakrishnan 3e1459b691 Merging changes from ATParser got AT parser unification 2017-10-02 10:03:58 -05:00
Senthil Ramakrishnan 7ffa3ddaaf Merging changes from ATParser towards parser unification 2017-10-02 10:03:58 -05:00
Chris Snow fb27e71894 Implement MBED_USED 2017-09-30 19:26:11 +01:00
Russ Butler 114d60c8ed Remove direct use of us ticker from platform
Update platform code to use the ticker common layer rather than using
HAL us ticker directly. This both ensures that the underlying ticker
is properly initialized and that the value read is in microseconds with
full 32-bit range.
2017-09-29 09:21:00 +01:00
Jimmy Brisson 01c864e9bb Merge pull request #5099 from mprse/move_clock_function
Move clock() function from mbed_rtc_time.cpp to mbed_retarget.cpp.
2017-09-28 14:05:35 -05:00
Jimmy Brisson 5bf224f1bf Merge pull request #5027 from geky/cb-fix-eq
cb: Fix uninitialized memory used for equality check
2017-09-27 15:14:59 -05:00
Przemyslaw Stekiel 035c0896ed Move clock() function from mbed_rtc_time.cpp to mbed_retarget.cpp. 2017-09-27 15:32:41 +02:00
Christopher Haster 01326910c0 fs: Fixed fstat retarget for regular files
GCC's newlib library depends on fstat to get in-flight information about
a file's type an size. A working fstat for regular files is needed for
seek and related functions to work correctly.
2017-09-26 21:41:13 -05:00
Martin Kojtal 6a46b9c0a7 Merge pull request #5165 from pan-/non-throwing-new-operator
Platform: Replace non throwing versions of new operator.
2017-09-26 15:08:18 +01:00
Vincent Coubard 017b8f0fc7 Platform: Replace non throwing versions of new operator.
This change prevents inclusion of non throwing versions of the new operator from
the compiler standard library. On GCC, the non throwing version bring with it
some portion of the exception support code.
2017-09-21 18:37:25 +01:00
Deepika 459e7d4725 IAR heap stats added 2017-09-18 10:24:01 -05:00
Anna Bridge 7b428916f5 Merge pull request #4949 from theotherjimmy/feature-armc5+armc6
NEW TOOLCHAIN: Add the ARMC6 Compiler
2017-09-13 10:39:15 +01:00
Vincent Coubard 682816d86e Sleep: Disallow sleep for targets turning of the systick clock at sleep entry.
When the RTOS is present and the tickless mode is not implemented, it is
expected that the next tick issued by the Systick timer will wake up the MCU.
However nothing prevents an implementation of the ARM architecture to gate the
systick clock signal upon sleep entry.

Therefore on those targets sleep shall be prohibited if the RTOS is present and the
tickless mode is not implemented.

To ease life of porters , a new option has been added in the device add list:
STCLK_OF_DURING_SLEEP. This option expose that the target turn of the systick
clock during sleep.

Targets which exhibit such behavior shall add this define in their device_has list.
2017-09-13 10:28:02 +01:00
Jimmy Brisson 41a6197208 Update mbed 2 discriminator 2017-09-11 13:20:33 -05:00
Jimmy Brisson b22a174c39 Correct semihosting check for ARMC6 2017-09-11 13:20:32 -05:00
Jimmy Brisson 15a9a0382b Enable Compiling with ARMC6 across all targets
remove duplicate sys.cpp
2017-09-11 13:20:32 -05:00
Jimmy Brisson 922bf1b619 Update mbed OS to handle ARMC6 requirements 2017-09-11 13:20:32 -05:00
Deepika 9422c351e4 Initial RTX and tools support for Cortex M-23/M-33 devices 2017-09-11 11:43:26 -05:00
Anna Bridge cab660d980 Merge pull request #4938 from deepikabhavnani/IAR_fixes
Update IAR to version 8
2017-09-11 17:28:38 +01:00
0x6d61726b 839cd7ee70 CircularBuffer(): get available transactions
This implementation returns the number of available (stored) transactions in the buffer
2017-09-08 15:33:14 +02:00
Martin Kojtal bc704427e2 platform: add DeepSleepLock
RAII object for disabling, then restoring the deep sleep mode
2017-09-07 15:35:06 +01:00
Martin Kojtal cb4e9b32a2 Sleep HAL: add sleep manager API
Sleep manager provides API to lock/unlock deepsleep. This API allows a user to
control deep sleep.

This API should be done via atomic operations (to be IRQ/thread safe).
2017-09-07 15:34:47 +01:00
Deepika 7d98eebf2a __IAR_SYSTEMS_ICC__ macro had issues when 7.5 and 8.11 both workbench are installed 2017-09-06 09:51:17 -05:00
Deepika bcb8779362 Internal members of std::FILE are not available from IAR8.x 2017-09-06 09:51:15 -05:00
Deepika 38e96ac432 __aeabi_read_tp function required for TLS in Dlib 2017-09-06 09:51:15 -05:00
Christopher Haster 382c0381c9 cb: Fixed uninitialized memory used for equality check
Fixed by zeroing the memory. A more "c++ correct" approach
may be to add an additional op for equality, and use the "=="
operator on the F type in the generate function. But this adds
the requirement that F supports equality.
2017-09-05 11:03:14 -05:00
Martin Kojtal 4ccff693ae Merge pull request #4962 from 0xc0170/dev_critical_section
platform: add CriticalSectionLock
2017-09-04 16:50:59 +01:00
Jimmy Brisson 2d65f49f61 Merge pull request #4954 from c1728p9/fix_isr_clear
Fix ISR powerdown in mbed_application.c
2017-08-29 13:46:25 -05:00
Martin Kojtal be8174f94f platform: add CriticalSectionLock
Critical section class RAII addition
2017-08-29 12:47:04 +01:00
Jimmy Brisson 7252447385 Merge pull request #4920 from scartmell-arm/led-error-sequence
Modify LED error sequence to be more recognisable
2017-08-24 10:14:13 -05:00
Jimmy Brisson dd0a0fc3e7 Merge pull request #4831 from fahhem/less_scanf
Remove excessive use of printf/scanf in mbed_fdopen/_open
2017-08-24 10:12:10 -05:00
Russ Butler 29ad5bb09b Fix ISR powerdown in mbed_application.c
Fix a calculation error in in powerdown_nvic preventing the last
group of 32 interrupts from getting powered down. The ARMv7m reference
manual states "the total number of interrupt lines is up
to (32*(INTLINESNUM+1)).".

Also rename isr_count to isr_groups_32 for clarity, since this is
actually the number of 32 interrupt groups.
2017-08-22 10:54:18 -05:00
Jimmy Brisson a457fe3bdd Merge pull request #4908 from geky/fs-reformat
fs: Add FileSystem::reformat
2017-08-21 10:38:00 -05:00
Jimmy Brisson 2dc4bef010 Merge pull request #4902 from deepikabhavnani/macro_fix
Using CMSIS/RTX Exclusive access macro
2017-08-17 10:11:03 -05:00
Steve Cartmell 9c87f5936c Unified the LED error pattern for all boards
- Removed the patterned LED sequence, all boards now use the 4 fast pulse, 4 slow pulses LED sequence.
  - Changed the LED used from LED_RED to LED1. Only 58/174 targets seem to define LED_RED but they all define LED1.
  - Removed all ERROR_RED and ERROR_PATTERN definitions from targets/targets.json
2017-08-16 11:55:24 +01:00
Christopher Haster cb2306c085 retarget: Added ENODEV to error codes 2017-08-14 17:32:08 -05:00
Jimmy Brisson 99a8467b70 Merge pull request #4817 from c1728p9/move_rtx_handlers
Move RTX error handlers into RTX handler file
2017-08-14 11:44:19 -05:00
Deepika 74ba5f3f51 Using CMSIS/RTX Exclusive access macro 2017-08-14 10:06:17 -05:00
Fahrzin Hemmati 88f90788bf Remove null byte at the end of fdopen's faux filename 2017-08-10 21:14:12 -07:00
Steve Cartmell 942f71a9c4 Modify LED error sequence to be more recognisable
The current error sequence for microcontrollers with less than 4 LEDs is
to toggle an LED at a fixed rate. Change the sequence to 4 short pulses
followed by 4 long pulses.
2017-08-09 16:15:31 +01:00
ccli8 98a79c872b [M487] Support NuMaker-PFM-M487 board 2017-08-01 10:14:24 +08:00
Fahrzin Hemmati af37520e42 Use MBED_STATIC_ASSERT instead of static_assert 2017-07-31 09:29:34 -07:00
Fahrzin Hemmati 199d108063 Update comments for code review 2017-07-31 09:29:34 -07:00
Fahrzin Hemmati e5ef69a925 Remove excessive use of printf/scanf in mbed_fdopen/_open 2017-07-31 09:29:34 -07:00
Russ Butler 46f6f52299 Move RTX error handlers into RTX handler file
Move the RTX error handlers out of mbed_retarget.cpp and into an the
dedicated RTX handler file.
2017-07-27 10:08:39 -05:00
Jimmy Brisson ea12d69564 Merge pull request #4790 from bulislaw/mem_stats
Improve documentation for memory stat ops
2017-07-27 09:46:21 -05:00
Jimmy Brisson 3ed697a36a Merge pull request #4775 from c1728p9/fix_defines
Fix non-portable defines
2017-07-24 10:58:05 -05:00
Jimmy Brisson 60550c1ef0 Merge pull request #4726 from sarahmarshy/patch-11
Update ATCmdParser example code
2017-07-24 10:54:09 -05:00
Bartek Szatkowski e9f78502dd Improve documentation for memory stat ops 2017-07-20 15:56:48 +01:00
Russ Butler c18b0e5c05 Fix non-portable defines
A define which expands to more defines is not portable across all
compilers and GCC warns about this. Restructure this so the behavior
is defined. This fixes the GCC warning:
"this use of "defined" may not be portable"
2017-07-18 12:04:13 -05:00
Jimmy Brisson 9cb9b9b5b5 Merge pull request #4718 from ARMmbed/g-weak-note
Toolchain: Add a note about weak functions and header files
2017-07-17 11:08:22 -05:00
Martin Kojtal 5a5d159a3c Merge pull request #4666 from chrissnow/tests-mbed_hal-flash-Timing_fix
Fix timing issues found in "Flash - clock and cache test"
2017-07-13 16:48:32 +02:00
sarahmarshy d8a7fe1467 Update ATCmdParser example code.
The previous example code was not very helpful, as it doesn't show the use of UARTSerial.
2017-07-07 16:45:01 -05:00
Christopher Haster eb4c223dd7 Toolchain: Added a note about weak functions and header files
The subtlety of where to mark functions as weak created an issue for
at least one user, so added a warning in the documentation.
2017-07-07 14:33:26 -05:00
Anna Bridge 4890261c98 Merge pull request #4548 from deepikabhavnani/os_warn
Resolve Warnings for mbed-os-examples
2017-07-07 12:43:27 +01:00
Chris 3df42bcfb4 Toolchain independent noinline 2017-06-30 20:32:17 +01:00
Martin Kojtal 8a9f49653b retarget: fix microlib for mbed 2
This is as it used to be, reverting the removal. uARM does not have any hook
that we could use for mbed sdk init and copy nvic, therefore _open is used that
should be sufficient, but not ideal.

For more information, visit https://github.com/ARMmbed/mbed-os/pull/2160/files#r76563844.
2017-06-29 14:35:00 +01:00
Vincent Coubard 7a1e2cfc9a platform: Replace private copy constructor and copy assignement operator by a NonCopyable tag.
The class concerned by this change are: ATCmdParser, CallChain, FileBase and Stream.
2017-06-20 16:23:43 +01:00
Vincent Coubard dcbcf64830 platform: Tag classes DirHandle, FileHandle, FileLike, FileSystemHandle, FileSystemLike, LocalFileHandle, LocalFileSystem and PlatformMutex as non copyable.
This avoid unwanted copy of these type which is a programming error.
2017-06-20 16:23:43 +01:00
Vincent Coubard 4f7943860a platform: Add NonCopyable class.
The NonCopyable template class avoid autogeneration of copy assignement
and copy construction function for classes inheriting from it.
2017-06-20 15:49:16 +01:00
Christopher Haster 6b02ceab5d rtos: Unbreak semaphore, trade assert for saturation with original limit
Before rtx 5, the max count on semaphores was UINT16_MAX, aftewards it
was decreased to 1024 with an assert on overflow.

This is especially problematic for semaphores used for signaling, since
there is no replacement currently available in C++.
2017-06-16 17:18:40 -05:00
Deepika 9b5f5a5472 Typecasting to resolve warning: integer conversion resulted in a change of sign 2017-06-15 13:37:19 -05:00
Jimmy Brisson 761151359e Merge pull request #4506 from c1728p9/disable_2_error_trapping
Disable error trapping for mbed 2 builds
2017-06-09 14:22:30 -05:00