[bsp]fix esp32_c3 compile error (#7107)

* fix rt_hw_interrupt_install return value

* add __rt_rvstack
This commit is contained in:
flyingcys 2023-03-29 19:01:26 +08:00 committed by GitHub
parent adf17c427f
commit 0cf3bcf495
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -113,6 +113,7 @@ index d6670bf759..1d51ffeea0 100644
+ __stack_cpu0 = .; + __stack_cpu0 = .;
+ __stack_end__ = .; + __stack_end__ = .;
+ } > dram0_0_seg + } > dram0_0_seg
+ PROVIDE( __rt_rvstack = __stack_end__);
+ +
+ .heap : + .heap :
+ { + {

View File

@ -41,21 +41,26 @@ rt_weak void rt_hw_interrupt_init(void)
* @param handler Break-in function requiring binding * @param handler Break-in function requiring binding
* @param param NULL * @param param NULL
* @param name NULL * @param name NULL
* @return NULL * @return old handler
*/ */
rt_weak rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler, rt_weak rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
void *param, const char *name) void *param, const char *name)
{ {
rt_isr_handler_t old_handler = RT_NULL;
void *user_param = param; void *user_param = param;
char *user_name = name; char *user_name = name;
if(vector < ISR_NUMBER) if(vector < ISR_NUMBER)
{ {
old_handler = rv32irq_table[vector].handler;
if (handler != RT_NULL) if (handler != RT_NULL)
{ {
rv32irq_table[vector].handler = (rt_isr_handler_t)handler; rv32irq_table[vector].handler = (rt_isr_handler_t)handler;
rv32irq_table[vector].param = param; rv32irq_table[vector].param = param;
} }
} }
return old_handler;
} }
/** /**