Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
I am trying to setup a project in the IAR Workbench for my XMC1200. But somehow i don't get any interupts there.
I have an ADC_MEASUREMENT_ADV_0 App and have defined an Interrupt callback. If i start the program in Dave4, i can receive the interrupt with that callback, but not in IAR.
I am also using the stack usage analysis and i get the following warning at compiling the code:
Warning[Ls016]: [stack usage analysis] the program contains at least one indirect call. Example: from "ADC_MEASUREMENT_ADV_Init". A complete list of such functions is in the map file.
In the map file i can see the following lines


Call Graph Root Category Max Use Total Use
------------------------ ------- ---------
interrupt 0 0
Program entry 140 140
Uncalled function 96 120


Uncalled function
"ADC_MEASUREMENT_ADV_0_event_config" in adc_measurement_adv_conf.o [1]: 0x10001cc9

The following functions perform unknown indirect calls:

"ADC_MEASUREMENT_ADV_Init": 0x100016d1



So, it says it has 0 interrupts.
If i press on "Go to definition of "adc_measurement_adv_callback" , it will direct me to the #define in the adc_measurement_adv.c file, which is fine.
When i start debugging my program, the breakpoint is disabled at my interrupt callback function, so this function will be removed from the compiler.
If i use the "__root" extension in front of the callback function, the function will keep, but the program will not jump in it.
In either way, the program will end up with an HardFault, as soon the interrupt supposed to be called.
Without the method call "ADC_MEASUREMENT_ADV_SoftwareTrigger(&ADC_MEASUREMENT_ADV_0);" , no interrupt will be called and so no Fault occurs.

So what can be the reason, that the interrupt call works in Dave4, but not in IAR Workbench?
I also already tried to include the cmsis_compiler, cmsis_gcc and core_cm0.h file in the project, but it also doesnt work with that.
0 Likes
2 Replies
Not applicable
I could get it running now. I included the startup_XMC1200.S, but a version, which is compatible with IAR ( the file from DAVE is not ). Took that assembler file from FreeRTOS.
Also i build the XMC libs and Dave Libs now all with C language. Before i built the XMCLibs with C++ language.

=> Thread can be closed
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

In the XMC4000 and XMC1000 web sites you can find documents on how to port DAVE projects to other IDEs, i.e. Tooling - Import DAVE™ version 4 Generated Library Sources into IAR Embedded Workbench® for ARM®

Regards,
Jesus
0 Likes