diff options
| author | hathach <[email protected]> | 2013-04-16 16:48:19 +0800 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-04-16 16:48:19 +0800 |
| commit | a9010c17862b56fd337716253f2059fb2fcb72b7 (patch) | |
| tree | 4a5b052737d79dce324c5422724309b6e29e3962 | |
| parent | cb4981dd2d0123c7442500a25e1897e537692e6b (diff) | |
getting build with freertos & host demo
| -rw-r--r-- | demos/host/host_freertos/.cproject | 1 | ||||
| -rw-r--r-- | tests/test/test_osal_freeRTOS.c | 2 | ||||
| -rw-r--r-- | tinyusb/osal/osal.h | 9 | ||||
| -rw-r--r-- | tinyusb/osal/osal_freeRTOS.h | 1 | ||||
| -rw-r--r-- | vendor/freertos/FreeRTOSConfig.h (renamed from demos/host/host_freertos/FreeRTOSConfig.h) | 5 | ||||
| -rw-r--r-- | vendor/freertos/freertos/Source/include/portable.h | 17 |
6 files changed, 26 insertions, 9 deletions
diff --git a/demos/host/host_freertos/.cproject b/demos/host/host_freertos/.cproject index b6a8776ec..93b4dcc74 100644 --- a/demos/host/host_freertos/.cproject +++ b/demos/host/host_freertos/.cproject @@ -138,6 +138,7 @@ <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:/CMSISv2p10_LPC43xx_DriverLib/inc}""/> <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}""/> <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/tinyusb}""/> <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src}""/> diff --git a/tests/test/test_osal_freeRTOS.c b/tests/test/test_osal_freeRTOS.c index aa6daa78b..fe7ad9d77 100644 --- a/tests/test/test_osal_freeRTOS.c +++ b/tests/test/test_osal_freeRTOS.c @@ -38,7 +38,7 @@ #include "unity.h" #include "errors.h" #include "freeRTOS.h" -//#include "osal_freeRTOS.h" +#include "osal_freeRTOS.h" //#include "mock_task.h" //#include "queue.h" //#include "mock_portmacro.h" diff --git a/tinyusb/osal/osal.h b/tinyusb/osal/osal.h index 3904e2c77..531911a7c 100644 --- a/tinyusb/osal/osal.h +++ b/tinyusb/osal/osal.h @@ -58,14 +58,17 @@ #include "tusb_option.h" #define TUSB_OS_NONE 1 -#define TUSB_OS_CMSIS 2 -#define TUSB_OS_FREERTOS 3 -#define TUSB_OS_UCOS 4 +#define TUSB_OS_FREERTOS 2 +#define TUSB_OS_CMSIS 3 +#define TUSB_OS_UCOS2 4 +#define TUSB_OS_UCOS3 5 #ifndef _TEST_ #if TUSB_CFG_OS == TUSB_OS_NONE #include "osal_none.h" +#elif TUSB_CFG_OS == TUSB_OS_FREERTOS + #include "osal_freeRTOS.h" #else #error TUSB_CFG_OS is not defined or OS is not supported yet #endif diff --git a/tinyusb/osal/osal_freeRTOS.h b/tinyusb/osal/osal_freeRTOS.h index 1a970f6b2..711660ff7 100644 --- a/tinyusb/osal/osal_freeRTOS.h +++ b/tinyusb/osal/osal_freeRTOS.h @@ -57,6 +57,7 @@ #include "FreeRTOS.h" #include "semphr.h" #include "queue.h" +//#include "task.h" #ifdef __cplusplus extern "C" { diff --git a/demos/host/host_freertos/FreeRTOSConfig.h b/vendor/freertos/FreeRTOSConfig.h index 47886ff60..6737e9242 100644 --- a/demos/host/host_freertos/FreeRTOSConfig.h +++ b/vendor/freertos/FreeRTOSConfig.h @@ -54,10 +54,7 @@ #ifndef FREERTOS_CONFIG_H #define FREERTOS_CONFIG_H -#ifndef __IASMARM__ -/* For SystemCoreClock */ -#include "board.h" -#endif +#include "hal/hal.h" /*----------------------------------------------------------- * Application specific definitions. diff --git a/vendor/freertos/freertos/Source/include/portable.h b/vendor/freertos/freertos/Source/include/portable.h index 4e6ea06a4..3d3af3081 100644 --- a/vendor/freertos/freertos/Source/include/portable.h +++ b/vendor/freertos/freertos/Source/include/portable.h @@ -311,7 +311,22 @@ #ifdef __IAR_78K0R_Kx3L__ #include "../../Source/portable/IAR/78K0R/portmacro.h" #endif - + +//--------------------------------------------------------------------+ +// TinyUSB modification +//--------------------------------------------------------------------+ +#include "tusb_option.h" + +#ifdef __GNUC__ + #if MCU==MCU_LPC43XX // TODO M0 M4 + #include "../portable/GCC/ARM_CM4F/portmacro.h" + #else + #error portmacro.h for mcu is not supported yet + #endif +#else + #error portmacro.h for mcu is not supported yet +#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 |
