Commit Graph

145 Commits (95383dde32fd49f19bee526631bf3c414bb627d9)

Author SHA1 Message Date
Mike Fiore 7836c6eaf1 rebase support for MultiTech xDot platform
[XDOT_L151] copy new target CMSIS files from NZ32_SC151 target

[XDOT_L151] remove Modtronix code, add HardFault_Handler, update clock configuration to match xDot hardware

[XDOT_L151] copy new target HAL files from NZ32_SC151 target

[XDOT_L151] update HAL to match xDot hardware

[XDOT_L151] add xdot_eeprom.* and xdot_low_power.* files

[XDOT_L151] add RTOS support for target

Conflicts:
	rtos/rtx/TARGET_CORTEX_M/RTX_Conf_CM.c

[XDOT_L151] match NUCLEO_L152RE startup code for GCC_ARM so RTOS works

[XDOT_L151] fix GPIO write failure

[XDOT_L151] add XDOT_L151CC target to targets.json

[XDOT_L151] change xDot default stack size to 256 bytes and main stack size to 1.5kB

[XDOT_L151] update PinNames.h to match rev E hardware - no change to external pinout

[XDOT_L151] update style in custom xDot HAL files

Conflicts:
	rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h
	rtos/rtx/TARGET_CORTEX_M/RTX_Conf_CM.c
2016-09-27 00:13:08 -07:00
Sam Grove 196584d571 Merge pull request #2805 from RobMeades/master
OS_TCB struct size is increased to 64 bytes (from 60 bytes).  With th…
2016-09-25 22:20:29 -05:00
Sam Grove c49e970909 Merge pull request #2794 from geky/callback-c-order
callback - Reorder optional argument to static C function
2016-09-25 22:07:45 -05:00
Sam Grove 5556d781a1 Merge pull request #2779 from jeromecoutant/PR_NUCLEO_F103RB
[NUCLEO_F103RB] RTOS tests update
2016-09-25 21:57:35 -05:00
Sam Grove e453b5ea9f Merge pull request #2391 from geky/fix-rtos-critical-sections
[rtos] Fix irq-safe rtx calls when inside critical sections
2016-09-24 16:22:26 -05:00
Rob Meades 0b2657932d OS_TCB struct size is increased to 64 bytes (from 60 bytes). With the change to introduce stats checking in commit c1728p9, OS_TCB now includes an extra pointer, *argv, hence it is larger by 4 bytes. 2016-09-24 18:11:10 +01:00
Christopher Haster b371eb5269 callback - Reordered optional argument to static C function
Before:
Callback<void()> a = callback(obj, member)
Callback<void()> b = callback(context, function)

After:
Callback<void()> a = callback(obj, member)
Callback<void()> b = callback(function, context)

This ordering is more intuitive based on feedback from users. This order
was initially considered but proved problematic when integrated with
other variable arguments in attach functions.

With `callback` as a separate convenience function, this style
no longer presents a problem.
2016-09-23 04:52:58 -05:00
Christopher Haster 3e7b5ed6b9 Fixed rtx calls when inside critical sections
Before, rtx calls would hard fault in critical sections when an svc
instruction was attempted with interrupts disabled.

Required changes:
- Added check for CPSR I bit in cortex A rtx
- Added check for PRIMASK in cortex M rtx
- Modified critical sections in cortex M rtx to be recursive
  (already recursive in cortex A)
2016-09-22 21:19:22 -05:00
jeromecoutant c416a1286d [NUCLEO_F103RB] RTOS tests update
As this target has 20K RAM, default stack size needs to be tuned
2016-09-22 14:48:11 +02:00
Tony Wu aa663ea42d RTOS - Move per-target RTX config to mbed_rtx.h
Disintegrate global RTX target config. Move per-target fragment
to mbed_rtx.h under each vendor's directory.

One mbed_rtx.h is defined for each vendor at this moment, however,
the granularity of mbed_rtx.h can be per-chip, or per-board
if necessary.

Signed-off-by: Tony Wu <tung7970@gmail.com>
2016-09-22 15:09:49 +08:00
Sam Grove 0c0455bf3f Merge pull request #2745 from pan-/disable_global_objects_destruction
Disable global objects destruction
2016-09-22 00:48:08 -05:00
Vincent Coubard ce23ec3120 Disable registration of __libc_fini_array in the init process.
With this call, destructors are not registered for execution atexit.
2016-09-19 13:54:50 +01:00
jeromecoutant 7eb69b041f STM32F070RB/STM32F072RB: decrease thread_stack_main size
Thread_stack_main is by default too large for this 16K target
2016-09-19 10:17:53 +02:00
jeromecoutant 519b52181f [STM32F070RB] correct INITIAL_SP 2016-09-19 10:17:30 +02:00
Sam Grove ee1cba0b69 Merge pull request #2572 from tung7970/master
Fix STM32F407VG target name and LPC11U6X linker errors
2016-09-18 17:44:55 -05:00
Sam Grove 52fd7b6864 Merge pull request #2642 from c1728p9/stack_stats
Stack stats
2016-09-16 17:24:20 -05:00
Martin Kojtal 21a2123aad Merge pull request #2669 from andreaslarssonublox/updated_master
Target - Add u-blox C029 target
2016-09-14 10:35:22 +01:00
Russ Butler 8447843c68 Fix error handling when thread cannot be created
Update the Thread::start function to gracefully handle the failed
creation of a thread when there are no TCBs left. This patch does
the following:
1. Set memory handles to NULL after free to prevent double free
2. Post to the release semaphore so anything that tries to join this
    thread will join immediately
3. Remove dead return path since the new operator should never
    return NULL (it should trap instead)
2016-09-13 15:53:19 -05:00
Russ Butler 9e4a479794 Add prefix to mark cmsis_os functions as private
Add a leading underscore to give an indication that the new cmsis_os
API functions are not official.
2016-09-13 15:53:17 -05:00
Russ Butler 1041904914 Turn on stack init so stack usage is correct
Initialize stack memory since this is required for stack metrics to
work.
2016-09-13 15:52:08 -05:00
Russ Butler 6fd9154d75 Add task terminate hook
Add an RTX hook which gets called when a thread terminates. Add
the function Thread::attach_terminate_hook() to allow users to attach
a hook to this event at runtime.
2016-09-13 12:59:05 -05:00
Russ Butler c319296692 Add RTX API to report stack usage
Add the function osThreadGetInfo to allow various Thread information
to be queried.  This includes stack size and maximum stack usage among
other things.

Note - for Cortex-A devices the worst case stack usage is not
available.
2016-09-13 12:58:57 -05:00
Russ Butler ad24b7d982 Add RTX API to enumerate running threads
Add the functions osThreadsEnumStart, osThreadEnumNext and
osThreadEnumFree to allow enumeration of running threads. Protect
thread creation, thread exit and thread termination with a mutex
so threads are not created or destroyed while an enumeration is
ongoing.
2016-09-12 17:08:36 -05:00
andreas.larsson 173486fac0 Added u-blox C029 target 2016-09-12 13:41:38 +02:00
jeromecoutant 2d2a4bcf4b 8K RAM target is too small for RTOS support 2016-09-12 11:49:43 +02:00
Sam Grove 582da03312 Merge pull request #2589 from OpenNuvoton/ccli8
[NUC472] Fix heap configuration error with armcc
2016-09-10 13:08:47 -05:00
Sam Grove c1ee7fb494 Merge pull request #2504 from ohagendorf/disco_f769_ii
[Disco_F769NI] adding new target
2016-09-10 07:16:21 -05:00
Sam Grove 14f5647d62 Merge pull request #2643 from c1728p9/fix_thread_self_termination
Fix thread self termination
2016-09-09 18:01:38 -05:00
Sam Grove 3bb149cab2 Merge pull request #2549 from geky/thread-clarification
Clean up confusion with deprecated constructors and callbacks in thread-spawning functions
2016-09-09 17:58:13 -05:00
ohagendorf 54adfe10c0 [disco_f769ni] adding rtos lib 2016-09-09 14:18:16 +02:00
Sam Grove 57ebf8bdad Merge pull request #2548 from jamike/NUCLEO_F303ZE
Nucleof303ze
2016-09-09 01:48:13 +02:00
Sam Grove a6b27319ec Merge pull request #2496 from geky/callback-cv
Add cv-qualifiers to Callback and deprecate combinatorial explody functions
2016-09-09 01:45:25 +02:00
Russ Butler b49d7e4fb4 Properly handle a thread which terminates itself
In Thread::terminate() release the join semaphore before terminating
the thread. This allows the join semaphore to be properly signaled in
the case where a thread is terminating itself.
2016-09-07 17:21:25 -05:00
Michel Jaouen aae0b921db [NUCLEO_F303ZE] Add RTOS support 2016-09-05 09:09:42 +02:00
ccli8 0194135bf3 [NUC472] Fix heap configuration error with armcc
In rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h, Image$$ARM_LIB_HEAP$$Base/Image$$ARM_LIB_HEAP$$Length will cause zero memory allocation.
Fix it with Image$$ARM_LIB_HEAP$$ZI$$Base/Image$$ARM_LIB_HEAP$$ZI$$Length. This is to place heap at external SRAM.
2016-08-31 14:32:13 +08:00
Tony Wu 934ac09d69 STM32F4 - Fix STM32F407VG target name
The target name of STM32F407VG should be TARGET_STM32F407VG,
rather than TARGET_F407VG.

Signed-off-by: Tony Wu <tung7970@gmail.com>
2016-08-29 20:52:11 +08:00
Sam Grove ea56684fff Merge pull request #2531 from radhika-raghavendran/master
ncs36510 from ON Semiconductor
2016-08-27 07:31:39 -05:00
Christopher Haster 022f821d0c Rewrote thread deprecation notices to help migration
User feedback indicated that the previous deprecation notices
were confusing and mislead migration from the old style of thread
spawning.

The deprecation notices were updated to emphasize the replacement
functions, and examples of correct usage were added in the doxygen.
2016-08-26 12:50:13 -05:00
Alessandro Angelino b98227c939 K64F: Revert to hardcoded stack pointer in RTX 2016-08-26 17:19:04 +01:00
Christopher Haster 45d25ed493 Added support for cv-qualifiers in Callback class
Additionally, the following changes were don to avoid combinatorial
explosion in function overloads as a result of adding cv-qualifiers:
- Added convenience function for inferred type
- Deprecated callback overloads qhere cv-qualifiers are not scalable

Supported overloads:
callback(void (*f)(A...));
callback(const Callback<R(A...)> &);
callback(T *t,                void (*f)(T*, A...));
callback(const T *t,          void (*f)(const T*, A...));
callback(volatile T *t,       void (*f)(volatile T*, A...));
callback(const volatile T *t, void (*f)(const volatile T*, A...));
callback(T *t,                void (T::*f)(A...));
callback(const T *t,          void (T::*f)(A...) const);
callback(volatile T *t,       void (T::*f)(A...) volatile);
callback(const volatile T *t, void (T::*f)(A...) const volatile);
2016-08-26 09:40:22 -05:00
Sam Grove 030261f2c4 Merge pull request #2544 from tung7970/master
Fix implicit declaration of function 'atexit'
2016-08-26 09:30:19 -05:00
Sam Grove daf4b1c6b1 Merge pull request #2528 from jeremybrodt/max32620
[MAX32620HSP] Initial release.
2016-08-26 09:25:33 -05:00
Radhika b75379f353 Adding NCS36510 support in mbed-os5.1 2016-08-26 12:00:54 +05:30
Jeremy Brodt 2604773a27 [MAX32620HSP] Added support to RTX files. 2016-08-25 16:55:42 -05:00
Tony Wu 6157563ae3 Fix implicit declaration of function 'atexit'
Silence the following compiler warning:
[Warning] RTX_CM_lib.h@807,5: implicit declaration of function 'atexit' [-Wimplicit-function-declaration]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2016-08-25 18:07:54 +08:00
Michel Jaouen a1bd087380 STM32F3 : fix RTOS IAR test not compiling.
Thread_stack_main is by default too large for this target.
2016-08-24 11:53:53 +02:00
Martin Kojtal 64a30a0095 Merge pull request #2479 from geky/deprecated-until
Updated deprecation notices to match branch names
2016-08-18 09:06:39 +01:00
Martin Kojtal 8568c9eac8 Merge pull request #2394 from geky/deprecated-until
Add more well-defined garuntees on deprecation notices in mbed
2016-08-17 14:45:46 +01:00
Christopher Haster b12c27c5b4 Updated deprecation notices to match branch names
Example:

    MBED_DEPRECATED_SINCE("mbed-os-5.1", "don't foo any more, bar instead")
    void foo(int arg);
2016-08-16 20:30:20 -05:00
Christopher Haster 0f516aa8e0 Added more well-defined garuntees on deprecation notices in mbed
From the discussion on issue #2068:
Functions marked deprecated in the mbed library should notate when
the deprecation was started to allow efficient removal once a set
amount of time has expired.

Added the following macro:
MBED_DEPRECATED_SINCE("version", "message string")

Example usage:

    MBED_DEPRECATED_SINCE("v5.1", "don't foo any more, bar instead")
    void foo(int arg);

Adopted in existing deprecations:
- FunctionPointer
- RtosTimer
- Thread
2016-08-16 15:45:51 -05:00