AVRDude works with no errors, but the program does not seem to be uploaded?

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

Hello all!

 

I'm new to using atmel studio 7 to work on my arduino boards. I'm doing this because I want to do 'real' embedded systems software development.

 

I previously had success uploading Blink.c, getting the LED on pin 13 to blink. That was when my Arduino appeared on COM3 (I use atmel studio in virtualbox with Mac OS as host). As of today, my arduino appears on COM4. This is with the arduino plugged into the same (only) USB port on my laptop, so I am a bit mystified as to why it has 'moved'.

 

I have been unable to successfully upload to my arduino since it changed ports. I am using AVRdude configured as an external tool for atmel studio. The strange thing is that AVRdude reports that it successfully uploads to my board.

 

Note that I have gone into Tools -> External Tools and updated the arguments to reflect the switch from COM3 to COM4.

 

My apologies if this thread is a repeat! I did do a couple searches, but came up with no answer.

Thomas Brannan | thomascbrannan@gmail.com

Last Edited: Sun. Jul 16, 2017 - 03:25 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well it seems to be working now, though I don't know what I did. Any ideas?

Thomas Brannan | thomascbrannan@gmail.com

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

USB enumeration (if this is the correct term for this) is a bit of a nuisanse.

It's trying to do some "smart" stuff just in case you happen to plug some similar (or identical) devices in your USB ports.

Note that you do not have serial COM ports. It's all emulated in software.

 

If you read the documentation of the driver of the USB <==> Serial bridge you are using you might find an option to assign a specific comport number to your arduino.

These chips usually need an external eeprom to hold the product ID and vendor ID (serial number etch) to uniquely identify to your PC what device you plugged in this time.

 

Me, myself, I don't bother with bootloaders and such but just use plain old regular pretty reliable USBasp on my linux box.

There is no reference to a serial port whatsoever in the make target I use to program an AVR:

program: main.hex
	avrdude -p $(MCU) -c usbasp -qe -U flash:w:main.hex:i

Ps:

Mac's are somewhat like linux.

You can use "lsusb" or: "dmesg -tail" on the commandline to give you an idea of how your PC has configured your device.

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

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

Paulvdh, thanks for your reply. I ended up making two external tools to launch avrdude from atmel studio, an arduino COM3 tool and an arduino COM4 tool. Works for now anyways, though I have to check up on which connection the arduino has decided on by looking in computer management.

Thomas Brannan | thomascbrannan@gmail.com