Restarting code without flashing the device

Discussion to talk about software related topics only.
Post Reply
v8dave
Posts: 333
Joined: Thu Dec 31, 2009 8:31 pm

Restarting code without flashing the device

Post 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...
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: Restarting code without flashing the device

Post 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 5833 times
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: Restarting code without flashing the device

Post by rnixon »

Tod is awesome. I didn't know that was there either.
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: Restarting code without flashing the device

Post 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.
v8dave
Posts: 333
Joined: Thu Dec 31, 2009 8:31 pm

Re: Restarting code without flashing the device

Post 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...
Ridgeglider
Posts: 513
Joined: Sat Apr 26, 2008 7:14 am

Re: Restarting code without flashing the device

Post by Ridgeglider »

You could call or jump to ForceReboot() from bsp.c

Code: Select all

void ForceReboot()
{
   SetSR_IntLevel( 7 );
   sim.reset.rcr = 0x80;
}
User avatar
pbreed
Posts: 1091
Joined: Thu Apr 24, 2008 3:58 pm

Re: Restarting code without flashing the device

Post by pbreed »

The reset button???
v8dave
Posts: 333
Joined: Thu Dec 31, 2009 8:31 pm

Re: Restarting code without flashing the device

Post 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...
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: Restarting code without flashing the device

Post 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
v8dave
Posts: 333
Joined: Thu Dec 31, 2009 8:31 pm

Re: Restarting code without flashing the device

Post 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...
Post Reply