Просмотр исходного кода

fix build error with lpcxpresso device os none

hathach 12 лет назад
Родитель
Сommit
368d09695f

+ 2 - 2
boards/lpcxpresso/board_lpcxpresso1347.h

@@ -51,8 +51,8 @@
 #endif
 #endif
 
 
 #include "LPC13Uxx.h"
 #include "LPC13Uxx.h"
-#include "lpc13uxx/LPC13Uxx_DriverLib/inc/gpio.h"
-#include "lpc13uxx/LPC13Uxx_DriverLib/inc/uart.h"
+#include "gpio.h"
+#include "uart.h"
 
 
 #define CFG_PRINTF_TARGET PRINTF_TARGET_UART
 #define CFG_PRINTF_TARGET PRINTF_TARGET_UART
 
 

+ 2 - 2
boards/microbuilder/board_rf1ghznode.h

@@ -51,8 +51,8 @@
 #endif
 #endif
 
 
 #include "LPC11Uxx.h"
 #include "LPC11Uxx.h"
-#include "lpc11uxx/LPC11Uxx_DriverLib/lpc11uxx_gpio.h"
-#include "lpc11uxx/LPC11Uxx_DriverLib/lpc11uxx_uart.h"
+#include "lpc11uxx_gpio.h"
+#include "lpc11uxx_uart.h"
 
 
 //#define CFG_PRINTF_TARGET             PRINTF_TARGET_SEMIHOST
 //#define CFG_PRINTF_TARGET             PRINTF_TARGET_SEMIHOST
 #define CFG_PRINTF_TARGET             PRINTF_TARGET_UART
 #define CFG_PRINTF_TARGET             PRINTF_TARGET_UART

Разница между файлами не показана из-за своего большого размера
+ 19 - 18
demos/device/device_os_none/.cproject


+ 9 - 4
demos/device/device_os_none/.project

@@ -81,9 +81,14 @@
 	</natures>
 	</natures>
 	<linkedResources>
 	<linkedResources>
 		<link>
 		<link>
-			<name>bsp</name>
+			<name>boards</name>
 			<type>2</type>
 			<type>2</type>
-			<locationURI>PARENT-2-PROJECT_LOC/bsp</locationURI>
+			<locationURI>PARENT-3-PROJECT_LOC/boards</locationURI>
+		</link>
+		<link>
+			<name>mcu</name>
+			<type>2</type>
+			<locationURI>PARENT-3-PROJECT_LOC/mcu</locationURI>
 		</link>
 		</link>
 		<link>
 		<link>
 			<name>src</name>
 			<name>src</name>
@@ -98,7 +103,7 @@
 	</linkedResources>
 	</linkedResources>
 	<filteredResources>
 	<filteredResources>
 		<filter>
 		<filter>
-			<id>1387876593819</id>
+			<id>1394632197708</id>
 			<name></name>
 			<name></name>
 			<type>26</type>
 			<type>26</type>
 			<matcher>
 			<matcher>
@@ -107,7 +112,7 @@
 			</matcher>
 			</matcher>
 		</filter>
 		</filter>
 		<filter>
 		<filter>
-			<id>1387876593840</id>
+			<id>1394632197724</id>
 			<name></name>
 			<name></name>
 			<type>26</type>
 			<type>26</type>
 			<matcher>
 			<matcher>

+ 1 - 1
demos/device/src/cdcd_app.h

@@ -46,7 +46,7 @@
 #ifndef _TUSB_CDCD_APP_H_
 #ifndef _TUSB_CDCD_APP_H_
 #define _TUSB_CDCD_APP_H_
 #define _TUSB_CDCD_APP_H_
 
 
-#include "boards/board.h"
+#include "board.h"
 #include "tusb.h"
 #include "tusb.h"
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus

+ 1 - 1
demos/device/src/keyboardd_app.h

@@ -46,7 +46,7 @@
 #ifndef _TUSB_KEYBOARDD_APP_H_
 #ifndef _TUSB_KEYBOARDD_APP_H_
 #define _TUSB_KEYBOARDD_APP_H_
 #define _TUSB_KEYBOARDD_APP_H_
 
 
-#include "boards/board.h"
+#include "board.h"
 #include "tusb.h"
 #include "tusb.h"
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus

+ 1 - 1
demos/device/src/main.c

@@ -43,7 +43,7 @@
 #include <stdio.h>
 #include <stdio.h>
 #include <string.h>
 #include <string.h>
 
 
-#include "boards/board.h"
+#include "board.h"
 #include "tusb.h"
 #include "tusb.h"
 
 
 #include "mscd_app.h"
 #include "mscd_app.h"

+ 1 - 1
demos/device/src/moused_app.h

@@ -46,7 +46,7 @@
 #ifndef _TUSB_MOUSED_APP_H_
 #ifndef _TUSB_MOUSED_APP_H_
 #define _TUSB_MOUSED_APP_H_
 #define _TUSB_MOUSED_APP_H_
 
 
-#include "boards/board.h"
+#include "board.h"
 #include "tusb.h"
 #include "tusb.h"
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus

+ 1 - 1
demos/device/src/mscd_app.h

@@ -46,7 +46,7 @@
 #ifndef _TUSB_MSCD_APP_H_
 #ifndef _TUSB_MSCD_APP_H_
 #define _TUSB_MSCD_APP_H_
 #define _TUSB_MSCD_APP_H_
 
 
-#include "boards/board.h"
+#include "board.h"
 #include "tusb.h"
 #include "tusb.h"
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus

+ 4 - 10
demos/device/src/tusb_config.h

@@ -88,27 +88,21 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 #ifdef __CODE_RED // compiled with lpcxpresso
 #ifdef __CODE_RED // compiled with lpcxpresso
   #if (TUSB_CFG_MCU == MCU_LPC11UXX) || (TUSB_CFG_MCU == MCU_LPC13UXX)
   #if (TUSB_CFG_MCU == MCU_LPC11UXX) || (TUSB_CFG_MCU == MCU_LPC13UXX)
-    #define TUSB_RAM_SECTION  ".data.$RAM2"
+    #define TUSB_CFG_ATTR_USBRAM  ATTR_SECTION(.data.$RAM2)
   #elif TUSB_CFG_MCU == MCU_LPC175X_6X
   #elif TUSB_CFG_MCU == MCU_LPC175X_6X
-    #define TUSB_RAM_SECTION // LPC17xx USB DMA can access all
+    #define TUSB_CFG_ATTR_USBRAM // LPC17xx USB DMA can access all
   #elif  (TUSB_CFG_MCU == MCU_LPC43XX)
   #elif  (TUSB_CFG_MCU == MCU_LPC43XX)
-    #define TUSB_RAM_SECTION  ".data.$RAM3"
-  #else
-    #error Please define USB RAM section
+    #define TUSB_CFG_ATTR_USBRAM  ATTR_SECTION(.data.$RAM3)
   #endif
   #endif
 
 
-  #define TUSB_CFG_ATTR_USBRAM   __attribute__ ((section(TUSB_RAM_SECTION)))
-
 #elif defined  __CC_ARM // Compiled with Keil armcc, USBRAM_SECTION is defined in scatter files
 #elif defined  __CC_ARM // Compiled with Keil armcc, USBRAM_SECTION is defined in scatter files
 
 
   #if (TUSB_CFG_MCU == MCU_LPC11UXX) || (TUSB_CFG_MCU == MCU_LPC13UXX)
   #if (TUSB_CFG_MCU == MCU_LPC11UXX) || (TUSB_CFG_MCU == MCU_LPC13UXX)
-    #define TUSB_CFG_ATTR_USBRAM   __attribute__ ((section("USBRAM_SECTION"))) // TODO Keil linker file
+    #define TUSB_CFG_ATTR_USBRAM  ATTR_SECTION(USBRAM_SECTION)
   #elif  (TUSB_CFG_MCU == MCU_LPC43XX)
   #elif  (TUSB_CFG_MCU == MCU_LPC43XX)
     #define TUSB_CFG_ATTR_USBRAM // Use keil tool configure to have AHB SRAM as default memory
     #define TUSB_CFG_ATTR_USBRAM // Use keil tool configure to have AHB SRAM as default memory
   #elif (TUSB_CFG_MCU == MCU_LPC175X_6X)
   #elif (TUSB_CFG_MCU == MCU_LPC175X_6X)
     #define TUSB_CFG_ATTR_USBRAM
     #define TUSB_CFG_ATTR_USBRAM
-  #else
-    #error Please define USB RAM section
   #endif
   #endif
 
 
 #elif defined __ICCARM__ // compiled with IAR
 #elif defined __ICCARM__ // compiled with IAR

+ 1 - 1
tinyusb/common/compiler/compiler_gcc.h

@@ -55,7 +55,7 @@
 #define ALIGN_OF(x) __alignof__(x)
 #define ALIGN_OF(x) __alignof__(x)
 
 
 /// Normally, the compiler places the objects it generates in sections like data or bss & function in text. Sometimes, however, you need additional sections, or you need certain particular variables to appear in special sections, for example to map to special hardware. The section attribute specifies that a variable (or function) lives in a particular section
 /// Normally, the compiler places the objects it generates in sections like data or bss & function in text. Sometimes, however, you need additional sections, or you need certain particular variables to appear in special sections, for example to map to special hardware. The section attribute specifies that a variable (or function) lives in a particular section
-#define ATTR_SECTION(section)      __attribute__ ((#section))
+#define ATTR_SECTION(sec_name)      __attribute__ (( section(#sec_name) ))
 
 
 /// If this attribute is used on a function declaration and a call to such a function is not eliminated through dead code elimination or other optimizations, an error that includes message is diagnosed. This is useful for compile-time checking
 /// If this attribute is used on a function declaration and a call to such a function is not eliminated through dead code elimination or other optimizations, an error that includes message is diagnosed. This is useful for compile-time checking
 #define ATTR_ERROR(Message)        __attribute__ ((error(Message)))
 #define ATTR_ERROR(Message)        __attribute__ ((error(Message)))

Некоторые файлы не были показаны из-за большого количества измененных файлов