Small Scale Production Programming

Go To Last Post
23 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've been using small AVRs since 2002, but extremely intermittently, so I haven't amassed very much experience in that time.

When I started I decided to make my own programmer hardware and software. The main reason was as a learning exercise, but I found that it worked better than the built in tools. I basically loaded data for EPROM and EEPROM, set the fuses and lock bits as I wanted them and saved the file as a custom format.

I could then program boards with one click. It would program, verify, write the lock bits and then verify that the program could not be read back.

Due to my infrequent use of AVRs I've just stuck with that system over the years, but recently I have not have a computer with a parallel port so I bought an AVRISP MKII.

Now, how do I duplicate the functionality I had in my program?

I see mention of an ELF format, but the help files for AVR Studio 4 and Atmel Studio 6 don't say much about how to actually create and use them.

I actually went back to AS4 because the method of programming seemed much more difficult in AS6. Until I found out that Debug->Start Without Debugging actually means "send program to chip".

So, I don't want to do multiple operations to program each board when I have hundreds to do.

What have I missed?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I forgot to mention that I'm using assembly code.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I actually went back to AS4
Use the AUTO tab, simply set up all the other tabs, uncheck the fuses and lock bits "Auto read" then set up what you want to program in the Auto tab.

From then on it's single click programming using START.

Se my belly aching about it's disapperance in AS6 here https://www.avrfreaks.net/index.p...

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for your reply.

I guess that idea will work in the short term, but it does mean I will need to program all the boards. I wouldn't trust anyone else to get the settings right.

That was the beauty of my program: in production mode it just had/has a button and a message that turned green on success and red on error.

If I wasn't so pushed for time now days I'd work out how to modify my program to work with the AVRISP MKII.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AS6 cannot currently create ELF production format files so actually use AS4.19 to do that.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I wouldn't trust anyone else to get the settings right.
Then get a Keyfob programmer (maybe KANDA?? http://www.kanda.com/browse.php?... ) and YOU load it up with all the necessary stuff.

Then all your people need to to is plug the programmer in, power up and push the programming button. When the light goes Green they do the next board, if it doesn't the board gets put aside for repair.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
AS6 cannot currently create ELF production format files so actually use AS4.19 to do that.

Really? Atmel Studio User Guide->Programming Dialog->Production Files says it can. Is it just something not yet implemented?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:
Quote:
I wouldn't trust anyone else to get the settings right.
Then get a Keyfob programmer (maybe KANDA??

That sounds like a possibility, but someone in another thread (I think it may have been you) said that key fob programmers don't work with AS6. Is that because of AS6 not being able to create ELF files?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That (and a check I just made with STK500) suggests you can program one but not that you can create one.

I guess if you use avr-gcc inside AS6 which has the capability to embed lock and fuse settings in a .elf then, yes, you can create one when you build a C project but the point is that in AS4 you could actually build one in that dialog. AFAICS AS6 has not yet inherited that ability.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AS6 does produce .elf production files by default. What it doesn't do is give you the ability to stich them together using the avr programmer gui.

Since the gui thing is missing, fuses and lock bits have to be set in the code. That really doesn't bother me much though, as I don't have to manually set fuses every time i create an .elf file.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Except it looks like that's only available when programming in C.

Well, using the auto function in AS4 will get me out of trouble in the short term, and I'll look into stand-alone production programmers later.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Well, using the auto function in AS4

As I say you can also construct an ELF Production file in AS4 too. Having created one you can either use AS4 command line tools (avrispmkii.exe, jtagicemkii.exe etc) to then program it or you can use the combined atprogram.exe from AS6 which combines all those into one.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Surely if you want to make a simple and robust production programming arrangement, you put every HEX file into a batch command.

The user simply inserts a board and presses START button.
The batch program does the business and checks for errors at every stage.

A log is kept of the progress.

You can do this with stk500.exe, atprogram.exe, avrdude.exe, ... or any properly designed command line program.

You can even make it look as if it is "graphical", play tunes or blow whistles.

Personally, I would be horrified by any "Studio" production programming.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
said that key fob programmers don't work with AS6
I said that MY keyfobs don't work with AS6 because the clever people at Atmel decided that they would drop support for older tools like the AVRISP Mk1 which is what the keyfob appears as to the programming interface. :-)

Kanda may appear as a STK500 in wich case they can be used with AS6, the STK500 is the only RS232 tool now supported. Just check with them before purchasing.

I may be able to get some changes done to my units so that instead of returning the AVRISP signature they will return the STK500 signature but it's a lot of pain which I don't really need.

If the "manufacturer" of my keyfobs is reading this maybe he can think about an update. :wink:

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:

Personally, I would be horrified by any "Studio" production programming.

I am too.

So where can I find the instructions to do this?
I found no help, not even a manual for JTAG3. The tools help in Studio5 just dumps me in Atmel.com, and I can't find any help from there. (I know you told me to use AS6, but it complains the JTAG3 can't be used for debugging, so AS6 does not work for me. It works in AS5.)

Any other suggestions how to do this is welcome as JTAG3 is not a must, but JTAG programming is (no ISP connector on the board). Buying another programmer is no problem if that can save me days looking for instructions.

The target is Xmega128A3 w. JTAG connector.

Einar Sjaavik

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The jtagice-3 user guide should explain most things.

AS6 (and AS5) come with the atprogram.exe command line utility. No. I can't find an online manual, but the comand line help gives you everything you need.

You should be able to create your production BAT file to use "atprogram.exe -t jtagice3 -i jtag"

I would guess that AS6 should work seamlessly with your JTAGICE-3 for interactive development, debugging, programming, ...

If you have a particular problem, just describe your setup.

I don't have a JTAGICE-3 but there are plenty out there. Someone can talk you through each step posibly with an identical setup.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
The jtagice-3 user guide should explain most things.

Thanks a million!!
That is what I have been searcing for to the best of my abilities. And in my opinion it should have been here:

Attachment(s): 

Einar Sjaavik

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Most microcontroller manufacturer websites are designed to be useless.
I tried your 'obvious' search for JTAGICE-3 Documents and got the same result. It works the same for a AVRDRAGON too !

In fact the webpages that I and Cliff have posted links too don't ever get found via the Atmel website.

If you find an online doc for atprogram.exe, please post a link for the benefit of mankind.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

No. I can't find an online manual

THE MANUAL:

http://www.atmel.no/webdoc/atmel...

(OK, not much of a manual when it just says "run the command to get help")

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

(OK, not much of a manual when it just says "run the command to get help")

However, you may be pleased to see http://www.atmel.no/webdoc/atmel... which list jungo errors, and in SP1, the Jungo errors are actually being reported with the error text....

Quote:

In fact the webpages that I and Cliff have posted links too don't ever get found via the Atmel website.

This is because this page is not a official atmel.com page that has gone through reviews etc. It is the "internal" page that is generated directly from our documentation repository, mostly to give support updated/linkable documents...

This means that the atmel.no is much more up to date than anything else that is being produced from us atm, but it is not something that is official.

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Morten,

And thankyou very much for making these pages available.

The "intuitive" approach of clicking on the AS6 Help->Product_Page_for_AVR_Dragon

just gets you to the "zero documents"

AS4->Help->AVR_Tools_User_Guide got you somewhere.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

The "intuitive" approach of clicking on the AS6 Help->Product_Page_for_AVR_Dragon

just gets you to the "zero documents"


This has been fixed, the reason is the... quirky atmel.com site rewamp that happened last spring, which seems to have decided that our old links should redirect to the frontpage in stead of the correct page. This will probably be available in the next release, as the fix involves a rewrite of the whole tool structure in studio...

The built-in help for Atmel Studio does contain the dragon help for instance, but in Microsofts wisdom, there are no good way to upgrade deployed help for the time beeing (and this is going to be the next main help system that windows uses...), so we decided on a "internal" web page to give at least some update frequency....

We do not promote this very loud, as it is not something that we are distributing, and in fact, these pages does not exist :P

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Quote:

No. I can't find an online manual

THE MANUAL:

http://www.atmel.no/webdoc/atmel...

(OK, not much of a manual when it just says "run the command to get help")

And this is primarily because as atprogram still is going through some iterations in the interface (internally), we have decided at least for know to make the CLI self-documenting...

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.