summaryrefslogtreecommitdiff
path: root/demos/device/src/tusb_config.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2014-03-12 22:22:00 +0700
committerhathach <[email protected]>2014-03-12 22:22:00 +0700
commit368d09695f5c72edb52df2fc7f2cb4e3bc9957e8 (patch)
tree4d891a9bd557bcf7da34342a6605c541f28ab1e0 /demos/device/src/tusb_config.h
parent97f95c61f6f0c3a8e0a6f32889605be1a1e09cdd (diff)
fix build error with lpcxpresso device os none
Diffstat (limited to 'demos/device/src/tusb_config.h')
-rw-r--r--demos/device/src/tusb_config.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/demos/device/src/tusb_config.h b/demos/device/src/tusb_config.h
index 4bba991bf..e9124e1d8 100644
--- a/demos/device/src/tusb_config.h
+++ b/demos/device/src/tusb_config.h
@@ -88,27 +88,21 @@
//--------------------------------------------------------------------+
#ifdef __CODE_RED // compiled with lpcxpresso
#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
- #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)
- #define TUSB_RAM_SECTION ".data.$RAM3"
- #else
- #error Please define USB RAM section
+ #define TUSB_CFG_ATTR_USBRAM ATTR_SECTION(.data.$RAM3)
#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
#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)
#define TUSB_CFG_ATTR_USBRAM // Use keil tool configure to have AHB SRAM as default memory
#elif (TUSB_CFG_MCU == MCU_LPC175X_6X)
#define TUSB_CFG_ATTR_USBRAM
- #else
- #error Please define USB RAM section
#endif
#elif defined __ICCARM__ // compiled with IAR