Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12600 Discussions

Debug Assembler Routine under NIOSII IDE

Altera_Forum
Honored Contributor II
1,038 Views

Hi, 

 

i tried to debug a assembler - routine (modified IRQ -entry). But I couldn't set a breakpoint in this source, to see whats going on there. 

Even if I set an break on an absolut adresss in this code the source file would not be shown in IDE (like when you set a break in C-Source) . 

 

Must I declare something in my ASM File ? 

 

 

The dokumentation for using assembler is not very good. So would be nice if anybody can help me. Maybe an assembler demo file could help me out of this problem. Even if you know about other dokumentation, please let me know. 

 

Thanks for help, 

 

Holger
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
329 Views

If you have included debug information in your build then debugging assembler files should work in the same way as for debugging C files. Or alternatively you could press the button which looks a bit like an inverted pile of bricks and debug in assembler mode. 

 

You said your assembler is a replacement interrupt entry. With 1.0 (and 1.0 SP1) you should be careful about stepping through code which reads the ipending register as it will return the wrong value (these versions also display the wrong value in the registers window). This should be fixed in 1.1. The workaround is to set a breakpoint and continue to it. 

 

As for assembler documentation, the GAS manual is shipped as part of the kit. There were some omissions from the 1.0 version, but the 1.0 SP1 and later manuals should be complete. If you think there's still something missing then please let us know.
0 Kudos
Altera_Forum
Honored Contributor II
329 Views

Hi , 

 

thanks for help but what have I to do, to inlcude debug information? 

Must I insert a# pragma or something else in my assembler file? 

 

Holger
0 Kudos
Altera_Forum
Honored Contributor II
329 Views

Hi, 

 

I didnt' found something about GAS in the manuals. Is it part of GNU C-Compiler ?
0 Kudos
Altera_Forum
Honored Contributor II
329 Views

To enable debug information open up the properties of your project, find C/C++ build and change the "debug level" to specify "-g". Check the commands being sent to the make system to ensure that the -g is being correctly passed through. 

 

GAS is part of GNU binutils. On my PC the documentation is in the file kits/nios2/documents/gnu-tools/binutils/as.html
0 Kudos
Reply