From 6bc6b060766b4e6b6c22363eb187656d66730b4c Mon Sep 17 00:00:00 2001 From: Zhihong Chen Date: Sun, 14 Jan 2024 15:11:26 +0800 Subject: [PATCH] usbh_core: add iar risc-v support - add iar risc-v support Signed-off-by: Zhihong Chen --- core/usbh_core.c | 2 +- core/usbh_core.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/usbh_core.c b/core/usbh_core.c index 99901478..de2284b8 100644 --- a/core/usbh_core.c +++ b/core/usbh_core.c @@ -686,7 +686,7 @@ int usbh_initialize(struct usbh_bus *bus) extern uint32_t __usbh_class_info_end__; usbh_class_info_table_begin = (struct usbh_class_info *)&__usbh_class_info_start__; usbh_class_info_table_end = (struct usbh_class_info *)&__usbh_class_info_end__; -#elif defined(__ICCARM__) || defined(__ICCRX__) +#elif defined(__ICCARM__) || defined(__ICCRX__) || defined(__ICCRISCV__) usbh_class_info_table_begin = (struct usbh_class_info *)__section_begin("usbh_class_info"); usbh_class_info_table_end = (struct usbh_class_info *)__section_end("usbh_class_info"); #endif diff --git a/core/usbh_core.h b/core/usbh_core.h index 056b630c..1944c400 100644 --- a/core/usbh_core.h +++ b/core/usbh_core.h @@ -38,7 +38,7 @@ extern "C" { #define CLASS_INFO_DEFINE __attribute__((section("usbh_class_info"))) __USED __ALIGNED(1) #elif defined(__GNUC__) #define CLASS_INFO_DEFINE __attribute__((section(".usbh_class_info"))) __USED __ALIGNED(1) -#elif defined(__ICCARM__) || defined(__ICCRX__) +#elif defined(__ICCARM__) || defined(__ICCRX__) || defined(__ICCRISCV__) #pragma section = "usbh_class_info" #define CLASS_INFO_DEFINE __attribute__((section("usbh_class_info"))) __USED __ALIGNED(1) #endif