From 93a60641ea8c2237a54f5823dc5511947c847d5b Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 4 Mar 2014 14:15:10 +0700 Subject: [PATCH] fix issue with SVC_Handler SVCall_Handler name between keil & xpresso start up file. Host freertos works with lpc17xx --- demos/host/host_freertos/host_freertos.uvopt | 40 +-- demos/host/host_os_none/.cproject | 12 +- demos/host/host_os_none/.project | 253 +++++++++--------- demos/host/host_os_none/host_os_none.uvopt | 2 +- demos/host/host_os_none/host_os_none.uvproj | 8 +- vendor/freertos/FreeRTOSConfig.h | 2 +- vendor/freertos/FreeRTOSConfig_lpc175x_6x.h | 10 +- .../freertos/Source/include/portable.h | 26 +- 8 files changed, 180 insertions(+), 173 deletions(-) diff --git a/demos/host/host_freertos/host_freertos.uvopt b/demos/host/host_freertos/host_freertos.uvopt index e6364548..3a74469c 100644 --- a/demos/host/host_freertos/host_freertos.uvopt +++ b/demos/host/host_freertos/host_freertos.uvopt @@ -457,7 +457,7 @@ 0 JL2CM3 - -U268003250 -O110 -S8 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(4) -TO19 -TC72000000 -TP21 -TDS800B -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB5 -TFE0 -FO15 -FD10000000 -FC800 -FN1 -FF0LPC_IAP_512 -FS00 -FL080000 + -U268003250 -O110 -S8 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC72000000 -TP21 -TDS800B -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB5 -TFE0 -FO15 -FD10000000 -FC800 -FN1 -FF0LPC_IAP_512 -FS00 -FL080000 @@ -514,10 +514,10 @@ 1 0 0 - 3 + 0 0 - 107 - 116 + 121 + 122 0 ..\src\main.c main.c @@ -1042,10 +1042,10 @@ 1 0 0 - 0 + 2 0 - 0 - 0 + 2094 + 2109 0 ..\..\..\vendor\freertos\freertos\Source\tasks.c tasks.c @@ -1108,8 +1108,8 @@ 0 0 0 - 0 - 0 + 1 + 1 0 ..\..\..\vendor\freertos\freertos\Source\portable\RVDS\ARM_CM3\port_cm3.c port_cm3.c @@ -1148,7 +1148,7 @@ 0 5 0 - 59 + 60 62 0 ..\..\..\vendor\fatfs\diskio.c @@ -1162,9 +1162,9 @@ 1 0 0 - 20 + 21 0 - 1716 + 1717 1723 0 ..\..\..\vendor\fatfs\ff.c @@ -1356,8 +1356,8 @@ 0 0 0 - 150 - 151 + 0 + 0 0 ..\..\bsp\lpc43xx\startup_keil\startup_LPC43xx.s startup_LPC43xx.s @@ -1372,8 +1372,8 @@ 0 26 0 - 366 - 374 + 0 + 0 0 ..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\lpc43xx_uart.c lpc43xx_uart.c @@ -1464,7 +1464,7 @@ bsp lpc175x_6x - 0 + 1 0 0 0 @@ -1570,10 +1570,10 @@ 2 0 0 - 0 + 20 0 - 158 - 164 + 122 + 133 0 ..\..\bsp\lpc175x_6x\startup_keil\startup_LPC17xx.s startup_LPC17xx.s diff --git a/demos/host/host_os_none/.cproject b/demos/host/host_os_none/.cproject index 569f0988..690e70c0 100644 --- a/demos/host/host_os_none/.cproject +++ b/demos/host/host_os_none/.cproject @@ -82,7 +82,7 @@ - + @@ -179,7 +179,7 @@ - + @@ -271,7 +271,7 @@ - + @@ -363,7 +363,7 @@ - + @@ -452,7 +452,7 @@ - + @@ -546,7 +546,7 @@ - + diff --git a/demos/host/host_os_none/.project b/demos/host/host_os_none/.project index 9060e554..cd665f70 100644 --- a/demos/host/host_os_none/.project +++ b/demos/host/host_os_none/.project @@ -1,129 +1,124 @@ - - - host_os_none - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - ?name? - - - - org.eclipse.cdt.make.core.append_environment - true - - - org.eclipse.cdt.make.core.autoBuildTarget - all - - - org.eclipse.cdt.make.core.buildArguments - - - - org.eclipse.cdt.make.core.buildCommand - make - - - org.eclipse.cdt.make.core.buildLocation - ${workspace_loc:/host/Debug} - - - org.eclipse.cdt.make.core.cleanBuildTarget - clean - - - org.eclipse.cdt.make.core.contents - org.eclipse.cdt.make.core.activeConfigSettings - - - org.eclipse.cdt.make.core.enableAutoBuild - false - - - org.eclipse.cdt.make.core.enableCleanBuild - true - - - org.eclipse.cdt.make.core.enableFullBuild - true - - - org.eclipse.cdt.make.core.fullBuildTarget - all - - - org.eclipse.cdt.make.core.stopOnError - true - - - org.eclipse.cdt.make.core.useDefaultBuildCmd - true - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - bsp - 2 - PARENT-2-PROJECT_LOC/bsp - - - fatfs - 2 - PARENT-3-PROJECT_LOC/vendor/fatfs - - - lwip - 2 - PARENT-3-PROJECT_LOC/vendor/lwip - - - src - 2 - PARENT-1-PROJECT_LOC/src - - - tinyusb - 2 - PARENT-3-PROJECT_LOC/tinyusb - - - - - 1380040598945 - - 26 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-startup_iar - - - - 1380040598970 - - 26 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-startup_keil - - - - + + + host_os_none + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.autoBuildTarget + all + + + org.eclipse.cdt.make.core.buildArguments + + + + org.eclipse.cdt.make.core.buildCommand + make + + + org.eclipse.cdt.make.core.buildLocation + ${workspace_loc:/host/Debug} + + + org.eclipse.cdt.make.core.cleanBuildTarget + clean + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.fullBuildTarget + all + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + bsp + 2 + PARENT-2-PROJECT_LOC/bsp + + + fatfs + 2 + PARENT-3-PROJECT_LOC/vendor/fatfs + + + src + 2 + PARENT-1-PROJECT_LOC/src + + + tinyusb + 2 + PARENT-3-PROJECT_LOC/tinyusb + + + + + 1380040598945 + + 26 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-false-startup_iar + + + + 1380040598970 + + 26 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-false-startup_keil + + + + diff --git a/demos/host/host_os_none/host_os_none.uvopt b/demos/host/host_os_none/host_os_none.uvopt index 88cbbd3b..dc8638ae 100644 --- a/demos/host/host_os_none/host_os_none.uvopt +++ b/demos/host/host_os_none/host_os_none.uvopt @@ -581,7 +581,7 @@ 0 JL2CM3 - -U268003250 -O463 -S8 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD10000000 -FC800 -FN1 -FF0LPC_IAP_512 -FS00 -FL080000 + -U268003250 -O463 -S8 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -TO18 -TC10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD10000000 -FC800 -FN1 -FF0LPC_IAP_512 -FS00 -FL080000 0 diff --git a/demos/host/host_os_none/host_os_none.uvproj b/demos/host/host_os_none/host_os_none.uvproj index 0d091c26..53ecd1fd 100644 --- a/demos/host/host_os_none/host_os_none.uvproj +++ b/demos/host/host_os_none/host_os_none.uvproj @@ -1653,9 +1653,9 @@ 0 - 1 + 0 0 - $K\ARM\BIN\ELFDWT.EXE !L BASEADDRESS(0x1A000000) + 0 0 @@ -1811,8 +1811,8 @@ 0 0 0 - 0 - 1 + 1 + 0 0 diff --git a/vendor/freertos/FreeRTOSConfig.h b/vendor/freertos/FreeRTOSConfig.h index e991b342..111ef593 100644 --- a/vendor/freertos/FreeRTOSConfig.h +++ b/vendor/freertos/FreeRTOSConfig.h @@ -10,7 +10,7 @@ #elif __CORTEX_M == 3 #include "FreeRTOSConfig_lpc175x_6x.h" #else - #error "For LPC43XX one of CORE_M0 or CORE_M4 must be defined!" + #error "not yet supported MCU" #endif /* ifdef CORE_M4 */ # endif /* __FREERTOS_CONFIG__H */ diff --git a/vendor/freertos/FreeRTOSConfig_lpc175x_6x.h b/vendor/freertos/FreeRTOSConfig_lpc175x_6x.h index a3684806..2fa38b34 100644 --- a/vendor/freertos/FreeRTOSConfig_lpc175x_6x.h +++ b/vendor/freertos/FreeRTOSConfig_lpc175x_6x.h @@ -149,10 +149,14 @@ function can have. Note that lower priority have numerically higher values. */ /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS standard names. */ -#define vPortSVCHandler SVCall_Handler -#define xPortPendSVHandler PendSV_Handler -#define xPortSysTickHandler SysTick_Handler +#define xPortPendSVHandler PendSV_Handler +#define xPortSysTickHandler SysTick_Handler +#ifdef __CODE_RED +#define vPortSVCHandler SVCall_Handler +#else +#define vPortSVCHandler SVC_Handler +#endif #endif /* FREERTOS_CONFIG_H */ diff --git a/vendor/freertos/freertos/Source/include/portable.h b/vendor/freertos/freertos/Source/include/portable.h index 390a7793..912bc0b8 100644 --- a/vendor/freertos/freertos/Source/include/portable.h +++ b/vendor/freertos/freertos/Source/include/portable.h @@ -315,20 +315,28 @@ //--------------------------------------------------------------------+ // TinyUSB modification //--------------------------------------------------------------------+ -#include "tusb_option.h" - -#ifdef __GNUC__ +#if defined __CC_ARM #if __CORTEX_M == 4 // TODO M0 M4 - #include "../portable/GCC/ARM_CM4F/portmacro.h" + #define PORTMACRO_PATH "../portable/RVDS/ARM_CM4F/portmacro.h" #elif __CORTEX_M == 3 - #include "../portable/GCC/ARM_CM3/portmacro.h" - #else - #error portmacro.h for mcu is not supported yet + #define PORTMACRO_PATH "../portable/RVDS/ARM_CM3/portmacro.h" + #endif + +#elif defined __GNUC__ + #if __CORTEX_M == 4 // TODO M0 M4 + #define PORTMACRO_PATH "../portable/GCC/ARM_CM4F/portmacro.h" + #elif __CORTEX_M == 3 + #define PORTMACRO_PATH "../portable/GCC/ARM_CM3/portmacro.h" #endif -#else - #error portmacro.h for mcu is not supported yet #endif +#ifndef PORTMACRO_PATH + #error portmacro.h path is not defined for this toolchain and/or MCU +#endif + +#include PORTMACRO_PATH + + /* Catch all to ensure portmacro.h is included in the build. Newer demos have the path as part of the project options, rather than as relative from the project location. If portENTER_CRITICAL() has not been defined then