Unable to reprogram

Discussion to talk about software related topics only.
SeeCwriter
Posts: 635
Joined: Mon May 12, 2008 10:55 am

Unable to reprogram

Post by SeeCwriter »

I had a working "Hello World" program that was running on my MOD5234. I made some changes to the
code and downloaded the new version to the module. Now the module crashes every 2seconds and
displays some Trap message on the Mitty terminal. And I am now unable to download to the board anymore.

The manual says that when the "Waiting 2 sec to start 'A' to abort" appears I can enter an upper case
letter A and get to a Boot Monitor prompt. But that never did work. I've never been able to get a prompt,
even right out of the box.

What do I have to do to be able to download to the module again?
User avatar
Chris Ruff
Posts: 222
Joined: Thu Apr 24, 2008 4:09 pm
Location: topsail island, nc
Contact:

Re: Unable to reprogram

Post by Chris Ruff »

when faced with this problem, I find that hitting capital-A EVEN FASTER will catch the monitor.
good luck!

Chris
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand
SeeCwriter
Posts: 635
Joined: Mon May 12, 2008 10:55 am

Re: Unable to reprogram

Post by SeeCwriter »

Hitting the keyboard faster has no effect.
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: Unable to reprogram

Post by rnixon »

Are you sure you have the serial port jumpers in the correct position? The device will transmit on either USB or DB9, but the RX jumper must be in the right place to select one or the other. So if RX is set up for USB, and you are using the DB9, the 'A' won't be detected.

Also note that if your crashing, you should do a power cycle before you download more code BEFORE and traps occur. Otherwise the system will not be in a known state.
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: Unable to reprogram

Post by tod »

Since you've never been able to break in with Shift-A it makes me thing something is not configured properly on your dev. board. I don't know if this is your own board or one of NetBurner's dev boards. With NB there are various jumpers for configuring things but in my experience they always come properly configured. I remember on one board I had the output messages showing up on multiple locations but the input was only being accepted on UART0. Make sure you are connected to the proper serial port. I use the Shift-A trick more frequently than I'd like to admit, so rest assured it works. Make sure your terminal program has the focus and make sure you hit the Shift key, the caps lock key is not a substitute.

One thing I have noticed of late is I often have to Shift-A in after a cold boot to get a valid reprogram. If my board is in a trap/reboot cycle and I just Shift-A and FLA down a new program, it often will give me an error at the end. If I cold boot, it always works. I usually FLA down the factory demo program after a trap/reboot cycle, just to make sure I get a good program running again.

Also in case you don't know, you can change the 2 second timing with the IPSetup program. Hit the Advanced settings and look for the Boot Delay field. If you decreased this below 2 it might explain why you're having trouble breaking in.

If you are experimenting, it can be helpful to put in an OSTimeDly of 10 seconds or so after you've enabled AutoUpdate, smart traps and the task monitor. That way if you make a change that traps/reboots you get a chance to send a fixed program over Ethernet before the trap occurs. Of course my favorite way to experiment is with my unit testing framework. The new code doesn't run unless I trigger it from the web interface. If it traps, the processor just reboots cleanly and I can download a new experiment.
greengene
Posts: 164
Joined: Wed May 14, 2008 11:20 am
Location: Lakeside, CA

Re: Unable to reprogram

Post by greengene »

there are several things that have gotten me to where i no longer can get the NB to
respond to 'A' usually having to do with the PC side.
1) Hyperterm or MyTTY can get confused. restarting them sometimes helps.
2) disconnecting the serial cable sometimes helps.
3) power cycling the NB sometimes helps.
4) if using a RS-232/USB converter sometimes unplugging and replugging helps
either/both at the PC or the other end of the dongle.

if i'm seeing the prompt, i have always been able to eventually get the NB to
to recognize my 'A'.
SeeCwriter
Posts: 635
Joined: Mon May 12, 2008 10:55 am

Re: Unable to reprogram

Post by SeeCwriter »

Jumper was set to USB. The docs didn't say anything about a jumper.

So the problem is when I call StartSnmpProcessor() it crashes. Remove it, it runs.

void usermain( void *pd ) {
InitializeStack();
if (EthernetIP == 0) GetDHCPAddress();
OSChangePrio(MAIN_PRIO);
EnableAutoUpdate();
StartSnmpProcessor( MAIN_PRIO - 1 ); // <<<<<-----------

EnableTaskMonitor();

iprintf("Application started\n");
while (1) {
iprintf("Hello World!\r\n");
OSTimeDly(30);
}
}
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: Unable to reprogram

Post by rnixon »

Just in case anyone else has this question, in the quick start guide that came with my dev kit (MOD-DEV-100 board) it says:

Development Board Jumper Settings
----------------------------------
Your development board has jumper locations to select the power source and serial communication channel.

The factory default jumper settings configure the USB port to be used for both power and UART0 serial communications. The instructions below use the notation “1-2” to signify connecting a jumper between jumper header pins 1 and 2, “2-3” to signify pins 2 and 3. Some jumper headers have only 2 pins. The word “open” signifies no jumper is to be installed.

Power Source Jumpers, JP1 and JP2
USB: JP1 (1-2), JP2 (1-2)
Optional external power supply on J9 or J10: JP1 (2-3), JP2 (open)

Debug Port UART0 RS-232 Jumper, JP3
USB: JP3 (1-2)
DB9 J7: JP3 (3-4)
SeeCwriter
Posts: 635
Joined: Mon May 12, 2008 10:55 am

Re: Unable to reprogram

Post by SeeCwriter »

Thank you. You have a better Quick Start Guide than I do. The only mention of a jumper is on page 3
where it says to "jumper JP15 on version 1.08 Carrier boards if you want to use the Flash File System."
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: Unable to reprogram

Post by rnixon »

Guess I should have mentioned my revision of the MOD-DEV-100 as well, its 1.12.
Post Reply