Microblaze中断示例,freeRTOS提供了中断处理程序的多个定义

Microblaze中断示例,freeRTOS提供了中断处理程序的多个定义,c,microblaze,C,Microblaze,我用Xilinx SDK创建了一个简单的示例程序,该程序具有FreeRTOS,我遇到了一个似乎出乎意料的问题。我想触发一个软件中断,所以我用这种方式设置了代码 void software_test( void ) __attribute__((interrupt_handler)); void software_test( void ) { // clear the interrupt *((volatile uint32_t *) 0x4120000C) = 0x80; i

我用Xilinx SDK创建了一个简单的示例程序,该程序具有FreeRTOS,我遇到了一个似乎出乎意料的问题。我想触发一个软件中断,所以我用这种方式设置了代码

void software_test( void ) __attribute__((interrupt_handler));

void software_test( void )
{
   // clear the interrupt
   *((volatile uint32_t *) 0x4120000C) = 0x80;
   interrupt_occurred++;
}
当我试图编译它时,会抱怨:

\interrupt_example_bsp\microblaze_0\libsrc\freertos823_xilinx_v1_1\src/portasm.S:288: multiple definition of `_interrupt_handler'
./src/freertos_hello_world.o:\Debug/../src/freertos_hello_world.c:130: first defined here
我检查了portasm.S,其中包含以下代码:

.global _interrupt_handler

... bunch more unreleated code here

.text
.align  4
_interrupt_handler:

portSAVE_CONTEXT

/* Stack the return address. */
swi r14, r1, portR14_OFFSET

/* Switch to the ISR stack. */
lwi r1, r0, pulISRStack

/* The parameter to the interrupt handler. */
ori r5, r0, configINTERRUPT_CONTROLLER_TO_USE

/* Execute any pending interrupts. */
bralid r15, XIntc_DeviceInterruptHandler
or r0, r0, r0

/* See if a new task should be selected to execute. */
lwi r18, r0, ulTaskSwitchRequested
or r18, r18, r0

/* If ulTaskSwitchRequested is already zero, then jump straight to
restoring the task that is already in the Running state. */
beqi r18, task_switch_not_requested

/* Set ulTaskSwitchRequested back to zero as a task switch is about to be
performed. */
swi r0, r0, ulTaskSwitchRequested

/* ulTaskSwitchRequested was not 0 when tested.  Select the next task to
execute. */
bralid r15, vTaskSwitchContext
or r0, r0, r0

... bunch more code here
我不清楚如何解决这个问题,是否有其他人遇到过这个问题


非常感谢您的帮助。提前感谢。

这里有一些关于使用FreeRTOS实现Microblaze ISR的信息:

这里有一些关于使用FreeRTOS实现Microblaze ISR的信息:

看一看,我之前已经看过了,我的链接器脚本也是由向导生成的,但它没有内核,我有-Wl,-start group,-lxil,-lfreertos,-lgcc,-lc,-end groups看一看我之前已经看过了,我的链接器脚本也是由向导生成的,但它没有内核,我有-Wl,-start group,-lxil,-lfreertos,-lgcc,-lc,-end groups