Hi,
--- Quote Start ---
originally posted by nir@Oct 28 2004, 12:42 AM
1. is it possible to run the program from flash without running the flash programmer ? i.e i want to just run it from the ide, have the ide download it to the flash and run, the same way it runs from ram. --- Quote End ---
For 1.1 this will almost be possible. You will need to download the program using the flash programmer but will be able to ask Eclipse to reset the processor and start debugging without doing a download.
For 1.0 and 1.01 you can't do it with Eclipse so you'll have to use insight. Here are the steps:
1) Use the flash programmer to set up the flash contents.
2) Start two SDK shells and for both of them cd into <your project>/Release (or debug).
3) In the first shell run `nios2-download --reset-target --tcpport=2342 --cable=usb-blaster` (change the cable argument as appropriate or omit it if you only have one cable).
4) In the second shell run `nios2-elf-insight <project.elf>`
5) Open an insight console window if there isn't one (view -> console)
6) In the console type `target remote :2342`
7) Now you should be able to step through your code. Step over won't work because that sets breakpoints, and soft breakpoints don't work in flash.
<div class='quotetop'>QUOTE </div>
--- Quote Start ---
2. Will software breakpoints be supported in the future ? Isn't it possible to use software breakpoints that are determined before the compilation and download ?[/b]
--- Quote End ---
For 1.1 you will be able to compile in a BREAK instruction and have the debugger stop there. In C code use __asm__ volatile ("break"); in the appropriate place.
You can use the same syntax in 1.0 but the 1.0 debugger sometimes gets confused by compiled in BREAK instructions - you may not be able to continue after hitting a compiled in break without hacking the registers somewhat.