diff options
| author | hathach <[email protected]> | 2014-03-06 11:27:22 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2014-03-06 11:37:37 +0700 |
| commit | dcc58a7afcd6f02458a5edaca33a5b63418d641f (patch) | |
| tree | a5ed07d5132d411aee3d643e1287b367a9b14884 | |
| parent | de7437852bb0cea3357aac86b87fc91831a7cc86 (diff) | |
refractor app_os_prio.h
| -rw-r--r-- | demos/bsp/boards/embedded_artists/ea4357/board_ea4357.c | 2 | ||||
| -rw-r--r-- | demos/bsp/boards/ngx/board_ngx4330.c | 14 | ||||
| -rw-r--r-- | demos/host/host_cmsis_rtx/.cproject | 2 | ||||
| -rw-r--r-- | demos/host/host_cmsis_rtx/app_os_prio.h | 71 | ||||
| -rw-r--r-- | demos/host/host_freertos/.cproject | 3 | ||||
| -rw-r--r-- | demos/host/host_freertos/host_freertos.ewp | 38 | ||||
| -rw-r--r-- | demos/host/host_freertos/host_freertos.uvopt | 32 | ||||
| -rw-r--r-- | demos/host/host_freertos/host_freertos.uvproj | 6 | ||||
| -rw-r--r-- | demos/host/host_os_none/.cproject | 7 | ||||
| -rw-r--r-- | demos/host/host_os_none/host_os_none.uvopt | 26 | ||||
| -rw-r--r-- | demos/host/src/app_os_prio.h (renamed from demos/host/host_freertos/app_os_prio.h) | 31 | ||||
| -rw-r--r-- | demos/host/src/cdc_serial_app.c | 3 | ||||
| -rw-r--r-- | demos/host/src/keyboard_app.c | 3 | ||||
| -rw-r--r-- | demos/host/src/main.c | 3 | ||||
| -rw-r--r-- | demos/host/src/mouse_app.c | 4 | ||||
| -rw-r--r-- | demos/host/src/msc_app.c | 3 | ||||
| -rw-r--r-- | demos/host/src/rndis_app.c | 3 | ||||
| -rw-r--r-- | tinyusb/tusb_option.h | 8 | ||||
| -rw-r--r-- | vendor/freertos/freertos/Source/include/portable.h | 866 |
19 files changed, 540 insertions, 585 deletions
diff --git a/demos/bsp/boards/embedded_artists/ea4357/board_ea4357.c b/demos/bsp/boards/embedded_artists/ea4357/board_ea4357.c index b5713fb1e..c76b94bda 100644 --- a/demos/bsp/boards/embedded_artists/ea4357/board_ea4357.c +++ b/demos/bsp/boards/embedded_artists/ea4357/board_ea4357.c @@ -73,7 +73,7 @@ void board_init(void) UART_CFG_Type UARTConfigStruct; UART_ConfigStructInit(&UARTConfigStruct); - UARTConfigStruct.Baud_rate = CFG_UART_BAUDRATE; + UARTConfigStruct.Baud_rate = CFG_UART_BAUDRATE; UARTConfigStruct.Clock_Speed = 0; UART_Init(BOARD_UART_PORT, &UARTConfigStruct); diff --git a/demos/bsp/boards/ngx/board_ngx4330.c b/demos/bsp/boards/ngx/board_ngx4330.c index c134ff952..4efd4c915 100644 --- a/demos/bsp/boards/ngx/board_ngx4330.c +++ b/demos/bsp/boards/ngx/board_ngx4330.c @@ -75,16 +75,16 @@ void board_init(void) #if CFG_UART_ENABLE
//------------- UART init -------------//
- UART_CFG_Type UARTConfigStruct;
-
- scu_pinmux(0x6 ,4, MD_PDN|MD_EZI, FUNC2); // UART0_TXD
- scu_pinmux(0x6 ,5, MD_PDN|MD_EZI, FUNC2); // UART0_RXD
+ scu_pinmux(0x6 ,4, MD_PDN | MD_EZI, FUNC2); // UART0_TXD
+ scu_pinmux(0x6 ,5, MD_PDN | MD_EZI, FUNC2); // UART0_RXD
+ UART_CFG_Type UARTConfigStruct;
UART_ConfigStructInit(&UARTConfigStruct); // default: baud = 9600, 8 bit data, 1 stop bit, no parity
- UARTConfigStruct.Baud_rate = CFG_UART_BAUDRATE; // Re-configure baudrate
+ UARTConfigStruct.Baud_rate = CFG_UART_BAUDRATE; // Re-configure baudrate
+ UARTConfigStruct.Clock_Speed = 0;
- UART_Init((LPC_USARTn_Type*) LPC_USART0, &UARTConfigStruct); // Initialize UART port
- UART_TxCmd((LPC_USARTn_Type*) LPC_USART0, ENABLE); // Enable UART
+ UART_Init(BOARD_UART_PORT, &UARTConfigStruct);
+ UART_TxCmd(BOARD_UART_PORT, ENABLE); // Enable UART
#endif
}
diff --git a/demos/host/host_cmsis_rtx/.cproject b/demos/host/host_cmsis_rtx/.cproject index 8d1b776f3..4763e1cc7 100644 --- a/demos/host/host_cmsis_rtx/.cproject +++ b/demos/host/host_cmsis_rtx/.cproject @@ -46,7 +46,6 @@ <option id="gnu.c.compiler.option.misc.other.898778785" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections" valueType="string"/>
<option id="gnu.c.compiler.option.include.paths.970795437" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp/lpc43xx/CMSIS_LPC43xx_DriverLib/inc}""/>
- <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/freertos}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/freertos/freertos/Source/include}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp}""/>
@@ -708,7 +707,6 @@ <option id="gnu.c.compiler.option.misc.other.740032111" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections" valueType="string"/>
<option id="gnu.c.compiler.option.include.paths.967143576" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp/lpc43xx/CMSIS_LPC43xx_DriverLib/inc}""/>
- <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/cmsis_rtos_rtx/INC}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/tinyusb}""/>
diff --git a/demos/host/host_cmsis_rtx/app_os_prio.h b/demos/host/host_cmsis_rtx/app_os_prio.h deleted file mode 100644 index 75c77a64a..000000000 --- a/demos/host/host_cmsis_rtx/app_os_prio.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************/ -/*! - @file app_os_prio.h - @author hathach (tinyusb.org) - - @section LICENSE - - Software License Agreement (BSD License) - - Copyright (c) 2013, hathach (tinyusb.org) - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holders nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This file is part of the tinyusb stack. -*/ -/**************************************************************************/ - -/** \file - * \brief TBD - * - * \note TBD - */ - -/** \ingroup TBD - * \defgroup TBD - * \brief TBD - * - * @{ - */ - -#ifndef _TUSB_APP_OS_PRIO_H_ -#define _TUSB_APP_OS_PRIO_H_ - - -#ifdef __cplusplus - extern "C" { -#endif - -#define KEYBOARD_APP_TASK_PRIO osPriorityNormal -#define MOUSE_APP_TASK_PRIO osPriorityNormal -#define LED_BLINKING_APP_TASK_PRIO osPriorityNormal -#define CDC_SERIAL_APP_TASK_PRIO osPriorityNormal - -#ifdef __cplusplus - } -#endif - -#endif /* _TUSB_APP_OS_PRIO_H_ */ - -/** @} */ diff --git a/demos/host/host_freertos/.cproject b/demos/host/host_freertos/.cproject index 7d2ac4f6a..c6e0046e4 100644 --- a/demos/host/host_freertos/.cproject +++ b/demos/host/host_freertos/.cproject @@ -47,7 +47,6 @@ <option id="gnu.c.compiler.option.misc.other.898778785" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections" valueType="string"/>
<option id="gnu.c.compiler.option.include.paths.970795437" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp/lpc43xx/CMSIS_LPC43xx_DriverLib/inc}""/>
- <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/freertos}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/freertos/freertos/Source/include}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/fatfs}""/>
@@ -937,7 +936,6 @@ <option id="gnu.c.compiler.option.include.paths.967143576" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp/lpc43xx/CMSIS_LPC43xx_DriverLib/inc}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/fatfs}""/>
- <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/freertos}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/freertos/freertos/Source/include}""/>
@@ -1901,7 +1899,6 @@ <option id="gnu.c.compiler.option.include.paths.643947484" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp/lpc175x_6x/CMSISv2p00_LPC17xx/inc}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp/lpc175x_6x/LPC17xx_DriverLib/include}""/>
- <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/freertos/freertos/Source/include}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/freertos}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/fatfs}""/>
diff --git a/demos/host/host_freertos/host_freertos.ewp b/demos/host/host_freertos/host_freertos.ewp index c313e6a28..60459446c 100644 --- a/demos/host/host_freertos/host_freertos.ewp +++ b/demos/host/host_freertos/host_freertos.ewp @@ -167,7 +167,8 @@ <state>CORE_M4</state>
<state>TUSB_CFG_MCU=MCU_LPC43XX</state>
<state>BOARD=BOARD_EA4357</state>
- <state>TUSB_CFG_OS=TUSB_OS_NONE</state>
+ <state>TUSB_CFG_OS=TUSB_OS_FREERTOS</state>
+ <state>TUSB_CFG_OS_TASK_PRIO=configMAX_PRIORITIES-5</state>
</option>
<option>
<name>CCPreprocFile</name>
@@ -301,6 +302,8 @@ <state>$PROJ_DIR$\..\..\bsp</state>
<state>$PROJ_DIR$\..\..\..\tinyusb</state>
<state>$PROJ_DIR$\..\..\..\vendor\fatfs</state>
+ <state>$PROJ_DIR$\..\..\..\vendor\freertos</state>
+ <state>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\include</state>
</option>
<option>
<name>CCStdIncCheck</name>
@@ -2887,6 +2890,39 @@ </file>
</group>
<group>
+ <name>freertos</name>
+ <group>
+ <name>CM4F</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\portable\IAR\ARM_CM4F\port.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\portable\IAR\ARM_CM4F\portasm.s</name>
+ </file>
+ </group>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\croutine.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\vendor\freertos\freertoslpc\FreeRTOSCommonHooks.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\portable\MemMang\heap_4.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\list.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\queue.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\tasks.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\timers.c</name>
+ </file>
+ </group>
+ <group>
<name>tinyusb</name>
<group>
<name>class</name>
diff --git a/demos/host/host_freertos/host_freertos.uvopt b/demos/host/host_freertos/host_freertos.uvopt index 98a8b877b..8fcf23373 100644 --- a/demos/host/host_freertos/host_freertos.uvopt +++ b/demos/host/host_freertos/host_freertos.uvopt @@ -73,7 +73,7 @@ <OPTFL> <tvExp>1</tvExp> <tvExpOptDlg>0</tvExpOptDlg> - <IsCurrentTarget>0</IsCurrentTarget> + <IsCurrentTarget>1</IsCurrentTarget> </OPTFL> <CpuCode>8</CpuCode> <DllOpt> @@ -555,7 +555,7 @@ <OPTFL> <tvExp>1</tvExp> <tvExpOptDlg>0</tvExpOptDlg> - <IsCurrentTarget>1</IsCurrentTarget> + <IsCurrentTarget>0</IsCurrentTarget> </OPTFL> <CpuCode>8</CpuCode> <Books> @@ -706,8 +706,8 @@ <Focus>0</Focus> <ColumnNumber>0</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>121</TopLine> - <CurrentLine>122</CurrentLine> + <TopLine>1</TopLine> + <CurrentLine>1</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\src\main.c</PathWithFileName> <FilenameWithoutPath>main.c</FilenameWithoutPath> @@ -752,10 +752,10 @@ <FileType>1</FileType> <tvExp>0</tvExp> <Focus>0</Focus> - <ColumnNumber>7</ColumnNumber> + <ColumnNumber>0</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>73</TopLine> - <CurrentLine>74</CurrentLine> + <TopLine>1</TopLine> + <CurrentLine>1</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\src\mouse_app.c</PathWithFileName> <FilenameWithoutPath>mouse_app.c</FilenameWithoutPath> @@ -1168,10 +1168,10 @@ <FileType>1</FileType> <tvExp>0</tvExp> <Focus>0</Focus> - <ColumnNumber>34</ColumnNumber> + <ColumnNumber>10</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>79</TopLine> - <CurrentLine>88</CurrentLine> + <TopLine>80</TopLine> + <CurrentLine>85</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\..\..\vendor\freertos\freertoslpc\FreeRTOSCommonHooks.c</PathWithFileName> <FilenameWithoutPath>FreeRTOSCommonHooks.c</FilenameWithoutPath> @@ -1234,7 +1234,7 @@ <Focus>0</Focus> <ColumnNumber>0</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>2113</TopLine> + <TopLine>2114</TopLine> <CurrentLine>2115</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\..\..\vendor\freertos\freertos\Source\tasks.c</PathWithFileName> @@ -1352,9 +1352,9 @@ <FileType>1</FileType> <tvExp>0</tvExp> <Focus>0</Focus> - <ColumnNumber>22</ColumnNumber> + <ColumnNumber>23</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>1718</TopLine> + <TopLine>1719</TopLine> <CurrentLine>1723</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\..\..\vendor\fatfs\ff.c</PathWithFileName> @@ -1546,7 +1546,7 @@ <Focus>0</Focus> <ColumnNumber>30</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>144</TopLine> + <TopLine>145</TopLine> <CurrentLine>150</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\..\bsp\lpc43xx\startup_keil\startup_LPC43xx.s</PathWithFileName> @@ -1654,7 +1654,7 @@ <Group> <GroupName>bsp lpc175x_6x</GroupName> - <tvExp>1</tvExp> + <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> <cbSel>0</cbSel> <RteFlg>0</RteFlg> @@ -1762,7 +1762,7 @@ <Focus>0</Focus> <ColumnNumber>0</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>123</TopLine> + <TopLine>124</TopLine> <CurrentLine>129</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\..\bsp\lpc175x_6x\startup_keil\startup_LPC17xx.s</PathWithFileName> diff --git a/demos/host/host_freertos/host_freertos.uvproj b/demos/host/host_freertos/host_freertos.uvproj index 1d9fb2cc7..3bd11fe13 100644 --- a/demos/host/host_freertos/host_freertos.uvproj +++ b/demos/host/host_freertos/host_freertos.uvproj @@ -350,7 +350,7 @@ <MiscControls>--gnu --c99 --diag_suppress=66</MiscControls> <Define>CORE_M4 TUSB_CFG_MCU=MCU_LPC43XX BOARD=BOARD_EA4357 TUSB_CFG_OS=TUSB_OS_FREERTOS TUSB_CFG_OS_TASK_PRIO=configMAX_PRIORITIES-5</Define> <Undefine></Undefine> - <IncludePath>..\src;..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\inc;..\..\bsp;..\..\..\tinyusb;..\..\..\vendor\freertos;..\..\..\vendor\freertos\freertos\Source\include;..\host_freertos;..\..\..\vendor\fatfs</IncludePath> + <IncludePath>..\src;..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\inc;..\..\bsp;..\..\..\tinyusb;..\..\..\vendor\freertos;..\..\..\vendor\freertos\freertos\Source\include;..\..\..\vendor\fatfs</IncludePath> </VariousControls> </Cads> <Aads> @@ -2020,7 +2020,7 @@ <MiscControls>--gnu --c99 --diag_suppress=66</MiscControls> <Define>TUSB_CFG_MCU=MCU_LPC175X_6X BOARD=BOARD_LPCXPRESSO1769 TUSB_CFG_OS=TUSB_OS_FREERTOS TUSB_CFG_OS_TASK_PRIO=configMAX_PRIORITIES-5</Define> <Undefine></Undefine> - <IncludePath>..\src;..\..\bsp\lpc175x_6x\CMSISv2p00_LPC17xx\inc;..\..\bsp\lpc175x_6x\LPC17xx_DriverLib\include;..\..\bsp;..\..\..\tinyusb;..\..\..\vendor\freertos;..\..\..\vendor\freertos\freertos\Source\include;..\host_freertos;..\..\..\vendor\fatfs</IncludePath> + <IncludePath>..\src;..\..\bsp\lpc175x_6x\CMSISv2p00_LPC17xx\inc;..\..\bsp\lpc175x_6x\LPC17xx_DriverLib\include;..\..\bsp;..\..\..\tinyusb;..\..\..\vendor\freertos;..\..\..\vendor\freertos\freertos\Source\include;..\..\..\vendor\fatfs</IncludePath> </VariousControls> </Cads> <Aads> @@ -2855,7 +2855,7 @@ <MiscControls>--gnu --c99 --diag_suppress=66</MiscControls> <Define>CORE_M4 TUSB_CFG_MCU=MCU_LPC43XX BOARD=BOARD_NGX4330 TUSB_CFG_OS=TUSB_OS_FREERTOS TUSB_CFG_OS_TASK_PRIO=configMAX_PRIORITIES-5</Define> <Undefine></Undefine> - <IncludePath>..\src;..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\inc;..\..\bsp;..\..\..\tinyusb;..\..\..\vendor\freertos;..\..\..\vendor\freertos\freertos\Source\include;..\host_freertos;..\..\..\vendor\fatfs</IncludePath> + <IncludePath>..\src;..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\inc;..\..\bsp;..\..\..\tinyusb;..\..\..\vendor\freertos;..\..\..\vendor\freertos\freertos\Source\include;..\..\..\vendor\fatfs</IncludePath> </VariousControls> </Cads> <Aads> diff --git a/demos/host/host_os_none/.cproject b/demos/host/host_os_none/.cproject index e1977f87d..2f11b5528 100644 --- a/demos/host/host_os_none/.cproject +++ b/demos/host/host_os_none/.cproject @@ -52,14 +52,14 @@ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src}""/>
</option>
<option id="com.crt.advproject.c.misc.dialect.861665028" name="C Dialect" superClass="com.crt.advproject.c.misc.dialect" value="com.crt.advproject.misc.dialect.gnu99" valueType="enumerated"/>
- <option id="com.crt.advproject.gcc.fpu.858901448" superClass="com.crt.advproject.gcc.fpu" value="com.crt.advproject.gcc.fpu.fpv4" valueType="enumerated"/>
+ <option id="com.crt.advproject.gcc.fpu.858901448" name="Floating point" superClass="com.crt.advproject.gcc.fpu" value="com.crt.advproject.gcc.fpu.fpv4" valueType="enumerated"/>
<inputType id="com.crt.advproject.compiler.input.217124913" superClass="com.crt.advproject.compiler.input"/>
</tool>
<tool command="arm-none-eabi-gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.gas.exe.debug.1376287865" name="MCU Assembler" superClass="com.crt.advproject.gas.exe.debug">
<option id="com.crt.advproject.gas.arch.1664735680" name="Architecture" superClass="com.crt.advproject.gas.arch" value="com.crt.advproject.gas.target.cm4" valueType="enumerated"/>
<option id="com.crt.advproject.gas.thumb.572061543" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" value="true" valueType="boolean"/>
<option id="gnu.both.asm.option.flags.crt.884423800" name="Assembler flags" superClass="gnu.both.asm.option.flags.crt" value="-c -x assembler-with-cpp -D__REDLIB__ -DDEBUG -D__CODE_RED" valueType="string"/>
- <option id="com.crt.advproject.gas.fpu.1152943186" superClass="com.crt.advproject.gas.fpu" value="com.crt.advproject.gas.fpu.fpv4" valueType="enumerated"/>
+ <option id="com.crt.advproject.gas.fpu.1152943186" name="Floating point" superClass="com.crt.advproject.gas.fpu" value="com.crt.advproject.gas.fpu.fpv4" valueType="enumerated"/>
<inputType id="com.crt.advproject.assembler.input.1812008425" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1488844340" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
@@ -77,7 +77,7 @@ <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.semihost" valueType="enumerated"/>
- <option id="com.crt.advproject.link.fpu.1467962306" superClass="com.crt.advproject.link.fpu" value="com.crt.advproject.link.fpu.fpv4" valueType="enumerated"/>
+ <option id="com.crt.advproject.link.fpu.1467962306" name="Floating point" superClass="com.crt.advproject.link.fpu" value="com.crt.advproject.link.fpu.fpv4" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1768732506" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
@@ -142,7 +142,6 @@ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lwip/lwip/src/include/ipv4}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lwip/lpclwip}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lwip/lwip/src/include}""/>
- <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/tinyusb}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src}""/>
diff --git a/demos/host/host_os_none/host_os_none.uvopt b/demos/host/host_os_none/host_os_none.uvopt index dec0da17d..80b630695 100644 --- a/demos/host/host_os_none/host_os_none.uvopt +++ b/demos/host/host_os_none/host_os_none.uvopt @@ -972,10 +972,10 @@ <FileType>1</FileType> <tvExp>0</tvExp> <Focus>0</Focus> - <ColumnNumber>54</ColumnNumber> + <ColumnNumber>36</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>125</TopLine> - <CurrentLine>137</CurrentLine> + <TopLine>126</TopLine> + <CurrentLine>138</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\src\mouse_app.c</PathWithFileName> <FilenameWithoutPath>mouse_app.c</FilenameWithoutPath> @@ -1004,10 +1004,10 @@ <FileType>1</FileType> <tvExp>0</tvExp> <Focus>0</Focus> - <ColumnNumber>38</ColumnNumber> + <ColumnNumber>12</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>138</TopLine> - <CurrentLine>150</CurrentLine> + <TopLine>140</TopLine> + <CurrentLine>152</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\src\msc_app.c</PathWithFileName> <FilenameWithoutPath>msc_app.c</FilenameWithoutPath> @@ -1034,7 +1034,7 @@ <Group> <GroupName>tinyusb</GroupName> - <tvExp>0</tvExp> + <tvExp>1</tvExp> <tvExpOptDlg>0</tvExpOptDlg> <cbSel>0</cbSel> <RteFlg>0</RteFlg> @@ -1484,9 +1484,9 @@ <FileType>1</FileType> <tvExp>0</tvExp> <Focus>0</Focus> - <ColumnNumber>8</ColumnNumber> + <ColumnNumber>12</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>3186</TopLine> + <TopLine>3187</TopLine> <CurrentLine>3196</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\..\..\vendor\fatfs\ff.c</PathWithFileName> @@ -1558,7 +1558,7 @@ <Focus>0</Focus> <ColumnNumber>17</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>80</TopLine> + <TopLine>81</TopLine> <CurrentLine>90</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\..\bsp\boards\printf_retarget.c</PathWithFileName> @@ -1692,10 +1692,10 @@ <FileType>2</FileType> <tvExp>0</tvExp> <Focus>0</Focus> - <ColumnNumber>30</ColumnNumber> + <ColumnNumber>18</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>147</TopLine> - <CurrentLine>153</CurrentLine> + <TopLine>148</TopLine> + <CurrentLine>163</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>..\..\bsp\lpc43xx\startup_keil\startup_LPC43xx.s</PathWithFileName> <FilenameWithoutPath>startup_LPC43xx.s</FilenameWithoutPath> diff --git a/demos/host/host_freertos/app_os_prio.h b/demos/host/src/app_os_prio.h index 1704d8312..99be2de0c 100644 --- a/demos/host/host_freertos/app_os_prio.h +++ b/demos/host/src/app_os_prio.h @@ -36,12 +36,6 @@ */ /**************************************************************************/ -/** \file - * \brief TBD - * - * \note TBD - */ - /** \ingroup TBD * \defgroup TBD * \brief TBD @@ -57,12 +51,27 @@ extern "C" { #endif -#define KEYBOARD_APP_TASK_PRIO (TUSB_CFG_OS_TASK_PRIO-2) -#define MOUSE_APP_TASK_PRIO KEYBOARD_APP_TASK_PRIO -#define CDC_SERIAL_APP_TASK_PRIO KEYBOARD_APP_TASK_PRIO -#define MSC_APP_TASK_PRIO KEYBOARD_APP_TASK_PRIO +#include "tusb.h" + +#if TUSB_CFG_OS == TUSB_OS_NONE + #define LOWER_PRIO(x) 0 // does not matter +#elif TUSB_CFG_OS == TUSB_OS_FREERTOS + #define LOWER_PRIO(x) ((x)-1) // freeRTOS lower number --> lower priority +#elif TUSB_CFG_OS == TUSB_OS_CMSIS_RTX + #define LOWER_PRIO(x) ((x)-1) // CMSIS-RTOS lower number --> lower priority +#else + #error Priority is not configured for this RTOS +#endif + +enum { + STANDARD_APP_TASK_PRIO = LOWER_PRIO(TUSB_CFG_OS_TASK_PRIO), // Application Task is lower than usb system task + LED_BLINKING_APP_TASK_PRIO = LOWER_PRIO(STANDARD_APP_TASK_PRIO), // Blinking task is lower than normal task -#define LED_BLINKING_APP_TASK_PRIO (tskIDLE_PRIORITY+1) + KEYBOARD_APP_TASK_PRIO = STANDARD_APP_TASK_PRIO, + MOUSE_APP_TASK_PRIO = STANDARD_APP_TASK_PRIO, + CDC_SERIAL_APP_TASK_PRIO = STANDARD_APP_TASK_PRIO, + MSC_APP_TASK_PRIO = STANDARD_APP_TASK_PRIO +}; #ifdef __cplusplus } diff --git a/demos/host/src/cdc_serial_app.c b/demos/host/src/cdc_serial_app.c index 6afcd0eed..db97bd87c 100644 --- a/demos/host/src/cdc_serial_app.c +++ b/demos/host/src/cdc_serial_app.c @@ -37,10 +37,7 @@ /**************************************************************************/
#include "cdc_serial_app.h"
-
-#if TUSB_CFG_OS != TUSB_OS_NONE
#include "app_os_prio.h"
-#endif
#if TUSB_CFG_HOST_CDC
diff --git a/demos/host/src/keyboard_app.c b/demos/host/src/keyboard_app.c index 68437195b..907ae8c2e 100644 --- a/demos/host/src/keyboard_app.c +++ b/demos/host/src/keyboard_app.c @@ -40,10 +40,7 @@ // INCLUDE
//--------------------------------------------------------------------+
#include "keyboard_app.h"
-
-#if TUSB_CFG_OS != TUSB_OS_NONE
#include "app_os_prio.h"
-#endif
#if TUSB_CFG_HOST_HID_KEYBOARD
diff --git a/demos/host/src/main.c b/demos/host/src/main.c index ef44f6b5e..5f7001202 100644 --- a/demos/host/src/main.c +++ b/demos/host/src/main.c @@ -46,10 +46,7 @@ #include "boards/board.h"
#include "tusb.h"
-#if TUSB_CFG_OS != TUSB_OS_NONE
#include "app_os_prio.h"
-#endif
-
#include "mouse_app.h"
#include "keyboard_app.h"
#include "msc_app.h"
diff --git a/demos/host/src/mouse_app.c b/demos/host/src/mouse_app.c index 59798691b..60b91f4d2 100644 --- a/demos/host/src/mouse_app.c +++ b/demos/host/src/mouse_app.c @@ -40,11 +40,7 @@ // INCLUDE
//--------------------------------------------------------------------+
#include "mouse_app.h"
-
-#if TUSB_CFG_OS != TUSB_OS_NONE
#include "app_os_prio.h"
-#endif
-
#if TUSB_CFG_HOST_HID_MOUSE
diff --git a/demos/host/src/msc_app.c b/demos/host/src/msc_app.c index 520bfa5b1..b7e909cee 100644 --- a/demos/host/src/msc_app.c +++ b/demos/host/src/msc_app.c @@ -40,10 +40,7 @@ // INCLUDE
//--------------------------------------------------------------------+
#include "msc_app.h"
-
-#if TUSB_CFG_OS != TUSB_OS_NONE
#include "app_os_prio.h"
-#endif
#if TUSB_CFG_HOST_MSC
diff --git a/demos/host/src/rndis_app.c b/demos/host/src/rndis_app.c index f77df8b9a..8371d6985 100644 --- a/demos/host/src/rndis_app.c +++ b/demos/host/src/rndis_app.c @@ -37,10 +37,7 @@ /**************************************************************************/
#include "rndis_app.h"
-
-#if TUSB_CFG_OS != TUSB_OS_NONE
#include "app_os_prio.h"
-#endif
#if TUSB_CFG_HOST_CDC && TUSB_CFG_HOST_CDC_RNDIS
diff --git a/tinyusb/tusb_option.h b/tinyusb/tusb_option.h index d27f21cbe..4bd720b2b 100644 --- a/tinyusb/tusb_option.h +++ b/tinyusb/tusb_option.h @@ -62,12 +62,12 @@ #include "mcu_capacity.h"
-#ifdef TUSB_CFG_CONFIG_FILE
- #include TUSB_CFG_CONFIG_FILE
-#else
- #include "tusb_config.h"
+#ifndef TUSB_CFG_CONFIG_FILE
+ #define TUSB_CFG_CONFIG_FILE "tusb_config.h"
#endif
+#include TUSB_CFG_CONFIG_FILE
+
//--------------------------------------------------------------------+
// CONTROLLER
//--------------------------------------------------------------------+
diff --git a/vendor/freertos/freertos/Source/include/portable.h b/vendor/freertos/freertos/Source/include/portable.h index 912bc0b82..0a4742808 100644 --- a/vendor/freertos/freertos/Source/include/portable.h +++ b/vendor/freertos/freertos/Source/include/portable.h @@ -1,430 +1,436 @@ -/* - FreeRTOS V7.3.0 - Copyright (C) 2012 Real Time Engineers Ltd. - - FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT - http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. - - *************************************************************************** - * * - * FreeRTOS tutorial books are available in pdf and paperback. * - * Complete, revised, and edited pdf reference manuals are also * - * available. * - * * - * Purchasing FreeRTOS documentation will not only help you, by * - * ensuring you get running as quickly as possible and with an * - * in-depth knowledge of how to use FreeRTOS, it will also help * - * the FreeRTOS project to continue with its mission of providing * - * professional grade, cross platform, de facto standard solutions * - * for microcontrollers - completely free of charge! * - * * - * >>> See http://www.FreeRTOS.org/Documentation for details. <<< * - * * - * Thank you for using FreeRTOS, and thank you for your support! * - * * - *************************************************************************** - - - This file is part of the FreeRTOS distribution. - - FreeRTOS is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation AND MODIFIED BY the FreeRTOS exception. - >>>NOTE<<< The modification to the GPL is included to allow you to - distribute a combined work that includes FreeRTOS without being obliged to - provide the source code for proprietary components outside of the FreeRTOS - kernel. FreeRTOS is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. You should have received a copy of the GNU General Public - License and the FreeRTOS license exception along with FreeRTOS; if not it - can be viewed here: http://www.freertos.org/a00114.html and also obtained - by writing to Richard Barry, contact details for whom are available on the - FreeRTOS WEB site. - - 1 tab == 4 spaces! - - *************************************************************************** - * * - * Having a problem? Start by reading the FAQ "My application does * - * not run, what could be wrong?" * - * * - * http://www.FreeRTOS.org/FAQHelp.html * - * * - *************************************************************************** - - - http://www.FreeRTOS.org - Documentation, training, latest versions, license - and contact details. - - http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, - including FreeRTOS+Trace - an indispensable productivity tool. - - Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell - the code with commercial support, indemnification, and middleware, under - the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also - provide a safety engineered and independently SIL3 certified version under - the SafeRTOS brand: http://www.SafeRTOS.com. -*/ - -/*----------------------------------------------------------- - * Portable layer API. Each function must be defined for each port. - *----------------------------------------------------------*/ - -#ifndef PORTABLE_H -#define PORTABLE_H - -/* Include the macro file relevant to the port being used. */ - -#ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT - #include "..\..\Source\portable\owatcom\16bitdos\pc\portmacro.h" - typedef void ( __interrupt __far *pxISR )(); -#endif - -#ifdef OPEN_WATCOM_FLASH_LITE_186_PORT - #include "..\..\Source\portable\owatcom\16bitdos\flsh186\portmacro.h" - typedef void ( __interrupt __far *pxISR )(); -#endif - -#ifdef GCC_MEGA_AVR - #include "../portable/GCC/ATMega323/portmacro.h" -#endif - -#ifdef IAR_MEGA_AVR - #include "../portable/IAR/ATMega323/portmacro.h" -#endif - -#ifdef MPLAB_PIC24_PORT - #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h" -#endif - -#ifdef MPLAB_DSPIC_PORT - #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h" -#endif - -#ifdef MPLAB_PIC18F_PORT - #include "..\..\Source\portable\MPLAB\PIC18F\portmacro.h" -#endif - -#ifdef MPLAB_PIC32MX_PORT - #include "..\..\Source\portable\MPLAB\PIC32MX\portmacro.h" -#endif - -#ifdef _FEDPICC - #include "libFreeRTOS/Include/portmacro.h" -#endif - -#ifdef SDCC_CYGNAL - #include "../../Source/portable/SDCC/Cygnal/portmacro.h" -#endif - -#ifdef GCC_ARM7 - #include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h" -#endif - -#ifdef GCC_ARM7_ECLIPSE - #include "portmacro.h" -#endif - -#ifdef ROWLEY_LPC23xx - #include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h" -#endif - -#ifdef IAR_MSP430 - #include "..\..\Source\portable\IAR\MSP430\portmacro.h" -#endif - -#ifdef GCC_MSP430 - #include "../../Source/portable/GCC/MSP430F449/portmacro.h" -#endif - -#ifdef ROWLEY_MSP430 - #include "../../Source/portable/Rowley/MSP430F449/portmacro.h" -#endif - -#ifdef ARM7_LPC21xx_KEIL_RVDS - #include "..\..\Source\portable\RVDS\ARM7_LPC21xx\portmacro.h" -#endif - -#ifdef SAM7_GCC - #include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h" -#endif - -#ifdef SAM7_IAR - #include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h" -#endif - -#ifdef SAM9XE_IAR - #include "..\..\Source\portable\IAR\AtmelSAM9XE\portmacro.h" -#endif - -#ifdef LPC2000_IAR - #include "..\..\Source\portable\IAR\LPC2000\portmacro.h" -#endif - -#ifdef STR71X_IAR - #include "..\..\Source\portable\IAR\STR71x\portmacro.h" -#endif - -#ifdef STR75X_IAR - #include "..\..\Source\portable\IAR\STR75x\portmacro.h" -#endif - -#ifdef STR75X_GCC - #include "..\..\Source\portable\GCC\STR75x\portmacro.h" -#endif - -#ifdef STR91X_IAR - #include "..\..\Source\portable\IAR\STR91x\portmacro.h" -#endif - -#ifdef GCC_H8S - #include "../../Source/portable/GCC/H8S2329/portmacro.h" -#endif - -#ifdef GCC_AT91FR40008 - #include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h" -#endif - -#ifdef RVDS_ARMCM3_LM3S102 - #include "../../Source/portable/RVDS/ARM_CM3/portmacro.h" -#endif - -#ifdef GCC_ARMCM3_LM3S102 - #include "../../Source/portable/GCC/ARM_CM3/portmacro.h" -#endif - -#ifdef GCC_ARMCM3 - #include "../../Source/portable/GCC/ARM_CM3/portmacro.h" -#endif - -#ifdef IAR_ARM_CM3 - #include "../../Source/portable/IAR/ARM_CM3/portmacro.h" -#endif - -#ifdef IAR_ARMCM3_LM - #include "../../Source/portable/IAR/ARM_CM3/portmacro.h" -#endif - -#ifdef HCS12_CODE_WARRIOR - #include "../../Source/portable/CodeWarrior/HCS12/portmacro.h" -#endif - -#ifdef MICROBLAZE_GCC - #include "../../Source/portable/GCC/MicroBlaze/portmacro.h" -#endif - -#ifdef TERN_EE - #include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h" -#endif - -#ifdef GCC_HCS12 - #include "../../Source/portable/GCC/HCS12/portmacro.h" -#endif - -#ifdef GCC_MCF5235 - #include "../../Source/portable/GCC/MCF5235/portmacro.h" -#endif - -#ifdef COLDFIRE_V2_GCC - #include "../../../Source/portable/GCC/ColdFire_V2/portmacro.h" -#endif - -#ifdef COLDFIRE_V2_CODEWARRIOR - #include "../../Source/portable/CodeWarrior/ColdFire_V2/portmacro.h" -#endif - -#ifdef GCC_PPC405 - #include "../../Source/portable/GCC/PPC405_Xilinx/portmacro.h" -#endif - -#ifdef GCC_PPC440 - #include "../../Source/portable/GCC/PPC440_Xilinx/portmacro.h" -#endif - -#ifdef _16FX_SOFTUNE - #include "..\..\Source\portable\Softune\MB96340\portmacro.h" -#endif - -#ifdef BCC_INDUSTRIAL_PC_PORT - /* A short file name has to be used in place of the normal - FreeRTOSConfig.h when using the Borland compiler. */ - #include "frconfig.h" - #include "..\portable\BCC\16BitDOS\PC\prtmacro.h" - typedef void ( __interrupt __far *pxISR )(); -#endif - -#ifdef BCC_FLASH_LITE_186_PORT - /* A short file name has to be used in place of the normal - FreeRTOSConfig.h when using the Borland compiler. */ - #include "frconfig.h" - #include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h" - typedef void ( __interrupt __far *pxISR )(); -#endif - -#ifdef __GNUC__ - #ifdef __AVR32_AVR32A__ - #include "portmacro.h" - #endif -#endif - -#ifdef __ICCAVR32__ - #ifdef __CORE__ - #if __CORE__ == __AVR32A__ - #include "portmacro.h" - #endif - #endif -#endif - -#ifdef __91467D - #include "portmacro.h" -#endif - -#ifdef __96340 - #include "portmacro.h" -#endif - - -#ifdef __IAR_V850ES_Fx3__ - #include "../../Source/portable/IAR/V850ES/portmacro.h" -#endif - -#ifdef __IAR_V850ES_Jx3__ - #include "../../Source/portable/IAR/V850ES/portmacro.h" -#endif - -#ifdef __IAR_V850ES_Jx3_L__ - #include "../../Source/portable/IAR/V850ES/portmacro.h" -#endif - -#ifdef __IAR_V850ES_Jx2__ - #include "../../Source/portable/IAR/V850ES/portmacro.h" -#endif - -#ifdef __IAR_V850ES_Hx2__ - #include "../../Source/portable/IAR/V850ES/portmacro.h" -#endif - -#ifdef __IAR_78K0R_Kx3__ - #include "../../Source/portable/IAR/78K0R/portmacro.h" -#endif - -#ifdef __IAR_78K0R_Kx3L__ - #include "../../Source/portable/IAR/78K0R/portmacro.h" -#endif - -//--------------------------------------------------------------------+ -// TinyUSB modification -//--------------------------------------------------------------------+ -#if defined __CC_ARM - #if __CORTEX_M == 4 // TODO M0 M4 - #define PORTMACRO_PATH "../portable/RVDS/ARM_CM4F/portmacro.h" - #elif __CORTEX_M == 3 - #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 -#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 -portmacro.h has not yet been included - as every portmacro.h provides a -portENTER_CRITICAL() definition. Check the demo application for your demo -to find the path to the correct portmacro.h file. */ -#ifndef portENTER_CRITICAL - #include "portmacro.h" -#endif - -#if portBYTE_ALIGNMENT == 8 - #define portBYTE_ALIGNMENT_MASK ( 0x0007 ) -#endif - -#if portBYTE_ALIGNMENT == 4 - #define portBYTE_ALIGNMENT_MASK ( 0x0003 ) -#endif - -#if portBYTE_ALIGNMENT == 2 - #define portBYTE_ALIGNMENT_MASK ( 0x0001 ) -#endif - -#if portBYTE_ALIGNMENT == 1 - #define portBYTE_ALIGNMENT_MASK ( 0x0000 ) -#endif - -#ifndef portBYTE_ALIGNMENT_MASK - #error "Invalid portBYTE_ALIGNMENT definition" -#endif - -#ifndef portNUM_CONFIGURABLE_REGIONS - #define portNUM_CONFIGURABLE_REGIONS 1 -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#include "mpu_wrappers.h" - -/* - * Setup the stack of a new task so it is ready to be placed under the - * scheduler control. The registers have to be placed on the stack in - * the order that the port expects to find them. - * - */ -#if( portUSING_MPU_WRAPPERS == 1 ) - portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters, portBASE_TYPE xRunPrivileged ) PRIVILEGED_FUNCTION; -#else - portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ); -#endif - -/* - * Map to the memory management routines required for the port. - */ -void *pvPortMalloc( size_t xSize ) PRIVILEGED_FUNCTION; -void vPortFree( void *pv ) PRIVILEGED_FUNCTION; -void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION; -size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION; - -/* - * Setup the hardware ready for the scheduler to take control. This generally - * sets up a tick interrupt and sets timers for the correct tick frequency. - */ -portBASE_TYPE xPortStartScheduler( void ) PRIVILEGED_FUNCTION; - -/* - * Undo any hardware/ISR setup that was performed by xPortStartScheduler() so - * the hardware is left in its original condition after the scheduler stops - * executing. - */ -void vPortEndScheduler( void ) PRIVILEGED_FUNCTION; - -/* - * The structures and methods of manipulating the MPU are contained within the - * port layer. - * - * Fills the xMPUSettings structure with the memory region information - * contained in xRegions. - */ -#if( portUSING_MPU_WRAPPERS == 1 ) - struct xMEMORY_REGION; - void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, portSTACK_TYPE *pxBottomOfStack, unsigned short usStackDepth ) PRIVILEGED_FUNCTION; -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* PORTABLE_H */ - +/*
+ FreeRTOS V7.3.0 - Copyright (C) 2012 Real Time Engineers Ltd.
+
+ FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT
+ http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
+
+ ***************************************************************************
+ * *
+ * FreeRTOS tutorial books are available in pdf and paperback. *
+ * Complete, revised, and edited pdf reference manuals are also *
+ * available. *
+ * *
+ * Purchasing FreeRTOS documentation will not only help you, by *
+ * ensuring you get running as quickly as possible and with an *
+ * in-depth knowledge of how to use FreeRTOS, it will also help *
+ * the FreeRTOS project to continue with its mission of providing *
+ * professional grade, cross platform, de facto standard solutions *
+ * for microcontrollers - completely free of charge! *
+ * *
+ * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
+ * *
+ * Thank you for using FreeRTOS, and thank you for your support! *
+ * *
+ ***************************************************************************
+
+
+ This file is part of the FreeRTOS distribution.
+
+ FreeRTOS is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License (version 2) as published by the
+ Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
+ >>>NOTE<<< The modification to the GPL is included to allow you to
+ distribute a combined work that includes FreeRTOS without being obliged to
+ provide the source code for proprietary components outside of the FreeRTOS
+ kernel. FreeRTOS is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details. You should have received a copy of the GNU General Public
+ License and the FreeRTOS license exception along with FreeRTOS; if not it
+ can be viewed here: http://www.freertos.org/a00114.html and also obtained
+ by writing to Richard Barry, contact details for whom are available on the
+ FreeRTOS WEB site.
+
+ 1 tab == 4 spaces!
+
+ ***************************************************************************
+ * *
+ * Having a problem? Start by reading the FAQ "My application does *
+ * not run, what could be wrong?" *
+ * *
+ * http://www.FreeRTOS.org/FAQHelp.html *
+ * *
+ ***************************************************************************
+
+
+ http://www.FreeRTOS.org - Documentation, training, latest versions, license
+ and contact details.
+
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
+ including FreeRTOS+Trace - an indispensable productivity tool.
+
+ Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
+ the code with commercial support, indemnification, and middleware, under
+ the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
+ provide a safety engineered and independently SIL3 certified version under
+ the SafeRTOS brand: http://www.SafeRTOS.com.
+*/
+
+/*-----------------------------------------------------------
+ * Portable layer API. Each function must be defined for each port.
+ *----------------------------------------------------------*/
+
+#ifndef PORTABLE_H
+#define PORTABLE_H
+
+//--------------------------------------------------------------------+
+// TinyUSB modification
+//--------------------------------------------------------------------+
+#if defined __CC_ARM
+ #if __CORTEX_M == 4 // TODO M0 M4
+ #define PORTMACRO_PATH "../portable/RVDS/ARM_CM4F/portmacro.h"
+ #elif __CORTEX_M == 3
+ #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
+
+#elif defined __ICCARM__
+ #if __CORTEX_M == 4 // TODO M0 M4
+ #define PORTMACRO_PATH "../portable/IAR/ARM_CM4F/portmacro.h"
+ #elif __CORTEX_M == 3
+ #define PORTMACRO_PATH "../portable/IAR/ARM_CM3/portmacro.h"
+ #endif
+
+#endif
+
+#ifndef PORTMACRO_PATH
+ #error portmacro.h path is not defined for this toolchain and/or MCU
+#endif
+
+#include PORTMACRO_PATH
+
+/* Include the macro file relevant to the port being used. */
+#ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT
+ #include "..\..\Source\portable\owatcom\16bitdos\pc\portmacro.h"
+ typedef void ( __interrupt __far *pxISR )();
+#endif
+
+#ifdef OPEN_WATCOM_FLASH_LITE_186_PORT
+ #include "..\..\Source\portable\owatcom\16bitdos\flsh186\portmacro.h"
+ typedef void ( __interrupt __far *pxISR )();
+#endif
+
+#ifdef GCC_MEGA_AVR
+ #include "../portable/GCC/ATMega323/portmacro.h"
+#endif
+
+#ifdef IAR_MEGA_AVR
+ #include "../portable/IAR/ATMega323/portmacro.h"
+#endif
+
+#ifdef MPLAB_PIC24_PORT
+ #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"
+#endif
+
+#ifdef MPLAB_DSPIC_PORT
+ #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"
+#endif
+
+#ifdef MPLAB_PIC18F_PORT
+ #include "..\..\Source\portable\MPLAB\PIC18F\portmacro.h"
+#endif
+
+#ifdef MPLAB_PIC32MX_PORT
+ #include "..\..\Source\portable\MPLAB\PIC32MX\portmacro.h"
+#endif
+
+#ifdef _FEDPICC
+ #include "libFreeRTOS/Include/portmacro.h"
+#endif
+
+#ifdef SDCC_CYGNAL
+ #include "../../Source/portable/SDCC/Cygnal/portmacro.h"
+#endif
+
+#ifdef GCC_ARM7
+ #include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h"
+#endif
+
+#ifdef GCC_ARM7_ECLIPSE
+ #include "portmacro.h"
+#endif
+
+#ifdef ROWLEY_LPC23xx
+ #include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h"
+#endif
+
+#ifdef IAR_MSP430
+ #include "..\..\Source\portable\IAR\MSP430\portmacro.h"
+#endif
+
+#ifdef GCC_MSP430
+ #include "../../Source/portable/GCC/MSP430F449/portmacro.h"
+#endif
+
+#ifdef ROWLEY_MSP430
+ #include "../../Source/portable/Rowley/MSP430F449/portmacro.h"
+#endif
+
+#ifdef ARM7_LPC21xx_KEIL_RVDS
+ #include "..\..\Source\portable\RVDS\ARM7_LPC21xx\portmacro.h"
+#endif
+
+#ifdef SAM7_GCC
+ #include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"
+#endif
+
+#ifdef SAM7_IAR
+ #include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h"
+#endif
+
+#ifdef SAM9XE_IAR
+ #include "..\..\Source\portable\IAR\AtmelSAM9XE\portmacro.h"
+#endif
+
+#ifdef LPC2000_IAR
+ #include "..\..\Source\portable\IAR\LPC2000\portmacro.h"
+#endif
+
+#ifdef STR71X_IAR
+ #include "..\..\Source\portable\IAR\STR71x\portmacro.h"
+#endif
+
+#ifdef STR75X_IAR
+ #include "..\..\Source\portable\IAR\STR75x\portmacro.h"
+#endif
+
+#ifdef STR75X_GCC
+ #include "..\..\Source\portable\GCC\STR75x\portmacro.h"
+#endif
+
+#ifdef STR91X_IAR
+ #include "..\..\Source\portable\IAR\STR91x\portmacro.h"
+#endif
+
+#ifdef GCC_H8S
+ #include "../../Source/portable/GCC/H8S2329/portmacro.h"
+#endif
+
+#ifdef GCC_AT91FR40008
+ #include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h"
+#endif
+
+#ifdef RVDS_ARMCM3_LM3S102
+ #include "../../Source/portable/RVDS/ARM_CM3/portmacro.h"
+#endif
+
+#ifdef GCC_ARMCM3_LM3S102
+ #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"
+#endif
+
+#ifdef GCC_ARMCM3
+ #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"
+#endif
+
+#ifdef IAR_ARM_CM3
+ #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"
+#endif
+
+#ifdef IAR_ARMCM3_LM
+ #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"
+#endif
+
+#ifdef HCS12_CODE_WARRIOR
+ #include "../../Source/portable/CodeWarrior/HCS12/portmacro.h"
+#endif
+
+#ifdef MICROBLAZE_GCC
+ #include "../../Source/portable/GCC/MicroBlaze/portmacro.h"
+#endif
+
+#ifdef TERN_EE
+ #include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h"
+#endif
+
+#ifdef GCC_HCS12
+ #include "../../Source/portable/GCC/HCS12/portmacro.h"
+#endif
+
+#ifdef GCC_MCF5235
+ #include "../../Source/portable/GCC/MCF5235/portmacro.h"
+#endif
+
+#ifdef COLDFIRE_V2_GCC
+ #include "../../../Source/portable/GCC/ColdFire_V2/portmacro.h"
+#endif
+
+#ifdef COLDFIRE_V2_CODEWARRIOR
+ #include "../../Source/portable/CodeWarrior/ColdFire_V2/portmacro.h"
+#endif
+
+#ifdef GCC_PPC405
+ #include "../../Source/portable/GCC/PPC405_Xilinx/portmacro.h"
+#endif
+
+#ifdef GCC_PPC440
+ #include "../../Source/portable/GCC/PPC440_Xilinx/portmacro.h"
+#endif
+
+#ifdef _16FX_SOFTUNE
+ #include "..\..\Source\portable\Softune\MB96340\portmacro.h"
+#endif
+
+#ifdef BCC_INDUSTRIAL_PC_PORT
+ /* A short file name has to be used in place of the normal
+ FreeRTOSConfig.h when using the Borland compiler. */
+ #include "frconfig.h"
+ #include "..\portable\BCC\16BitDOS\PC\prtmacro.h"
+ typedef void ( __interrupt __far *pxISR )();
+#endif
+
+#ifdef BCC_FLASH_LITE_186_PORT
+ /* A short file name has to be used in place of the normal
+ FreeRTOSConfig.h when using the Borland compiler. */
+ #include "frconfig.h"
+ #include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h"
+ typedef void ( __interrupt __far *pxISR )();
+#endif
+
+#ifdef __GNUC__
+ #ifdef __AVR32_AVR32A__
+ #include "portmacro.h"
+ #endif
+#endif
+
+#ifdef __ICCAVR32__
+ #ifdef __CORE__
+ #if __CORE__ == __AVR32A__
+ #include "portmacro.h"
+ #endif
+ #endif
+#endif
+
+#ifdef __91467D
+ #include "portmacro.h"
+#endif
+
+#ifdef __96340
+ #include "portmacro.h"
+#endif
+
+
+#ifdef __IAR_V850ES_Fx3__
+ #include "../../Source/portable/IAR/V850ES/portmacro.h"
+#endif
+
+#ifdef __IAR_V850ES_Jx3__
+ #include "../../Source/portable/IAR/V850ES/portmacro.h"
+#endif
+
+#ifdef __IAR_V850ES_Jx3_L__
+ #include "../../Source/portable/IAR/V850ES/portmacro.h"
+#endif
+
+#ifdef __IAR_V850ES_Jx2__
+ #include "../../Source/portable/IAR/V850ES/portmacro.h"
+#endif
+
+#ifdef __IAR_V850ES_Hx2__
+ #include "../../Source/portable/IAR/V850ES/portmacro.h"
+#endif
+
+#ifdef __IAR_78K0R_Kx3__
+ #include "../../Source/portable/IAR/78K0R/portmacro.h"
+#endif
+
+#ifdef __IAR_78K0R_Kx3L__
+ #include "../../Source/portable/IAR/78K0R/portmacro.h"
+#endif
+
+/* 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
+portmacro.h has not yet been included - as every portmacro.h provides a
+portENTER_CRITICAL() definition. Check the demo application for your demo
+to find the path to the correct portmacro.h file. */
+#ifndef portENTER_CRITICAL
+ #include "portmacro.h"
+#endif
+
+#if portBYTE_ALIGNMENT == 8
+ #define portBYTE_ALIGNMENT_MASK ( 0x0007 )
+#endif
+
+#if portBYTE_ALIGNMENT == 4
+ #define portBYTE_ALIGNMENT_MASK ( 0x0003 )
+#endif
+
+#if portBYTE_ALIGNMENT == 2
+ #define portBYTE_ALIGNMENT_MASK ( 0x0001 )
+#endif
+
+#if portBYTE_ALIGNMENT == 1
+ #define portBYTE_ALIGNMENT_MASK ( 0x0000 )
+#endif
+
+#ifndef portBYTE_ALIGNMENT_MASK
+ #error "Invalid portBYTE_ALIGNMENT definition"
+#endif
+
+#ifndef portNUM_CONFIGURABLE_REGIONS
+ #define portNUM_CONFIGURABLE_REGIONS 1
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "mpu_wrappers.h"
+
+/*
+ * Setup the stack of a new task so it is ready to be placed under the
+ * scheduler control. The registers have to be placed on the stack in
+ * the order that the port expects to find them.
+ *
+ */
+#if( portUSING_MPU_WRAPPERS == 1 )
+ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters, portBASE_TYPE xRunPrivileged ) PRIVILEGED_FUNCTION;
+#else
+ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters );
+#endif
+
+/*
+ * Map to the memory management routines required for the port.
+ */
+void *pvPortMalloc( size_t xSize ) PRIVILEGED_FUNCTION;
+void vPortFree( void *pv ) PRIVILEGED_FUNCTION;
+void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION;
+size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION;
+
+/*
+ * Setup the hardware ready for the scheduler to take control. This generally
+ * sets up a tick interrupt and sets timers for the correct tick frequency.
+ */
+portBASE_TYPE xPortStartScheduler( void ) PRIVILEGED_FUNCTION;
+
+/*
+ * Undo any hardware/ISR setup that was performed by xPortStartScheduler() so
+ * the hardware is left in its original condition after the scheduler stops
+ * executing.
+ */
+void vPortEndScheduler( void ) PRIVILEGED_FUNCTION;
+
+/*
+ * The structures and methods of manipulating the MPU are contained within the
+ * port layer.
+ *
+ * Fills the xMPUSettings structure with the memory region information
+ * contained in xRegions.
+ */
+#if( portUSING_MPU_WRAPPERS == 1 )
+ struct xMEMORY_REGION;
+ void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, portSTACK_TYPE *pxBottomOfStack, unsigned short usStackDepth ) PRIVILEGED_FUNCTION;
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PORTABLE_H */
+
|
