Xmega and programming .HEX bootloaders...

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

Hi freaks. I would really appreciate some help. I am desperate. In my final 10 days at UNI and finishing my Android controlled Arduino FM synth project and my board goes nuts. :(
I am using an Xaduino. It is an Arduino board in the shape of an Arduino Xmega2560 that has an ATXega128A3u as its core. It uses a modified version of the Arduino IDE.
I can no longer program the board with the modified IDE. I have found the bootloader .hex file in the packages hardware/xmega/bootloaders/ folder and have tried to upload it to the board using my AVR dragon and the PDI programming port. AVR studio sees the chip and reads it correctly but when I try to program the .hex bootloader file I get an exception error:

Timestamp: 2014-04-30 22:01:12.444
Severity: ERROR
ComponentId: 20100
StatusCode: 1
ModuleName: TCF command: Modules:add failed.

The Service threw an unknown exception

I am really at my wits end and now will probably have nothing to give in as my final year project. If anyone can help me get the bootloader back I will donate some money to them or send them lots of strawberry scented kisses on a beautiful psychadelic sunset. PLease soeone help. Or if anyone knows of ANYbody who has one of these boards: http://www.ebay.co.uk/itm/Arduino-compatiable-xmega-based-arduino-Xmega128A3U-Xaduino-/181150592167?nma=true&si=RYRf9hHg%252BdGvFOqfO%252FbyBXAZ45Q%253D&orig_cvip=true&rt=nc&_trksid=p2047675.l2557

and they can sell and post e one or are in the london area then I will do all of the above with bells on.

thanks.
Steve.

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

What programmer are you using? If it's supported by avrdude have you tried that as an alternative to AS6 ?

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

i'm using a dragon programmer. thru PDI.the device is an atXmega128a3u.

:...(

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

So have you tried avrdude instead of Atmel software? Not only is it simply an alternative it also has a useful feature that if you add more and more "-v"s to the command line (up to 4) it gets more and more verbose and may be able to tell you more about what is wrong (assuming it doesn't simply "just work").

The rather scant error you get from AS6:

Quote:
ModuleName: TCF command: Modules:add failed.

sounds much more like some kind of high level software installation problem than some low level thing like wiring or whatever so it could well be that alternative software "just works".

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

Thanks for helping me Clawson. :....)
OK I've got AVRdude 5.1. Ive tried this line: avrdude -p ATXMEGA128A3 -c dragon_pdi -U FLASH -P usb
Is this right?
I get an error saying usbdevopen() did not find device 'usb'

What am I doing wrong?

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

Quote:

ModuleName: TCF command: Modules:add failed.

What version of Atmel Studio is this? 5 beta?

Modules is the component that parses object files etc. the add command is when objects are added. So something in the object file borks the system.

If you go to Tools|Options|Tools and enable diagnostics logging, you should get a better message available in the Output window".

:: Morten

 

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

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

Ok. I installed the libusb filter and can now connect but when I try to program I get this:

C:\Program Files\arduino-1.0.1-windows-X\arduino-1.0.1\hardware\xmegaduino\bootl
oaders\xarduino>avrdude -p ATXMEGA128A3 -b 115200 -c dragon_pdi -P usb -U boot:w:xarduino.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.19s

avrdude: Device signature = 0x1e9742
avrdude: reading input file "xarduino.hex"
avrdude: input file xarduino.hex auto detected as invalid format
avrdude: invalid input file format: -1
avrdude: write to file 'xarduino.hex' failed

avrdude done. Thank you.

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

Post the first few lines of xarduino.hex

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

xarduino.hex was empty!!! :O
I have worked a way around it though it took me a while and the board had been playing up long before this happened or so it seems...
I tried uploading the last .hex file from the last Xarduino compile I did with what i thought was a working program.
It didn't work and so I tried an earlier version and it worked!! :S
so as far as I can see, soething went wrong with the board being programmed by the Xarduino software because I can upload .hex files to the board using the dragon and the PDI interface..hmmm... so with a few tweaks I've re compiled an older verison of the program and uploaded it and it now all works again albeit without the xarduino bootloader. Still can't use the xarduino IDE but it doesn't really matter because I can just compile and use the .hex file generated. :)