I must create my own system or be enslaved by another man's

William Blake

By admin, on June 28, 2009

Electronic & Software Projects


After some investigating, it appears that the JTAG ICE mkII is required in order to program the EVK1101.   A board was obtained, and plugged in via USB.  A messsage came up asking to install the drivers since they weren’t signed, and after accepting, there are now new USB devices:

Jungo: JTAGICE mkII     & WinDriver

Now test the rebuild & download process, as per the description from the DVD:   file:///C:/Dev/AVR/AVR32-SoftwareFramework-AT32UC3B-1.4.0/AT32UC3B-1.4.0/.docsrc/TUTORIALS/GCC/Embedded_Development_Quick_Start.htm

C:DevAVRAVR32-SoftwareFramework-AT32UC3B-1.4.0AT32UC3B-1.4.0DRIVERSADCEXAMPLEAT32UC3B0256_EVK1101GCC>make
ECHO is off.
ECHO is off.
avr32-gcc (GCC) 4.2.2-atmel.1.0.8 (mingw32 special)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiling `../../../../../DRIVERS/USART/usart.c’ to `../../../../../DRIVERS/USART/usart.o’.
process_begin: CreateProcess(NULL, touch ../../../../../DRIVERS/USART/usart.d, …) failed.
make (e=2): The system cannot find the file specified.
make: *** [../../../../../DRIVERS/USART/usart.o] Error 2
Now run AVR32 studio, and follow the procedure in ‘Getting Started’, except for the following clarifications:

For the first step, pick ‘File’ then ‘New’ then ‘Project…’ and then ‘C’ and then ‘AVR32 C Project (Make)

For the project name and path, put the project name at the end of the path as well.

Having some troubles getting a new project started without too much manual adding of files.  But, in looking around a bit more, and also realizing that maybe the AVR-ONE would have been the better JTAG programmer to get (though it is $600.00 instead of $300.00), I came across these instructions:

Create a demonstration project
Select File>New>Example.
Select EVK1101>Components>Accelerometer example, then Next.
Enter a name for the project, and click Finish.
Right-click on the project in Project Explorer view and select Build Project (or use Ctrl+B).

After a bit of futzing around with the JTAG-ICE-mkII, (it immediately wanted to upgrade the firmware, and after clicking ‘ok’, it didn’t say it did or didn’t but it still showed up as an invalid device.  After a few times of restarting AVR32 studio, it eventually did figure out how to upgrade the firmware and then it showed up as a  happy device.  Then for picking the actual target board, the serial number had to be copied from the mkII target into the EVK1101 board target (there was no scan option or droplist that had it).

Now it can talk to the device and appears to be able to erase it, but programming gets an error:

Internal flash programming failed
Programming of at least one locked lock region has happend since the last read of FSR.

A quick search reveals this:

Your UC3 devices have a pre-programmed USB bootloader which is protected with a lock fuse (BOOTPROT fuse).
In order to program a new binary to the Flash, you need to erase the fuse first with a “Chip Erase” command.

Since, this command is not automatically executed, you have to execute it before launching the first debug session.
In the “AVR32 Targets” view:
- Right click on the JTAGICEmkII (or AVRONE!) target
- Select the “Chip Erase”command
This will erase the fuse protection and the whole Flash memory.



Leave a Reply