Generating assembly list file in KDS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Generating assembly list file in KDS

Jump to solution
885 Views
larrydemuth
Contributor III

I'm having a Hard Fault issue with MQX4.2 in the TCP/IP task. I am able to display the exception information (R0 - 3, R12, LR, PC, PSW), but don't know how to find the line that caused the exception since I don't have the assembly list for my code.

I'm using KDS 3.2 and GNU tools for compiling. How can I generate an assembly list file for my code so I can find where the exception is happening?

Is there another way to find where it is happening in the code without an assembly list file?

I can't step through with the debugger since it happens at random, and not on my test board. It only happens when its in the field at a customer site.

Tags (2)
0 Kudos
1 Solution
755 Views
BlackNight
NXP Employee
NXP Employee

See Creating Disassembly Listings with GNU Tools and Eclipse | MCU on Eclipse  for an overview with different methods.

There is an option in the compiler settings:

pastedImage_2.png

Instead of using the diassembly listing files, you can use the Disassembly view in the debugger while debugging.

For hard faults, I recommend to install a special hard fault handler. Articles on that subject:

Debugging Hard Faults on ARM Cortex-M | MCU on Eclipse 

Debugging ARM Cortex-M0+ Hard Fault with MTB Trace | MCU on Eclipse 

Debugging ARM Cortex-M Hard Faults with GDB Custom Command | MCU on Eclipse 

A Processor Expert Component to Help with Hard Faults | MCU on Eclipse 

Debugging ARM Cortex-M0+ HardFaults | MCU on Eclipse 

I hope this helps,

Erich

View solution in original post

0 Kudos
2 Replies
756 Views
BlackNight
NXP Employee
NXP Employee

See Creating Disassembly Listings with GNU Tools and Eclipse | MCU on Eclipse  for an overview with different methods.

There is an option in the compiler settings:

pastedImage_2.png

Instead of using the diassembly listing files, you can use the Disassembly view in the debugger while debugging.

For hard faults, I recommend to install a special hard fault handler. Articles on that subject:

Debugging Hard Faults on ARM Cortex-M | MCU on Eclipse 

Debugging ARM Cortex-M0+ Hard Fault with MTB Trace | MCU on Eclipse 

Debugging ARM Cortex-M Hard Faults with GDB Custom Command | MCU on Eclipse 

A Processor Expert Component to Help with Hard Faults | MCU on Eclipse 

Debugging ARM Cortex-M0+ HardFaults | MCU on Eclipse 

I hope this helps,

Erich

0 Kudos
755 Views
larrydemuth
Contributor III

Thanks.

I tried checking the "Generate assembler listing" option but it created a file called $@.lst and would overwrite it for each file. I had to go into each file individually and put this in for each one with the filename instead of $@. Not sure why it wouldn't replace the $@ with the filename automatically. Anyway, I got list files for hopefully the right file and will send the code to the customer and see what happens.

Will update when I find the bug if its in MQX 4.2.

0 Kudos