Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
726 Views

Cannot step into crt0.s

Hi, 

 

I am using the ISS (Instruction Set Simulator). I would like to start program execution by stepping through crt0.s. However, the IDE has that option greyed out. I circumvented it by simply setting a breakpoint on the label _start in crt0.s, which works. So, problem solved. But just to be curious: is this 'step into first instruction' not possible in the Eclipse IDE ?  

 

Bye, 

 

Roland.
0 Kudos
4 Replies
Highlighted
Valued Contributor III
10 Views

I wasn't able to step into asm at all :/ 

 

so I did a call to a dummy function. It allows at least to see registers .. 

 

 

(working on Nios II) 

 

slvn
0 Kudos
Highlighted
Valued Contributor III
10 Views

roland, 

 

Which option are you referring to as greyed out? 

 

With both the ISS and real hardware you can't step until the initial startup code has run and the program has stopped (at alt_main or main usually). 

 

Why do you need to step through crt0.s? 

 

ps. If you are having problems stepping through assembler code without debug information then try doing it in dissasembly mode (the upside down pile of bricks)
0 Kudos
Highlighted
Valued Contributor III
10 Views

Hello Wombat, 

 

The option 'step into' was greyed out in the IDE's 'debug' view, when I had not started program execution yet. The option of stepping into execution is something I knew from the Visual Studio environment, so it just caught my attention that it was not there. 

 

So.. why would anybody step through the nitty-gritty details of crt0.s. The reason is that the first C-statement in my main() routine was not reached. Instead, the ISS bailed out, indicating that a non-initialized value was read. So, I wanted to know where execution flow decided to generate an ISS error instead of reaching main(). 

 

I can see now that crt0.s is executed succesfully, and the ISS error is thrown in a strcmp() in the context of system initialization of the timer. Haven't figured out why, yet. 

 

Anyway, my question regarding this issue has been answered so thank you for the replies ! 

 

 

http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/cool.gif
0 Kudos
Highlighted
Valued Contributor III
10 Views

If you don&#39;t get to main then I suggest ticking the "stop at alt_main" tickbox in the launch configuration. 

 

You can then step through alt_main and the functions it calls to find out what&#39;s wrong (just for future use since you seem to have worked out the problem already).
0 Kudos