Commit Graph

126 Commits (ea652f9abaee4ba1f1b760a430f9e2b6d1c4ed67)

Author SHA1 Message Date
dbestm 171657d67c [NUCLEO_L152RE] RTOS clock conf 2015-06-04 17:34:29 +02:00
Toyomasa Watarai 56e43df1c7 [SSCI824] Add rtos
- Add rtos TARGET_SSCI824 (same as LPC824) and test
- Fixed warning of pwmout_api.c by GCC_ARM
2015-06-03 16:13:06 +09:00
Martin Kojtal 6f7f37eec7 Merge pull request #1118 from logost/LPC2460
Introduction of new platform LPC2460 MCU
2015-06-01 10:52:03 +01:00
Dmitry Bogdanov 3ebee14015 Update years in copyright headers in RTX for ARM7 sourses 2015-05-27 19:18:29 +04:00
Olaf Hagendorf 8b73e9093b [NUCLEO_F446RE] adding to RTOS lib
RTOS_1 .. RTOS_8 tests are OK
2015-05-23 19:10:53 +02:00
0xc0170 1838c70a90 Fix OS clock definition for NZ32ST1L (latest merge) 2015-05-21 09:59:11 +01:00
0xc0170 f5eeaa09c6 Merge branch 'master' of https://github.com/modtronix-com/mbed into modtronix-com-master
Conflicts:
	libraries/rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h
	libraries/rtos/rtx/TARGET_CORTEX_M/RTX_Conf_CM.c
	workspace_tools/export/coide.py
	workspace_tools/export/gccarm.py
	workspace_tools/export/uvision4.py
2015-05-21 09:53:12 +01:00
Toyomasa Watarai 014c5f46f5 [RTOS] Add Nucleo STM32L152RE platform
* Add RTOS support for Nucleo STM32L152RE
* Add RTOS tests for the target
* Add RTOS build for build travis
2015-05-14 13:05:57 +09:00
Dmitry Bogdanov 6d0c61a6ad Backport of Issue: RTX: Main thread should not write MAGIC_WORD to stack #827 2015-05-08 19:58:12 +04:00
Dmitry Bogdanov f3a03cacc1 Backport of Issue: RTX: Support stacks larger than 64k #826 2015-05-08 19:53:07 +04:00
Dmitry Bogdanov d56b34022d code cleanup 2015-05-08 19:43:34 +04:00
Dmitry Bogdanov 4653da3604 Merge remote-tracking branch 'origin/master' into LPC2460
Conflicts:
	libraries/USBDevice/USBDevice/USBEndpoints.h
	workspace_tools/export_test.py
2015-05-05 21:35:21 +04:00
Dmitry Bogdanov d41b74e898 backport of Issue: Fix stack aligment. #812 2015-05-05 21:27:39 +04:00
raulMrello a73ee5c3d6 Updated Thread.cpp|.h to support signal clear 2015-05-04 09:35:58 +02:00
Martin Kojtal 7c1fba2cda Merge pull request #1074 from dbestm/master
[NUCLEO_F3xxRx][RTOS]enhance source and test
2015-04-27 09:42:20 +01:00
Dmitry Bogdanov ac5a462946 bug fix of SVC handler 2015-04-23 18:57:41 +04:00
Christoph Plank 82b7d9d3f7 Added RTOS support for TEENSY3_1 target 2015-04-18 17:00:57 +02:00
Christoph Plank bd1bfb5c4b Fixed RTOS support for Cortex-M4 without FPU 2015-04-18 17:00:57 +02:00
Jeremy Brodt 5ada69b73d [MAX32600MBED] Adding MAX32600MBED platform. 2015-04-14 10:00:23 -05:00
Jun-Ru Chang f211a680b4 [RTOS] fix compilation warning
pragma push/pop/Ospace are only supported by ARM compiler. Change
predefined marco from __arm__ to __CC_ARM. Warning messages are
shown as below.

[Warning] rt_CMSIS.c@1867: 1866:0: warning: ignoring #pragma push
[-Wunknown-pragmas] ignoring #pragma Ospace  [-Wunknown-pragmas]
[Warning] rt_CMSIS.c@1884: 1866:0: warning: ignoring #pragma push
[-Wunknown-pragmas] ignoring #pragma pop  [-Wunknown-pragmas]

Change-Id: Ife657b710d694449b30dc4b3150cd49c883fc080
Signed-off-by: Jun-Ru Chang <jrjang@gmail.com>
2015-04-10 10:56:55 +08:00
dbestm 1684127708 Merge branch 'master' of https://github.com/mbedmicro/mbed 2015-04-08 11:39:06 +02:00
Martin Kojtal 071f4d0e44 Merge pull request #1003 from jeremybrodt/maxwsnenv
Adding MAXWSNENV platform.
2015-04-08 08:31:46 +02:00
Toyomasa Watarai 41d37b5f2d [RTOS] Add workaround for internal fault
* Add #pragma Ospace to prevent internal fault of armcc 5.04 and 5.05
* Reported by
http://developer.mbed.org/questions/5003/Compiling-latest-github-with-ARM-DS5-fai/
2015-04-08 14:42:17 +09:00
Jeremy Brodt 3f7718cec4 Adding MAXWSNENV platform. 2015-04-07 13:39:09 -05:00
dbestm 48f9602e8a [NUCLEO_F302R8] Fix wrong clock define used by RTX 2015-04-01 15:04:14 +02:00
Masao Hamanaka 095a943958 Increase main thread stack size.
When the user makes a program , it is often continue to add the process to the main thread .
For this reason, increase main thread stack size.
2015-03-23 19:56:55 +09:00
dominus97 4e86cf6273 Removed the comment 2015-03-09 18:41:12 +01:00
dominus97 e636215665 Added support for Nucleo F303RE
The OS_TASKCNT is set to 6, could be more.
The OS_SCHEDULERSTKSIZE is set to 112, could also be more.
The OS_CLOCK is set to 72000000 which matches the description on https://developer.mbed.org/platforms/ST-Nucleo-F303RE/

Cheers
2015-03-07 22:33:48 +01:00
dominus97 5e1716f63f Added support for Nucleo F303RE
I am not sure if it's the right SP, but the basic blink code works.
What does the SP stand for? Stack pointer?

Also, if you could tell me where to look for the correct address, I would.
I looked in the reference manual and the programming manual that STM provides, with no luck.

Cheers
2015-03-07 22:13:37 +01:00
Viller Hsiao bb0246f04a Remove trailing whitespace in RTX 2015-03-06 16:16:58 +08:00
Masao Hamanaka c46f5b894b Modify to support GCC. (CMSIS-RTOS RTX for Cortex-A9) 2015-02-26 16:31:58 +09:00
modtronix-com fa26ed2e0e Added NZ32ST1L Target
Added NZ32ST1L Target, new board from modtronix.com using STM32L151RC
cpu.
2015-02-24 18:08:39 +11:00
Masao Hamanaka 02cba63476 Increase private thread num. 2015-02-20 17:36:11 +09:00
Dmitry Bogdanov e81663306b bugfix of SysTickTimer 2015-02-19 16:05:09 +04:00
Dmitry Bogdanov a523cb7da9 Add support of RTOS to LPC2460 platform 2015-02-18 19:07:41 +04:00
0xc0170 ccfbdf497b Fix issue #902 - disable RTOS for NRF51822.
To enable, systick needs to be replaced by RTC for this target,
as systick is not implemented.
2015-02-12 09:11:22 +00:00
Anders Lindvall dcc53f4bda Fixed target issues for TARGET_LPC4088_DM
- Removed target alias from the EXPORT_MAP in targets.py as it didn't work
- Added copies of the LPC4088 target exporters
- Fixed flag issue in the gcc toolchain
- Changed defines in eth USBDevice, rpt and rtos to handle
  TARGET_LPC4088_DM
2015-02-08 11:56:39 +01:00
nitin.bhaskar.27.09@gmail.com 81a364c6e9 Extended RTOS support for LPC4330 Target 2015-01-28 20:57:37 +05:30
Adam Green 35d1ffd787 Correct warning when assigning HEAP_START to stack_pointer
This fixes issue #856 reported by @neilt6.

I tested on mbedLPC1768 and mbedLPC11U24 using the GCC_ARM toolchain.
2015-01-21 18:52:24 -08:00
Masao Hamanaka 596d0e9b78 Commit upstream changes.
Commit upstream changes that is "Merge pull request #833"
2015-01-09 13:54:55 +09:00
Masao Hamanaka d469fdf79e Increase STACK size of thread. 2015-01-07 19:09:50 +09:00
ohagendorf 11c2a5b888 error correction rebas and build_travis extension
travis_build ok
all tests for nucleo_f0xx and nucleo_f3xx ok
2015-01-05 23:59:58 +01:00
ohagendorf f5c3b18d75 [NUCLEO_F091RC] adding exporter (gcc_arm, coide), enable rtos
- Adding exporter for CoIDE and GCC_ARM
- Adding target to RTOS lib
2015-01-05 22:55:18 +01:00
ohagendorf 5ebdb92e78 [NUCLEO_F072RB] adding target to rtos lib
Every test (DTCT_1, EXAMPLE_1, MBED_xx, RTOS_x) is OK.
2015-01-05 22:43:52 +01:00
Martin Kojtal 914dd37b11 Merge pull request #818 from ohagendorf/stm32l053_rtos
DISCO/NUCLEO_L053xx - adding to RTOS, corrections for all tests, [DISCO_L053] exporter to µVision
2015-01-05 08:08:00 +01:00
Martin Kojtal 47ac39b3fd Merge pull request #812 from perkristian/master
RTOS: Fix stack alignment
2015-01-05 08:01:09 +01:00
Martin Kojtal fdc60ac217 Merge pull request #827 from adamgreen/rtxNoStackCheckForMainThread
RTOS: Main thread should not write MAGIC_WORD to stack
2015-01-05 07:50:23 +01:00
Adam Green 461403989c RTX: Main thread should not write MAGIC_WORD to stack
This is a fix for issue #285.  This fix is similar to that proposed by
@oresths in the original issue.

There is code in rt_init_stack() which compares the task_id against the
value of 1 before writing MAGIC_WORD to the bottom of the stack.  This
is supposed to stop the write from occurring for the main thread but
svcThreadCreate() doesn't initialize the P_TCB's task_id field until
after rt_init_stack() is executed.  If any dynamic memory allocation
has occurred before the main thread is started (from the standard C
startup code) then this write could overwrite data in that allocation.

This change:
* moves the task_id initialization in svcThreadCreate() to happen
  before the call to rt_init_context() is made.
* cleans up some comments in svcThreadCreate() which appear to
  reference older versions of the code which would automatically
  allocate stack memory if size == 0.
* still keeps the call to rt_dispatch() occurring after the call to
  rt_init_context() so that the task is not dispatched to the
  scheduler until the task fields have been populated.

I stepped through the rt_init_stack() code on my mbedLPC1768 after this
change was made to make sure that the write of MAGIC_WORD is now
skipped.
-----------------------------------------------------------------------
(gdb) break HAL_CM.c:95
Breakpoint 1 at 0x482c: file ../../external/mbed/libraries/rtos/rtx/TARGET_CORTEX_M/HAL_CM.c, line 95.
(gdb) c
Continuing.
Note: automatically using hardware breakpoints for read-only addresses.

Breakpoint 1, rt_init_stack (p_TCB=0x10000774 <os_idle_TCB>, task_body=0x4899 <os_idle_demon>)
    at ../../external/mbed/libraries/rtos/rtx/TARGET_CORTEX_M/HAL_CM.c:95
95	  if (p_TCB->task_id != 0x01)
(gdb) p *p_TCB
$1 = {
  cb_type = 0 '\000',
  state = 1 '\001',
  prio = 0 '\000',
  task_id = 255 '\377',
  p_lnk = 0x0 <_reclaim_reent>,
  p_rlnk = 0x0 <_reclaim_reent>,
  p_dlnk = 0x0 <_reclaim_reent>,
  p_blnk = 0x0 <_reclaim_reent>,
  delta_time = 0,
  interval_time = 0,
  events = 0,
  waits = 0,
  msg = 0x0 <_reclaim_reent>,
  stack_frame = 0 '\000',
  reserved = 0 '\000',
  priv_stack = 128,
  tsk_stack = 268437480,
  stack = 0x100007a8 <idle_task_stack>,
  ptask = 0x4899 <os_idle_demon>
}
(gdb) c
Continuing.

Breakpoint 1, rt_init_stack (p_TCB=0x10000120 <os_thread_def_main+16>, task_body=0x620d <__wrap_main()>)
    at ../../external/mbed/libraries/rtos/rtx/TARGET_CORTEX_M/HAL_CM.c:95
95	  if (p_TCB->task_id != 0x01)
(gdb) p *p_TCB
$2 = {
  cb_type = 0 '\000',
  state = 1 '\001',
  prio = 4 '\004',
  task_id = 1 '\001',
  p_lnk = 0x0 <_reclaim_reent>,
  p_rlnk = 0x0 <_reclaim_reent>,
  p_dlnk = 0x0 <_reclaim_reent>,
  p_blnk = 0x0 <_reclaim_reent>,
  delta_time = 0,
  interval_time = 0,
  events = 0,
  waits = 0,
  msg = 0x0 <_reclaim_reent>,
  stack_frame = 0 '\000',
  reserved = 0 '\000',
  priv_stack = 26968,
  tsk_stack = 268467136,
  stack = 0x100012a8,
  ptask = 0x620d <__wrap_main()>
}
(gdb) n
97	}

When the p_TCB for ptask==__wrap_main() is encountered, the task_id
now has a value of 1 and the write of MAGIC_WORD on line 96 is
skipped.
2015-01-02 17:24:48 -08:00
Adam Green d587474778 RTX: Support stacks larger than 64k
This issue was originally reported on the mbed site:
 http://developer.mbed.org/questions/5570/mbed-rtos-memory-utilization/

The cause of the 64k limitation is that even though the user can set a
stack size larger than 64k in the osThreadDef_t::stacksize 32-bit
field, this size is truncated to 16-bit when it is copied to
the priv_stack field in the OS_TCB structure.

This commit corrects that problem by making the OS_TCB::priv_stack
field 32-bit.  Due to word alignment, this introduces another 2 bytes
of padding in the structure which I have made explicit with the
addition of the reserved2 field.

The tsk_stack field which follows priv_stack is referenced directly by
assembly language code responsible for context switching.  This context
switching code used a fixed byte offset, TCB_TSTACK, to access this
tsk_stack field.  I had to update the TCB_TSTACK definition in various
locations from 36 to 40 to account for the extra alignment padding and
increased size of the priv_stack field.

TESTING
* GCC_ARM - mbedLPC1768 and mbedLPC11U24
* Online mbed Compiler - mbedLPC1768 and mbedLPC11U24

NOTES: I had to change assembly language code that was specific to IAR
       but I don't have that toolchain so those changes aren't tested.
       They do however follow the same pattern as the tested GCC
       modifications.
2015-01-02 13:14:40 -08:00
ohagendorf b9bef6b06e [DISCO/NUCLEO_L053xx] adding to RTOS - part3
Reverting the DEFAULT_STACK_SIZE changes in cmsis.oh.h and adding
changes to RTOS_x tests, to create threads with the neccessary reduced
stack sizes for these targets.
2015-01-02 14:52:39 +01:00