Commit Graph

714 Commits (229b9ad43b3328df59fca50d84d14d13ee6d2aa5)

Author SHA1 Message Date
Martin Kojtal fc2a71064d
Merge pull request #12068 from rajkan01/feature_bare_metal
Enabling small C library option and deprecating uARM toolchain
2020-01-03 11:35:48 +00:00
Rajkumar Kanagaraj 6a8c43252b Fix the CI build issue 2020-01-02 02:46:21 -08:00
Anna Bridge 06734e0f57
Merge pull request #12141 from kjbracey-arm/thread_rm51
Thread: remove constructors deprecated in 5.1
2019-12-24 11:42:43 +00:00
jeromecoutant 5cedd3320c STM32F0: clean main-thread-stack-size setting 2019-12-23 12:29:40 +01:00
Rajkumar Kanagaraj 957dca2082 Enabling small C library option and deprecating uARM toolchain
- By default, Mbed OS build tools use standard C library for all supported toolchains.
   It is possible to use smaller C libraries by overriding the "target.default_lib" option
   with "small". This option is only currently supported for the GCC_ARM toolchain.
   This override config option is now extended in the build tool for ARM toolchain.
 - Add configuration option to specify libraries supported for each toolchain per targets.
 - Move __aeabi_assert function from rtos to retarget code so it’s available for bare metal.
 - Use 2 memory region model for ARM toolchain scatter file for the following targets:
   NUCLEO_F207ZG, STM32F411xE, STM32F429xI, NUCLEO_L073RZ, STM32F303xE
 - Add a warning message in the build tools to deprecate uARM toolchain.
 - NewLib-Nano C library is not supporting floating-point and printf with %hhd,%hhu,%hhX,%lld,%llu,%llX
   format specifier so skipping those green tea test cases.
2019-12-19 10:05:11 -08:00
Kevin Bracey 077c6aa78d Thread: remove constructors deprecated in 5.1 2019-12-19 14:27:37 +02:00
Ari Parkkila ed4b948d8e Allow OS_THREAD_LIBSPACE_NUM as a macro 2019-09-26 04:33:53 -07:00
Hugues Kamba cc7403457d Fix ARMC6 linker error for the bare metal profile
The ARMC6 compiler inadvertently introduces the `_scanf_mbtowc` symbol
to the build. The commit provides a weak definition of the symbol to
satisfy the linker whenever the symbol is included. This affects ARM
Compiler 6 version 6.12 and earlier.

The compiler error was previously observed when the MICROLIB library is
used with the uARM toolchain. However, the weak definition was put in
`mbed-os/rtos` which is not included when the bare metal profile is used.
2019-09-25 12:20:50 +01:00
Martin Kojtal 6fcd29769c
Merge pull request #11470 from hugueskamba/hk-fix-warnings
Prevent unreachable statements and correct variable sizes.
2019-09-19 10:36:39 +02:00
Martin Kojtal 171fe5a619
Merge pull request #11479 from maciejbocianski/nrf51_systick_handler_fix
no-systick targets: fix systick irq handler setup
2019-09-16 15:35:22 +02:00
Maciej Bocianski 94a08e9aea fix systick irq handler setup
Remove checking that vectors were copied to RAM as not all targets
have NVIC_RAM_VECTOR_ADDRESS defined as public. Instead always
call NVIC_SetVector unconditionally as old implementation does.
2019-09-13 12:33:49 +02:00
Hugues Kamba 93f50eef3d Suppress Coverity warnings 2019-09-12 15:44:55 +01:00
Hugues Kamba 2163d07401 Prevent unreachable statements and correct variable sizes. 2019-09-12 11:51:26 +01:00
Martin Kojtal 5e693778f4
Merge pull request #11441 from gpsimenos/gp-move-source-files
Organize source files and add Doxygen labels
2019-09-11 08:00:03 +02:00
George Psimenos bd95c53a4c Move source files and add Doxygen labels 2019-09-10 14:31:24 +01:00
Hugues Kamba 5933dec3b7 Harmonise Doxygen comments in drivers, events, platform and rtos dirs
When a Doxygen group has been defined (created), all its needed to add
documentation to that group is `\addtogroup`. Since all the information
about the group is preserved, it is not necessary to mention the group
hierarchy again with `\ingroup`. This PR removes unnecessary Doxygen lines
across the `drivers`, `events`, `platform` and `rtos` directories.

It also ensures that new groups are created with `\defgroup` once and
referenced with `\addtogroup` whenever documentation needs to be added to
an existing group.
2019-09-09 10:59:51 +01:00
Hugues Kamba a562841992 Cast void pointer before deallocating with delete[]
The stack memory is a `void*` which creates a warning when using
the `delete[]` operator because it is unable to call the destructor of
of an unknown object type.
2019-09-03 10:52:31 +01:00
Martin Kojtal cb6efc0e45 Merge branch 'Mutex_trylock_adding_missing_count_parameter' of git://github.com/dmaziec1/mbed-os into dev_rollup 2019-08-28 18:36:25 +01:00
Dominika Maziec b5826fc63e Mutex: _count incrementation brought back 2019-08-27 14:18:41 +02:00
Yogesh Pande 076deeb4a9 Bare metal support for running PDMC
PDMC requires event loop to also support bare metal configuration.
It requires to adapt eventloop for bare-metal configuration.
2019-08-27 13:09:56 +03:00
int_szyk 6467f56abf Fix Coverity uninitialized pointer field Thread.h
Changed _obj_mem to be initialized with constructor of new thread.
2019-08-21 13:07:48 +02:00
George Psimenos b37de68c74 Move TARGET directories to source 2019-08-08 11:59:16 +01:00
Seppo Takalo 7d7416558a
Merge pull request #11073 from ARMmbed/feature-public-headers
Feature public headers
2019-08-07 16:04:45 +03:00
Hugues Kamba 20f81e19be Change Doxygen groups structure, splitting first by Public/Internal (#11105)
* Change Doxygen groups structure, splitting first by Public/Internal

This commit also does the following:
* groups the documentation of related API
* moves `events/internal/equeue.h` to `events/equeue.h`
* merges `events/source/README.md` to `events/README.md`
2019-08-02 12:23:47 +01:00
Hugues Kamba bfa1b4dd84 Drivers/Events/RTOS Public and internal APIs cleanup (#10955)
Separate drivers, events, and rtos internal APIs from public APIs.

* Move source files to source subdirs
* Move internal headers to internal subdirs
* Add Doxygen comments for documenting internal and public APIs
* Remove source code from header files in order to remove include pre-processor directives
that included header files not directly used by said header files
* Explicitly include header files instead of implicit inclusions via third-party header files.

Release Notes

This will break user code that was using an internal API as the internal header files have been moved.
This will only break if the user was including the header file using a namespace (i.e #include "foo/bar.h" instead of #include "bar.h"
2019-08-02 12:23:47 +01:00
int_szyk 32bdde5b8e Add queue.count() in Queue.h 2019-08-02 08:49:47 +02:00
Kevin Bracey ed4bf5220e rtos: NULL -> nullptr
Some build errors seen with NULL not being defined. Rather than
add cstddef includes, switch to C++11 nullptr.
2019-07-15 10:13:50 +03:00
Kevin Bracey c94d6a8cc7 Make events use RTOS API
Switch from CMSIS-RTOS to mbed C++ API, which are available in bare
metal build.

Other minor tidies, like removing unnecessary volatile.
2019-07-15 10:13:50 +03:00
Kevin Bracey a522dcfa0a Replace deprecated wait calls 2019-07-15 10:13:50 +03:00
Kevin Bracey fc8e8f67c6 Deprecate wait/wait_ms APIs 2019-07-15 10:13:50 +03:00
Kevin Bracey 04cb39da07 Minimal C thread API 2019-07-15 10:13:50 +03:00
Kevin Bracey 83b329cb71 RTOS API for bare metal
Provide partial RTOS API for bare metal builds - things that
can be done in a single threaded environment.

Allows more code to work in both RTOS and bare metal builds without
change, and in particular gives easy access to the ability to
efficiently wait for something occurring in interrupt.

Available in bare-metal:
* ThisThread
* osThreadFlagsSet to set flags on main thread (can be set from IRQ)
* EventFlags (can be set from IRQ)
* Semaphores (can be released from IRQ)
* Mutex (dummy implementation)

Not useful:
* ConditionVariable (could only be signalled from 2nd thread)
* RtosTimer (calls in a second thread context)
* Thread

Unimplemented:
* Mail, Queue, MemoryPool

Possible future work:
* ConditionVariableCS to act as IRQ signalled ConditionVariable
2019-07-15 10:13:50 +03:00
Kevin Bracey 38160035d4 rtos/mbed_lib.json: Correct indents 2019-07-15 10:13:49 +03:00
Kevin Bracey 89eba7303f Timed sleep rework 2019-07-15 10:13:49 +03:00
Kevin Bracey 20451082c1 Move SysTimer to platform, for non-RTOS use 2019-07-15 10:13:49 +03:00
Martin Kojtal 1cecfa480f
Merge pull request #10855 from OpenNuvoton/nuvoton_idle_stack_underflow_debug
Nuvoton: Fix idle thread stack underflow in debug build
2019-07-01 15:14:15 +01:00
Martin Kojtal 85c477c1dc
Merge pull request #10609 from kjbracey-arm/us_ticker_optimise
wait_us optimization
2019-06-28 14:29:00 +01:00
Martin Kojtal eee8d0a768
Merge pull request #10781 from LMESTM/Idle_Stack_Size_For_Tickless
Include TICKLESS stack size increase even without LPTICKER_DELAY_TICKS
2019-06-27 10:21:45 +01:00
Laurent Meunier 9e8871916d Allow target or application level definition of extra TICKLESS stack size
Adding a check to let application or target force increase idle thread
stack size.
2019-06-25 17:01:39 +02:00
Hugues Kamba 4f38abf8dd microlib support: Specify compiler version unable to build without the fix 2019-06-25 15:44:02 +01:00
Martin Kojtal 7954074613
Merge pull request #10704 from hugueskamba/fix-microlib-with-arm-compiler-6
microlib support: Fix build with Arm Compiler 6 and MicroLib
2019-06-25 15:18:57 +01:00
Martin Kojtal e39aeff69e
Merge pull request #10706 from hugueskamba/fix-softcoding-mem-pool-size-evaluation
mem pool size: Fix calculation of memory pool size for portability
2019-06-25 10:59:56 +01:00
Hugues Kamba 4f8305ed95 mem pool size: Fix calculation of memory pool size for portability
Replace the hardcoded value calculation of the memory pool block size
with the RTX preprocessor macro (via a shim layer).
This is in preparation for the replacement of the direct access of RTX
functionalities in Mbed OS with an access via CMSIS.
2019-06-19 09:29:41 +01:00
Chun-Chieh Li 766a7650a5 [Nuvoton] Fix idle thread stack underflow in debug build
In rtos/mbed_lib.json:
Enlarge idle-thread-stack-size-debug-extra for all Nuvoton targets.

In rtos/TARGET_CORTEX/mbed_rtx_conf.h:
MBED_DEBUG also must be defined for this configuration parameter to take effect.
2019-06-18 17:42:39 +08:00
Kevin Bracey 57310729d4 wait_us optimization
As the timer code became more generic, coping with initialization on
demand, and variable width and speed us_ticker_api implementations,
wait_us has gradually gotten slower and slower.

Some platforms have reportedly seen overhead of wait_us() increase from
10µs to 30µs. These changes should fully reverse that drop, and even
make it better than ever.

Add fast paths for platforms that provide compile-time information about
us_ticker. Speed and code size is improved further if:

* Timer has >= 2^32 microsecond range, or better still is 32-bit 1MHz.
* Platform implements us_ticker_read() as a macro
* Timer is initialised at boot, rather than first use

The latter initialisation option is the default for STM, as this has
always been the case.
2019-06-14 10:22:08 +03:00
Hugues Kamba e12889d8e1 microlib support: Fix build with Arm Compiler 6 and MicroLib
Building binaries with MicroLib and Arm compiler 6 has been failing
because of a bug in Arm compiler 6. The compiler introduces a
symbol, `__scanf_mbtowc`, which is not present in MicroLib C library.

The present commit adds a weak reference to the symbol to allow a
successful linkage. This is a temporary fix until the bug in the
compiler is fixed. It should be removed after the compiler bug is fixed.
2019-05-29 14:42:28 +01:00
Laurent Meunier 6f46fd3476 Add extra idle debug stack size in case all STATS are enabled 2019-05-29 13:19:25 +02:00
Kevin Bracey 2fbbd9d2ca Introduce Semaphore::acquire methods
Deprecate wait() in favour of acquire(), try_acquire(),
try_acquire_for() and try_acquire_until().

Brings Semaphore more into line with CMSIS-RTOS 2 (which uses "acquire"),
itself (as it has "release"), and other classes having "try", "try for"
and "try until".

Also steps away from vague "wait" term - the primary operation here is
to acquire the semaphore, and this will of course sleep.
2019-05-28 17:02:06 +03:00
Lingkai Dong 427c7db627 mbed_rtx_idle: fix ticker macro checks
If a ticker is unavailable, its macro is undefined and cannot
be checked with MBED_STATIC_ASSERT.
2019-05-16 17:13:18 +01:00
Lingkai Dong 9f12e55340 SysTimer: default to us ticker if lp ticker is unavailable 2019-05-16 16:14:26 +01:00
George Beckstein 5ced28359b
Change "aplication" to "application" 2019-05-13 17:59:03 -04:00
Oren Cohen 73ddfa9f88 Call psa_spm_init() before staring the NS core 2019-04-29 16:42:33 +03:00
Martin Kojtal 5fb5e9808c
Merge pull request #10367 from jeromecoutant/PR_STACK_SIZE_DEBUG
Increase background stack size to fix overflows with debug profile
2019-04-17 15:52:38 +01:00
Martin Kojtal 14b9229b13
Merge pull request #10415 from 0xc0170/fix_licenses
rtos/drivers: add license information
2019-04-17 12:26:43 +01:00
Martin Kojtal 94898a12ab
Merge pull request #10358 from kjbracey-arm/error_print_improvements
Error print improvements
2019-04-17 08:04:15 +01:00
Martin Kojtal 5a96f45ce0 license: fix files list 2019-04-16 11:43:14 +01:00
Martin Kojtal 393707f2b8 rtos: add license information 2019-04-16 11:26:39 +01:00
Kevin Bracey b8e80dd2fb Don't trap RTX errors or mutex errors during errors
Once a fatal error is in progress, it's not useful to trap RTX errors
or mutex problems, so short-circuit the checks.

This makes it more likely that we may be able to get the console
initialised if it is being written to for the first time by `mbed_error`
in a difficult context - such as an RTX error callback from inside an
SVCall.

For example, the one-line program

   osMutexAcquire(NULL, 0);

will generate an RTX error trap, then `mbed_error` will try to call
`write(STDERR_FILENO)` to print the error, which will prompt mbed_retarget to
construct a singleton `UARTSerial`. This would trap in the mutex
for the singleton or the construction of the UARTSerial itself, if
we didn't allow this leniency. If we clear the mutex checks, then
`UARTSerial::write_unbuffered` will work.
2019-04-15 11:29:04 +03:00
Cruz Monrreal 582edf503a
Merge pull request #10366 from kjbracey-arm/feature_CMSIS_5_ca812421
Update CMSIS to 5.5.1
2019-04-11 20:34:00 -05:00
Cruz Monrreal b1e48db242
Merge pull request #10225 from kjbracey-arm/memorypool_blocking_alloc
Mail/MemoryPool: blocking alloc
2019-04-11 20:21:44 -05:00
jeromecoutant 9b2ba12c62 Increase background stack size to fix overflows with debug profile 2019-04-11 16:50:49 +02:00
Kevin Bracey 49928ec143 Adjust EVR_RTX disable macros for 5.5.1 2019-04-10 15:47:43 +03:00
Bartek Szatkowski d55698ec88 CMSIS/RTX: Pre-processor defines used for assembly
CMSIS repo does not support pre-processor defines, hence multiple assembly
files are added for secure/non-secure and floating point tools.
Mbed OS tools support assembly file pre-processing, but the build system
does not support multiple assembly files for each target, hence updating
the assembly files.

1. Patch RTX so irq_cm4f.S files work with no FPU targets
2. Patch RTX so irq_armv8mml.S files to work with and without FPU
2. Patch RTX so irq_armv8mml.S and irq_armv8mbl.S files to work with secure and
   non-secure builds

(cherry picked from commit 094662790a)
2019-04-10 14:42:56 +03:00
deepikabhavnani 9144ecc08c CMSIS/RTX: Move Idle and Timer thread stack to bss section.
In case of ARM compiler, idle and timer thread stack though assigned
to `.bss.os` section since not zero initialized are part of `data` section.

In this commit, we are moving stacks of idle and timer thread to bss
section and thereby saving ROM space.

(cherry picked from commit ba92372b8d)
2019-04-10 14:42:52 +03:00
Bartek Szatkowski b8408bc231 CMSIS/RTX: Fix using FALSE/TRUE with preprocesor
(cherry picked from commit 1752803626)
2019-04-10 14:42:21 +03:00
Bartek Szatkowski 1aab93ac98 CMSIS/RTX: Allow overwriting mutex ops for ARMC
(cherry picked from commit b88254809e)
2019-04-10 14:42:06 +03:00
Bartek Szatkowski 4edb719624 CMSIS/RTX: Patch RTX4 to preserve osThreadDef compatibility
mbed OS used older RTX4 version and with osThreadDef accepting only 3
parameters, to preserve compatibility we hardcode the 'instances'
parameter to 1.

(cherry picked from commit 428acae1b2ac15c3ad523e8d40755a9301220822)
(cherry picked from commit 4360b7bbf8)
2019-04-10 14:41:48 +03:00
Kevin Bracey 00c9005b4e [CMSIS_5]: Updated to ca812421 2019-04-10 14:41:35 +03:00
Martin Kojtal 43cbc10616
Merge pull request #10020 from TacoGrandeTX/fix_iar_single_threaded
Fix single-threaded apps for IAR v8 builds
2019-04-08 10:38:42 +02:00
Kevin Bracey e2a965fe1e Mail/MemoryPool: blocking alloc
Mail and MemoryPool did not permit access to the blocking form of
allocation available in CMSIS-RTOS 2 - give them new blocking methods.
2019-03-26 14:12:59 +02:00
Kevin Bracey b7171d1bbf RTOS API: minor tidies
Remove unneeded memsets and an unneeded cast.

Add missing initialisation of EventFlags attributes - no all fields were
being initialised.
2019-03-18 17:27:07 +02:00
RFulchiero 0562128998 Fix single-threaded apps for IAR v8 builds
For single-threaded apps __iar_Initlocks() is not required and must
not be called because the proper IAR library is brought in only if
"--threaded_lib" is defined in the linker command.
2019-03-08 15:33:04 -06:00
Martin Kojtal e75794ec6e
Merge pull request #9888 from ARMmbed/feature-armc6
ARM Toolchain update to ARM Compiler 6.11(ARMC6)
2019-03-04 12:23:38 +01:00
deepikabhavnani a9ce4b3d9a Target_WIZWIKI: Add ARM_LIB_STACK and ARM_LIB_HEAP section
Instead of user defined symbols in assembly files or C files,
use linker scripts to add heap and stack - this is inconsistent
with ARM std linker scripts
2019-02-28 19:52:06 -06:00
deepikabhavnani 7f6b4e51a3 Microlib only supports the two region memory model
Update arm_std.c and linker scripts to use ARM_LIB_STACK
and ARM_LIB_HEAP section from scatter files, instead of user
defined symbols
2019-02-28 19:52:06 -06:00
Cruz Monrreal e393c2dc0b
Merge pull request #9785 from c1728p9/default_to_us_ticker
Use us ticker for tickless on devs with wrapper
2019-02-28 18:25:01 -06:00
Kevin Bracey 0adc7dc927 RTX5: Make rtx_core_ca.h cope with compiler in Thumb mode
Assembler in rtx_core_ca.h is on the whole unified syntax such that it
should work fine if assembled as either ARM or Thumb-2.

The exception was __get_PSP, which uses STM^, which is only available
in ARM state.

Flagging for this function was incorrect, except for IAR - it switched
assembler state without telling the compiler, meaning that the resulting
assembler output could be incorrect, and that the function itself would
not be correctly marked as an ARM function - the CPU would enter in
Thumb state.

Alternative fix would be to switch to System mode, which would work
as either ARM or Thumb-2 assembler, like the rest of the file, but
this is the minimal change.

Fixes #526.
2019-02-28 11:55:20 -06:00
d-kato 0ef1620ffb Back to the original : "rtx_core_ca.h" 2019-02-28 11:55:19 -06:00
d-kato 7aebee07b1 GR_LYCHEE,RZ_A1H,VK_RZ_A1H: Update to fix ARMC6 build failures 2019-02-28 11:55:19 -06:00
Cruz Monrreal 3352b431b3
Merge pull request #9786 from c1728p9/tickless_optimization
Optimize tickless tick computation
2019-02-26 23:22:04 -06:00
Cruz Monrreal e1736cd06f
Merge pull request #9571 from mprse/fix_9523_rtos_less_issue
Update to 2-region model for HEAP and Stack Memory
2019-02-26 22:50:19 -06:00
Russ Butler f6ed7cee41 Optimize tickless interrupt latency
Remove unnecessary critical sections from the SysTimer code since
the access should already be serialized.
2019-02-23 17:44:51 -06:00
Russ Butler d43ca21ec5 Optimize tickless tick computation
Optimize the tick computation in the following ways:
1. Use relative time rather than absolute time
2. Replace multiplication/division pair with just multiplication
    or division:
    "* 1000000ULL / OS_TICK_FREQ"   ->   "* US_IN_TICK"
    "* OS_TICK_FREQ / 1000000"      ->   "/ US_IN_TICK"
2019-02-23 17:44:29 -06:00
Russ Butler d901c51056 Apply astyle fixes
Apply the fixes found from astyle.
2019-02-21 18:43:59 -06:00
Russ Butler b32b996419 Use us ticker for tickless on devs with wrapper
The low power ticker wrapper layer adds a large amount of interrupt
latency. This can cause dropped bytes at a baud of 115200 on some
devices. To prevent this by default use the microsecond ticker for
tickless on devices which make use of the low power ticker wrapper.
2019-02-21 10:51:10 -06:00
Martin Kojtal baed84a109
Merge pull request #9670 from kegilbert/timeout_units
Add units to timeout argument in EventFlags
2019-02-21 15:53:38 +01:00
kegilbert f1abca35cf Change EventFlag timeout paramter
Matches rest of RTOS class timeout parameters by using the unit name. Remove ambigious statement in reference to 0 ms being no-timeout as a timeout of 0 causes the function to not block and return immediately (osWaitForever is used as no timeout as it will wait forever)
2019-02-20 17:52:28 -06:00
Deepika f13a3e32b6 Fix GCC _sbrk allocation 2019-02-19 15:49:49 -06:00
deepikabhavnani b36147fbe9 ISR_Stack_start/size defines are not needed, use linker file defines 2019-02-19 15:49:49 -06:00
deepikabhavnani 9d1ce66b14 ISR_STACK_START/ HEAP_START defines not used by GCC_ARM toolchain 2019-02-19 15:49:49 -06:00
Deepika 537b3646d3 Resolve build/type cast errors 2019-02-19 15:49:49 -06:00
Deepika 41eaefeeb4 Update memory model for stack and heap memory
Memory model for RTOS and No RTOS was initially single stack and heap,
only few targets implemented 2-region RAM model.

2-region RAM model is applied for all toolchains and targets.

GCC: __wrap__sbrk was implemented for 2-region ram model, with switch to 2-region
for all targets, we do not need target specific implementation of this API
Also _sbrk is WEAK function, hence can be over written in target folder for
special cases
2019-02-19 15:49:45 -06:00
Deepika a1fe75093e Interrupt stack is always explicitly specified, hence other condition is not needed
Earlier if interrupt stack is specified it was used and remaining section of
IRAM was used to allocate heap, if stack is not specified heap section was
reduced by isr stack size and it was added at the end of RAM

With 2-region RAM support interrupt stack will always be specified.
2019-02-19 15:46:32 -06:00
Oren Cohen 5dbb8fef09 Call tfm_ns_lock_init() on TFM NSPE boot 2019-02-19 15:19:02 +02:00
Oren Cohen 34895a05ad CR fixes 2019-01-31 17:17:54 +02:00
Oren Cohen 8841ba69f8 Align to new spec changes and prep for TFM SPM
# Conflicts:
#	components/TARGET_PSA/services/crypto/COMPONENT_PSA_SRV_IPC/psa_crypto_spm.c
#	components/TARGET_PSA/services/crypto/COMPONENT_SPE/psa_crypto_partition.c
2019-01-31 17:17:53 +02:00
Bartek Szatkowski 094662790a CMSIS/RTX: Pre-processor defines used for assembly
CMSIS repo does not support pre-processor defines, hence multiple assembly
files are added for secure/non-secure and floating point tools.
Mbed OS tools support assembly file pre-processing, but the build system
does not support multiple assembly files for each target, hence updating
the assembly files.

1. Patch RTX so irq_cm4f.S files work with no FPU targets
2. Patch RTX so irq_armv8mml.S files to work with and without FPU
2. Patch RTX so irq_armv8mml.S and irq_armv8mbl.S files to work with secure and
   non-secure builds
2019-01-18 17:39:43 -06:00
Deepika bb25e8660d Reverted 4 CMSIS/RTX commits for Assembly files
1. Revert "CMSIS/RTX: __FPU_USED to be set based on HW FPU support"
This reverts commit b4f5bed7e75c21927c954a50d40422b81a1de5a0.

2. Revert "CMSIS/RTX: Update Armv8M IAR 8.x assembly files - add END"
This reverts commit b228cd9db0.

3. Revert "CMSIS/RTX: Pre-processor defines used for assembly"
This reverts commit 287121ffdc.

4. Revert "CMSIS/RTX: Patch RTX so irq_cm4f.s files work with no FPU targets"
This reverts commit cc2e0517e1.
2019-01-18 17:31:42 -06:00
deepikabhavnani ba92372b8d CMSIS/RTX: Move Idle and Timer thread stack to bss section.
In case of ARM compiler, idle and timer thread stack though assigned
to `.bss.os` section since not zero initialized are part of `data` section.

In this commit, we are moving stacks of idle and timer thread to bss
section and thereby saving ROM space.
2019-01-15 12:04:39 -06:00
Deepika 255661e55b Adding debugger awarness with Keil MDK
Main thread in Mbed OS is statically allocated and was not available in call
stack of Keil MDK. The RTX5 kernel requires statically allocated thread
information objects that are placed into a specific section to enable RTOS
thread awareness in Keil MDK. This fix is to keep main thread in specific
section of memory.
2019-01-15 12:04:39 -06:00
Martin Kojtal aff2bee8a4
Merge pull request #9352 from mprse/armc6_fix
mbed_boot_arm_std.c: remove redundant compiler check
2019-01-15 10:39:01 +01:00
Martin Kojtal 116e42f840
Merge pull request #9295 from deepikabhavnani/iar_asm
Add missing END to Armv8M IAR assembly files
2019-01-14 08:54:21 +00:00
Przemyslaw Stekiel 8cc4234181 mbed_boot_gcc_arm.c: remove redundant compiler check 2019-01-11 12:59:53 +01:00
Przemyslaw Stekiel bfcdb7dd3c mbed_boot_arm_std.c: remove redundant compiler check
Check is not needed since this file is exclusive for ARM compiler.
It causes problems on ARMC6.
2019-01-11 12:59:21 +01:00
Deepika b228cd9db0 CMSIS/RTX: Update Armv8M IAR 8.x assembly files - add END
Add missing END to the IAR assembly files. In future this commit should be
merged to other assembly file commit, when performing CMSIS update.
287121ffdc
2019-01-10 13:57:01 -06:00
Przemyslaw Stekiel 1739d7e6dd Define heap/stack start and size based on linker script symbols for ARM and GCC_ARM 2019-01-08 15:32:01 +01:00
Antti Kauppila 02b0f79e15 mbed.h includes removed 2018-12-28 14:36:10 +02:00
Alastair D'Silva 2617c5d55b Don't use define checks on DEVICE_FOO macros (mbed code)
The DEVICE_FOO macros are always defined (either 0 or 1).

This patch replaces any instances of a define check on a DEVICE_FOO
macro with value test instead.

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2018-12-20 10:16:42 +11:00
Cruz Monrreal 463a4536e2
Merge pull request #8961 from marcemmers/this-thread
ThisThread get_name()
2018-12-14 11:13:31 -06:00
Kevin Bracey 770baa22ea Rework MPU use option
Make the option positively named, and as it is a platform config
option make sure it only affects platform code.

HAL functions still remain available even if platform is told not
to use them.
2018-12-11 13:03:59 +02:00
Kevin Bracey 842587ddb5 Save ROM by specifying initial MPU state
We can omit the need for the "change MPU state" calls from simple images
by specifying the initial state at init.
2018-12-10 15:53:34 +02:00
Marc Emmers 2f792a9c88 Added get_name function to ThisThread namespace 2018-12-05 08:39:29 +01:00
Martin Kojtal fd301c708b rtos: fix copyright years 2018-11-28 10:42:11 +00:00
Martin Kojtal e3ddd519c3 rtos: add spdx license 2018-11-28 10:39:52 +00:00
Martin Kojtal 52822cb8af
Merge pull request #8871 from c1728p9/mpu
MPU API (Reopened)
2018-11-28 10:28:32 +01:00
Martin Kojtal e69aa15aea
Merge pull request #8744 from kfnta/psa_spm_base
PSA Secure partition manager and services
2018-11-27 15:26:38 +01:00
Russ Butler 1821d37621 Overhaul MPU for new requirements
Make the following changes:
-Allow a vector specific ARM MPU driver by defining MBED_MPU_CUSTOM
-Allow ROM address to be configured for ARMv7-M devices by
    setting the define MBED_MPU_ROM_END
-Add ROM write protection
    -Add new functions and lock
    -enable at boot
    -disable during flash programming
2018-11-27 09:29:32 +00:00
Russ Butler ecd0414494 Integrate MPU with mbed
Enable the MPU as part of the boot sequence and disable it before
starting a new application. Also add reference counted MPU lock and
unlock functions to allow code to execute from ram when necessary.
2018-11-27 09:29:31 +00:00
Oren Cohen dd73fa689c PSA SPM
* Intorduce PSA-SPM to mbed-os
* Add SPM tests (for PSA targets)
* Add PSA PRoT internal storage Secure implementation
* Integrate SPM into the boot proccess
* PSA manifest data generator
* Introduce PSA targets skeleton to mbed-os
* Add artifact delivery to the tools
2018-11-27 09:16:35 +02:00
deepikabhavnani b6e381b701 MBED_NO_GLOBAL_USING_DIRECTIVE is added to remove auto-addition of namespace
Macro guard `MBED_NO_GLOBAL_USING_DIRECTIVE` is added around namespace, to avoid
polluting users namespace.
2018-11-26 09:23:16 -06:00
Senthil Ramakrishnan 6181394e37 Error and fault handling changes for crash reporting 2018-11-16 13:59:59 -06:00
Martin Kojtal e1e20a64f9 rtos: fix coding style 2018-11-15 07:20:12 +00:00
Martin Kojtal 830f7464cc rtx idle: fix coding style 2018-11-15 07:20:10 +00:00
Cruz Monrreal 9d95d46d6c
Merge pull request #8591 from 0xc0170/fix_coding_style_features
features: fix coding style
2018-11-09 09:40:56 -06:00
Martin Kojtal 57be9d2492 Merge branch 'fix_background_overflow' of https://github.com/c1728p9/mbed-os into dev_rollup 2018-11-08 09:21:20 +00:00
Martin Kojtal 87265f7744 rtos: fix coding style in the boot files 2018-11-08 08:54:22 +00:00
Cruz Monrreal II 0a8f5e07d3 Merge branch 'sen_KernelDoxyUpdate' of ssh://github.com/SenRamakri/mbed-os into rollup 2018-11-06 21:29:13 -06:00
Cruz Monrreal c792d33112
Merge pull request #8652 from 0xc0170/dev_rollup
Rollup PR for docs
2018-11-06 20:40:04 -06:00
Russ Butler 9613e0ffbd Increase background stack size to fix overflows
On platforms using both tickless and the low power ticker wrapper
so much of the background stack is used that it overflows. To
ensure the background thread's stack doesn't overflow increase this
size by 256 bytes when tickless is enabled. Worst case usage
on the NUCLEO_F476RG was recorded at 656 when tickless is
turned on so this increased size should safely prevent overflows.
2018-11-06 10:55:58 -06:00
Jeroen de Bruijn 2ef82e18f5
fix: Remove rtx from main thread name 2018-11-03 18:32:23 +01:00
Jeroen de Bruijn 3f635ef813
fix: Update thread names
Remove _thread suffix and rename threads.
2018-11-02 13:44:24 +01:00
kegilbert 3008de5cbf Fix typos in RTOS doxygen. 2018-11-01 15:46:40 -05:00
Amanda Butler 2418d9c0ae
Edit Kernel.h
Make minor copy edits for active voice, branding and deletion of extra spaces.
2018-10-30 10:25:25 -05:00
Cruz Monrreal 5ed07c2dd4
Merge pull request #8328 from kjbracey-arm/noreturn
Error path tightening: use MBED_NORETURN; add+use core_util_atomic_flag
2018-10-29 20:49:54 -05:00
Senthil Ramakrishnan 4cdcdc1010 Updated attach_thread_terminate_hook doxygen comments 2018-10-29 13:53:19 -05:00
Senthil Ramakrishnan ad88218a35 Kernel.h doxygen update 2018-10-29 13:47:22 -05:00
Kevin Bracey 90a731daee rtos_idle_loop is MBED_NORETURN
Don't need loops at two layers.

Also tighten up slightly-invalid extern "C" markings.
2018-10-29 13:58:06 +02:00
Cruz Monrreal 4798a91f2e
Merge pull request #8223 from c1728p9/deep_sleep_wakeup_fix
Improve RTOS behavior with deep sleep
2018-10-27 08:45:33 -05:00
Cruz Monrreal II 3da861808b Make variables that are private in ConditionVariable.h, protected
Paritally reverts docs PR 8511
2018-10-26 13:03:56 -05:00
Mel W 0d128d13f1
Breaking behaviors into two sections
as per @kjbracey-arm review
2018-10-26 14:10:33 +03:00
Mel W 96a6368814
Adding missing punctuation. 2018-10-26 11:37:40 +03:00
Mel W 6a1b260f68
True -> `true`, inserting article 2018-10-26 11:32:27 +03:00
Cruz Monrreal II fab0c3f031 Merge branch 'docs-condition-variable-refactor' of ssh://github.com/scartmell-arm/mbed-os into rollup 2018-10-25 21:49:46 -05:00
Cruz Monrreal II 3a66d9dca3 Merge branch 'doc-fix-mail' of ssh://github.com/paul-szczepanek-arm/mbed-os into rollup 2018-10-25 21:49:43 -05:00
Amanda Butler 5abe427f50 Edit Mail.h
Edit file for active voice, branding and comma use.
2018-10-25 21:47:57 -05:00
paul-szczepanek-arm f57d8978ff no doxygen guards needed for private 2018-10-25 21:47:56 -05:00
paul-szczepanek-arm 1b38b5a717 fix docs in Mail 2018-10-25 21:47:56 -05:00
Amanda Butler fbc5a381af Edit Queue.h
Edit file, including existing text, mostly for active voice and consistent tense.
2018-10-25 21:41:54 -05:00
Steve Cartmell 7e8a932b6f docs(api-queue): Update documentation for the Queue API 2018-10-25 21:41:53 -05:00
Cruz Monrreal de6ba91644
Merge pull request #8365 from 0xc0170/fix_astyle_common2
Fix astyle for tests folders
2018-10-25 10:41:13 -05:00