[En-Nut-Discussion] Trouble uploading to Ethernut 2.1.b Board

Michael Casanova michael.casanova at gmail.com
Sun Jun 24 22:40:05 CEST 2007


Thanks Ernst,

I am not using the DP Duo Dongle.  The programmer that came with my board is
labeled AVR JTAG.  It just has a female RS232 connection and a ten pin
connector to connect with the J7 input.

>From your configuration, I understand that even though I am using a JTAG
Programmer, I should use the stk500 protocol.

I tried programming the board using uisp, with the command:

uisp -dprog=stk500, -dserial=/dev/ttyS0 -dspeed=115200 -dpart=atmega128
--segment=flash --upload if=httpd.hex

but the error I received was:  "Programmer is not responding."  The LED does
stay lit a solid red.

If I try to program the board again, using the same command, but without
turning the board off and then on, I get the error:  "[VP 1] Device is not
responding correctly."  The LED then goes out.

These are similar results from when I was using avrdude.

With avrdude, I am running the command:

avrdude -p m128 -b 115200 -c stk500 -P /dev/ttyS0 -vvvv -U httpserv.hex

This is the output that I get:
mcasanova at localhost ~/ethernut-4.2.1/app/httpd $ avrdude -p m128 -b 115200
-c stk500 -P /dev/ttyS0 -vvvv -U httpserv.hex

avrdude: Version 5.4, compiled on Jun 23 2007 at 12:03:32
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "/usr/local/etc/avrdude.conf"
         User configuration file is "/home/mcasanova/.avrduderc"
         User configuration file does not exist or is not a regular file,
skipping

         Using Port            : /dev/ttyS0
         Using Programmer      : stk500
         Overriding Baud Rate  : 115200
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv: . [e0]
avrdude: stk500_getsync(): not in sync: resp=0xe0
avrdude: successfully opened stk500v1 device -- please use -c stk500v1
         AVR Part              : ATMEGA128
         Chip Erase delay      : 9000 us
         PAGEL                 : PD7
         BS2                   : PA0
         RESET disposition     : dedicated
         RETRY pulse           : SCK
         serial program mode   : yes
         parallel program mode : yes
         Timeout               : 200
         StabDelay             : 100
         CmdexeDelay           : 25
         SyncLoops             : 32
         ByteDelay             : 0
         PollIndex             : 3
         PollValue             : 0x53
         Memory Detail         :

                                  Block Poll
Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
           eeprom         4    12    64    0 no       4096    8      0
9000  9000 0xff 0xff
                                  Block Poll
Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
           flash         33     6   128    0 yes    131072  256    512
4500  4500 0xff 0xff
                                  Block Poll
Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
           lfuse          0     0     0    0 no          1    0      0
9000  9000 0x00 0x00
                                  Block Poll
Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
           hfuse          0     0     0    0 no          1    0      0
9000  9000 0x00 0x00
                                  Block Poll
Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
           efuse          0     0     0    0 no          1    0      0
9000  9000 0x00 0x00
                                  Block Poll
Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
           lock           0     0     0    0 no          1    0      0
9000  9000 0x00 0x00
                                  Block Poll
Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
           calibration    0     0     0    0 no          4    0      0
0     0 0x00 0x00
                                  Block Poll
Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
           signature      0     0     0    0 no          3    0      0
0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500
avrdude: Send: A [41] . [80]   [20]
avrdude: Recv: . [e0]

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0xe0
avrdude: Send: A [41] . [81]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

I have sifted through the avrdude source code a bit to see what exactly is
failing.

I think the next best step for me is to make sure the programmer is working
correctly.  I will try to setup a development environment on my Windows
box.

Any advice you can offer is greatly appreciated.

Thanks,
Michael




On 6/24/07, Ernst Stippl <ernst at stippl.org> wrote:
>
> Hi!
>
> When not using Ethernut's "make burn" I use the following small batch file
> to run "uisp":
>
> if %1=="" goto l_error
> uisp -dprog=stk500 -dserial=/dev/ttyS0 -dspeed=115200 -dpart=atmega128
> --segment=flash  --upload if=%1.hex
> goto l_end
> :l_error
> rem no .hex file defined!
> :l_end
>
>
> I use it with the SP-Duo programmer dongle which came with my Ethernut
> 2.1b
> Starter kit. Are you using this one, too? (you refer to AVR JTAG). I have
> the cable labelled "JTAG" connected to J7 and also pins 1-2 and 5-6
> connected on JP5.
>
> When powering up the Ethernut board the LED on thr SP Duo is lit *green*
> and
> when connecting a terminal emulator at 115200 bps-8N1 when typing CTRL-V
> the
> reply is "SP Duo v1.0"
> Only then burning the ATmega, the LED starts flashing green/red and when
> finished becomes green again.
> I do this all on a Windows/XP machine and have never tried it on Linux.
>
> hth
>
> Ernst
>
> -----Ursprüngliche Nachricht-----
> Von: en-nut-discussion-bounces at egnite.de
> [mailto:en-nut-discussion-bounces at egnite.de] Im Auftrag von Michael
> Casanova
> Gesendet: Sonntag, 24. Juni 2007 02:16
> An: en-nut-discussion at egnite.de
> Betreff: [En-Nut-Discussion] Trouble uploading to Ethernut 2.1.b Board
>
> Hi All,
>
> I am having trouble uploading anything to my Ethernut 2.1b Board.  I have
> been searching for a solution all day, but have yet to find anything that
> works.
>
> I am using the AVR JTAG adapter that came with my board and have it
> connected between the J7 connection and my serial port /dev/ttyS0.  On
> JP5,
> I have pins 1 and 2 shorted, and pins 5 and 6 shorted.
>
> I am trying to use avrdude to program my microcontroller, and have tried
> using may different settings, all to no avail.  I am unsure which
> programmer
> to use.  I have tried using STK500, STK200, and a number of the JTAG
> listed
> in the avrdude.conf file.  None of them have worked.
>
> When I connect the JTAG adapter to my serial port, and press Ctrl-V, I get
> the hex output:  E0E0 0008.  I am not getting the version number of the
> programmer.  My port is configured as follows:  /dev/ttyS0, baud rate -
> 115200, no parity, 8-bit, 1 stop bit, no flow control.
>
> My serial port is functional.  I have been able to verify that it is
> working
> correctly by connecting the RS-232 connection directly to my serial port,
> holding down the spacebar, and pressing reset button.  I am able to get
> the
> Nut/OS version,  the IP Address, the IP Mask, and the Common Gateway.  The
> sample application (httpd server) is already loaded, and functions
> correctly.
>
> I am seeing some weirdness with the LED on the JTAG adapter.  When I first
> power up the board, the LED is solid red.  When I try to program the
> board,
> or issue a Ctrl-V from the terminal, the LED goes out.  The only way to
> reset the LED to solid red is to power down and power up the board.  The
> reset button does not reset the LED.
>
> I have received a number of error messages when issuing the "make burn"
> command, but I they are probably not too helpful, since they are different
> depending on which programmer I have selected in my Makefiles.
>
> I do have read/write access on my /dev/ttyS0 port.
>
> I believe my problem lies in a faulty JTAG Programmer, or in selecting the
> correct programmer in my Makefiles.
>
> Your help and advice is greatly appreciated.
>
> Thank You,
> -Michael
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.472 / Virus Database: 269.9.6/863 - Release Date: 23.06.2007
> 11:08
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>



More information about the En-Nut-Discussion mailing list