Commit Graph

5863 Commits (c854d0180f8de2455330ef352bd050166145e8c0)

Author SHA1 Message Date
Vincent Coubard c854d0180f Build RTOS tests on nrf51 based targets. 2016-06-05 19:55:16 +01:00
Vincent Coubard 39a459f4b6 Port RTOS tests to nrf51.
Provide fixed stack stize for nrf51 targets.
Disable memory allocation for stdout otherwise tests fail on mkit target.
2016-06-05 18:32:47 +01:00
Vincent Coubard c0a6c7c6d4 Better generation of heap section.
With this change, the heap section occupy the whole space from the end of
the bss section to the start of the stack section instead of taking a
fixed size in RAM.

This change allows applications to make a more efficient use of the RAM
available and allows application to be compiled if the space between end
of bss and start of stack is less than 2048 bytes.
2016-06-05 17:56:01 +01:00
Vincent Coubard 000e04d768 RTOS port for nrf51.
The NRF51 doesn't have a systick. When the MCU doesn't have a systick, the
HAL has to export several functions which will be use by the kernel to
manage the tick:

  * os_tick_init provides the initialization function for the alternative
    hardware timer.
  * os_tick_val returns the current value of the alternative hardware timer.
  * os_tick_ovf returns the overflow flag of the alternative hardware timer.
  * os_tick_irqack is an interrupt acknowledge function that is called to
    confirm the alternative hardware timer interrupt.

The HAL should also call OS_Tick_Handler needs to be called as the
hardware timer interrupt function.

In the case of the NRF51, two RTCs are available:
  * RTC0: reserved for soft device
  * RTC1: used by us_ticker.

RTC1 is a 4 channels timers, channel 0 is used for us_ticker, and
in this port channel 1 is used for tick generation.

Implementation notes:
  * RTC1_IRQHandler: has to be written in assembly otherwise a stack
    overflow will occur because the function OS_Tick_Handler never
    returns. This function is called when RTC1 channel IRQ is triggered.
  * tick generation has been optimised for a tick with a duration of
    1000us.
  * us_ticker can still be compiled and used without RTX enabled.

More information about alternative timer as RTX Kernel Timer:
https://www.keil.com/pack/doc/CMSIS/RTX/html/_timer_tick.html
2016-06-03 10:13:10 +01:00
0xc0170 b32f7a9aaf Merge branch 'TomoYamanaka-master_branch2' 2016-05-24 13:27:32 +01:00
0xc0170 935111ff6c Merge branch 'master_branch2' of https://github.com/TomoYamanaka/mbed into TomoYamanaka-master_branch2 2016-05-24 11:30:26 +01:00
Martin Kojtal 24136afd3f Merge pull request #1763 from BartSX/timer-fxxx-#816
Fix timer #816 issue for STM32F0 and STM32F1
2016-05-24 11:26:43 +01:00
0xc0170 39fa25d77e Merge branch 'ksitko-master' 2016-05-23 15:48:12 +01:00
Martin Kojtal 045d99bbaa Merge pull request #1764 from BartSX/can-devel-f0
[STM32F0xx] Move CAN API to new directory structure
2016-05-23 15:40:52 +01:00
Bartosz Szczepanski aa2ecad0b2 [STM32F0xx] Move CAN API to new directory structure
We need to remove *can_api.c* file accordingly to new directory structure.
Without that we can't compile any CAN mBed test.

Change-Id: I3d4f798ad75ec1b4c4a1d7ed877e71b7db6bf60f
2016-05-23 16:30:25 +02:00
0xc0170 62eda4dd6d Merge branch 'master' of https://github.com/ksitko/mbed into ksitko-master 2016-05-23 15:22:23 +01:00
0xc0170 b395dd5956 Merge branch 'toyowata-master' 2016-05-23 15:06:45 +01:00
0xc0170 9c525e2f71 Merge branch 'master' of https://github.com/toyowata/mbed into toyowata-master 2016-05-23 15:06:09 +01:00
Bartosz Szczepanski 01ff0b9ab7 [NUCLEO_F030R8] 16-bit timer register update
This path fixes issue #816.

Current value of TIM_MST->CNT is read in interrupt context only.
This avoids master timer overflow without SlaveCounter update.

Change-Id: I8e2ec02ce7539a4c044c7e3dfe6bedc9fcdf7736
2016-05-23 16:02:25 +02:00
Bartosz Szczepanski 82d82d0b2a [NUCLEO_F070RB] 16-bit timer register update
This path fixes issue #816.

Current value of TIM_MST->CNT is read in interrupt context only.
This avoids master timer overflow without SlaveCounter update.

Change-Id: Iaaf7b9eb33aa8d8992e9354ca5e21bf01ec2413d
2016-05-23 16:02:25 +02:00
Rafal Kula e938780788 [NUCLEO_F103RB] 16-bit timer register update
This path fixes issue #816.

Current value of TIM_MST->CNT is read in interrupt context only.
This avoids master timer overflow without SlaveCounter update.

Change-Id: Ie7a9bfce76990f85caa84264450d053604af33e5
2016-05-23 16:02:25 +02:00
Rafal Kula 07b841b08f [STM32Fxxx] Fix issue #816
Both STM32F0xx and STM32F1xx are using a 16-bit timer as a internal ticker
but the mBed ticker needs a 32-bit timer implementation, so the upper part
of that 32-bit timer is being calculated in software.

Software bug has been fixed where continous HIGH/LOW voltage levels
could be observerd for 65ms due to 16-bit timer overflow.

Now current value of TIM_MST->CNT is stored in cnt_val and is
updated in interrupt context only. This avoids master timer
overflow without SlaveCounter update.

This fix is only for platforms which already implements a 16-bit timer:
F103RB, F070RB, F030R8

Change-Id: I205c70ce155b373c6593ead93ade9ec38993f7f9
2016-05-23 16:02:25 +02:00
0xc0170 f74fc12313 Merge branch 'bcostm-fix_f4_serial' 2016-05-23 14:09:29 +01:00
0xc0170 ee6f510ade Merge branch 'fix_f4_serial' of https://github.com/bcostm/mbed into bcostm-fix_f4_serial 2016-05-23 14:08:19 +01:00
0xc0170 6523d648bf Merge branch 'BartSX-timer-l0-#816' 2016-05-23 14:03:42 +01:00
0xc0170 2b44bfbcc6 Merge branch 'timer-l0-#816' of https://github.com/BartSX/mbed into BartSX-timer-l0-#816 2016-05-23 13:59:40 +01:00
0xc0170 57c85c034b Merge branch 'adustm-master' 2016-05-23 11:55:15 +01:00
0xc0170 369841a6cb Merge branch 'master' of https://github.com/adustm/mbed into adustm-master
Conflicts:
	workspace_tools/tests.py
2016-05-23 11:10:03 +01:00
0xc0170 821c492eb8 Merge branch 'neilt6-master' 2016-05-23 10:47:30 +01:00
0xc0170 327bd41632 Merge branch 'master' of https://github.com/neilt6/mbed into neilt6-master 2016-05-23 10:41:32 +01:00
0xc0170 275100e969 Merge branch 'BartSX-can-devel-f0' 2016-05-23 10:37:39 +01:00
0xc0170 c70aedc044 Merge branch 'can-devel-f0' of https://github.com/BartSX/mbed into BartSX-can-devel-f0 2016-05-23 10:37:22 +01:00
Martin Kojtal 99fb83ae21 Merge pull request #1730 from 0xc0170/dev_rtos_init
RTX - init sequence (C++ array init)
2016-05-23 09:58:08 +01:00
0xc0170 daf5c9ee86 RTX - ARM7 init sequence update 2016-05-23 09:50:24 +01:00
0xc0170 f3e11eb36e semihost - fix inline __semihost for IAR (add static)
This was causing errors at my machine (for programs like MBED_10, RTOS_1):

Error[Li005]: no definition for "__semihost" [referenced from
          semihost_api.o(mbed.a)]
[ERROR] Error[Li005]: no definition for "__semihost" [referenced from
          semihost_api.o(mbed.a)]
2016-05-23 09:50:20 +01:00
0xc0170 607c9d119b RTX - ARMCC pre_main - pop fix 2016-05-23 09:50:16 +01:00
0xc0170 8420e13246 RTX - pre_main for GCC C function 2016-05-23 09:50:11 +01:00
Martin Kojtal 230be00443 ARMCC ulib - initalize RTOS before the standard library C++ init
Initialize the RTOS before initializing the standard library.  This
allows C++ constructors to be called in a well defined thread context.
2016-05-23 09:50:05 +01:00
Russ Butler 87176751a8 IAR - Initialize RTOS before standard library
Initialize the RTOS before initializing the standard library.  This
allows C++ constructors to be called in a well defined thread context.
2016-05-23 09:50:00 +01:00
Russ Butler a5ace8dea0 GCC - Initialize RTOS before standard library
Initialize the RTOS before initializing the standard library.  This
allows C++ constructors to be called in a well defined thread context.
2016-05-23 09:49:55 +01:00
Russ Butler ac727e270e ARMCC - Initialize RTOS before standard library
Initialize the RTOS before initializing the standard library.  This
allows C++ constructors to be called in a well defined thread context.
2016-05-23 09:49:48 +01:00
Russ Butler a0fd520408 Remove dead CodeSourcery init code
The CodeSourcery compiler is not longer supported.  This patch removes
the CodeSourcery init code in RTX_CM_lib.h.
2016-05-23 09:49:44 +01:00
Martin Kojtal 03d8ea8e96 Merge pull request #1744 from screamerbg/simplify-layout
Simplify mbed SDK layout
2016-05-23 09:31:27 +01:00
Mihail Stoyanov ec8512aaab Removed mbed-drivers/mbed.h which breaks compatibility with binary releases due to difference in the inclusion path 2016-05-23 09:14:06 +01:00
Mihail Stoyanov 9db0f2e6e0 Update synch.py script to use the paths defined in paths.py 2016-05-23 09:14:04 +01:00
Mihail Stoyanov d5ad8cb949 Rename .mbedignore to .buildignore 2016-05-23 09:14:03 +01:00
Mihail Stoyanov 9bd2b4e4b1 Align paths config (paths.py) with the new directory layout. Also rename the output build folder to .build 2016-05-23 09:14:01 +01:00
Mihail Stoyanov d9734e5a32 Simplify layout:
* /libraries/mbed -> /hal
* /libraries/rtos -> /rtos
2016-05-23 09:13:59 +01:00
Martin Kojtal bd78f98496 Merge pull request #1750 from NXPmicro/dev_ksdk_2.0
Fix for Issue#1740.
2016-05-22 16:47:45 +01:00
Krzysztof Sitko db8595264a STM32F031K6 Missing UART_RX Pin Def
PA3 on the STM32F031K6 can function as a USART1_RX pin.
2016-05-20 12:58:36 -04:00
Bartosz Szczepanski fad2190225 [NUCLEO_F042K6] Added CAN support
Added CAN API support for NUCLEO_F042K6 target.

"stm32f042x6.h" file was changed to avoid compilation errors.

Change-Id: I9622a233775fc6834201a322740bf5026244d50e
2016-05-20 13:27:58 +02:00
Bartosz Szczepanski d140e9959a [NUCLEO_F072RB] Added CAN support
Added CAN API support for NUCLEO_F072RB target.

*stm32f072xb.h* file was changed to avoid compilation errors.

Change-Id: I9da75fde29fd19f0326d554acc1dbb5386b08317
2016-05-20 11:48:34 +02:00
Bartosz Szczepanski 8577163ca3 [NUCLEO_F091RC] Added CAN support
Added CAN API suport for NUCLEO_F091RC target.

*stm32f091xc.h* file was changed to avoid compilation errors.

Change-Id: I9207575a0e2ad0f8e3a4bb78eb23d1e7b4a94171
2016-05-20 11:48:33 +02:00
Bartosz Szczepanski f04377d889 Added CAN API for STM32F0xx family
* STM32F0xx family have only one CAN bus

Change-Id: Id17fbfb825fabe04725a829a121300290f074919
2016-05-20 11:26:55 +02:00
Toyomasa Watarai 3281f5fb9a [LPC812] Fix PwmOut conflict issue
* Use conflict resolution register to set/clear output
2016-05-20 13:40:02 +09:00