| Author |
Message |
|
|
Posted: Jul 31, 2011 - 12:25 PM |
|

Joined: Jul 31, 2011
Posts: 9
|
|
Good day,
I recently acquired a blue xplain board. Since I don't have any programming hardware, I'd like to program it using its USB connector. To do so, I have to unplug the USB, hold SW0, plug the USB back in and release SW0. And use FLIP to program it. That isn't very convenient.
I've read about the LUFA thing, but these blue boards do not contain the AT90USB1287, but a AT32UC3B1256 (as usb-uart bridge and programmer). Next, I saw avr-xboot, which looks promising. My idea was to get it onto the xmega for more convenient programming.
However, after building and configuring xboot, I was not able to get it onto the xmega. FLIP (the gui) and batchisp (the actual programmer) both believe that the boot section of the xmega is only 3 bytes: from 0x0 to 0x02. That can't be right, can it? Any .hex file larger than 3 bytes yields error messages.
FLIP uses xml files to configure its devices, and I found in ATxmega128A1.xml:
Code:
<?xml version="1.0"?>
<!DOCTYPE Part SYSTEM "part.dtd">
<Part NAME="ATxmega128A1">
<PageSize SIZE="512" />
<Memory NAME="FLASH" SIZE="131072" ADDR="0" INDEX="0"/>
<Memory NAME="EEPROM" SIZE="2048" ADDR="0" INDEX="1"/>
<Memory NAME="BOOTLOADER" SIZE="3" INDEX="3"/>
<Memory NAME="SIGNATURE" SIZE="4" INDEX="6"/>
<Memory NAME="USER" SIZE="512" INDEX="11"/>
<Protocol FILE="RS232_I03.xml" />
</Part>
Which explains a lot, I think. I was about to modify it, but since I'm new to this stuff and don't want to fry my board, I'd thought to ask first here. Thanks!
edit: I checked the xmls of other devices, but those that contain a bootloader entry have all a size of 3, so my ATxmega128A1.xml is not an exception (i.e. it looks less like a mistake than I thought). |
|
|
| |
|
|
|
|
|
Posted: Jul 31, 2011 - 12:49 PM |
|


Joined: Jul 18, 2005
Posts: 62230
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
| It is virtually impossible to replace a bootloader with a botloader - esp. a USB one so you'll need to get access to a PDI programmer to achieve this. |
_________________
|
| |
|
|
|
|
|
Posted: Jul 31, 2011 - 01:23 PM |
|

Joined: Jul 31, 2011
Posts: 9
|
|
| Sorry if I wasn't clear, but if I'm not mistaken, the board contains two AVRs: the xmega, and a helper. The helper can program the xmega. It wouldn't be impossible to program the xmega's bootloader via the helper, would it? |
|
|
| |
|
|
|
|
|
Posted: Jul 31, 2011 - 07:19 PM |
|

Joined: Jul 25, 2011
Posts: 49
|
|
After spending a long time getting initiated with this concept of having a programmer AVR on the evaluation board (mine is Xplain; your blue board is actually called Xplained; if it contains ATxmega128A1, it's probably XMEGA-A1 Xplained), I find Dean/abcminiuser's PDI-Serial Bridge project page contains the best explanation: http://www.avrfreaks.net/index.php?modu ... e=project. (The project is a LUFA application, but only for green Xplain board that uses AT90USB1287.) So in theory it is possible to do a similar project like that for Xplained board. But since FLIP 3.4.3 doesn't show AT32UC3B1256, not sure how far that could go.
BTW, because FLIP doesn't interface directly with ATxmega128A1 via USB on your Xplained board, your boot loader have to go into AT32UC3B1256. This way the entire ATxmega128A1 is available for your application.
One bit I'm confused about: Flip 3.4.3 doesn't show AT32UC3B1256 in device list (at least in my Win7 64-bit installation), yet AT32UC3B1256.xml is present. AT32UC3B1256_gui.xml is absent - this could explain why it's not in drop-down list but why missing that file? Do you have a different version? |
|
|
| |
|
|
|
|
|
Posted: Aug 01, 2011 - 03:40 PM |
|

Joined: Jul 31, 2011
Posts: 9
|
|
Ah, thanks for the clarification regarding the name. My idea was to actually put the bootloader in the xmega (then the xmega programs itself), so that the AT32UC3B1256 would only be used as a usb-to-xmega-communication-bridge, not as programmer anymore. Why? Because avr-xboot exists. Using the AT32UC3B1256 to program the xmega with a AT32UC3B1256-version of Dean's project would be fine too, I guess, but that seemed more work to me -- if FLIP/batchisp would just let me access the xmega's boot section and fuse bits, avr-xboot could work instantly.
AT32UC3B1256 does not show up in my FLIP list either, and I do have the .xml too. A missing gui xml is not the problem I believe, the partdesc xml does not reference any other xmls. Some partdesc xmls do reference gui xmls to make fuse bit checkboxes appear in the gui. I stick with the command line batchisp program anyway, specifying AT32UC3B1256 to it might work. I must say though that FLIP is a rather crappy buggy piece of software with poor documentation.
But to summarize my thoughts:
1. I can use the annoying usb-unplug-switch-replug programming method;
2. If I can get a bootloader on the xmega to program itself, or Dean's project on the AT32UC3B1256, I can get rid of #1;
3. I can buy an external programmer that contains the same functionality (a mcu that produces programming signals given usb input) that is already on the board. |
|
|
| |
|
|
|
|
|
Posted: Aug 09, 2011 - 01:26 PM |
|

Joined: Sep 27, 2007
Posts: 9
|
|
xroelx,
The xmega contains a bootloader that can program the application section of the flash. You just need to launch FLIP 3.4.3 and select the RS232 interface and connect to the correct COM port. Then you'll be able to program the flash, eeprom and user signature row. But not the fuses.
I don't see why you would need to create your own bootloader to do this. |
|
|
| |
|
|
|
|
|
Posted: Aug 09, 2011 - 05:28 PM |
|

Joined: Jul 31, 2011
Posts: 9
|
|
|
SuperAVRman wrote:
I don't see why you would need to create your own bootloader to do this.
Because the current bootloader requires one to re-plug the USB while holding SW0, for every programming iteration -- a plain annoying work flow. |
|
|
| |
|
|
|
|
|
Posted: Aug 12, 2011 - 12:23 PM |
|

Joined: Sep 27, 2007
Posts: 9
|
|
|
xroelx wrote:
Because the current bootloader requires one to re-plug the USB while holding SW0, for every programming iteration -- a plain annoying work flow.
Do you mean between each programming of the main, or do you mean for each memory type? I know batchisp have a limitation, but for the FLIP GUI you can program all memories without the need for re-entry in the bootloader to do this. |
|
|
| |
|
|
|
|
|
Posted: May 11, 2012 - 12:11 PM |
|

Joined: Jun 07, 2011
Posts: 3
|
|
Anyone can use the xboot in xplain board using serial com?
what are the correct configurations? |
|
|
| |
|
|
|
|
|