using AVR studio question

hi, I finished writing the program in the Arduino environment. It works fine. I am only prototyping with the Arduino. I am going to mass-produce my device with the ATmega168P chip and I plan to upload the program using the ICSP interface with a Atmel JTAG (ATJTAGICE2).

what would be the best way of doing this? (My final PCB does not have a USB interface, only a six pin ICSP interface)

I was thinking that copying the C (.cpp) file that is made while uploading the Arduino sketch using the Arduino environment into AVR Studio would be the way to go. When I do this AVR Studio tells me that I'm missing some files.

What would be the best way for mass production. I cannot give someone the code that I wrote for the Arduino environment as it is not sufficient.

Thank you very much for your help, Eitan Waks

Once you compile your sketch in the Arduino environment, the folder for your sketch will contain a file in the applet folder ending in .hex - this can be uploaded through AVR studio under tools/program AVR/connect...

Just a question here, if you just compile, doesn't it store the hex file in a temporary folder? I "think" (not sure, but it's what I do) is do a Load, the file will then compile, then try to upload and fail with an error. BUT the hex file is still there in the applet folder.

Not sure about the above, but if just compiling doesn't work, you might try that.

Ken H>

I THINK it depends on the IDE Version whether the hex file is left in the applet folder or not. Version 16 does leave it there. I dislike version 17 for a number of reasons and haven't tried v18 yet so I can't say whether they do or not.

For one design I did for a customer I turned on verbose for the final build, copied the avrdude invoking command line and used it as the basis for a batch file. I put the hex file and the batch file (with the directories and programming options changed as needed) together with avrdude and it's configuration file on a thumb drive and gave that to the customer who uses it to upload via ICSP. Works great.

In my case I also gave the customer a second thumb drive complete with the V16 IDE and all files so he can just fire it up and make changes if he needs to in the future. He did pay for the source code.

Actually I now only use the Arduino IDE as a compiler/linker/loader when I'm developing. I much prefer UltraEdit Studio for project management and editing. But my projects tend to be big ones with loads of files.

As an aside if somebody can point me to some kind of instructions for porting Arduino code to AVR studio along with the libraries and core I'd like to try that. I could dig through it and figure it out myself but I'm up to my elbows in other work.