Commit Graph

437 Commits (8d9e2e5d0a7559764e29e46d85089051788725a1)

Author SHA1 Message Date
Anna Bridge c2fdc0d972
Merge pull request #7423 from mprse/mutex_lock_assert
Fix issue #6872 - Mutex lock has possibility to fail at runtime (returning status flag)
2018-09-03 14:14:24 +01:00
Przemyslaw Stekiel fba9c4bc57 Address review comments.
Perform the following changes:
- change definition of `void Mutex::lock(void)` to `osStatus Mutex::lock(void)`.
- change definition of `void Mutex::unlock()` to `osStatus Mutex::unlock()`.
- use MBED_ERROR1 macro to check the lock/unlock operation status.
- add notes in the description of lock/unlock functions: "This function asserts status of the lock/unlock operation (will not return in case of failure). Use of the return value is deprecated, as the return is expected to become void in the future.".
- modify/add description of the return value.
- remove reference to Mbed 6.
- make `lock(millisec)` deprecated in favour of lock(), trylock() and trylock_for() functions.
2018-09-03 07:40:01 +02:00
Cruz Monrreal 48232be98e
Merge pull request #7872 from kjbracey-arm/thisthread
Add ThisThread namespace and deprecate static Thread methods
2018-09-02 15:10:18 -05:00
Cruz Monrreal 00b7700be2
Merge pull request #7875 from c1728p9/feature_CMSIS_5_0b521765
Update CMSIS to 5.4.0
2018-08-31 11:31:37 -05:00
Russ Butler 325565bf79 Refactor boot process
Refactor the Mbed 5 boot process to make is simpler and more modular.
This is done by breaking the boot sequence into 4 distinct steps -
Target setup, Toolchain setup, RTOS setup and Mbed setup. This patch
also move toolchain specific code into a per toolchain folder to make
it more maintainable.
2018-08-28 19:26:55 -05:00
Kevin Bracey 0ddd1d9af5 Make Thread methods const 2018-08-28 13:25:17 +03:00
Kevin Bracey 1330eeecd0 Add ThisThread 2018-08-28 13:25:17 +03:00
Kevin Bracey 6477b762d1 Style clean-up of Thread-related files 2018-08-27 12:30:33 +03:00
Przemyslaw Stekiel ac2db7cc06 Mutex: fixing missing include
Macro MBED_DEPRECATED_SINCE is defined in platform/mbed_toolchain.h which was not included.
If someone used member functions lock (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-08-27 08:50:00 +02:00
Przemyslaw Stekiel c693eb512a Change `Mutex::unlock()` function definition - void return value
This is done for consistency with the new version of `Mutex::lock()` member function which does not return status.
2018-08-27 08:48:59 +02:00
Przemyslaw Stekiel b626e185ec `osStatus lock(uint32_t millisec=osWaitForever)` - remove default value
Since `void lock(void)` member function has been added we need to remove default value from deprecated `lock(uint32_t millisec=osWaitForever)` member function since otherwise calling `lock()` would be ambiguous.
2018-08-27 08:47:16 +02:00
Przemyslaw Stekiel 3decd510dc Fix codding style. 2018-08-27 08:47:16 +02:00
Przemyslaw Stekiel ca8070a482 Fix for issue #6872 - Mutex lock has possibility to fail at runtime (returning status flag)
Add assertions for statuses returned by osMutexAcquire().
Add void Mutex::lock(void) member function - lock function which does not return status and waits for the mutex forever.
Make osStatus Mutex::lock(uint32_t millisec=osWaitForever) member function deprecated in favour of bool Mutex::trylock_for(uint32_t millisec).
2018-08-27 08:47:16 +02:00
Russ Butler d5be92adb1 Fix define around EvrRtxKernelInitialized
Rename the define EVR_RTX_KERNEL_INITIALIZE_COMPLETED_DISABLE to
EVR_RTX_KERNEL_INITIALIZED_DISABLE so it matches the rest of RTX.
2018-08-25 20:41:11 -05:00
Russ Butler 6f7964b23f CMSIS/RTX: Remove the file os_tick_gtim.c
Cortex-A devices in mbed-os supply their own OS timer so the code
from RTX is not needed.
2018-08-25 20:41:11 -05:00
Bartek Szatkowski b7efe36125 CMSIS/RTX: Fix using FALSE/TRUE with preprocesor
(cherry picked from commit 1752803626)
2018-08-25 20:41:10 -05:00
deepikabhavnani 67b677d285 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.

(cherry picked from commit 287121ffdc)
2018-08-25 20:41:09 -05:00
Bartek Szatkowski 4fd0daf9f5 CMSIS/RTX: Allow overwriting mutex ops for ARMC
(cherry picked from commit b88254809e)
2018-08-25 20:41:09 -05:00
Bartek Szatkowski 1be672d5f0 CMSIS/RTX: Patch RTX so irq_cm4f.s files work with no FPU targets
(cherry picked from commit cc2e0517e1)
2018-08-25 20:41:09 -05:00
Bartek Szatkowski 9a87d7b6a0 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)
2018-08-25 20:41:08 -05:00
Russ Butler 342841aa0f [CMSIS_5]: Updated to 0b521765 2018-08-25 20:41:00 -05:00
Russ Butler 5d0aac53bb Move Code to get Cortex A tick irqn
Move the function "mbed_get_a9_tick_irqn()" declared in os_tick.h
to SysTimer.h so it does not get overridden when RTX is updated.

This function was originally added in:
3d3e89097d
Fixes for RZ_A1H issue 6543
2018-08-25 20:40:17 -05:00
Oren Cohen 787317b7eb Remove uVisor from mbed-os 2018-08-22 16:36:59 +03:00
Cruz Monrreal f62e1032af
Merge pull request #7600 from c1728p9/remove_unnecissary_low_power_ticker_rescheduling
Remove unnecessary low power ticker rescheduling
2018-08-16 13:37:01 -05:00
Brendan McDonnell b2480d6281 fix comment copy/paste error 2018-07-31 18:14:31 -04:00
Cruz Monrreal 41bd4c48b9
Merge pull request #7628 from SenRamakri/sen_RtxEvrOptimization
Optimize the configuration for RTX evr events
2018-07-31 11:40:03 -05:00
Cruz Monrreal b8a2a461cf
Merge pull request #7545 from SenRamakri/sen_StackMaxStackIssue
Fix for Thread::max_stack not returning right value when OS_STACK_WATERMARK is enabled
2018-07-31 11:37:15 -05:00
Senthil Ramakrishnan 6221e6fa23 Optimize the configuration for RTX evr events to disable the ones not in use 2018-07-27 13:05:16 -05:00
Russ Butler 05d33b068d Remove unnecessary low power ticker rescheduling
Schedule the next OS tick inside of the ticker interrupt rather than
in the systick interrupt. Scheduling this while the ticker is
dispatching prevents an unnecissary rescheduling since this
rescheduling is done anyway when dispatching is finished.

This is particularly useful for the low power ticker on devices with
LPTICKER_DELAY_TICKS set to a non-zero value. This is because the low
power ticker cannot be reschduled immediately and needs to fall back
onto the microsecond ticker which temporarily locks deep sleep.

Note - the optimization in this commit is made possible by the commit:
"Don't reschedule ticker while dispatching"
2018-07-25 23:24:12 -05:00
Senthil Ramakrishnan 577844d3d3 Fix spelling in error message in fault handler 2018-07-19 10:31:34 -05:00
Senthil Ramakrishnan 481285a324 Fix for max_stack not returning right value when OS_STACK_WATERMARK is enabled 2018-07-18 15:05:39 -05:00
ccli8 0b00d0ce11 Allow non-secure main thread to call secure functions 2018-07-12 18:01:32 +08:00
Jimmy Brisson 0222ca4976 Add _RTX_ define where it's needed and used 2018-07-11 13:49:57 +01:00
Cruz Monrreal 93233c4f5d
Merge pull request #7364 from 0xc0170/fix_storage_rtos
Fix storage rtos types - remove including internal header file
2018-07-05 14:29:46 -05:00
Martin Kojtal 97a3ca193e boot: fix libspace num macro
RTX Config header file is internal and not exposed. With latest fixes to use
only public header files from RTX, we need to add these 2 new macros for
RTX ARMC lib configuration.
2018-06-29 11:43:17 +01:00
Martin Kojtal 2be3c13534
Merge pull request #7355 from deepikabhavnani/rtx_header_fix
Remove semicolon at the end of #6897 

Upstream fix https://github.com/ARM-software/CMSIS_5/pull/384
2018-06-29 08:43:06 +02:00
Martin Kojtal e91ab9c1a1 Thread: fix rtx thread type 2018-06-28 14:40:08 +01:00
Martin Kojtal 5c0f1b5db3 rtos: use RTX identifier
os_thread_t and family are internal and should not be used (thus we included
internal header file). Instead, use those that are exposed via rtx_os.h file.
2018-06-28 14:12:16 +01:00
Deepika 357138468a Remove semicolon at the end of #define 2018-06-27 15:47:49 -05: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
Deepika bc65153a4d Add names to idle/timer thread 2018-06-21 18:32:43 -05:00
ccli8 8071409963 Move RTX_NO_MULTITHREAD_CLIB from RTX_Config.h to mbed_rtx_conf.h
This is to avoid change to RTX code base.
2018-06-21 09:57:21 +08:00
ccli8 f055c2a700 Add comment with RTX_NO_MULTITHREAD_CLIB movement 2018-06-21 09:54:47 +08: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 dcdd616e6d Update exception handling code to remove dedicated fault safe printfs and use mbed_error_printf to optimize memory usage.
Dedicated safe printfs were originally developed to print data over serial with minimal resources. But this adds more code space, so we are switching to use mbed_error_printf.
2018-06-20 11:56:32 -05:00
ccli8 afc0a28cc5 Support thread-safety with ARMC6
1. Define RTX_NO_MULTITHREAD_CLIB to provide Mbed-specific multi-thread support for ARM/ARMC6
2. All overridden _mutex_xxx functions are declared with __USED to avoid excluded by linker

NOTE: Microlib doesn't support multi-thread
2018-06-20 10:35:47 +08:00
Jan Jongboom 63d1684bbe
Spelling error in fault handler 2018-06-18 10:58:12 +08:00
Michael Coulter 3d3e89097d Fixes for RZ_A1H issue 6543
Removed debugging code, fixed errors indicated in the comments.
2018-06-11 13:30:17 -05:00
Cruz Monrreal 1fa333df82
Merge pull request #7032 from TomoYamanaka/feature-rtx_update
Update cmsis/rtx for Cortex-A
2018-06-02 20:52:40 -05:00
Cruz Monrreal f92c227558
Merge pull request #7027 from c1728p9/timer_fix
Fix possible bug with SysTimer
2018-05-31 11:07:34 -05:00