diff options
| author | hathach <[email protected]> | 2014-03-19 16:06:27 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2014-03-19 16:06:27 +0700 |
| commit | 96bb6c8968ba1ae5b430c02d02e94721a25aa34b (patch) | |
| tree | 8b75b262fe61569253c530ff32b9791a40d7d062 | |
| parent | 582492b02ce8406144b85c476e71bfe8bed03a39 (diff) | |
remvoe main as thread of cmsis rtx for portability.
Keil & lpcxpresso4 host_cmsis_rtx work well
| -rw-r--r-- | demos/host/host_cmsis_rtx/.cproject | 2 | ||||
| -rw-r--r-- | demos/host/host_cmsis_rtx/host_cmsis_rtx.uvopt | 42 | ||||
| -rw-r--r-- | demos/host/host_freertos/.cproject | 31 | ||||
| -rw-r--r-- | demos/host/src/main.c | 9 | ||||
| -rw-r--r-- | tinyusb/osal/osal_common.h | 2 | ||||
| -rw-r--r-- | vendor/cmsis_rtos_rtx/INC/RTX_CM_lib.h | 6 | ||||
| -rw-r--r-- | vendor/cmsis_rtos_rtx/INC/cmsis_os.h | 2 | ||||
| -rw-r--r-- | vendor/cmsis_rtos_rtx/RTX_Conf_CM.c | 6 |
8 files changed, 56 insertions, 44 deletions
diff --git a/demos/host/host_cmsis_rtx/.cproject b/demos/host/host_cmsis_rtx/.cproject index c4fc91b9e..dcedaeece 100644 --- a/demos/host/host_cmsis_rtx/.cproject +++ b/demos/host/host_cmsis_rtx/.cproject @@ -187,7 +187,7 @@ </toolChain>
</folderInfo>
<sourceEntries>
- <entry excluding="cmsis_rtos_rtx/SRC|cmsis_rtos_rtx/SRC/GCC/HAL_CM3.s|cmsis_rtos_rtx/SRC/GCC/HAL_CM0.s|cmsis_rtos_rtx/SRC/ARM|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/sdio.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_wwdt.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_timer.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_ssp.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sdmmc.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sdif.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sct.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rtc.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rit.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rgu.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_qei.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_pwr.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_nvic.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_mcpwm.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_lcd.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_i2s.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_gpdma.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_evrt.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_emc.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_dac.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_can.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_atimer.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_adc.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/LCDTerm.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/Font5x7.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/debug_frmwrk.c|mcu/lpc175x_6x|mcu/lpc13uxx|mcu/lpc11uxx|cmsis_rtos_rtx/SRC/IAR|freertos/freertoslpc/FreeRTOS_lpc43xx_m0_Tick.c|freertos/freertos/Source/portable|bsp/boards/EA4357|NGX|bsp/lpc13uxx|bsp/lpc11uxx" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ <entry excluding="mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/sdio.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_wwdt.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_timer.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_ssp.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sdmmc.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sdif.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sct.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rtc.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rit.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rgu.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_qei.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_pwr.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_nvic.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_mcpwm.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_lcd.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_i2s.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_gpdma.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_evrt.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_emc.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_dac.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_can.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_atimer.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_adc.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/LCDTerm.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/Font5x7.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/debug_frmwrk.c|mcu/lpc175x_6x|mcu/lpc13uxx|mcu/lpc11uxx|freertos/freertoslpc/FreeRTOS_lpc43xx_m0_Tick.c|freertos/freertos/Source/portable" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
diff --git a/demos/host/host_cmsis_rtx/host_cmsis_rtx.uvopt b/demos/host/host_cmsis_rtx/host_cmsis_rtx.uvopt index 477d33f02..78a9652d4 100644 --- a/demos/host/host_cmsis_rtx/host_cmsis_rtx.uvopt +++ b/demos/host/host_cmsis_rtx/host_cmsis_rtx.uvopt @@ -212,6 +212,16 @@ </Tracepoint> <LintExecutable></LintExecutable> <LintConfigFile></LintConfigFile> + <SystemViewers> + <Entry> + <Name>OS Support\Event Viewer</Name> + <WinId>35904</WinId> + </Entry> + <Entry> + <Name>OS Support\RTX Tasks and System</Name> + <WinId>35905</WinId> + </Entry> + </SystemViewers> </TargetOption> </Target> @@ -407,10 +417,10 @@ <FileType>1</FileType> <tvExp>0</tvExp> <Focus>0</Focus> - <ColumnNumber>19</ColumnNumber> + <ColumnNumber>0</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>78</TopLine> - <CurrentLine>93</CurrentLine> + <TopLine>1</TopLine> + <CurrentLine>1</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\src\main.c</PathWithFileName> <FilenameWithoutPath>main.c</FilenameWithoutPath> @@ -489,7 +499,7 @@ <Focus>0</Focus> <ColumnNumber>0</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>137</TopLine> + <TopLine>138</TopLine> <CurrentLine>145</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\src\msc_app.c</PathWithFileName> @@ -759,10 +769,10 @@ <FileType>1</FileType> <tvExp>0</tvExp> <Focus>0</Focus> - <ColumnNumber>35</ColumnNumber> + <ColumnNumber>17</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>364</TopLine> - <CurrentLine>366</CurrentLine> + <TopLine>356</TopLine> + <CurrentLine>373</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\..\..\tinyusb\host\usbh.c</PathWithFileName> <FilenameWithoutPath>usbh.c</FilenameWithoutPath> @@ -957,12 +967,12 @@ <GroupNumber>4</GroupNumber> <FileNumber>34</FileNumber> <FileType>1</FileType> - <tvExp>0</tvExp> + <tvExp>1</tvExp> <Focus>0</Focus> - <ColumnNumber>29</ColumnNumber> + <ColumnNumber>0</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>217</TopLine> - <CurrentLine>225</CurrentLine> + <TopLine>1</TopLine> + <CurrentLine>1</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\..\..\vendor\cmsis_rtos_rtx\RTX_Conf_CM.c</PathWithFileName> <FilenameWithoutPath>RTX_Conf_CM.c</FilenameWithoutPath> @@ -989,7 +999,7 @@ <Group> <GroupName>lpc43xx</GroupName> - <tvExp>0</tvExp> + <tvExp>1</tvExp> <tvExpOptDlg>0</tvExpOptDlg> <cbSel>0</cbSel> <RteFlg>0</RteFlg> @@ -1063,10 +1073,10 @@ <FileType>1</FileType> <tvExp>0</tvExp> <Focus>0</Focus> - <ColumnNumber>0</ColumnNumber> + <ColumnNumber>68</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>0</TopLine> - <CurrentLine>0</CurrentLine> + <TopLine>105</TopLine> + <CurrentLine>120</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\..\..\mcu\lpc43xx\CMSIS_LPC43xx_DriverLib\src\system_LPC43xx.c</PathWithFileName> <FilenameWithoutPath>system_LPC43xx.c</FilenameWithoutPath> @@ -1097,7 +1107,7 @@ <Focus>0</Focus> <ColumnNumber>0</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>144</TopLine> + <TopLine>139</TopLine> <CurrentLine>151</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\..\..\mcu\lpc43xx\keil\startup_LPC43xx.s</PathWithFileName> diff --git a/demos/host/host_freertos/.cproject b/demos/host/host_freertos/.cproject index 34fb85ab2..b4cc30b7a 100644 --- a/demos/host/host_freertos/.cproject +++ b/demos/host/host_freertos/.cproject @@ -1,25 +1,23 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?fileVersion 4.0.0?>
-
-<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="com.crt.advproject.config.exe.debug.1239969983">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.exe.debug.1239969983" moduleId="org.eclipse.cdt.core.settings" name="Board NGX4330">
<macros>
<stringMacro name="CFLAGS_OFF" type="VALUE_TEXT" value=""/>
- <stringMacro name="CFLAGS" type="VALUE_TEXT" value="${CFLAGS_OFF}"/>
<stringMacro name="CFLAGS_ON" type="VALUE_TEXT" value="-Wextra -Wswitch-default -Wunsafe-loop-optimizations -Wcast-align -Wlogical-op -Wpacked-bitfield-compat -Wnested-externs -Wredundant-decls -Winline"/>
+ <stringMacro name="CFLAGS" type="VALUE_TEXT" value="${CFLAGS_OFF}"/>
</macros>
<externalSettings/>
<extensions>
- <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
- <extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
@@ -79,7 +77,7 @@ </option>
<option id="gnu.c.link.option.libs.1088600788" name="Libraries (-l)" superClass="gnu.c.link.option.libs"/>
<option id="gnu.c.link.option.paths.1352371726" name="Library search path (-L)" superClass="gnu.c.link.option.paths"/>
- <option id="com.crt.advproject.link.gcc.hdrlib.1912639139" name="Use C library" superClass="com.crt.advproject.link.gcc.hdrlib" value="com.crt.advproject.gcc.link.hdrlib.codered.nohost" valueType="enumerated"/>
+ <option id="com.crt.advproject.link.gcc.hdrlib.1912639139" name="Library" superClass="com.crt.advproject.link.gcc.hdrlib" value="com.crt.advproject.gcc.link.hdrlib.codered.nohost" valueType="enumerated"/>
<option id="com.crt.advproject.link.fpu.1071054814" name="Floating point" superClass="com.crt.advproject.link.fpu" value="com.crt.advproject.link.fpu.fpv4" valueType="enumerated"/>
<option id="com.crt.advproject.link.gcc.multicore.slave.913688114" name="Multicore slave" superClass="com.crt.advproject.link.gcc.multicore.slave"/>
<option id="com.crt.advproject.link.gcc.multicore.master.240160361" name="Multicore" superClass="com.crt.advproject.link.gcc.multicore.master"/>
@@ -99,25 +97,24 @@ <storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
- <storageModule moduleId="scannerConfiguration"/>
</cconfiguration>
<cconfiguration id="com.crt.advproject.config.exe.debug.1239969983.636406670">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.exe.debug.1239969983.636406670" moduleId="org.eclipse.cdt.core.settings" name="Board EA4357">
<macros>
<stringMacro name="CFLAGS_OFF" type="VALUE_TEXT" value=""/>
- <stringMacro name="CFLAGS" type="VALUE_TEXT" value="${CFLAGS_OFF}"/>
<stringMacro name="CFLAGS_ON" type="VALUE_TEXT" value="-Wextra -Wswitch-default -Wunsafe-loop-optimizations -Wcast-align -Wlogical-op -Wpacked-bitfield-compat -Wnested-externs -Wredundant-decls -Winline"/>
+ <stringMacro name="CFLAGS" type="VALUE_TEXT" value="${CFLAGS_OFF}"/>
</macros>
<externalSettings/>
<extensions>
- <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
- <extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
@@ -177,7 +174,7 @@ </option>
<option id="gnu.c.link.option.libs.1825587478" name="Libraries (-l)" superClass="gnu.c.link.option.libs"/>
<option id="gnu.c.link.option.paths.916077707" name="Library search path (-L)" superClass="gnu.c.link.option.paths"/>
- <option id="com.crt.advproject.link.gcc.hdrlib.1015545513" name="Use C library" superClass="com.crt.advproject.link.gcc.hdrlib" value="com.crt.advproject.gcc.link.hdrlib.codered.nohost" valueType="enumerated"/>
+ <option id="com.crt.advproject.link.gcc.hdrlib.1015545513" name="Library" superClass="com.crt.advproject.link.gcc.hdrlib" value="com.crt.advproject.gcc.link.hdrlib.codered.nohost" valueType="enumerated"/>
<option id="com.crt.advproject.link.fpu.834301167" name="Floating point" superClass="com.crt.advproject.link.fpu" value="com.crt.advproject.link.fpu.fpv4" valueType="enumerated"/>
<option id="com.crt.advproject.link.gcc.multicore.slave.589644699" name="Multicore slave" superClass="com.crt.advproject.link.gcc.multicore.slave"/>
<option id="com.crt.advproject.link.gcc.multicore.master.1414273917" name="Multicore" superClass="com.crt.advproject.link.gcc.multicore.master"/>
@@ -197,7 +194,6 @@ <storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
- <storageModule moduleId="scannerConfiguration"/>
</cconfiguration>
<cconfiguration id="com.crt.advproject.config.exe.debug.1239969983.636406670.2076562408">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.exe.debug.1239969983.636406670.872802562" moduleId="org.eclipse.cdt.core.settings" name="Board LPCXpresso1769">
@@ -348,7 +344,7 @@ </option>
<option id="gnu.c.link.option.libs.1868402007" name="Libraries (-l)" superClass="gnu.c.link.option.libs"/>
<option id="gnu.c.link.option.paths.943091458" name="Library search path (-L)" superClass="gnu.c.link.option.paths"/>
- <option id="com.crt.advproject.link.gcc.hdrlib.961930336" name="Use C library" superClass="com.crt.advproject.link.gcc.hdrlib" value="com.crt.advproject.gcc.link.hdrlib.codered.semihost" valueType="enumerated"/>
+ <option id="com.crt.advproject.link.gcc.hdrlib.961930336" name="Library" superClass="com.crt.advproject.link.gcc.hdrlib" value="com.crt.advproject.gcc.link.hdrlib.codered.semihost" valueType="enumerated"/>
<option id="com.crt.advproject.link.fpu.837495348" name="Floating point" superClass="com.crt.advproject.link.fpu" value="com.crt.advproject.link.fpu.none" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1609667925" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
@@ -365,25 +361,24 @@ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.exe.debug.1239969983.636406670.872802562" moduleId="org.eclipse.cdt.core.settings" name="Board LPCXpresso1769">
<macros>
<stringMacro name="CFLAGS_OFF" type="VALUE_TEXT" value=""/>
- <stringMacro name="CFLAGS" type="VALUE_TEXT" value="${CFLAGS_OFF}"/>
<stringMacro name="CFLAGS_ON" type="VALUE_TEXT" value="-Wextra -Wswitch-default -Wunsafe-loop-optimizations -Wcast-align -Wlogical-op -Wpacked-bitfield-compat -Wnested-externs -Wredundant-decls -Winline"/>
+ <stringMacro name="CFLAGS" type="VALUE_TEXT" value="${CFLAGS_OFF}"/>
</macros>
<externalSettings/>
<extensions>
- <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
- <extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
- <storageModule moduleId="scannerConfiguration"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
diff --git a/demos/host/src/main.c b/demos/host/src/main.c index b85004052..d3bf1032e 100644 --- a/demos/host/src/main.c +++ b/demos/host/src/main.c @@ -89,6 +89,10 @@ void os_none_start_scheduler(void) int main(void)
{
+#if TUSB_CFG_OS == TUSB_OS_CMSIS_RTX
+ osKernelInitialize(); // CMSIS RTX requires kernel init before any other OS functions
+#endif
+
board_init();
print_greeting();
@@ -109,10 +113,7 @@ int main(void) #elif TUSB_CFG_OS == TUSB_OS_NONE
os_none_start_scheduler();
#elif TUSB_CFG_OS == TUSB_OS_CMSIS_RTX
- while(1)
- {
- osDelay(osWaitForever); // CMSIS RTX osKernelStart already started, main() is a task
- }
+ osKernelStart();
#else
#error need to start RTOS schduler
#endif
diff --git a/tinyusb/osal/osal_common.h b/tinyusb/osal/osal_common.h index 0cf712e25..3f1bfe08e 100644 --- a/tinyusb/osal/osal_common.h +++ b/tinyusb/osal/osal_common.h @@ -56,7 +56,7 @@ enum {
OSAL_TIMEOUT_NOTIMEOUT = 0, // for use within ISR, return immediately
OSAL_TIMEOUT_NORMAL = 10*5, // default is 10 msec, FIXME CMSIS-RTX easily timeout with 10 msec
- OSAL_TIMEOUT_WAIT_FOREVER = 0x0EEEEEEE
+ OSAL_TIMEOUT_WAIT_FOREVER = 0xFFFFFFFF
};
static inline uint32_t osal_tick_from_msec(uint32_t msec) ATTR_CONST ATTR_ALWAYS_INLINE;
diff --git a/vendor/cmsis_rtos_rtx/INC/RTX_CM_lib.h b/vendor/cmsis_rtos_rtx/INC/RTX_CM_lib.h index ae6c076a0..b5935fa0d 100644 --- a/vendor/cmsis_rtos_rtx/INC/RTX_CM_lib.h +++ b/vendor/cmsis_rtos_rtx/INC/RTX_CM_lib.h @@ -115,6 +115,9 @@ _declare_box8 (mp_stk, OS_STKSIZE*4, OS_TASK_CNT-OS_PRIV_CNT+1); uint32_t const mp_stk_size = sizeof(mp_stk); /* Memory pool for user specified stack allocation (+main, +timer) */ +#ifdef __CODE_RED +__attribute__ (( section(".data.$RAM2") )) // overflow RamLoc32 +#endif uint64_t os_stack_mem[2+OS_PRIV_CNT+(OS_STACK_SZ/8)]; uint32_t const os_stack_sz = sizeof(os_stack_mem); @@ -234,6 +237,7 @@ __attribute__((used)) void _mutex_release (OS_ID *mutex) { * RTX Startup *---------------------------------------------------------------------------*/ +#if osFeature_MainThread /* Main Thread definition */ extern int main (void); osThreadDef_t os_thread_def_main = {(os_pthread)main, osPriorityNormal, 1, 4*OS_MAINSTKSIZE }; @@ -373,6 +377,8 @@ __noreturn __stackless void __cmain(void) { #endif +#endif + /*---------------------------------------------------------------------------- * end of file diff --git a/vendor/cmsis_rtos_rtx/INC/cmsis_os.h b/vendor/cmsis_rtos_rtx/INC/cmsis_os.h index ea4d77cb6..17cc71778 100644 --- a/vendor/cmsis_rtos_rtx/INC/cmsis_os.h +++ b/vendor/cmsis_rtos_rtx/INC/cmsis_os.h @@ -141,7 +141,7 @@ used throughout the whole project. /// \note MUST REMAIN UNCHANGED: \b osFeature_xxx shall be consistent in every CMSIS-RTOS. -#define osFeature_MainThread 1 ///< main thread 1=main can be thread, 0=not available +#define osFeature_MainThread 0 ///< main thread 1=main can be thread, 0=not available #define osFeature_Pool 1 ///< Memory Pools: 1=available, 0=not available #define osFeature_MailQ 1 ///< Mail Queues: 1=available, 0=not available #define osFeature_MessageQ 1 ///< Message Queues: 1=available, 0=not available diff --git a/vendor/cmsis_rtos_rtx/RTX_Conf_CM.c b/vendor/cmsis_rtos_rtx/RTX_Conf_CM.c index 011df7cbc..7577414d4 100644 --- a/vendor/cmsis_rtos_rtx/RTX_Conf_CM.c +++ b/vendor/cmsis_rtos_rtx/RTX_Conf_CM.c @@ -55,14 +55,14 @@ // <i> Defines default stack size for threads with osThreadDef stacksz = 0 // <i> Default: 200 #ifndef OS_STKSIZE - #define OS_STKSIZE 50 + #define OS_STKSIZE 200 #endif // <o>Main Thread stack size [bytes] <64-4096:8><#/4> // <i> Defines stack size for main thread. // <i> Default: 200 #ifndef OS_MAINSTKSIZE - #define OS_MAINSTKSIZE 50 + #define OS_MAINSTKSIZE 200 #endif // <o>Number of threads with user-provided stack size <0-250> @@ -76,7 +76,7 @@ // <i> Defines the combined stack size for threads with user-provided stack size. // <i> Default: 0 #ifndef OS_PRIVSTKSIZE - #define OS_PRIVSTKSIZE 1024 + #define OS_PRIVSTKSIZE (8*1024) #endif // <q>Check for stack overflow |
