Commit Graph

598 Commits (0da589e6e725c3757c6b3ecbf973732e48879ceb)

Author SHA1 Message Date
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
Vladimir Umek 4251af0248 RTX5 (Cortex-A): exception handling restructured, post processing moved after context save. 2018-05-28 19:36:42 +09:00
Vladimir Umek 165c663871 RTX5: fixed nesting interrupt handling (Cortex-A) 2018-05-28 13:55:35 +09:00
Vladimir Umek b6c4139328 RTX5: ignoring CPUID field in GIC implementation
updated interrupt handler for GCC and IAR
2018-05-28 13:54:44 +09:00
Vladimir Umek 0226b11b67 RTX5: disabled OS Tick interrupt during post processing in IRQ handler for Cortex-A devices 2018-05-28 12:52:11 +09:00
Russ Butler aa6b931698 Fix possible bug with SysTimer
Ensure the SysTimer isn't added to the timer list twice by adding
an extra call to remove() inside suspend().
2018-05-27 13:15:00 -05:00
Bartek Szatkowski a92ff94904 Fix rebase error 2018-05-25 12:20:10 -05:00
Bartek Szatkowski 9575dd26ec Don't use tickless if LPTICKER is not present
The current implementation of tickless requires LPTICKER to be present.
2018-05-25 12:20:09 -05:00
Cruz Monrreal 527f9a12fd
Merge pull request #6983 from SenRamakri/sen_ErrorHandling_Push2
Standardized Error Handling and Error Codes
2018-05-24 10:57:00 -05:00
Martin Kojtal d8cb72a0a2
Merge pull request #6273 from bulislaw/update_cmsis_5.3
Update cmsis/rtx to version 5.3
2018-05-24 09:37:40 +02: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 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 9041b475c6 Error handling/logging implementation and tests 2018-05-23 12:21:07 -05:00
Bartek Szatkowski b4d5f0e10f CMSIS: Move non-config includes behind PTIM ifdef
That is to enabled integration with build-it-all Mbed OS type build
system.

Cherry-picked from CMSIS_5 repo: e8d0a476
2018-05-14 12:18:21 +01:00
Bartek Szatkowski 1752803626 CMSIS/RTX: Fix using FALSE/TRUE with preprocesor 2018-05-14 12:18:21 +01:00
Bartek Szatkowski a1fb51c283 RTX5: uVisor: Remove static from svcRtxKernelUnlock/Lock to support uVisor 2018-05-14 12:18:21 +01:00
Jaeden Amero 2f7a841e0e RTX5: uVisor: Defer to uVisor for SVCall priority
Only set the SVCall priority if uVisor is not present. If uVisor is
present, keep using whatever priorities it has already set up.
2018-05-14 12:18:21 +01:00
Jaeden Amero 32d04a08d0 RTX5: uVisor: Add OsEventObserver
Add the OsEventObserver mechanism. A client interested in receiving
notifications on certain OS events can register to receive notifications
with osRegisterForOsEvents. This is useful for clients like the secure
memory allocator, which observes thread switching events in order to
swap in and out different memory allocator objects.
2018-05-14 12:18:21 +01:00
Jaeden Amero 86b91beeca RTX5: uVisor: Extend thread control block with context
OsEventObserver objects expect a context to be maintained per thread on
their behalf. Add this context to the thread control block and extend
the thread creation functions with the ability to supply a context.
2018-05-14 12:18:21 +01:00
Jaeden Amero c250369803 RTX5: uVisor: Use OsEventObserver 2018-05-14 12:18:21 +01:00
Jaeden Amero 73a957997f RTX5: uVisor: Switch threads very carefully
uVisor doesn't set the PSP of the target thread. The RTOS sets the PSP
of the target thread from the target thread's TCB. However, when
interrupts of higher priority than PendSV happen between the call to
uVisor to switch boxes, and the RTOS setting PSP, the uVisor vIRQ
interrupt handler will attempt to use an invalid PSP (the PSP from
before the box and thread switch). This leads to a crash. Make box and
thread switching atomic by disabling interrupts immediately before the
box switching until immediately after the new PSP is set.
2018-05-14 12:18:21 +01:00
Bartek Szatkowski 3f1ea4b9ee CMSIS/RTX: Update idle handler and SysTick ops 2018-05-14 12:18:21 +01:00
deepikabhavnani 287121ffdc 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.
2018-05-14 12:18:20 +01:00
Bartek Szatkowski b88254809e CMSIS/RTX: Allow overwriting mutex ops for ARMC 2018-05-14 12:18:20 +01:00
Bartek Szatkowski cc2e0517e1 CMSIS/RTX: Patch RTX so irq_cm4f.s files work with no FPU targets 2018-05-14 12:18:20 +01:00
Bartek Szatkowski 4360b7bbf8 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)
2018-05-14 12:18:20 +01:00
Bartek Szatkowski 8afbd66763 [CMSIS_5]: Updated to 49ac527a 2018-05-14 12:18:20 +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
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
deepikabhavnani 52c33b5494 Add stats header file to mbed.h
All API header files should be part of mbed.h
2018-05-09 10:24:28 -05:00
Cruz Monrreal 53aa1b04ab
Merge pull request #6654 from kjbracey-arm/fault_cr
Add missing carriage returns to fault handler
2018-05-07 10:41:40 -05:00
ccli8 7b94d4dc32 Add MBED_CONF_APP_TIMER/IDLE_THREAD_STACK_SIZE to configure timer/idle thread stack size by application 2018-05-03 09:46:57 +08:00
ccli8 285bb87fe9 Change back default size of timer thread stack
Configuration for changing this size is kept.
2018-05-03 09:46:56 +08:00
ccli8 eecdd3834e Enlarge timer thread stack size for Cortex-M23/M33 2018-05-03 09:46:55 +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 47c3197f13 Support RTOS-less secure image build with Cortex-M23/M33 2018-04-26 09:33:09 +08:00
Martin Kojtal 675528b6c0
Merge pull request #6534 from c1728p9/rtos_suspend
Update idle loop to reduce calls to suspend
2018-04-25 13:21:47 +01:00
Cruz Monrreal 5fcc9617de
Merge pull request #6486 from deepikabhavnani/thread_class_tz
Thread class tz
2018-04-23 11:03:08 -05:00
Kevin Bracey fc61b8ab50 Add missing carriage returns to fault handler
Fault handler was outputting just LFs between lines, when standard
terminals require CR+LF, leading to messy output.
2018-04-17 14:35:03 +03:00
Filip Jagodzinski 20013d75d6 RTOS: SysTimer: Update tests
Use a mock ticker object instead of the lp_ticker for update_tick() and get_time() tests.
2018-04-13 10:07:00 +02:00
deepikabhavnani 48002ffc39 Added description of tz_module and MBED_TZ_DEFAULT_ACCESS 2018-04-04 12:28:57 -05:00
Russ Butler 953bbeb7de Update idle loop to reduce calls to suspend
Change tickless handling to use public RTX calls and to prevent
unnecessary calls to suspend/resume by looping until the kernel
needs to be resumed.
2018-04-04 09:17:05 -05:00
Deepika ceb44f9cb1 Overloaded ctor for new parameter tz_module 2018-03-29 17:01:02 -05:00
Deepika 044dfb122f Trust zone module identifier added to thread class
Non-Secure threads can access secure calls only when tz_module attribute is set
as 1(OS_SECURE_CALLABLE_THREAD), while thread creation.
Hence adding tz_module as an argument to ctor.
2018-03-28 16:06:06 -05:00
Deepika 4043d95396 Trustzone stack requirement for Mbed-OS is 512 bytes
Added config parameter for TZ stack size and update code to add correct header
file.
2018-03-28 11:20:11 -05:00
Jimmy Brisson f67fe4a7a3
Merge pull request #6257 from SenRamakri/sen_FaultHandlerFixes
Fix for Crash dump formatting issues and adding more info to crash dump
2018-03-08 13:04:07 -06:00
Senthil Ramakrishnan 72f45b83e0 Add mode and privilege info to crash dump 2018-03-05 15:30:01 -06:00
Senthil Ramakrishnan 06f5fbc75d Fix linefeed issues in crash dump output 2018-03-05 15:26:01 -06:00
Cruz Monrreal II 05dd4463db Modified underflow error text to print overflow instead.
End users are more familiar with handling overflow errors, even if underflow may be technically correct
2018-03-05 13:38:55 -06:00
Cruz Monrreal 9ddb092d43
Merge pull request #6230 from bulislaw/system_reset
Add system_reset call
2018-03-01 10:31:07 -06:00
Cruz Monrreal acad33ac13
Merge pull request #5548 from fkjagodzinski/test-systimer
Tests for SysTimer (the idle loop timer for tickless mode)
2018-02-28 18:47:10 -06:00
Bartek Szatkowski 4cb47df40a Add system_reset() function to Mbed OS 2018-02-28 16:42:34 +00:00
Filip Jagodzinski d83ed63a31 RTOS: SysTimer: Fix update_tick 2018-02-28 14:37:13 +01:00
Filip Jagodzinski d098cd6757 RTOS: SysTimer: Split methods for testing 2018-02-28 14:37:12 +01:00
Filip Jagodzinski 1054277c65 RTOS: SysTimer: Extract RtosTimer as SysTimer
RtosTimer class introduced with tickless support in #4991 had to be
renamed because that name was already present in rtos namespace.
2018-02-28 14:37:12 +01:00
Tamas Kaman 8cc71dda75 Build issue for M33 core
Fix typo in irq_armv8mml.S

Signed-off-by: Tamas Kaman <tamas.kaman@arm.com>
2018-02-26 16:30:40 +01:00
Cruz Monrreal bc4dea2b1c
Merge pull request #6113 from bmcdonnell-ionx/master
remove unused variable / resolve compiler warning
2018-02-16 13:47:33 -06:00
Cruz Monrreal 4145cc0cf0
Merge pull request #6029 from deepikabhavnani/update_context_switch_files
RTX5: Pre-processor defines used for assembly
2018-02-16 10:15:03 -06:00
Cruz Monrreal 342e3caeb8
Merge pull request #6045 from deepikabhavnani/thread_tzoption
RTX changes pulled in from d20b8aa
2018-02-16 10:14:24 -06:00
Brendan McDonnell 0dbfcb13a2 remove unused variable / resolve compiler warning 2018-02-15 12:45:39 -05:00
Senthil Ramakrishnan 96d900c99f Fixes for targets with invalid HardFault_Handler implementation and review/other fixes 2018-02-12 11:50:33 -06:00
Senthil Ramakrishnan 29348d823d Support for generating core/register/thread-info dump on fault exceptions 2018-02-12 11:50:33 -06:00
Deepika 9fa0a52c04 Default values for Trustzone Idle/Timer thread updated
Default value for timer/idle thread trustzone identifier is 0, updated
it to 1 to allow threads to access secure functions when timer is secure device.
2018-02-12 11:38:12 -06:00
Deepika 4e89c9261f RTX changes pulled in from d20b8aad7f5e
RTX5: Added TrustZone Module Identifier configuration for Idle and Timer Thread
2018-02-08 15:52:17 -06:00
Deepika cf65e2b125 Pulling in CMSIS commit 05fa9d328a
Systick handler switch to secure/nonsecure issues addressed:
1. Switch to secure/nonsecure context save/restore is based on 6th bit in
LR register, correct the bug (R7 instead of LR was used for decision)
2. Prevent R7 from being corrupted in Sys_ContextSave
3. Branch when non-secure rather than secure
2018-02-08 12:40:20 -06:00
deepikabhavnani 919282322e RTX5: 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.
2018-02-06 21:53:55 -06:00
Cruz Monrreal 07fce417ca
Merge pull request #5852 from maciejbocianski/scoped_lock
ScopedLock implementation
2018-02-06 12:51:21 -06:00
Kevin Bracey 2b77caa32c Add Semaphore::wait_until
Given the 64-bit timebase, add wait_until to Semaphore.

Naming is based on Thread::wait_until.

pthreads uses "timedwait", but that's not a good fit against our
existing wait() - pthreads only has an absolute-time wait, not relative.
2018-01-29 15:26:41 +02:00
Kevin Bracey cd573a603f Add Mutex::trylock_until and trylock_for
Given the 64-bit timebase, add trylock_until to Mutex.

Naming is based on a combination of Mutex::trylock, Thread::wait_until,
and C++11 timed_mutex::try_lock_until.

pthreads and C11 use "timedlock", but that's not a good fit against our
existing trylock() and lock(timeout) - they have only absolute-time
waits, not relative.

To increase the similarity to C++11, add trylock_for - same parameters
as lock, but with the bool return value of trylock and trylock_until.

Add an assertion when convering status codes to booleans to check that
there are no non-timeout errors.
2018-01-29 15:26:41 +02:00
Kevin Bracey bbefeb4432 Add ConditionVariable::wait_until
Given the 64-bit timebase, add wait_until to ConditionVariable.

Move the timeout example to wait_until(), and give wait_for() an
alternative example, as it's no longer the best option for a
timeout.

Tidy up - remove the redundant RESUME_SIGNAL definition.
2018-01-29 15:26:41 +02:00
Kevin Bracey 3bb2c445ca Correct ConditionVariable ISR comments
No ConditionVariable methods are useable from ISR, due to the built-in
mutex and the requirement that the caller of notify holds the mutex.
2018-01-29 15:26:41 +02:00
Kevin Bracey 99dc805e79 Add Thread::wait_until
API is somewhat loose to cope with potential shift in the underlying
RTOS APIs.
2018-01-29 15:26:41 +02:00
Kevin Bracey 4d3888c06a Add Kernel::get_ms_count
Give C++ access to the RTOS's absolute timebase, reducing the need to
run private Timers and similar. Allows wait_until functionality, and
makes it easier to avoid time drift.

Place it in a new header and namespace in case we want more kernel
functions in future.

Try to cover over the breaking API change potentially upcoming in
CMSIS-RTOS 2.1.1, when it reduces the tick count from 64-bit to 32-bit.
(See https://github.com/ARM-software/CMSIS_5/issues/277)

Explicitly state that ticks are milliseconds in mbed OS, despite CMSIS
RTOS 2 permitting different tick rates.

See also https://github.com/ARMmbed/mbed-os/pull/3648 (wait_until
for condition variables) and
https://github.com/ARMmbed/mbed-os/issues/5378 (EventQueue should
use RTOS tick count).
2018-01-29 15:26:41 +02:00
Russ Butler 8ef1a73735 Remove tickless assert for tick count
Remove the assert that the tick count of the OS matches the tick
count of the tickless timer as this occurs frequently when
debugging. This is because the function svcRtxKernelResume
only increments the OS's tick count until the next wakeup event
so if the device was halted by a debugger past the next wakeup
event the tick counts will be out of sync.
2018-01-25 15:27:35 -06:00
Amanda Butler 1d35ccecab
Copy edit Mutex.h
Copy edit document for active voice and consistent branding.
2018-01-17 16:56:32 -06:00
Martin Kojtal 9a18732b20 RTX idle: sleep without locked deep sleep fix
If tickless is enabled, it should not be locking deepsleep
2018-01-17 11:14:41 +00:00
Martin Kojtal 940614c4bc
Merge pull request #5760 from bulislaw/rtc_isr_safe_doc
Add notes about ISR safety to RTOS doxygen
2018-01-15 15:24:51 +00:00
Maciej Bocianski cde5196170 rtos: Add ScopedMutexLock typedef 2018-01-15 09:34:34 +01:00
Amanda Butler ec681b6548
Copy edit Thread.h
Copy edit file for active voice.
2018-01-08 18:01:02 -06:00
Amanda Butler 3621536dd5
Copy edit Semaphore.h
Copy edit file for active voice.
2018-01-08 17:52:40 -06:00
Amanda Butler c3b6c4d53f
Copy edit RtosTimer.h
Copy edit file for active voice.
2018-01-08 17:50:38 -06:00
Amanda Butler 61b2cbbac5
Copy edit Queue.h
Copy edit file for active voice.
2018-01-08 17:48:11 -06:00
Amanda Butler 0d772db6ac
Copy edit Mutex.h
Copy edit file for active voice.
2018-01-08 17:46:08 -06:00
Amanda Butler 4a3c9ef566
Copy edit MemoryPool.h
Copy edit file for active voice.
2018-01-08 17:43:45 -06:00
Amanda Butler d4b3da6700
Copy edit Mail.h
Copy edit file for active voice and American English.
2018-01-08 17:41:37 -06:00
Amanda Butler 30b8da9d4f
Copy edit EventFlags.h
Copy edit file for active voice and agreement.
2018-01-08 17:38:48 -06:00
Amanda Butler c23709c60a
Copy edit ConditionVariable.h
Copy edit docs changes for active voice.
2018-01-08 17:36:24 -06:00
Bartek Szatkowski 71555a984d Add notes about ISR safety to RTOS doxygen 2017-12-27 14:46:49 +00:00
Vladimir Umek 0ff62f6b9e RTX5: fixed __get_PSP function for Cortex-A on IAR (#288) 2017-12-21 14:09:25 +09:00
Robert Rostohar 56602562ad Core(A): Updated __FPU_Enable function (VFP register count detection) 2017-12-21 14:09:25 +09:00
Robert Rostohar 461c215636 RTX5: Cortex-A exception handlers updated (VFP register count detection) 2017-12-21 14:09:24 +09:00
Martin Kojtal 6776cb726b
Merge pull request #5587 from slashdevteam/thread_terminate
Fix fatal parameter error when deleting/terminating Thread object
2017-12-20 14:49:57 +00:00
Martin Kojtal a762e7a622
Merge pull request #5687 from SenRamakri/sen_MutexErrorFix
Statically allocate ARMCC required mutex objects
2017-12-20 14:36:48 +00:00
Senthil Ramakrishnan d3f2883736 Statically allocate ARMCC required mutex objects 2017-12-11 11:41:47 -06:00
Bartek Szatkowski e8c5d652ef Remove inclusion of an internal RTX header 2017-11-28 12:07:57 +01:00
Maciej Rogozinski c08e0f51ec Fixed whitespace 2017-11-27 09:54:09 +01:00
Maciej Rogozinski c721ed8966 Fatal parameter error when deleting/terminating Thread object
Call to osThreadTerminate is guarded by local_id check, to avoid parameter error fault when deleting or terminating Thread object that was not started.
2017-11-25 18:09:37 +01:00
Christopher Haster 7e45aee8a5 Fixed mutex assert in armcc fopen and related memory leak
armcc fopen allocated a mutex using the retargeted system-level
_mutex_initialize function. Interestingly, malloc also uses this
same _mutex_initialization function, which prevents a full solution
relying on malloc. The solution previously implemented involved using
the rtx mutex pool for the first 8 mutexes, then falling back on
malloc.

The previous implementation relied on osMutexNew returning an error
on out-of-memory. An unrelated change causes osMutexNew to instead
assert (except for release mode). This meant if you exceed 8 system-
level mutexes in armcc you will hit an assert. Since the filesystem
code can call fopen an unlimited number of times, this is a problem.

Solution is to keep track of which static mutexes we've allocated, so
we know before calling osMutexNew if we need to call malloc.

Also _mutex_free never deallocated the malloced mutexes, which would
cause fopen to leak memory.
2017-11-22 16:53:19 -06:00
Russ Butler 93cf15d57c Fix and add test for ConditionVariable
Fix the circular linked list handling in ConditionVariable and add a
test to validate the linked list implementation.
2017-11-15 16:15:27 -06: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
Bartek Szatkowski 7bee352dd7 Update SysTick API usage for tickless mode 2017-11-10 09:53:42 +00:00
Bartek Szatkowski 4b354f80cf Update include paths to match updated CMSIS 2017-11-10 09:53:41 +00:00
Martin Kojtal fbd9e7eaf2
Merge pull request #5372 from SenRamakri/sen_PlatformDoxygenUpdates
Doxygen comments fixes
2017-11-09 16:38:45 +00:00
Martin Kojtal c45dd269f5
Merge pull request #3648 from c1728p9/condition_variable
Add ConditionVariable to mbed rtos
2017-11-09 16:38:02 +00:00
Martin Kojtal 242c8700a6
Merge pull request #5428 from kjbracey-arm/rtos_attrs
Shrink RTOS classes
2017-11-09 16:29:15 +00:00
Kevin Bracey 130fffaf8b Shrink RTOS classes
Various RTOS classes were storing their CMSIS-RTOS creation attribute
structure as a member, when it's not required after construction. Reduce
memory by eliminating this member.
2017-11-03 15:22:22 +02:00
Russ Butler 0c4e50abb3 Add ConditionVariable to mbed rtos
Add the ConditionVariable class to mbed rtos to provide easier and
safer synchronization.
2017-11-02 21:02:27 -05:00
Jimmy Brisson 3a05b63f1e
Merge pull request #5158 from YarivCol/master
RTOS : added empty and full functions to Mail and Queue
2017-11-02 10:46:06 -05:00
Jaeden Amero 75ad20b65f RTX5: uVisor: Switch threads very carefully
uVisor doesn't set the PSP of the target thread. The RTOS sets the PSP
of the target thread from the target thread's TCB. However, when
interrupts of higher priority than PendSV happen between the call to
uVisor to switch boxes, and the RTOS setting PSP, the uVisor vIRQ
interrupt handler will attempt to use an invalid PSP (the PSP from
before the box and thread switch). This leads to a crash. Make box and
thread switching atomic by disabling interrupts immediately before the
box switching until immediately after the new PSP is set.
2017-11-01 09:25:43 +00:00
Jaeden Amero 474f6c63ba RTX5: uVisor: Use OsEventObserver 2017-11-01 09:25:43 +00:00
Jaeden Amero 12a47f0031 RTX5: uVisor: Extend thread control block with context
OsEventObserver objects expect a context to be maintained per thread on
their behalf. Add this context to the thread control block and extend
the thread creation functions with the ability to supply a context.
2017-11-01 09:25:43 +00:00
Jaeden Amero f363ccbb59 RTX5: uVisor: Add OsEventObserver
Add the OsEventObserver mechanism. A client interested in receiving
notifications on certain OS events can register to receive notifications
with osRegisterForOsEvents. This is useful for clients like the secure
memory allocator, which observes thread switching events in order to
swap in and out different memory allocator objects.
2017-11-01 09:25:42 +00:00
Jaeden Amero 372b7b8b47 RTX5: uVisor: Defer to uVisor for SVCall priority
Only set the SVCall priority if uVisor is not present. If uVisor is
present, keep using whatever priorities it has already set up.
2017-11-01 09:25:42 +00:00
Bartek Szatkowski b8aa068def CMSIS/RTX: Rename asm files to upper case .S 2017-11-01 09:25:42 +00:00
Bartek Szatkowski 4523b5d266 CMSIS/RTX: Allow overwriting _mutex_initialize symbol for ARMC 2017-11-01 09:25:42 +00:00
Bartek Szatkowski 3f97e57364 CMSIS/RTX: Remove os_tick_gtim.c
This implementation of timer conflicts with the default ptim, we will
keep the default and let the timer override the implmenetation if
needed.
2017-11-01 09:25:42 +00:00
Bartek Szatkowski 1b131edd69 CMSIS/RTX: Patch RTX so irq_cm4f.s files work with no FPU targets 2017-11-01 09:25:42 +00:00
Bartek Szatkowski 5d6abd6572 CMSIS/RTX: Patch RTX includes to match mbed OS scheme 2017-11-01 09:25:42 +00:00
Bartek Szatkowski d5933f198c 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.
2017-11-01 09:25:42 +00:00
Bartek Szatkowski a03591d6e3 CMSIS/RTX: Update CMSIS and RTX to 22b68c
This includes Cortex A support and directory reshuffle.
2017-11-01 09:25:42 +00:00
Russ Butler d98a011749 Ensure Thread stack is 8 byte aligned
Ensure both the stack and stack size used in the Thread class are
aligned to 8 bytes. This prevents the runtime error
"Thread 0 error -11: Unknown" due to incorrect stack alignment.
2017-10-31 11:58:18 -05:00
Senthil Ramakrishnan 3ad298488c Doxygen comment updates and fixes 2017-10-26 15:36:26 -05:00
Anna Bridge 9c1fd48529 Merge pull request #5278 from maciejbocianski/heap_and_stack_tests
Move heap_and_stack tests to TESTS/mbed_bootstrap
2017-10-20 10:25:07 +01:00
Martin Kojtal cbb8a1f994 Merge pull request #4947 from fkjagodzinski/rtostimer_tests
Rtostimer tests
2017-10-19 16:46:12 +01:00
Maciej Bocianski 9ab2a1df32 Move heap_and_stack tests 2017-10-13 08:23:55 +02:00
Russ Butler 209b9a9e62 Add error if OS tickrate is changed
The current mbed-os drivers rely on a tickrate of 1ms for timing.
This means that if OS_TICK_FREQ is set to any value other than 1000
then mbed-os driver will no longer delay for the correct amount of
time. To prevent this from happening this patch triggers a compile
time error if a tickrate other than 1m is used.
2017-10-05 16:31:14 -05:00
Jimmy Brisson 93459011b0 Merge pull request #5105 from deepikabhavnani/m33_files
Cortex-M33: Add RTX5 context switcher files
2017-10-02 10:38:35 -05:00
Jimmy Brisson b83b0b1678 Merge pull request #5098 from maciejbocianski/signal_fix
Doxygen comment fix for Thread class
2017-10-02 10:37:55 -05:00
Jimmy Brisson 74e592757f Merge pull request #5078 from v2422/master
Enable access to kernel tick information in ISR
2017-09-29 10:10:46 -05:00
Maciej Bocianski a3a73cb281 Doxygen comment fix for Thread class 2017-09-29 15:51:41 +02:00
Martin Kojtal 1fed1d003e Merge pull request #4684 from deepikabhavnani/thread_stack_issue
Add thread terminate hook
2017-09-22 11:31:39 +01:00
YarivCol ba7045392c fix doc in the function empty 2017-09-21 05:07:42 -07:00
YarivCol cf2378ecbd Added empty, full function to Queue and Mail 2017-09-21 03:09:45 -07:00
Anna Bridge 02a10e5974 Merge pull request #5094 from deepikabhavnani/m23_armc6
ARMC6 support for Cortex-M23
2017-09-19 10:25:33 +01:00
Deepika e235772ed5 Replaced older version of assembly file with 2016-2017 version from RTX 2017-09-14 23:15:12 -05:00
Deepika a2b53011be Added thread terminate hook
Hook was added in RTX4 code to assist test framework to log thread info on
thread terminate, which was not working with RTX5.
2017-09-14 16:21:48 -05:00
Jaeden Amero 0d34c3636e mbed_rtx_idle: uVisor: Don't attempt to sleep
When uVisor is enabled, don't attempt to sleep. Attempting to sleep will
fail, as per <https://github.com/ARMmbed/uvisor/issues/420>.
2017-09-14 17:20:23 +01:00
Deepika 1916000472 [Cortex-M33] Added RTX5 context switcher files 2017-09-14 10:07:18 -05:00
Deepika 60c600ac11 ARMC6 support for Cortex-M23 2017-09-13 17:07:05 -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
Viller Hsiao 6c5af87c73 Enable access to kernel tick information in ISR
The osKernelGetTickCount() is the only function to get kernel tick information,
however it's not allowed to access in ISR.

It's already enabled in API v2.1.1.
2017-09-12 17:54:35 +08: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
Russ Butler c3eae587eb Add tickless support for devices without SysTick
Some Cortex-M0 devices, such as the nrf51, don't have the SysTick.
Instead, these targets use a software interrupt to simulate SysTick.
Add the hooks in the tickless code to support these devices. Targets
which do not have SysTick should now define NO_SYSTICK in targets.json
and implement mbed_get_m0_tick_irqn to add os suport.

This patch also removes os tick handling from the existing devices
(nrf51) since this is now handled in common code.
2017-09-07 21:35:04 -05:00
Russ Butler e44d94fa1e Add initial support for tickless RTX
Add support for tickless by replacing RTX's SysTick timer code with
with code which uses an mbed timer along with suspending and
resuming the kernel in the idle loop. Tickless is enabled on a
per-target basis by defining the macro MBED_TICKLESS.
2017-09-07 21:34:57 -05:00
Jimmy Brisson e12f116ec1 Merge pull request #4912 from 0xc0170/dev_sleep_drivers
Add sleep manager API
2017-09-07 18:26:49 -05:00
Martin Kojtal 39f31c3195 idle loop: add deepsleep locks
For backward compability, we invoke just sleep mode. Adding critical section to complete
lock/unlock deepsleep section.
2017-09-07 15:35:07 +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 fe2646d183 Added new locking init requirement for v8.x
The application must call void __iar_Initlocks(void); before any
lock is used.
2017-09-06 09:51:16 -05:00
Deepika 6c1ad4a4e4 Use correct IAR toolchain macro 2017-09-06 09:51:16 -05:00
Deepika 22afcfacbd _MAX_LOCK define is moved to DLib_Threads.h 2017-09-06 09:51:15 -05:00
Russ Butler b2384b1629 Remove use of internal RTX types
Make calls to cmsis-os to get thread state, stack size, and max stack
usage rather than accessing internal RTX data directly. Wrap RTX5
specific code in OS_BACKEND_RTX5.

Also refactor the code to use mbed types rather than RTX types:
os_timer_t -> mbed_rtos_storage_timer_t
os_event_flags_t -> mbed_rtos_storage_event_flags_t
osRtxMutex_t -> mbed_rtos_storage_thread_t
2017-09-04 11:26:38 -05:00
Filip Jagodzinski 4b0cf636be RTOS: RtosTimer: Improve API docs 2017-09-04 16:10:53 +02:00
Russ Butler ac22225ad9 Move Cortex specific RTX behind TARGET_CORTEX
Update directory structure to include RTX for only cortex targets, and
for all cortex targets. This patch accomplishes this by moving mbed-os
specific RTX files and RTX itself into rtos/TARGET_CORTEX along with
removing TARGET_CORTEX_M from the RTX5 directory.

The old directory structure:

rtos/rtx5/<mbed-os specific RTX files>
rtos/rtx5/TARGET_CORTEX_M/*
rtos/rtx4/*
rtos/<mbed-os specific RTX files>

Is re-arranged to:

rtos/TARGET_CORTEX/rtx5/*
rtos/TARGET_CORTEX/rtx4/*
rtos/TARGET_CORTEX/<mbed-os specific rtx files>

This both encapsulates RTX code more cleanly and makes it easier to
experiment with non-cortex cmsis-os2 backends, such as a posix
based cmsis-os2 backend.

Note - A potentially better name for the CORTEX_M directory would be
something like FEATURE_RTX5 since this directory only contains RTX5
related files. This cannot be done because there is not an easy way
to turn this feature on, since it cannot be done from mbed_lib.json.
2017-08-31 19:55:54 -05:00
Jimmy Brisson 3e00a22d78 Merge pull request #4941 from mprse/fix_mem_pool_header_file
Update of MemoryPool.h header file.
2017-08-24 10:18:18 -05:00
Przemyslaw Stekiel 5abbccb45c Fix pool buffer size, update free() description, add assertion in MemoryPool.h header file.
Provide fix for pool buffer size: pool block size must be
a multiple of 4 bytes.
Add assertion to forbid creation of MemoryPool object with queue size equal to 0.
Update description of free() function. Add information about
statuses returned by this function.
2017-08-21 18:09:51 +01:00
Bartek Szatkowski b0ad73ea41 RTOS: Changes to the EvenFlags API, doxy and tests 2017-08-15 13:33:32 +01:00
YarivCol c532a9a06d RTOS: Add EventFlags class
EventFlags class is a wrapper for Event Flag functionality introduced in
RTOS2/RTX5.
2017-08-15 13:27:30 +01: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
Jimmy Brisson a81783e177 Merge pull request #4752 from bulislaw/queue_tests
RTOS: Queue tests & docs rework
2017-08-07 10:27:11 -05: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 c5c470e22c Merge pull request #4729 from bulislaw/mutex_tests
RTOS: Mutex: Rework tests
2017-07-27 09:40:26 -05:00
Bartek Szatkowski a1736e6341 Boot: Provide dynamic mutexes for ARM toolchain
ARM toolchain requires variable number of dynamic mutexes. We use combination of
RTX mutex pool and heap allocation to achieve that.
2017-07-21 10:09:53 +01:00
Jimmy Brisson 160940b30e Merge pull request #4682 from bulislaw/sem_tests
Test: RTOS: Semaphore: Rework tests
2017-07-17 11:06:48 -05:00
Jimmy Brisson 18bb6fdc1f Merge pull request #4620 from bulislaw/thread_tests
Extend tests for RTOS Thread class
2017-07-17 11:03:34 -05:00
Bartek Szatkowski ffd1c031a6 RTOS: Queue: Improve API docs 2017-07-12 15:39:54 +01:00
Bartek Szatkowski 0935683187 RTOS: Mutex: Improve API docs 2017-07-12 11:02:12 +01:00
Bartek Szatkowski 2963308349 RTOS: Semaphore: Improve API docs 2017-07-11 15:01:40 +01:00
Bartek Szatkowski 739a429820 Test: RTOS: Semaphore: Rework tests 2017-07-11 15:01:39 +01:00
Kevin Gilbert 4d1ad1d3d5 Fix typo runnig_thread -> running_thread 2017-06-30 17:24:43 -05:00
Jimmy Brisson 2ffd264bba Merge pull request #4601 from pan-/fix_memory_pool_destructor
rtos: Fix MemoryPool and Queue destructor
2017-06-29 11:07:38 -05:00
Bartek Szatkowski 0b359263d8 RTOS: Thread: Update thread state docs 2017-06-29 13:01:22 +01:00
Bartek Szatkowski 4c489e686b RTOS: Thread: Fix how free stack is calculated 2017-06-29 13:01:21 +01:00
Bartek Szatkowski 505beb773f RTOS: Thread: Fix return value for signal_wait
Signal wait was always returning success even in case of error.
2017-06-29 12:58:44 +01:00
Bartek Szatkowski af1832d4c7 RTOS: Thread: Update docs; make singal_clr static as it's affects running thread 2017-06-29 12:58:44 +01:00
Bartek Szatkowski 8cc21ea505 RTX: Fixed RTXv5 mutex owner list handling.
The prev-pointer of the running threads mutex list was not set when
multiple mutexes are acquired at a time. This leads to a corrupted list
if the mutexes are not freed in reversed order.

Original commit for CMSIS_5:
commit 729f6ab08540342b7de7612fac103539d5b2f168
Author: Jonatan Antoni <jonatan.antoni@arm.com>
Date:   Wed Apr 19 15:38:43 2017 +0200
2017-06-27 14:39:34 +01:00
Vincent Coubard e690ee04e0 rtos: Add missing Queue destructor. 2017-06-21 11:21:34 +01:00
Vincent Coubard b49fbf1d91 rtos: Add missing destructor for MemoryPool objects. 2017-06-21 11:14:50 +01:00
Vincent Coubard 3119c4238d rtos Thread: Remove private copy constructor and assignment operators in favor of the NonCopyable traits. 2017-06-20 16:23:44 +01:00
Vincent Coubard 4d5f805cde rtos: Tag non value type as NonCopyable.
The types marked are: Mail, MemoryPool, Mutex, Queue, RtosTimer and Semaphore.
2017-06-20 16:23:44 +01:00
Jimmy Brisson 77b6127a71 Merge pull request #4579 from geky/rtos-unbreak-semaphore
RTOS: Fix semaphore
2017-06-19 15:32:48 -05: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
Vincent Coubard fd7eff202c RTOS: Allow per target definition of OS_IDLE_THREAD_STACK_SIZE.
The stack required for the idle thread is highly dependent on the
target because it will call the sleep function which is target
specific.

While 256 bytes of stack is enough for most targets, others like the
NRF52840 might require more.

With this change, target maintainers can specify the idle thread stack
size in their mbed_rtx.h file.
2017-06-16 10:11:12 +01:00
Russ Butler fc18250b1f Increase background stack size to fix overflow
Bump the background stack size to 512 bytes to fix stack overflows on
the NRF52 and so it is the same size as it was before the switch to
RTX5.
2017-06-14 17:31:52 -05:00
Martin Kojtal d3cf5fb999 Merge pull request #4445 from theotherjimmy/fix-exporters
Fixes for exporter issues
2017-06-09 15:04:01 +01:00
Jimmy Brisson fc6c2b85ff Upcase assembly file suffix for preprocesssing 2017-06-09 00:03:23 -05:00
Kevin Gilbert 567589f138 Resolve Doxygen errors from RTOS. Fixed minor Doxygen bug in FileSystemHandle.h as well 2017-06-08 15:51:04 -05:00
Jaeden Amero 778d6822bf RTX5: uVisor: Switch threads very carefully
uVisor doesn't set the PSP of the target thread. The RTOS sets the PSP
of the target thread from the target thread's TCB. However, when
interrupts of higher priority than PendSV happen between the call to
uVisor to switch boxes, and the RTOS setting PSP, the uVisor vIRQ
interrupt handler will attempt to use an invalid PSP (the PSP from
before the box and thread switch). This leads to a crash. Make box and
thread switching atomic by disabling interrupts immediately before the
box switching until immediately after the new PSP is set.
2017-06-04 14:41:59 +01:00
Russ Butler cabc1e0911 Fix Thread class synchronization
Prevent osTheadTerminate from being called on an already terminated
thread. Also make sure the thread termination process is properly
synchronized.
2017-06-02 23:50:38 -05:00
Russ Butler 96bd943ea2 RTX5: Enable priority inheritance and robust mode
Add the attribute flash to enable priority inheritance and robust mode.
The robust flag allows mutexes held by terminated threads to be
properly released.
2017-06-02 23:50:36 -05:00
Russ Butler e48e599a9d Fix RTOS function prototypes by adding extern "C"
Wrap the file mbed_rtos_storage.h in extern "C". This allows the
functions inside rtx_lib.h to have correct definitions when included
in a C++ file.

This is required for the RTX5 error trapping.
2017-06-02 23:50:32 -05:00
Bartosz Szatkowski 39a1b39ce1 Bump number of ARMC mutexes to fix PAL test failure 2017-05-30 18:55:56 +01:00
Yuguo Zou f03509c6cb Add up OS_MUTEX_NUM for ARMCC compiler
CI shield test (SPI test) may need 7 mutexes
2017-05-30 18:55:56 +01:00
Bartek Szatkowski 80cb65e094 Add more verbose RTOS error messages 2017-05-30 18:55:56 +01:00
Bartek Szatkowski a8229b5351 Make sure all RTOS attribute structures are 0-ed before use 2017-05-30 18:55:56 +01:00
Bartek Szatkowski 0064df1ce6 Add name parameter for C++ mutex wrapper 2017-05-30 18:55:55 +01:00
Bartek Szatkowski e66f9ee818 Fix IAR coding style and thread/mutex namingin mbed_boot.c 2017-05-30 18:55:55 +01:00
Bartek Szatkowski b01f13d1a0 Make sure all system threads and mutexes have clear names 2017-05-30 18:55:55 +01:00
Bartek Szatkowski 05548e786d Rename directories rtx->rtx4 rtx2->rtx5 2017-05-30 18:55:55 +01:00
Bartek Szatkowski 535ee8ba25 Make stack sizes configurable by the app
Application can overwrite stack sizes by defining main-stack-size and
thread-stack-size in mbed_app.json
2017-05-30 18:55:55 +01:00
Bartek Szatkowski b793a3fb89 Update codebase for CMSIS5/RTX5
Update all of mbed-os to use RTX5.
2017-05-30 18:55:52 +01:00
Bartek Szatkowski 7b022f8785 Modify CMSIS 5 so it is suitable for mbed-os
Make changes to the files taken from RTX5/CMSIS5 so they work
with mbed-os and uvisor.
2017-05-30 18:53:38 +01:00
Jaeden Amero 7ae2e6e9ec RTX5: uVisor: Use OsEventObserver 2017-05-30 18:53:38 +01:00
Jaeden Amero 24c60f6cc7 RTX5: uVisor: Extend thread control block with context
OsEventObserver objects expect a context to be maintained per thread on
their behalf. Add this context to the thread control block and extend
the thread creation functions with the ability to supply a context.
2017-05-30 18:53:38 +01:00
Jaeden Amero 756e0cae99 RTX5: uVisor: Add OsEventObserver
Add the OsEventObserver mechanism. A client interested in receiving
notifications on certain OS events can register to receive notifications
with osRegisterForOsEvents. This is useful for clients like the secure
memory allocator, which observes thread switching events in order to
swap in and out different memory allocator objects.
2017-05-30 18:53:38 +01:00
Jaeden Amero 25021f271a RTX5: uVisor: Defer to uVisor for SVCall priority
Only set the SVCall priority if uVisor is not present. If uVisor is
present, keep using whatever priorities it has already set up.
2017-05-30 18:53:37 +01:00
Bartek Szatkowski a9a29a4529 Pull in CMSIS 5 files
Pull in unmodified CMSIS5 files from the repository
https://github.com/ARM-software/CMSIS_5.git from the commit
c1b4232f4a98275dd79ebc99cf9b5da5053def4d.

The files were copied as shown below with source->dest_dir.
CMSIS_5/CMSIS/Core/Include/core_*.h -> mbed-os/cmsis/
CMSIS_5/CMSIS/Core_A/Include/core_*.h -> mbed-os/cmsis/
CMSIS_5/CMSIS/DSP/Include/arm_math.h -> mbed-os/cmsis/
CMSIS_5/CMSIS/Core/Include/tz_context.h -> mbed-os/cmsis/
CMSIS_5/CMSIS/Core/Include/cmsis_compiler.h -> mbed-os/cmsis/TARGET_CORTEX_M/
CMSIS_5/CMSIS/Core/Include/cmsis_arm*.h -> mbed-os/cmsis/TARGET_CORTEX_M/TOOLCHAIN_ARM/
CMSIS_5/CMSIS/Core/Include/cmsis_gcc*.h -> mbed-os/cmsis/TARGET_CORTEX_M/TOOLCHAIN_GCC/
CMSIS_5/CMSIS/Core_A/Include/cmsis_compiler.h -> mbed-os/cmsis/TARGET_CORTEX_A/
CMSIS_5/CMSIS/Core_A/Include/cmsis_arm*.h -> mbed-os/cmsis/TARGET_CORTEX_A/TOOLCHAIN_ARM/
CMSIS_5/CMSIS/RTOS2/RTX/Library/cmsis_os1.c -> mbed-os/rtos/rtx/
CMSIS_5/CMSIS/RTOS2/Include/cmsis_os2.h -> mbed-os/rtos/rtx2/TARGET_CORTEX_M/
CMSIS_5/CMSIS/RTOS2/RTX/Config/* -> mbed-os/rtos/rtx2/TARGET_CORTEX_M/
CMSIS_5/CMSIS/RTOS2/RTX/Include1/* -> mbed-os/rtos/rtx/
CMSIS_5/CMSIS/RTOS2/RTX/Include/* -> mbed-os/rtos/rtx2/TARGET_CORTEX_M/
CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_* -> mbed-os/rtos/rtx2/TARGET_CORTEX_M/
CMSIS_5/CMSIS/RTOS2/RTX/Source/core_cm.h -> mbed-os/rtos/rtx2/TARGET_CORTEX_M/
CMSIS_5/CMSIS/RTOS2/RTX/Source/ARM/irq_cm0.s -> mbed-os/rtos/rtx2/TARGET_CORTEX_M/TARGET_M0/TOOLCHAIN_ARM/
CMSIS_5/CMSIS/RTOS2/RTX/Source/GCC/irq_cm0.s -> mbed-os/rtos/rtx2/TARGET_CORTEX_M/TARGET_M0/TOOLCHAIN_GCC/
CMSIS_5/CMSIS/RTOS2/RTX/Source/IAR/irq_cm0.s -> mbed-os/rtos/rtx2/TARGET_CORTEX_M/TARGET_M0/TOOLCHAIN_IAR/
CMSIS_5/CMSIS/RTOS2/RTX/Source/ARM/irq_cm0.s -> mbed-os/rtos/rtx2/TARGET_CORTEX_M/TARGET_M0P/TOOLCHAIN_ARM/
CMSIS_5/CMSIS/RTOS2/RTX/Source/GCC/irq_cm0.s -> mbed-os/rtos/rtx2/TARGET_CORTEX_M/TARGET_M0P/TOOLCHAIN_GCC/
CMSIS_5/CMSIS/RTOS2/RTX/Source/IAR/irq_cm0.s -> mbed-os/rtos/rtx2/TARGET_CORTEX_M/TARGET_M0P/TOOLCHAIN_IAR/
CMSIS_5/CMSIS/RTOS2/RTX/Source/ARM/irq_cm3.s -> mbed-os/rtos/rtx2/TARGET_CORTEX_M/TARGET_M3/TOOLCHAIN_ARM/
CMSIS_5/CMSIS/RTOS2/RTX/Source/GCC/irq_cm3.s -> mbed-os/rtos/rtx2/TARGET_CORTEX_M/TARGET_M3/TOOLCHAIN_GCC/
CMSIS_5/CMSIS/RTOS2/RTX/Source/IAR/irq_cm3.s -> mbed-os/rtos/rtx2/TARGET_CORTEX_M/TARGET_M3/TOOLCHAIN_IAR/
CMSIS_5/CMSIS/RTOS2/RTX/Source/ARM/irq_cm4f.s -> mbed-os/rtos/rtx2/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_ARM/
CMSIS_5/CMSIS/RTOS2/RTX/Source/GCC/irq_cm4f.s -> mbed-os/rtos/rtx2/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_GCC/
CMSIS_5/CMSIS/RTOS2/RTX/Source/IAR/irq_cm4f.s -> mbed-os/rtos/rtx2/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_IAR/
2017-05-30 18:53:37 +01:00
Russ Butler fd233778db Remove RTOS and CMSIS files
Remove the RTOS and CMSIS files in preperation for CMSIS 5. Note that
the RTOS heap ad stack test is left since this is still applicable to
RTX5. This file can be found here:
rtos\rtx\TARGET_CORTEX_M\TESTS\memory\heap_and_stack\main.cpp
2017-05-30 18:53:37 +01:00
Russ Butler 0a3b2561bc Merge pull request #4316 from c1728p9/remove_cortex_a
Remove Cortex A boards as Cortex-A it is not supported in CMSIS5/RTX2
2017-05-15 11:55:36 -05:00
Martin Kojtal 1b94d5abd1 Merge pull request #4292 from bulislaw/fix_release_version
Set mbed minor and patch version to 0 for master
2017-05-15 16:19:41 +01:00
Bartek Szatkowski 5f29445103 Remove Cortex A support from CMSIS/RTOS
This change is temporary, Cortex A support will be reenabled when it's
fully supported in CMSIS/RTX 5.
2017-05-15 11:53:59 +01:00
Bartek Szatkowski 2ddf4b33cb CMSIS5: Remove ARM7 support and targets 2017-05-12 13:48:43 -05:00
Bartek Szatkowski be0f65a417 Set mbed minor and patch version to 0 for master
The proper version will be set for releases.
2017-05-09 16:37:04 +01:00
Jimmy Brisson 7ace0cbb14 Merge pull request #3881 from geky/log-no-io
Remove debug links to printf/exit in NDEBUG builds
2017-05-02 11:37:10 -05:00
Christopher Haster cfc223cc3f Removed debug links to printf/exit in NDEBUG builds
Allows development of small applications where stdio is avoided
2017-04-24 10:40:24 -05:00
Anna Bridge 88fb819e25 Merge pull request #3862 from c1728p9/thread_start_assert
Trap earlier when a Thread instance is re-used
2017-03-14 14:36:39 +00:00
Russ Butler 88f879d0f8 Prevent underflow in heap size calculation
If the free memory on a device is small enough then the calculation to
determine heap size could underflow to a large value. If this happens
then malloc will never return failure and instead will cause a crash on
allocation. This patch prevents the underflow so malloc works as
expected even with low amounts of free memory.
2017-03-06 17:15:51 -06:00
Russ Butler ab4da40e81 rtos: Prevent Thread class from being copied
Make the copy constructor and assignment operator private to prevent
them from being used.
2017-03-06 11:54:58 -06:00
Russ Butler 05403d4231 rtos: Add Inactive return to thread get state
If a thread hasn't been started return Inactive as the status when
Thread::get_state() is called.
2017-03-06 11:54:57 -06:00
Russ Butler 11ef1d10b8 rtos: Return an error when a Thread is re-used
Calling Thread::start multiple times leads to undefined behavior since
the Thread class was not designed to handle being restarted.  Return an
error code if Thread::start is called a second time to prevent this
behavior.
2017-03-06 11:54:50 -06:00
Christopher Haster aff49d8d1e Renamed files in platform to match source names
critical.h     -> mbed_critical.h
sleep.h        -> mbed_sleep.h
toolchain.h    -> mbed_toolchain.h
rtc_time.h     -> mbed_rtc_time.h
semihost_api.h -> mbed_semihost_api.h
wait_api.h     -> mbed_wait_api.h
2017-02-22 18:17:54 -06:00
Sam Grove e852d7fecf Merge pull request #3566 from betzw/betzw_wb_sleep
Put system to sleep when going idle
2017-02-07 10:30:33 -06:00
Wolfgang Betz 2a585ea060 Include new "platform/sleep.h" file 2017-01-26 13:14:54 +01:00
Wolfgang Betz c6897c58dc Put system to sleep when going idle 2017-01-26 12:59:39 +01:00
TomoYamanaka 33d5c5139d Fix Stack stats by running the test command with "-DMBED_HEAP_STATS_ENABLED=1"
In CI, I receive an mbed assert of stack stats by running the following commands. Its assert is TIMEOUT.
mbed test -m RZ_A1H -t GCC_ARM -DMBED_STACK_STATS_ENABLED=1 --clean --compile
mbed test -m RZ_A1H -t GCC_ARM --run -n tests-mbed_drivers-stl_features -v

So, I fixed the process of related to stack stats (osThreadInfoStackMax).The Detail contents is here.
https://github.com/ARMmbed/mbed-os/issues/3273#issuecomment-268407191
2017-01-23 18:11:27 +09:00
TomoYamanaka 9af3173993 [RZ/A1H]Support RTX v4.80 for Cortex-A and a few Malloc API (#3470)
* [RZ/A1H]Support RTX v4.80 for Cortex-A and a few Malloc API

PR to update RTX to v4.80 for Cortex-A.
In the latest CI test, three tests result in an error. The cause is mainly three points
- Unsupport RTX v4.80 for Cortex-A
- Insufficient stack size of thread defined in test
- A few Lack of Malloc API in GCC
Therefore, I supported to these. For the stack size for test, @Russ already supported in PR #3362.

Reference for issue of test error is here.
https://github.com/ARMmbed/mbed-os/issues/3273

Reference for PR to update RTX for Cortex-M.
https://github.com/ARMmbed/mbed-os/pull/1702

* Revert "[RZ/A1H]Support RTX v4.80 for Cortex-A and a few Malloc API"

This reverts commit e71f79aaf2.

* [RZ/A1H]Support RTX v4.80 for Cortex-A and a few Malloc API

PR to update RTX to v4.80 for Cortex-A.
In the latest CI test, three tests result in an error. The cause is mainly three points
- Unsupport RTX v4.80 for Cortex-A
- Insufficient stack size of thread defined in test
- A few Lack of Malloc API in GCC
Therefore, I supported to these. For the stack size for test, @c1728p9 already supported in PR #3362.

Reference for issue of test error is here.
https://github.com/ARMmbed/mbed-os/issues/3273

Reference for PR to update RTX for Cortex-M.
https://github.com/ARMmbed/mbed-os/pull/1702
2017-01-09 10:11:52 -06:00
Sarah Marsh ee7e21d722 Remove Thread::wait from thread example 2016-12-20 10:42:29 -06:00
sarahmarshy dd07d30c7e Remove invalid thread::start example
This changes reflects the correct syntax for spawning a thread that will execute a local function with given parameters.
2016-12-19 14:43:38 -06:00
Christopher Haster 048a47b908 Marked the RtosTimer class as deprecated
The non-irq timer functionality provided by the RtosTimer is now
duplicated by the EventQueue. See RtosTimer.h for more info.
2016-11-07 13:01:08 -06:00
Sam Grove f2b49b860d Merge pull request #2949 from NXPmicro/Fix_For_Cortex_M4
The HAL CM4 for ARM and IAR toolchains is valid only for FPU present.…
2016-10-07 11:15:22 -05:00
Sam Grove 3a16ca9855 Merge pull request #2911 from theotherjimmy/docs-generation
[Tools] Add documentation generation script
2016-10-06 15:57:08 -05:00
Mahadevan Mahesh b290c71f57 The HAL CM4 for ARM and IAR toolchains is valid only for FPU present. These guards were added
to mbed SDK as there are targets with Cortex-M4. This is similar to the implementation already
done for GCC ARM

Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2016-10-06 09:27:59 -05:00
Jimmy Brisson f1a78027d3 Add tags to our code 2016-10-04 15:02:44 -05:00