فهرست منبع

getting build with freertos & host demo

hathach 13 سال پیش
والد
کامیت
a9010c1786

+ 1 - 0
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="&quot;${workspace_loc:/CMSISv2p10_LPC43xx_DriverLib/inc}&quot;"/>
 									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/bsp}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/freertos}&quot;"/>
 									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/freertos/freertos/Source/include}&quot;"/>
 									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/tinyusb}&quot;"/>
 									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src}&quot;"/>

+ 1 - 1
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"

+ 6 - 3
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

+ 1 - 0
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" {

+ 1 - 4
demos/host/host_freertos/FreeRTOSConfig.h → 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.

+ 16 - 1
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