how to save BP config after setting it with TeraTerm?

Bus Pirate support for AVRDude AVR programmer

how to save BP config after setting it with TeraTerm?

Postby Vizzini » Fri Jan 12, 2018 7:15 pm

I have a newbie question. I've managed to change the mode of my bus pirate 3.b with Tera Term to "SPI". But if I quit Tera Term all the configuration is lost again! How to save the mode and config, so that I can use AVRdude to talk to my target chip with the given mode/config?
Vizzini
Newbie
Newbie
 
Posts: 7
Joined: Fri Aug 05, 2016 7:21 am

Re: how to save BP config after setting it with TeraTerm?

Postby USBEprom » Sat Jan 13, 2018 8:31 am

Hi Vizzini.
Can you explain better, please?
Entering direct SPI mode the pgmled pin acts as slave select but for what I know that feature is only supported on parallel bitbang programmers.
What version is avrdude and what the operating system you are using?

Be seeing you.

U.Sb
USBEprom
Full Member
Full Member
 
Posts: 158
Joined: Wed Mar 14, 2012 4:09 pm

Re: how to save BP config after setting it with TeraTerm?

Postby Vizzini » Sat Jan 13, 2018 1:30 pm

Hi U.sb. I'm on Windows 10, with BP v3.b, and BP firmware 5.10, and avrdude version 5.10 (same number).
And what I'm trying to do is talking via avrdude and via BP to my chip, an Atmega32U4. What I did wasentering the console with Tera Term, and changing some options of the BP, as clock speed or mode. Then I quit Tera Term and tried to use avrdude. However, all the option I did in Tera Term (as mode, clock speed setting, etc.) of the BP seems to be discarded (reset) again. My question is, how can I save the options permanently, to use avrdude with the options I set in Tera Term?
Vizzini
Newbie
Newbie
 
Posts: 7
Joined: Fri Aug 05, 2016 7:21 am

Re: how to save BP config after setting it with TeraTerm?

Postby USBEprom » Sat Jan 13, 2018 4:50 pm

Hi Vizzini.
OK, I get it now.
To me the whole thing it is rather weird though.
Honestly I did not know avrdude works in that way, I mean by setting it using a terminal program.
I know it is possible use it with Arduino IDE and some other GUI, but by using terminal programs really no.
I did not ever use it but I know avrdude on Windows 10 need to be started from CMD or powershell without first setting anything by a terminal program.
I also know that there is an alternate firmware for the Bus Pirate that clones an STK500 programmer for AVR microcontrollers (http://dangerousprototypes.com/docs/STK ... mmer_clone).
I have never had avrdude v5.10, that truthfully speaking is pretty old, but I have the current avrdude v6.3 (http://download.savannah.gnu.org/releases/avrdude/) and it is a stand alone software that does not need for any terminal program for what I know.
For setting things there is a file named avrdude.conf.
WinAVR too works that way without any need for a terminal program.
However avrdude (http://www.nongnu.org/avrdude/) should works simply by starting it with the wanted options using this sintax:

avrdude -c buspirate -P <bus pirate comm port> -p <chipname>

For instance something like this:

avrdude -c buspirate -p m32u4 -P COM1 -v (Testing connection and reading Fuses of the Atmega32U4)

Here are some documents that explain how use avrdude:

http://dangerousprototypes.com/docs/Bus ... rogramming

http://dangerousprototypes.com/docs/AVR_quick_start

https://open.konspyre.org/pages/avrb/index/

http://www.nongnu.org/avrdude/user-manu ... scriptions

http://www.nongnu.org/avrdude/user-manu ... parameters

http://www.nongnu.org/avrdude/user-manu ... nvocations

Really a do not see any need to set options by a terminal program, as well I do not understand how it can be possible to manage them and last but not least, the purpose of doing it that way because actually avrdude has already its own options for do that.

Be seeing you.

U.Sb
USBEprom
Full Member
Full Member
 
Posts: 158
Joined: Wed Mar 14, 2012 4:09 pm

Re: how to save BP config after setting it with TeraTerm?

Postby Vizzini » Mon Jan 15, 2018 5:01 pm

Hi Us.b! Alright, then I misunderstood how to use bus pirate. I better don't change any setting in the console configuration with Tera Term at all, since avrdude uses his own config? But what is the purpose of the console configuration, then? Anyway, thanks for your help! best regards..
Vizzini
Newbie
Newbie
 
Posts: 7
Joined: Fri Aug 05, 2016 7:21 am

Re: how to save BP config after setting it with TeraTerm?

Postby USBEprom » Tue Jan 16, 2018 2:30 pm

Hi Vizzini.
Good question yours, I believe there is a misunderstanding about the meaning of the 'terminal' term.
As stated here:

http://www.nongnu.org/avrdude/user-manu ... ude_4.html

AVRDUDE is a command line tool, used as follows:

...
For programmers that attach to a serial port using some kind of higher level protocol (as opposed to bit-bang style programmers), port can be specified as net:host:port. In this case, instead of trying to open a local device, a TCP network connection to (TCP) port on host is established. The remote endpoint is assumed to be a terminal or console server that connects the network stream to a local serial port where the actual programmer has been attached to. The port is assumed to be properly configured, for example using a transparent 8-bit data connection without parity at 115200 Baud for a STK500.

This feature is currently not implemented for Win32 systems.

...
-t Tells AVRDUDE to enter the interactive “terminal” mode instead of up- or downloading files. See below for a detailed description of the terminal mode.


How you can read avrdude itself implements a 'terminal mode' and at the same time can be remotely administered by a 'terminal'.
Honestly I could not find anything about the use of avrdude with some terminal program like Tera Term, Putty, and so on, can you provide some reference about it?
However by going forward, here are examples of use of avrdude and its user manual too:

http://www.ladyada.net/learn/avr/avrdude.html

https://learn.sparkfun.com/tutorials/po ... ng-avrdude

https://www.cs.ou.edu/~fagg/classes/gen ... vrdude.pdf

I find no mention about the need to set parameters in avrdude using a terminal program.
Rather it is described how to send commands to the device that you want to program, never how to set up avrdude itself by a terminal program.

Be seeing you.

U.Sb
USBEprom
Full Member
Full Member
 
Posts: 158
Joined: Wed Mar 14, 2012 4:09 pm


Return to AVRDude