Author Topic: RS485 Bootloader For XMEGA ?  (Read 6026 times)

0 Members and 1 Guest are viewing this topic.

Offline David_AVDTopic starter

  • Super Contributor
  • ***
  • Posts: 2879
  • Country: au
RS485 Bootloader For XMEGA ?
« on: November 18, 2014, 05:56:27 am »
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.  :scared:

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.
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: RS485 Bootloader For XMEGA ?
« Reply #1 on: November 18, 2014, 06:35:35 am »
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 in any context - the others will work exactly the 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.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline FreddyVictor

  • Regular Contributor
  • *
  • Posts: 164
  • Country: gb
Re: RS485 Bootloader For XMEGA ?
« Reply #2 on: November 18, 2014, 10:53:39 pm »
A while ago played briefly with bootloaders on Xmega(32A4), the only one I could get to work well was chip45boot

IIRC, as well as the Tx/Rx wires, I also had connection from RTS to the reset pin via 100nF cap - same as arduino
 

Offline Dago

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: fi
    • Electronics blog about whatever I happen to build!
Re: RS485 Bootloader For XMEGA ?
« Reply #3 on: November 19, 2014, 08:35:04 am »
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).
Come and check my projects at http://www.dgkelectronics.com ! I also tweet as https://twitter.com/DGKelectronics
 

Offline David_AVDTopic starter

  • Super Contributor
  • ***
  • Posts: 2879
  • Country: au
Re: RS485 Bootloader For XMEGA ?
« Reply #4 on: November 19, 2014, 09:04:54 am »
I'm guessing that still requires fiddling with command line stuff?  That's not what I want.
 

Offline Dago

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: fi
    • Electronics blog about whatever I happen to build!
Re: RS485 Bootloader For XMEGA ?
« Reply #5 on: November 19, 2014, 10:33:12 am »
I'm guessing that still requires fiddling with command line stuff?  That's not what I want.

Well 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.
Come and check my projects at http://www.dgkelectronics.com ! I also tweet as https://twitter.com/DGKelectronics
 

Offline David_AVDTopic starter

  • Super Contributor
  • ***
  • Posts: 2879
  • Country: au
Re: RS485 Bootloader For XMEGA ?
« Reply #6 on: November 19, 2014, 10:46:49 am »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf