RS485 Bootloader For XMEGA ? - Page 1
Forum section: electronics / general

author: David_AVD
author_rank: Super Contributor
timestamp: November 18, 2014, 05:56:27 am
content: I have a few projects that are based on XMEGA chips and would like to be able to reprogram them in the field over their RS485 interface. This would be easier than opening up the units.The main project I'm thinking of already has a button that could be held at power-up to invoke the bootloader process. Alternatively, power cycling the device to invoke the bootloader could be better for some situations where there's no button available.I've looked at xboot, but couldn't get the make to work. Asking about xboot over on AVR Freaks didn't net anything useful either. It's all make files and command line stuff.Today I tried the chip45boot2 pre-compiled hex. Although I programmed it into the chip and it shows up in their PC software, I get an error "Could not enter programming mode". I've sent off a query to chip45, but thought I'd ask here in the meantime.Part of the confusion is that the fuse options mentioned in the instructions don't line up with what I'm seeing in Atmel Studio for the ATXMEGA128D3-AU I'm using.What I really need is a way to get the bootloader hex file into the chip (using an AVRISPII) and then a simple PC app to load the application code via a USB-serial converter. I'm not interested in command line shenanigans.

author: SL4P
author_rank: Super Contributor
timestamp: November 18, 2014, 06:35:35 am
content: Using USBserial, RS-232 or -422/485 really makes no difference. These are just level / wiring standards.If you have - for example - the Arduino or other boot loader (Optiboot etc) working inanycontext - the others will workexactlythe same way.However if you're talking about some other non-ASCII serial protocol - then you might want to look into that a little deeper - to suspend the device protocol long enough to allow the boot loader to get a hook and timeout/start an upload - before reverting to the device protocol.

author: FreddyVictor
author_rank: Regular Contributor
timestamp: November 18, 2014, 10:53:39 pm
content: A while ago played briefly with bootloaders on Xmega(32A4), the only one I could get to work well was chip45bootIIRC, as well as the Tx/Rx wires, I also had connection from RTS to the reset pin via 100nF cap - same as arduino

author: Dago
author_rank: Frequent Contributor
timestamp: November 19, 2014, 08:35:04 am
content: I'm currently working on compiling a custom version of xboot (https://code.google.com/p/avr-xboot/) for a work project. It implements AVR109 compatible serial bootloader (should work via RS485 too).

author: David_AVD
author_rank: Super Contributor
timestamp: November 19, 2014, 09:04:54 am
content: I'm guessing that still requires fiddling with command line stuff? That's not what I want.

author: Dago
author_rank: Frequent Contributor
timestamp: November 19, 2014, 10:33:12 am
content: Quote from: David_AVD on November 19, 2014, 09:04:54 amWell yes... it requires you to be able to write "make <makefile name>" and "make" to the terminal.You are going to have a bad time doing anything with embedded software if you are unwilling to use the command line.

author: David_AVD
author_rank: Super Contributor
timestamp: November 19, 2014, 10:46:49 am
content: I did try the command line method, but got errors that I don't understand. Asking on AVR Freaks didn't elicit any solution.Has anyone here used xboot under Win7-64? Are there better instructions than what comes with the xboot package?I really don't have the time or inclination to write a bootloader. It may be trivial for some, but not for me.