Page 1 of 1

Restarting code without flashing the device

Posted: Wed Sep 08, 2010 10:01 pm
by v8dave
Is there any way to restart a running application during debug instead of having to downloading and reflashing the device?

Sometimes when debugging I want to try something out more than once to check behavour and at present I have to download and restart the application each time. What would be nice is a way to RESET the programme to the start and start debugging again.

Can this be done?

Cheers,
Dave...

Re: Restarting code without flashing the device

Posted: Thu Sep 09, 2010 12:51 pm
by tod
Yes. See the attached image. With this set when you re-run your debug configuration it just prompts you to quit the current session and starts over.
NBDebug.png
NBDebug.png (50.45 KiB) Viewed 5837 times

Re: Restarting code without flashing the device

Posted: Thu Sep 09, 2010 1:31 pm
by rnixon
Tod is awesome. I didn't know that was there either.

Re: Restarting code without flashing the device

Posted: Thu Sep 09, 2010 2:41 pm
by tod
aww shucks. Of course I should have given credit to Forrest . Not too long ago, I just happened to see his response to a post from two years back about this upcoming feature in Rel23_rc1.

Re: Restarting code without flashing the device

Posted: Fri Sep 10, 2010 4:19 am
by v8dave
Thanks Tod,

This sort of works but doesn't restart the code from the beginning. It just seems to reconnect the debugger, which for some stuff will work for me. Ideally I want a restart of the app without the reload.

I also don't see a way to load any updated code with this option selected. I have made changes and then rebuilt the code but not I can't see how to download this without switching this option off!!

Cheers,
Dave...

Re: Restarting code without flashing the device

Posted: Fri Sep 10, 2010 5:05 am
by Ridgeglider
You could call or jump to ForceReboot() from bsp.c

Code: Select all

void ForceReboot()
{
   SetSR_IntLevel( 7 );
   sim.reset.rcr = 0x80;
}

Re: Restarting code without flashing the device

Posted: Fri Sep 10, 2010 7:52 am
by pbreed
The reset button???

Re: Restarting code without flashing the device

Posted: Fri Sep 10, 2010 8:54 am
by v8dave
At first I thought you was joking, then I realised that with the suggestion from Tod this would work and sure enough it does!!

Just need a way to download recompiled code without changing the check box option and I am in business but otherwise this is excellent suggestions.

Cheers all.

Dave...

Re: Restarting code without flashing the device

Posted: Fri Sep 10, 2010 10:08 am
by tod
I can't see how to download this without switching this option off!!
AutoUpdate?

To make it easy there's a button for it in the toolbar.
Also, you can automate it more via the external tools menu and using the command line version

See the \nburn\docs\NetBurnerPcTools\NetBurnerTools.pdf p 27 for full details but the summary is
AutoUpdate.exe -I<ipaddr> -F<filename> -R -A

Re: Restarting code without flashing the device

Posted: Fri Sep 10, 2010 10:30 am
by v8dave
Thanks Tod,

Because you have to select the file each time you use this, I'll investigate creating a new tool for it using the command line option.

Getting closer to the perfect setup I would like!! :o)

Dave...