This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Cannot breakpoint on UART0_IRQHandler with C++

Hello all,

I am using the examples/peripheral/uart project, which by default is set up as follows:

Language = C Dialect = C99 Language conformance = Standard with IAR extensions

I can breakpoint on UART0_IRQHandler.

However, if I switch this project as follows:

Language = C++ Dialect = Extended embedded C++ Language conformance = Standard with IAR extensions

I now find I can no longer set a breakpoint on UART0_IRQHandler.

Does anyone have any idea how I resolve this? The reason I care about this is I am developing a C++ application and have hit upon this problem, and have found I can reproduce it (more-or-less) using the example project mentioned above.

Regards, Richard.

Parents
  • Go to the disassembly window and try setting a breakpoint on the first assembly instruction of UART0_IRQHandler(). You can get the address of this instruction via the linker .map file (which will probably consist of a PUSH {r?-r?,lr} type of instruction.

    EDIT: I just re-read your post and noticed you said IAR wouldn't even let you set a breakpoint at all. This would seem to indicate your interrupt handler is not even getting compiled in the first place. I would again check the linker .map file and see if this symbol is included in the image. Maybe your code is conditionally compiled out? Maybe your compiler is having trouble recognizing the weak binding of the UART0_IRQHandler symbol and is instead using the stock interrupt handler @ address 0x00000048?

  • (At home now, so can't refer to files etc directly, but will respond from memory)

    For the original C++ project that had this issue, UART0_IRQHandler was missing from the map-file, but was listed in the lst-file for app_uart_fifo. However, in the lst-file, it was "taken from" the ".s" startup file. In contrast, in the UART example project it was "taken from" the app_uart_fifo module.

    (Sorry for the vague details, I don't know your timezone so hope this might get me a useful response before I return to work tomorrow!)

Reply
  • (At home now, so can't refer to files etc directly, but will respond from memory)

    For the original C++ project that had this issue, UART0_IRQHandler was missing from the map-file, but was listed in the lst-file for app_uart_fifo. However, in the lst-file, it was "taken from" the ".s" startup file. In contrast, in the UART example project it was "taken from" the app_uart_fifo module.

    (Sorry for the vague details, I don't know your timezone so hope this might get me a useful response before I return to work tomorrow!)

Children
No Data
Related