change IAR TUSB_CFG_ATTR_USBRAM to _Pragma("location=\".ahb_sram1\"") instead of @ .ahb_sram1 so that we can place it before the variable for a cleaner code
change pipe xfer API buffer from void* to uint8_t* change FIFO_DEF to have a separated buffer to be compatible with IAR\ refractor IAR data alignment pragma
This commit is contained in:
@@ -51,8 +51,8 @@ OSAL_SEM_DEF(serial_semaphore);
|
||||
|
||||
static osal_semaphore_handle_t sem_hdl;
|
||||
|
||||
static uint8_t serial_in_buffer[32] TUSB_CFG_ATTR_USBRAM;
|
||||
static uint8_t serial_out_buffer[32] TUSB_CFG_ATTR_USBRAM;
|
||||
TUSB_CFG_ATTR_USBRAM static uint8_t serial_in_buffer[32];
|
||||
TUSB_CFG_ATTR_USBRAM static uint8_t serial_out_buffer[32];
|
||||
|
||||
static uint8_t received_bytes; // set by transfer complete callback
|
||||
|
||||
|
||||
@@ -135,8 +135,8 @@ static cli_cmdfunc_t cli_command_tbl[] =
|
||||
//--------------------------------------------------------------------+
|
||||
// INTERNAL OBJECT & FUNCTION DECLARATION
|
||||
//--------------------------------------------------------------------+
|
||||
TUSB_CFG_ATTR_USBRAM uint8_t fileread_buffer[CLI_FILE_READ_BUFFER];
|
||||
static char cli_buffer[CLI_MAX_BUFFER];
|
||||
uint8_t fileread_buffer[CLI_FILE_READ_BUFFER] TUSB_CFG_ATTR_USBRAM;
|
||||
static char volume_label[20];
|
||||
|
||||
static inline void drive_number2letter(char * p_path) ATTR_ALWAYS_INLINE;
|
||||
|
||||
@@ -56,7 +56,7 @@ OSAL_TASK_DEF(keyboard_app_task, 128, KEYBOARD_APP_TASK_PRIO);
|
||||
OSAL_QUEUE_DEF(queue_kbd_def, QUEUE_KEYBOARD_REPORT_DEPTH, hid_keyboard_report_t);
|
||||
|
||||
static osal_queue_handle_t queue_kbd_hdl;
|
||||
static hid_keyboard_report_t usb_keyboard_report TUSB_CFG_ATTR_USBRAM;
|
||||
TUSB_CFG_ATTR_USBRAM static hid_keyboard_report_t usb_keyboard_report;
|
||||
|
||||
static inline uint8_t keycode_to_ascii(uint8_t modifier, uint8_t keycode) ATTR_CONST ATTR_ALWAYS_INLINE;
|
||||
static inline void process_kbd_report(hid_keyboard_report_t const * report);
|
||||
|
||||
@@ -56,7 +56,7 @@ OSAL_TASK_DEF(mouse_app_task, 128, MOUSE_APP_TASK_PRIO);
|
||||
OSAL_QUEUE_DEF(queue_mouse_def, QUEUE_MOUSE_REPORT_DEPTH, hid_mouse_report_t);
|
||||
|
||||
static osal_queue_handle_t queue_mouse_hdl;
|
||||
static hid_mouse_report_t usb_mouse_report TUSB_CFG_ATTR_USBRAM;
|
||||
TUSB_CFG_ATTR_USBRAM static hid_mouse_report_t usb_mouse_report;
|
||||
|
||||
static inline void process_mouse_report(hid_mouse_report_t const * p_report);
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
//--------------------------------------------------------------------+
|
||||
OSAL_TASK_DEF(msc_app_task, 512, MSC_APP_TASK_PRIO);
|
||||
|
||||
static FATFS fatfs[TUSB_CFG_HOST_DEVICE_MAX] TUSB_CFG_ATTR_USBRAM;
|
||||
TUSB_CFG_ATTR_USBRAM static FATFS fatfs[TUSB_CFG_HOST_DEVICE_MAX];
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// tinyusb callback (ISR context)
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
|
||||
#elif defined __ICCARM__ // compiled with IAR
|
||||
|
||||
#define TUSB_CFG_ATTR_USBRAM @ ".ahb_sram1"
|
||||
#define TUSB_CFG_ATTR_USBRAM _Pragma("location=\".ahb_sram1\"")
|
||||
|
||||
#else
|
||||
|
||||
|
||||
Reference in New Issue
Block a user