From 86681fe44226c636e62320f3cedcaddcd53259e9 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 19 Sep 2013 16:11:11 +0700 Subject: starting to add support for IAR workbench --- demos/bsp/lpc43xx/startup_iar/startup_LPC43xx.s | 298 ++++++ demos/host/host_os_none/.project | 11 +- demos/host/host_os_none/host_os_none.ewd | 1304 +++++++++++++++++++++++ demos/host/host_os_none/host_os_none.ewp | 1058 ++++++++++++++++++ demos/host/host_os_none/host_os_none.eww | 10 + demos/host/host_os_none/host_os_none.uvopt | 32 +- demos/host/src/cdc_serial_app.c | 6 +- demos/host/src/keyboard_app.c | 4 +- demos/host/src/mouse_app.c | 4 +- demos/host/src/tusb_config.h | 2 + 10 files changed, 2705 insertions(+), 24 deletions(-) create mode 100644 demos/bsp/lpc43xx/startup_iar/startup_LPC43xx.s create mode 100644 demos/host/host_os_none/host_os_none.ewd create mode 100644 demos/host/host_os_none/host_os_none.ewp create mode 100644 demos/host/host_os_none/host_os_none.eww (limited to 'demos') diff --git a/demos/bsp/lpc43xx/startup_iar/startup_LPC43xx.s b/demos/bsp/lpc43xx/startup_iar/startup_LPC43xx.s new file mode 100644 index 000000000..916fd6d1f --- /dev/null +++ b/demos/bsp/lpc43xx/startup_iar/startup_LPC43xx.s @@ -0,0 +1,298 @@ +/************************************************** + * + * Part one of the system initialization code, contains low-level + * initialization, plain thumb variant. + * + * Copyright 2011 IAR Systems. All rights reserved. + * + * $Revision: 50291 $ + * + **************************************************/ + +; +; The modules in this file are included in the libraries, and may be replaced +; by any user-defined modules that define the PUBLIC symbol _program_start or +; a user defined start symbol. +; To override the cstartup defined in the library, simply add your modified +; version to the workbench project. +; +; The vector table is normally located at address 0. +; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. +; The name "__vector_table" has special meaning for C-SPY: +; it is where the SP start value is found, and the NVIC vector +; table register (VTOR) is initialized to this address if != 0. +; +; Cortex-M version +; + + + MODULE ?cstartup + + ;; Forward declaration of sections. + SECTION CSTACK:DATA:NOROOT(3) + + SECTION .intvec:CODE:NOROOT(2) + + EXTERN __iar_program_start + PUBLIC __vector_table + PUBLIC __vector_table_0x1c + PUBLIC __Vectors + PUBLIC __Vectors_End + PUBLIC __Vectors_Size + + DATA + +__vector_table + DCD sfe(CSTACK) + DCD Reset_Handler + DCD NMI_Handler + DCD HardFault_Handler + DCD MemManage_Handler + DCD BusFault_Handler + DCD UsageFault_Handler +__vector_table_0x1c + DCD 0 + DCD 0 + DCD 0 + DCD 0 + DCD SVC_Handler + DCD DebugMon_Handler + DCD 0 + DCD PendSV_Handler + DCD SysTick_Handler + + ; External Interrupts + DCD DAC_IRQHandler ; 16 D/A Converter + DCD M0CORE_IRQHandler ; 17 CortexM0 + DCD DMA_IRQHandler ; 18 General Purpose DMA + DCD 0 ; 19 Reserved + DCD 0 ; 20 Reserved + DCD ETH_IRQHandler ; 21 Ethernet + DCD SDIO_IRQHandler ; 22 SD/MMC + DCD LCD_IRQHandler ; 23 LCD + DCD USB0_IRQHandler ; 24 USB0 + DCD USB1_IRQHandler ; 25 USB1 + DCD SCT_IRQHandler ; 26 State Configurable Timer + DCD RITIMER_IRQHandler ; 27 Repetitive Interrupt Timer + DCD TIMER0_IRQHandler ; 28 Timer0 + DCD TIMER1_IRQHandler ; 29 Timer1 + DCD TIMER2_IRQHandler ; 30 Timer2 + DCD TIMER3_IRQHandler ; 31 Timer3 + DCD MCPWM_IRQHandler ; 32 Motor Control PWM + DCD ADC0_IRQHandler ; 33 A/D Converter 0 + DCD I2C0_IRQHandler ; 34 I2C0 + DCD I2C1_IRQHandler ; 35 I2C1 + DCD SPI_IRQHandler ; 36 Reserved + DCD ADC1_IRQHandler ; 37 A/D Converter 1 + DCD SSP0_IRQHandler ; 38 SSP0 + DCD SSP1_IRQHandler ; 39 SSP1 + DCD USART0_IRQHandler ; 40 UART0 + DCD UART1_IRQHandler ; 41 UART1 + DCD UART2_IRQHandler ; 42 UART2 + DCD UART3_IRQHandler ; 43 UART3 + DCD I2S0_IRQHandler ; 44 I2S0 + DCD I2S1_IRQHandler ; 45 I2S1 + DCD SPIFI_IRQHandler ; 46 SPIFI + DCD SGPIO_IRQHandler ; 47 SGPIO + DCD GPIO0_IRQHandler ; 48 GPIO0 + DCD GPIO1_IRQHandler ; 49 GPIO1 + DCD GPIO2_IRQHandler ; 50 GPIO2 + DCD GPIO3_IRQHandler ; 51 GPIO3 + DCD GPIO4_IRQHandler ; 52 GPIO4 + DCD GPIO5_IRQHandler ; 53 GPIO5 + DCD GPIO6_IRQHandler ; 54 GPIO6 + DCD GPIO7_IRQHandler ; 55 GPIO7 + DCD GINT0_IRQHandler ; 56 GINT0 + DCD GINT1_IRQHandler ; 57 GINT1 + DCD EVENTROUTER_IRQHandler ; 58 Event Router + DCD C_CAN1_IRQHandler ; 59 CCAN1 + DCD 0 + DCD 0 + DCD ATIMER_IRQHandler ; 62 Alarm Timer + DCD RTC_IRQHandler ; 63 RTC + DCD 0 + DCD WWDT_IRQHandler ; 65 WWDT + DCD 0 + DCD C_CAN0_IRQHandler ; 67 CCAN0 + DCD QEI_IRQHandler ; 68 QEI +__Vectors_End + +__Vectors EQU __vector_table +__Vectors_Size EQU __Vectors_End - __Vectors + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Default interrupt handlers. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + THUMB + + PUBWEAK Reset_Handler + SECTION .text:CODE:REORDER(2) +Reset_Handler + LDR R0, =__iar_program_start + BX R0 + + PUBWEAK NMI_Handler + PUBWEAK HardFault_Handler + PUBWEAK MemManage_Handler + PUBWEAK BusFault_Handler + PUBWEAK UsageFault_Handler + PUBWEAK SVC_Handler + PUBWEAK DebugMon_Handler + PUBWEAK PendSV_Handler + PUBWEAK SysTick_Handler + PUBWEAK DAC_IRQHandler + PUBWEAK M0CORE_IRQHandler + PUBWEAK DMA_IRQHandler + PUBWEAK ETH_IRQHandler + PUBWEAK SDIO_IRQHandler + PUBWEAK LCD_IRQHandler + PUBWEAK USB0_IRQHandler + PUBWEAK USB1_IRQHandler + PUBWEAK SCT_IRQHandler + PUBWEAK RITIMER_IRQHandler + PUBWEAK TIMER0_IRQHandler + PUBWEAK TIMER1_IRQHandler + PUBWEAK TIMER2_IRQHandler + PUBWEAK TIMER3_IRQHandler + PUBWEAK MCPWM_IRQHandler + PUBWEAK ADC0_IRQHandler + PUBWEAK I2C0_IRQHandler + PUBWEAK I2C1_IRQHandler + PUBWEAK SPI_IRQHandler + PUBWEAK ADC1_IRQHandler + PUBWEAK SSP0_IRQHandler + PUBWEAK SSP1_IRQHandler + PUBWEAK USART0_IRQHandler + PUBWEAK UART1_IRQHandler + PUBWEAK UART2_IRQHandler + PUBWEAK UART3_IRQHandler + PUBWEAK I2S0_IRQHandler + PUBWEAK I2S1_IRQHandler + PUBWEAK SPIFI_IRQHandler + PUBWEAK SGPIO_IRQHandler + PUBWEAK GPIO0_IRQHandler + PUBWEAK GPIO1_IRQHandler + PUBWEAK GPIO2_IRQHandler + PUBWEAK GPIO3_IRQHandler + PUBWEAK GPIO4_IRQHandler + PUBWEAK GPIO5_IRQHandler + PUBWEAK GPIO6_IRQHandler + PUBWEAK GPIO7_IRQHandler + PUBWEAK GINT0_IRQHandler + PUBWEAK GINT1_IRQHandler + PUBWEAK EVENTROUTER_IRQHandler + PUBWEAK C_CAN1_IRQHandler + PUBWEAK ATIMER_IRQHandler + PUBWEAK RTC_IRQHandler + PUBWEAK WWDT_IRQHandler + PUBWEAK C_CAN0_IRQHandler + PUBWEAK QEI_IRQHandler + SECTION .text:CODE:REORDER(1) +NMI_Handler + B NMI_Handler +SVC_Handler + B SVC_Handler +DebugMon_Handler + B DebugMon_Handler +PendSV_Handler + B PendSV_Handler +SysTick_Handler + B SysTick_Handler +HardFault_Handler + B HardFault_Handler +MemManage_Handler + B MemManage_Handler +BusFault_Handler + B BusFault_Handler +UsageFault_Handler +DAC_IRQHandler +M0CORE_IRQHandler +DMA_IRQHandler +ETH_IRQHandler +SDIO_IRQHandler +LCD_IRQHandler +USB0_IRQHandler +USB1_IRQHandler +SCT_IRQHandler +RITIMER_IRQHandler +TIMER0_IRQHandler +TIMER1_IRQHandler +TIMER2_IRQHandler +TIMER3_IRQHandler +MCPWM_IRQHandler +ADC0_IRQHandler +I2C0_IRQHandler +I2C1_IRQHandler +SPI_IRQHandler +ADC1_IRQHandler +SSP0_IRQHandler +SSP1_IRQHandler +USART0_IRQHandler +UART1_IRQHandler +UART2_IRQHandler +UART3_IRQHandler +I2S0_IRQHandler +I2S1_IRQHandler +SPIFI_IRQHandler +SGPIO_IRQHandler +GPIO0_IRQHandler +GPIO1_IRQHandler +GPIO2_IRQHandler +GPIO3_IRQHandler +GPIO4_IRQHandler +GPIO5_IRQHandler +GPIO6_IRQHandler +GPIO7_IRQHandler +GINT0_IRQHandler +GINT1_IRQHandler +EVENTROUTER_IRQHandler +C_CAN1_IRQHandler +ATIMER_IRQHandler +RTC_IRQHandler +WWDT_IRQHandler +C_CAN0_IRQHandler +QEI_IRQHandler +Default_IRQHandler + B Default_IRQHandler + + + THUMB + + PUBLIC getPC + SECTION .text:CODE:REORDER(2) +getPC + MOV R0,LR + BX LR + + +/* CRP Section - not needed for flashless devices */ + +;;; SECTION .crp:CODE:ROOT(2) +;;; DATA +/* Code Read Protection +NO_ISP 0x4E697370 - Prevents sampling of pin PIO0_1 for entering ISP mode +CRP1 0x12345678 - Write to RAM command cannot access RAM below 0x10000300. + - Copy RAM to flash command can not write to Sector 0. + - Erase command can erase Sector 0 only when all sectors + are selected for erase. + - Compare command is disabled. + - Read Memory command is disabled. +CRP2 0x87654321 - Read Memory is disabled. + - Write to RAM is disabled. + - "Go" command is disabled. + - Copy RAM to flash is disabled. + - Compare is disabled. +CRP3 0x43218765 - Access to chip via the SWD pins is disabled. ISP entry + by pulling PIO0_1 LOW is disabled if a valid user code is + present in flash sector 0. +Caution: If CRP3 is selected, no future factory testing can be +performed on the device. +*/ +;;; DCD 0xFFFFFFFF +;;; + + END + \ No newline at end of file diff --git a/demos/host/host_os_none/.project b/demos/host/host_os_none/.project index df8437c32..d69907840 100644 --- a/demos/host/host_os_none/.project +++ b/demos/host/host_os_none/.project @@ -103,7 +103,16 @@ - 1379174455764 + 1379572492985 + + 26 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-false-startup_iar + + + + 1379572492997 26 diff --git a/demos/host/host_os_none/host_os_none.ewd b/demos/host/host_os_none/host_os_none.ewd new file mode 100644 index 000000000..233debece --- /dev/null +++ b/demos/host/host_os_none/host_os_none.ewd @@ -0,0 +1,1304 @@ + + + + 2 + + Board EA4357 + + ARM + + 1 + + C-SPY + 2 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\PowerPac\PowerPacRTOS.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB6_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + + diff --git a/demos/host/host_os_none/host_os_none.ewp b/demos/host/host_os_none/host_os_none.ewp new file mode 100644 index 000000000..8176206fd --- /dev/null +++ b/demos/host/host_os_none/host_os_none.ewp @@ -0,0 +1,1058 @@ + + + + 2 + + Board EA4357 + + ARM + + 1 + + General + 3 + + 21 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + app + + $PROJ_DIR$\..\src\cdc_serial_app.c + + + $PROJ_DIR$\..\src\keyboard_app.c + + + $PROJ_DIR$\..\src\main.c + + + $PROJ_DIR$\..\src\mouse_app.c + + + $PROJ_DIR$\..\src\rndis_app.c + + + + bsp + + boards + + $PROJ_DIR$\..\..\bsp\boards\board.c + + + $PROJ_DIR$\..\..\bsp\boards\embedded_artists\board_ea4357.c + + + $PROJ_DIR$\..\..\bsp\boards\microbuilder\board_lpc4357usb.c + + + $PROJ_DIR$\..\..\bsp\boards\ngx\board_ngx4330.c + + + $PROJ_DIR$\..\..\bsp\boards\embedded_artists\oem_base_board\pca9532.c + + + $PROJ_DIR$\..\..\bsp\boards\printf_retarget.c + + + + lpc43xx + + $PROJ_DIR$\..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\lpc43xx_cgu.c + + + $PROJ_DIR$\..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\lpc43xx_gpio.c + + + $PROJ_DIR$\..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\lpc43xx_i2c.c + + + $PROJ_DIR$\..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\lpc43xx_scu.c + + + $PROJ_DIR$\..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\lpc43xx_uart.c + + + $PROJ_DIR$\..\..\bsp\lpc43xx\startup_iar\startup_LPC43xx.s + + + $PROJ_DIR$\..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\system_LPC43xx.c + + + + + tinyusb + + class + + $PROJ_DIR$\..\..\..\tinyusb\class\cdc_host.c + + + $PROJ_DIR$\..\..\..\tinyusb\class\cdc_rndis_host.c + + + $PROJ_DIR$\..\..\..\tinyusb\class\hid_host.c + + + + common + + $PROJ_DIR$\..\..\..\tinyusb\common\errors.c + + + + hal + + $PROJ_DIR$\..\..\..\tinyusb\hal\hal_lpc11uxx.c + + + $PROJ_DIR$\..\..\..\tinyusb\hal\hal_lpc13uxx.c + + + $PROJ_DIR$\..\..\..\tinyusb\hal\hal_lpc175x_6x.c + + + $PROJ_DIR$\..\..\..\tinyusb\hal\hal_lpc43xx.c + + + + host + + ehci + + $PROJ_DIR$\..\..\..\tinyusb\host\ehci\ehci.c + + + + $PROJ_DIR$\..\..\..\tinyusb\host\hcd.c + + + $PROJ_DIR$\..\..\..\tinyusb\host\hub.c + + + $PROJ_DIR$\..\..\..\tinyusb\host\usbh.c + + + + osal + + $PROJ_DIR$\..\..\..\tinyusb\osal\osal_none.c + + + + $PROJ_DIR$\..\..\..\tinyusb\tusb.c + + + + + diff --git a/demos/host/host_os_none/host_os_none.eww b/demos/host/host_os_none/host_os_none.eww new file mode 100644 index 000000000..c9165d7c6 --- /dev/null +++ b/demos/host/host_os_none/host_os_none.eww @@ -0,0 +1,10 @@ + + + + + $WS_DIR$\host_os_none.ewp + + + + + diff --git a/demos/host/host_os_none/host_os_none.uvopt b/demos/host/host_os_none/host_os_none.uvopt index 13f68cbc4..702c4551d 100644 --- a/demos/host/host_os_none/host_os_none.uvopt +++ b/demos/host/host_os_none/host_os_none.uvopt @@ -389,7 +389,7 @@ 0 0 0 - 118 + 149 158 0 ..\src\main.c @@ -405,8 +405,8 @@ 0 0 0 - 84 - 124 + 1 + 1 0 ..\src\cdc_serial_app.c cdc_serial_app.c @@ -493,7 +493,7 @@ 0 2 0 - 128 + 137 146 0 ..\..\bsp\boards\embedded_artists\board_ea4357.c @@ -509,7 +509,7 @@ 0 1 0 - 97 + 99 106 0 ..\..\bsp\boards\printf_retarget.c @@ -709,8 +709,8 @@ 0 0 0 - 170 - 210 + 1 + 1 0 ..\..\..\tinyusb\host\usbh.c usbh.c @@ -725,8 +725,8 @@ 0 0 0 - 262 - 254 + 1 + 1 0 ..\..\..\tinyusb\host\ehci\ehci.c ehci.c @@ -773,7 +773,7 @@ 0 0 0 - 29 + 60 69 0 ..\..\..\tinyusb\hal\hal_lpc43xx.c @@ -835,10 +835,10 @@ 1 0 0 - 0 + 15 0 - 102 - 142 + 1 + 24 0 ..\..\..\tinyusb\class\cdc_host.c cdc_host.c @@ -851,10 +851,10 @@ 1 0 0 - 24 + 0 0 - 135 - 152 + 1 + 1 0 ..\..\..\tinyusb\class\cdc_rndis_host.c cdc_rndis_host.c diff --git a/demos/host/src/cdc_serial_app.c b/demos/host/src/cdc_serial_app.c index 197d60a84..e44cfd924 100644 --- a/demos/host/src/cdc_serial_app.c +++ b/demos/host/src/cdc_serial_app.c @@ -93,7 +93,7 @@ void tusbh_cdc_xfer_isr(uint8_t dev_addr, tusb_event_t event, cdc_pipeid_t pipe_ case TUSB_EVENT_XFER_STALLED: default : - ASSERT(false, (void) 0); // error + ASSERT(false, VOID_RETURN); // error break; } }else if (pipe_id == CDC_PIPE_DATA_OUT) @@ -113,9 +113,9 @@ void cdc_serial_app_init(void) memclr_(buffer_in, sizeof(buffer_in)); queue_hdl = osal_queue_create( OSAL_QUEUE_REF(queue_def) ); - ASSERT_PTR( queue_hdl, (void) 0 ); + ASSERT_PTR( queue_hdl, VOID_RETURN); - ASSERT( TUSB_ERROR_NONE == osal_task_create(OSAL_TASK_REF(cdc_serial_app_task)), (void) 0 ); + ASSERT( TUSB_ERROR_NONE == osal_task_create(OSAL_TASK_REF(cdc_serial_app_task)), VOID_RETURN); } //------------- main task -------------// diff --git a/demos/host/src/keyboard_app.c b/demos/host/src/keyboard_app.c index 27d5c0cfe..404a27c41 100644 --- a/demos/host/src/keyboard_app.c +++ b/demos/host/src/keyboard_app.c @@ -108,10 +108,10 @@ void keyboard_app_init(void) memclr_(&usb_keyboard_report, sizeof(tusb_keyboard_report_t)); queue_kbd_hdl = osal_queue_create( OSAL_QUEUE_REF(queue_kbd_def) ); - ASSERT_PTR( queue_kbd_hdl, (void) 0 ); + ASSERT_PTR( queue_kbd_hdl, VOID_RETURN ); ASSERT( TUSB_ERROR_NONE == osal_task_create( OSAL_TASK_REF(keyboard_app_task) ) , - (void) 0 ); + VOID_RETURN); } //------------- main task -------------// diff --git a/demos/host/src/mouse_app.c b/demos/host/src/mouse_app.c index 666aa02f5..3469fc4ab 100644 --- a/demos/host/src/mouse_app.c +++ b/demos/host/src/mouse_app.c @@ -110,10 +110,10 @@ void mouse_app_init(void) memclr_(&usb_mouse_report, sizeof(tusb_mouse_report_t)); queue_mouse_hdl = osal_queue_create( OSAL_QUEUE_REF(queue_mouse_def) ); - ASSERT_PTR( queue_mouse_hdl, (void) 0 ); + ASSERT_PTR( queue_mouse_hdl, VOID_RETURN); ASSERT( TUSB_ERROR_NONE == osal_task_create( OSAL_TASK_REF(mouse_app_task) ), - (void) 0 ); + VOID_RETURN ); } //------------- main task -------------// diff --git a/demos/host/src/tusb_config.h b/demos/host/src/tusb_config.h index 8596660de..b44c2ee73 100644 --- a/demos/host/src/tusb_config.h +++ b/demos/host/src/tusb_config.h @@ -113,6 +113,8 @@ #define TUSB_CFG_ATTR_USBRAM __attribute__ ((section(TUSB_RAM_SECTION))) #elif defined __CC_ARM // Compiled with Keil armcc #define TUSB_CFG_ATTR_USBRAM +#elif __ICCARM__ // compiled with IAR + #define TUSB_CFG_ATTR_USBRAM #else #error compiler not specified #endif -- cgit v1.3.1