Commit Graph

590 Commits (6ebc5be0f06e66ea9ec0f566af6e63c3f8ca3a9f)

Author SHA1 Message Date
Cruz Monrreal II 98a9bb880b Merge branch 'fhtidy_doc' of ssh://github.com/kjbracey-arm/mbed-os into kjbracey-arm-fhtidy_doc 2018-10-12 12:07:07 -05:00
Senthil Ramakrishnan e547e3d88d Fix doxygen comments and spelling errors 2018-10-12 11:49:58 -05:00
Amanda Butler 9eab32e365
Copy edit changes to mbed_mem_trace.h
Delete extra spaces.
2018-10-12 11:13:31 -05:00
Amanda Butler 82c4ce607d
Edit mbed_stats.h
Capitalize ID for consistency.
2018-10-12 11:08:01 -05:00
Cruz Monrreal 6d7b655b87
Merge pull request #8331 from deepikabhavnani/getc_fix
Stream: add necessary flushes, removing unneeded IAR workaround
2018-10-12 08:59:16 -05:00
Kevin Bracey 1ef213ec89 Clean up Thread deprecation warnings
Static Thread methods and signal methods have been deprecated. Remove
all references in the main code, and most of the tests. Some tests of
the deprecated APIs themselves remain.
2018-10-12 14:57:13 +03:00
Brian Daniels ddedc155d4 Updating stats doc comments 2018-10-11 19:11:17 -05:00
Senthil Ramakrishnan 026c978515 Adding doxygen comments for mem trace enum 2018-10-11 16:58:47 -05:00
MateuszMaz e6ae3d2c51 Remove stray error_value 2018-10-09 18:49:47 +02:00
Filip Jagodzinski 9dce8b3ab5 HAL: SleepManager: Update header file
Move sleep manager API into its own doxygen group.
Add defined behavior section and links to tests.
2018-10-09 17:52:42 +02:00
Kevin Bracey 199d1667ff Make SingletonPtr methods const
Make get() and operators * and -> of SingletonPtr const - they are
logically const and thread-safe, despite the construction on first call.
This construction is "invisible" to the caller of those methods.
2018-10-09 18:08:05 +03:00
kegilbert eeada14721 Add enable/disable cb function in mem_trace 2018-10-08 11:50:10 -05:00
MateuszMaz cf43e1cb5c Fix message string 2018-10-08 18:41:50 +02:00
Cruz Monrreal f529dc799e
Merge pull request #8001 from kjbracey-arm/singletonptr_star
Add * operator to SingletonPtr
2018-10-08 10:25:46 -05:00
deepikabhavnani 0e758796f6 Signature to track memory allocations by wrapper functions.
Compilers allocate some section of memory without using wrapper function,
which is later freed when wrappers were initialized. Since the allocated
memory didn;t contain wrapper header the pointer got corrupt when calling to free.

This implementation of signature addition during malloc and signature check during
free helps in freeing the memory allocated by wrapper functions properly and
also the internal memory allocated by compilers (without malloc wrappers).
2018-10-08 07:45:01 -05:00
Deepika 6646323867 Alignment of 8 is not required for additional header
malloc guarantees aligned memory. If we add an alignment here, we are adding
additonal unused 4 bytes. Each allocator has its own 4/8 byte header
(GGC / ARM have 4 bytes).

So if user request for 8 bytes of memory stats will add 8 + allocator 8.
However if we remove the alignment in stats header, allocator will consider
add 4 bytes to 12 byte request and zero padding.

It will be beneficial to leave the padding to allocator.
2018-10-08 07:37:54 -05:00
Martin Kojtal 4fbd39c74e
Merge pull request #8108 from c1728p9/systick_rename
Rename device option STCLK_OFF_DURING_SLEEP
2018-10-06 07:46:49 +02:00
Deepika f79a354311 Replace fflush to fseek before writes
You are allowed in POSIX / ANSI C to read and write on the same stream, but you
have to do an fseek in between read and write call (getc->fseek->putc)

Thanks @Alex-EEE for sharing the fix: https://github.com/ARMmbed/mbed-os/pull/7749

Added test case for verification of the behavior
2018-10-05 14:29:15 -05:00
MateuszMaz 63d3a32894 Remove empty line 2018-10-05 21:25:28 +02:00
MateuszMaz 845655b621 Add case MBED_ERROR_CODE_ASSERTION_FAILED, fix names, pass expr to mbed_error 2018-10-05 21:15:03 +02:00
MateuszMaz a2f3c59768 Add ASSERTATION_FAILED error code 2018-10-04 20:47:16 +02:00
paul-szczepanek-arm 05a4337490 make it backwards compatible 2018-10-04 16:12:26 +01:00
paul-szczepanek-arm 3a408eb85a fix missing namespace mbed 2018-10-04 15:51:01 +01:00
deepikabhavnani 5f5882830f Add `overhead_size` element to get the overhead of stats
Heap statistics are used for analysing heap stats, but it doesn't tell anything
about real heap usage or malloc overheads. Adding `overhead_size` element
will help users to get the real heap usage.
2018-10-03 16:41:24 -05:00
Cruz Monrreal 4403a561b3
Merge pull request #7890 from deepikabhavnani/cb_issue_7701
Circular buffer should use conditional statement instead of modulo
2018-09-27 10:20:05 -05:00
MateuszM c3e7ddbb10 Changed behaviour of mbed_asert to use mbed_error instead of mbed_die. 2018-09-26 11:08:54 +02:00
Martin Kojtal ac6ca73dd8
Merge pull request #8165 from mprse/issue_8155_fix
Fix for issue #8155 (NRF52832: time stops after 35 minutes)
2018-09-24 12:59:22 +02:00
Martin Kojtal 9506f50112
Merge pull request #8036 from TeroJaasko/fix_mbed_error_c_memsets
platform: error: fix bogus usage of memset()
2018-09-24 08:23:02 +02:00
Cruz Monrreal 1a638c7870
Merge pull request #8106 from c1728p9/macros_to_config
Replace macros with config options
2018-09-22 16:40:53 -05:00
Martin Kojtal 3d94fb889b
Merge pull request #7903 from tkem/fix/cleanup-include-paths
Clean up include paths.
2018-09-19 12:16:09 +02:00
Kevin Bracey 1492829f82 poll: Un-doxygen internal comment 2018-09-18 12:40:03 +03:00
Przemyslaw Stekiel 814940cabe Fix for issue #8155 (NRF52832: time stops after 35 minutes)
Low power Timer is used as RTC for platforms that don't have HW RTC capabilities (like NRF52832).
`_rtc_lpticker_read(void)` function currently uses `Timer::read()` function to trace elapsed time.
`Timer::read()` returns seconds represented as `float` value, but this value is calculated from `int` since `Timer::read_us()` returns `int`.
This limits time tracing to ~35 min.
To fix this problem we will use `timer::read_high_resolution_us()` (which returns unsigned 64 bit value) instead of `Timer::read()`.
2018-09-18 09:48:53 +02:00
Cruz Monrreal 3da606e586
Merge pull request #8017 from TTornblom/master
IAR: Fix for #7662, only massage the error decode URL for the IAR .xcl
2018-09-17 19:46:12 -05:00
Russ Butler ab50681c33 Rename device option STCLK_OFF_DURING_SLEEP
Rename STCLK_OFF_DURING_SLEEP to SYSTICK_CLK_OFF_DURING_SLEEP to avoid
confusion with the STmicroelectronics.
2018-09-12 14:40:25 -05:00
Russ Butler b9b4b8ada6 Replace macros with config options
Add a config option for the following values:
MBED_SYS_STATS_ENABLED
MBED_STACK_STATS_ENABLED
MBED_CPU_STATS_ENABLED
MBED_HEAP_STATS_ENABLED
MBED_THREAD_STATS_ENABLED
MBED_CONF_APP_MAIN_STACK_SIZE
MBED_CONF_APP_TIMER_THREAD_STACK_SIZE
MBED_CONF_APP_IDLE_THREAD_STACK_SIZE
MBED_CONF_APP_THREAD_STACK_SIZE

To maintain backwards compatibility inside the RTOS both
APP and RTOS config values can be used.
2018-09-12 13:59:46 -05:00
Kevin Bracey eaddf0a160 FileBase: Fix unsetting of default when destroyed
Code that should unset a FileBase from being the default when it is
destroyed was broken by a `==` instead of `=` typo.
2018-09-10 11:20:36 +03:00
Tero Jääskö 321548cadc platform: error: fix bogus usage of memset()
Code had mixed up order of 'c' and 'n' arguments to memset().
Fix this.

Spotted-by: kjbracey-arm & a GCC profile without "-fno-builtin"

Related GCC warnings:
---8<---8<----
[Warning] mbed_error.c@123,5: 'memset' used with constant zero length parameter; this could be due to transposed parameters [-Wmemset-transposed-args]
[Warning] mbed_error.c@282,5: 'memset' used with constant zero length parameter; this could be due to transposed parameters [-Wmemset-transposed-args]
2018-09-07 15:40:44 +03:00
TTornblom 0d97803ad8 IAR: Fix for #7662, only massage the error decode URL for the IAR .xcl
file.
2018-09-06 12:16:15 +02:00
Kevin Bracey 390f6e7a7b Add * operator to SingletonPtr
Sometimes you want don't want to directly call a method on your
SingletonPtr-wrapped object, but you want to pass it to something
else.

For example

    SingletonPtr<PlatformMutex> mutex;
    mutex->lock();

is fine, but what about

    SingletonPtr<PlatformMutex> mutex;
    ScopedLock<PlatformMutex> lock(*mutex.get());

Add an overload for operator* to make this more elegant:

    SingletonPtr<PlatformMutex> mutex;
    ScopedLock<PlatformMutex> lock(*mutex);

This addition is consistent with standard C++ classes such as
`unique_ptr` and `shared_ptr`, which likewise have
get, operator-> and operator*.
2018-09-05 18:15:47 +03:00
Kevin Bracey a67f09851b Add special handling for "/default" filesystem
Allow a FileBase (normally a FileSystemLike) to be set as the default,
so it can be looked up as "/default" as well as its actual name.
2018-09-05 13:28:42 +03:00
Cruz Monrreal 83e0e65a42
Merge pull request #7726 from SenRamakri/sen_BLE_ErrorUpdate
Update BLE error calls to use new error codes and mbed_error
2018-09-02 20:47:40 -05:00
Cruz Monrreal f82feecc51
Merge pull request #7822 from donatieng/nfc-impl
Add initial NFC support to Mbed OS
2018-08-31 19:01:25 -05:00
Cruz Monrreal a849fa46df
Merge pull request #7662 from SenRamakri/sen_ErrorUrl
Add Error Decoding URL to error report
2018-08-31 18:27:30 -05:00
Cruz Monrreal 88eb8aab23
Merge pull request #7794 from c1728p9/boot_overhaul
Update Mbed 5 boot sequence
2018-08-30 10:22:15 -05:00
Senthil Ramakrishnan e84e56bc8d Add Error Decoding URL in error report 2018-08-30 12:19:59 +01:00
Vincent Coubard 913f219fc1 Span: Fix type used in is_convertible traits. 2018-08-29 19:42:46 +01:00
Thomas Kemmer a16c374725 Clean up include paths. 2018-08-27 20:47:19 +02:00
Cruz Monrreal 1b051c7687
Merge pull request #7402 from kegilbert/mem-tracing-config-patch
Replace mbed_mem_tracing_enabled macro with config option
2018-08-27 10:34:24 -05:00
Cruz Monrreal c12c69fef0
Merge pull request #7828 from pan-/span
Platform: Add C++ Span class.
2018-08-27 10:28:59 -05:00
Deepika 4e263b17b9 Refactor circular buffer test to platform folder 2018-08-27 09:33:07 -05:00
Russ Butler ec19bf1de4 Allow early use of singleton lock
Allow singleton_lock and singleton_unlock to be called before the
RTOS has been started by checking for a valid mutex before locking
and unlocking it.
2018-08-26 12:59:57 -05:00
Cruz Monrreal 2f8e679183
Merge pull request #7592 from orenc17/remove_uvisor
Remove uVisor from mbed-os
2018-08-25 19:52:24 -05:00
Deepika 546743aeb0 Replace modulo op with compare/reset op 2018-08-24 16:51:32 -05:00
Vincent Coubard 9d1fd9983c Span: Fix documentation. 2018-08-24 17:51:58 +01:00
Amanda Butler bf08651d3a
Copy edit Span.h
Copy edit file, mostly for consistent capitalization, punctuation and tense.
2018-08-24 09:31:10 -05:00
Vincent Coubard af69e1fb8b Span: use static assert to kill copy construction from an incompatible span type.
Copy construction between Span of compatible type is allowed to fulfil the use
case Span<T> -> Span<const T>. This is achieved by a templated copy constructor
like constructor.

In p0122, the overload is discarded from the constructor set if the ElementType
of the Span in input is not convertible into the ElementType of the Span being
constructed.

To discard function overload, SFINAE has to be used which polutes the documentation
and make the code harder to read and maintain.

Unlike p0122, our Span class doesn't exposes (yet) functions with default argument
or functions that convert container in input into span the only overload with the
a single parameter that we exposes are:
- template<size_t N> Span(ElementType (&element)[N])
- Span(const Span& other): <- generated by the compiler.

For both of this functions we expect exact match and their resolution should not
interfere with the constructor that converts from another type of Span.

As a result it is possible to rely solely on C++ default resolution rules as we
won't hit cases were constructors convert from another type (std::array, std
container, span) and raise an error with a static assert if the element type
can't be converted.

If another copy - conversion - constructor is added then SFINAE has to be
reintroduced.
2018-08-24 11:10:17 +01:00
Martin Kojtal 871d7e7361
Merge pull request #7730 from davidsaada/david_stack_stats_fail_fix
When stack stats enabled, prevent exceptions if memory allocations fail
2018-08-24 11:31:24 +02:00
Vincent Coubard d5051a8ca7 Span: Allow copy construction from convertible span.
Addition of these overloads help when Span<const T> is constructed from Span<T>.
2018-08-23 18:41:53 +01:00
Cruz Monrreal deb905da1d
Merge pull request #7815 from donatieng/shared_ptr
Re-add Shared Pointer Class into platform features
2018-08-23 10:09:02 -05:00
Vincent Coubard b7f074ef68 Span: Fix opening brace position. 2018-08-23 14:02:26 +01:00
Vincent Coubard 2a6c6d5985 Span: Use mbed way of writing types in documentation example. 2018-08-23 12:41:04 +01:00
Vincent Coubard 33ca10192d Span: Fix documentation. 2018-08-23 11:38:32 +01:00
Vincent Coubard 6b08320573 Span: Fix doxygen tags. 2018-08-23 09:02:28 +01:00
Vincent Coubard 4e7fa91b94 Span: amend documentation 2018-08-22 15:11:27 +01:00
Oren Cohen 787317b7eb Remove uVisor from mbed-os 2018-08-22 16:36:59 +03:00
Vincent Coubard 95fc284a83 Span: add boundary check in subscript operator for debug profile 2018-08-22 13:32:54 +01:00
Vincent Coubard f6dd5eaa31 Span: Fix static assert message in default constructor. 2018-08-22 13:31:26 +01:00
Vincent Coubard 26b546bab3 Span: Improve readability of precondition checks 2018-08-22 09:40:51 +01:00
Vincent Coubard 938d802ea0 Span: Fix subspan return type 2018-08-22 09:40:50 +01:00
Vincent Coubard 54e2d92c95 Span: Improve consistency with standard.
This commit aims to make Span implementation more in line with what is present in N4762:
- use appropiate index types where applicable.
- use typedefed type inside the class (index_type, reference, pointer, element_type)
- assertion where applicable
- restrict default construction to Span with extent == 0 or extent == dynamic.
- construct span from a range of pointer
- remove non const overload of the subscript operator
- remove non const overload of the data function
- implement subspan function
- implement missing first and last function of dynamic span
2018-08-21 18:20:58 +01:00
Donatien Garnier 298f847821 Fix use_count() in SharedPtr 2018-08-21 12:59:54 +01:00
Amanda Butler 7086d69a83
Copy edit SharedPtr.h
Copy edit for consistent capitalization and minor grammar nits.
2018-08-20 13:55:21 -05:00
Donatien Garnier d9c1748c14 Update formatting for SharedPtr.h 2018-08-20 12:04:53 +01:00
Vincent Coubard 3985fb8d62 Span: Fix documentation error. 2018-08-20 12:00:20 +01:00
Vincent Coubard 1f00336c7e Span: replace reference to Size with Extent. 2018-08-20 11:58:48 +01:00
Vincent Coubard 6fcf1e8284 Span: Make type pointer and reference declaration consistent with guideline. 2018-08-20 10:47:41 +01:00
Vincent Coubard 9b9d33a7b4 Span: Fix typo. 2018-08-20 10:41:47 +01:00
Vincent Coubard 3fb3173876 Span: Fix odd condition in Span::empty. 2018-08-20 10:30:35 +01:00
Vincent Coubard 43170d21bf Span: Make name of dynamic span tag consistent with C++ standard. 2018-08-20 10:29:43 +01:00
Vincent Coubard eba1dc6dd6 Span: Improve comparison operator to array by using fixed size Span. 2018-08-20 09:13:31 +01:00
Vincent Coubard 7f195b8ec1 Span: Cleanup usage of ptrdiff_t and size_t 2018-08-20 09:13:17 +01:00
Vincent Coubard d8c788a413 Platform: Add C++ Span class.
The Span class allows the creation of views over contiguous memory. The view
do not own memory, is typed and has a length. It can be used as a replacement of
the traditional pair of pointer and size in parameters or class fields.

Main operations:
- size(): return the lenght of the memory viewed
- empty(): return if the memory viewed is empty
- [index]: access elements viewed
- data(): return a pointer to the memory viewed.
- first(count): Create a subview from the first count elements.
- last(count): Create a subview from the last count elements.
- == and !=: compare two views or a view to array and return if they are equal or
not.

The Span class came in two flavors:
- Static size: The size is encoded in the Span type and it is as lightweitgh as
a single pointer,
- Dynamic size: The object can store arbitrary views and it costs one pointer
and the size of the view.
2018-08-19 20:20:05 +01:00
Senthil Ramakrishnan 529af2b0f4 Changes to error code names 2018-08-17 23:13:59 -05:00
Senthil Ramakrishnan 7803a40fbd Update BLE error calls to use new error codes and mbed_error 2018-08-17 22:52:50 -05:00
Donatien Garnier 6f3c07f6eb Optimize SharedPtr code 2018-08-17 20:11:00 +01:00
Donatien Garnier ac79b007d0 Cleanup description 2018-08-17 19:05:19 +01:00
Donatien Garnier 2608478e87 Cleanup shared pointer implementation and add reset() methods 2018-08-17 18:45:01 +01:00
Donatien Garnier f45642cec0 Make shared pointer thread safe and clean-up class and doc 2018-08-17 18:25:28 +01:00
Russ Butler 472ababfef Update deep sleep lock check in tests
When the define LPTICKER_DELAY_TICKS is set deep sleep can be randomly
disallowed when using the low power ticker. This is because a Timer
object, which locks deep sleep, is used to protect from back-to-back
writes to lp tickers which can't support that. This causes tests which
assert that deep sleep is allowed to intermittently fail.

To fix this intermittent failure this patch adds the function
sleep_manager_can_deep_sleep_test_check() which checks if deep sleep
is allowed over a duration. It updates all the tests to use
sleep_manager_can_deep_sleep_test_check() rather
than sleep_manager_can_deep_sleep() so the tests work even if deep
sleep is spuriously blocked.
2018-08-17 09:29:41 -05:00
Donatien Garnier 9ebfbc0cdd Re-introduce a shared pointer class in mbed OS 2018-08-17 12:30:51 +01:00
David Saada cfe7df28c9 When stack stats enabled, prevent exceptions if memory allocations fail 2018-08-08 16:18:29 +03:00
Martin Kojtal 7a44185c1c CircularBuffer: volatile specifier removal
Volatile specifier in this case it not required as we currently have all accesses
to the buffer protected by critical section. This shall optimize accesses in
some cases to the buffer.

Fixes #7702
2018-08-08 10:11:59 +01:00
kegilbert 9b53d1256f Replace mbed_mem_tracing_enabled macro with config option 2018-08-06 13:44:12 -05:00
Cruz Monrreal 8292affb53
Merge pull request #7609 from bremoran/patch-2
Make location meaningful in print_error_report
2018-07-26 22:07:22 -05:00
Cruz Monrreal cc506eed14
Merge pull request #7603 from OpenNuvoton/nuvoton_override_gcc_sbrk
Nuvoton: Replace __wrap__sbrk with overriding _sbrk
2018-07-26 12:54:45 -05:00
Brendan Moran 96fbd02f8c
Make location meaningful in print_error_report
`handle_error` calls `MBED_CALLER_ADDR()`, but this is always a location from within platform/mbed_error.c. This is because `handle_error` is declared static. This does not cause the function to be inlined however. Instead, it is called by each function within mbed_error.c. For example, mbed_error yields this code:

```
000625c8 <mbed_error>:
   625c8:       b510            push    {r4, lr}
   625ca:       460c            mov     r4, r1
   625cc:       4611            mov     r1, r2
   625ce:       461a            mov     r2, r3
   625d0:       9b02            ldr     r3, [sp, #8]
   625d2:       f7ff feff       bl      623d4 <handle_error>
   625d6:       b968            cbnz    r0, 625f4 <mbed_error+0x2c>
   625d8:       4620            mov     r0, r4
   625da:       f7ff ff67       bl      624ac <print_error_report.constprop.0>
   625de:       f7ff fea8       bl      62332 <core_util_is_isr_active>
   625e2:       b910            cbnz    r0, 625ea <mbed_error+0x22>
   625e4:       f7ff fe9f       bl      62326 <core_util_are_interrupts_enabled>
   625e8:       b908            cbnz    r0, 625ee <mbed_error+0x26>
   625ea:       bf30            wfi
   625ec:       e7fd            b.n     625ea <mbed_error+0x22>
   625ee:       2001            movs    r0, #1
   625f0:       f000 f948       bl      62884 <__wrap_exit>
   625f4:       4800            ldr     r0, [pc, #0]    ; (625f8 <mbed_error+0x30>)
   625f6:       bd10            pop     {r4, pc}
   625f8:       80ff010f        .word   0x80ff010f
```

Note that at `625d2` there is a bl to handle error. That replaces the LR, which means that ALL calls to mbed_error will report a location of 0x625d6 or 0x625d7 (user vs. supervisor). I do not expect that this was the intention of the code. The simplest fix is to change line 99:

```C
static inline mbed_error_status_t handle_error(mbed_error_status_t error_status, unsigned int error_value, const char *filename, int line_number)
```

Since `handle_error()` will be inlined, the link register will be kept the same, so `MBED_CALLER_ADDR()` will yield the expected result. However, there is no guarantee that the compiler will respect the `inline` keyword in all circumstances.

The result is that each function that wishes to report its caller must extract its caller. This code cannot be centralised.

I have modified `mbed_error.c` to report the caller of each error reporting function, rather than the error reporting function itself.
2018-07-26 16:21:17 +01:00
ccli8 313f322cf7 [Nuvoton] Replace __wrap__sbrk with overriding _sbrk
With _sbrk being weak, we can override it directly rather than #if to support heap with
two-region model.
2018-07-26 15:47:25 +08:00
Senthil Ramakrishnan 7cedccc488 Improved logic in wait_us to avoid division operation in sub-millisec case 2018-07-25 15:04:06 -05:00
Deepika b05d105493 Update stats to fetch Mbed OS version info 2018-07-13 11:58:49 -05:00
Cruz Monrreal 6fcb77ee34
Merge pull request #7434 from deepikabhavnani/version_header
Separate version header file in Mbed OS
2018-07-13 11:43:15 -05:00
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