Uploading code through UART in avr Controller by atmel studio 7.0

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

I want to upload my Atmega 2560 with ftdi rs232 Programmer through atmel studio 7.0 .

So is it possible ??? If yes then how should i proceed .

PS
1) Bootloader Programmer is already uploaded on the controller
2) i have checked AVRdude , but their it is not showing ftdi rs232 Programmer on doing
**avrdude -c?** Command.

This topic has a solution.

Kunal Gupta

github.com/gkunalupta

Last Edited: Thu. Jul 2, 2020 - 08:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Which bootloader are you using?

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

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

The one given in the Arduino ide

Kunal Gupta

github.com/gkunalupta

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

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

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

I have seen this post but as i mentioned i want to upload from atmel studio 7.0 IDE not with Arduino IDE.

Kunal Gupta

github.com/gkunalupta

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

But AS7 itself can't do it? All you'll end up doing is configuring an "external command" anyway. So why bother, why not simply run the Arduino IDE if that is already the tool for the job?

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

clawson wrote:

But AS7 itself can't do it? 

You are asking this or telling me?

clawson wrote:

All you'll end up doing is configuring an "external command" anyway. 

Yeah i want to know that external command ...  we can add external tool in AS7 and then we write command for that tool in argument section starting with avrdude 

like this 

 

Now -c is used for selecting the programmer but i did not find any option for selecting ftdi adapters for doing so

 

 

Kunal Gupta

github.com/gkunalupta

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

Well i might have solved this issue , got some leads 

 

But one more error is now coming,

 

 now when i connect my usbasp programmer to arduino uno ICSP pins , it shows this error

C:\Users\kunal\Desktop\work\books\bootloaderofavr>avrdude -pm328p -cusbasp -Pusb -b115200

 

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: error: programm enable: target doesn't answer. 1

avrdude: initialization failed, rc=-1

         Double check connections and try again, or use -F to override

         this check.

 

 

avrdude done.  Thank you.

 

So as this error comes because of invalid connections or inproper power supply. I reviewed all my connections and power supply but still this error was coming.

 

 

Then  i connect same usbasp programmer to the arduino Mega for same purpose there is no error like this and it is all positive like this :

C:\Users\kunal\Desktop\work\books\bootloaderofavr>avrdude -pm2560 -cusbasp -Pusb -b115200

 

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: AVR device initialized and ready to accept instructions

 

Reading | ################################################## | 100% 0.03s

 

avrdude: Device signature = 0x1e9801

 

avrdude: safemode: Fuses OK

 

avrdude done.  Thank you.

 

 

So , Now i am not able to makeout why this thing is happening, same USBASP programmer , checked all connections and power supply but for one Board all is positive and for other it shows error.

Is there anything like this that for working on AVRDUDE , some special firmware has to be their in the controller.

PS

Both controllers can be  successfully programmed  using ARDUINO IDE

Kunal Gupta

github.com/gkunalupta

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kunalgupta wrote:

I want to upload my Atmega 2560 with ftdi rs232 Programmer through atmel studio 7.0 .

So is it possible ??? If yes then how should i proceed .

 

Is the 2560 board an arduino board or one that you made?

If yours, did you connect the DTR line through a capacitor to the Reset pin?

(This is how arduino IDE resets the target board before downloading.)

 

Since you have the arduino ide, use it to capture the avrdude command that it

uses to download a schetch to the 2560 using the bootloader.

 

For adding an external tool to Atmel Studio, see this thread (Link)

where david.prentice shows how to set up an external tool to use a batch file

to command avrdude to do the download.