Author Topic: AVR32 bare-minimum boot loader  (Read 10162 times)

Offline kmjackson

  • Newbie
  • *
  • Posts: 33
    • View Profile
AVR32 bare-minimum boot loader
« on: September 18, 2010, 05:11:47 AM »
I'm trying to get the boot loader running.  What file extension is the convert program looking for?

uTaskerConvert.exe

Offline kmjackson

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: AVR32 bare-minimum boot loader
« Reply #1 on: September 18, 2010, 06:23:40 AM »
Never mind

Offline kmjackson

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: AVR32 bare-minimum boot loader
« Reply #2 on: September 18, 2010, 07:14:42 AM »
Do you have any documentation on these programs?
 - uTaskerFileCreate.exe
 - uTaskerCombine.exe

Also, I'm simply trying to load the boot loader and the appication firnware.  I just want to reset the board and have it execute the application code at 0x80000800. Initially, do I need to combine the boot loader and the initial firmware load together?  I'm using this linker file (lnkuc3a0512_bm.xcl), which has the following settitngs:

* The assumed memory layout is:
 *
 *   Start   Stop      Name   Type
 *   ----------   ----------   -----   --------------
 *   0x00000104   0x0000FFFF   SRAM   RAM 
 *   0x80000800   0x8007FFFF   FLASH   FLASH

And the boot loader has the following:
#define START_OF_FLASH 0x80000000

#elif defined (_HW_AVR32)                                           
    #define UTASKER_APP_START      (START_OF_FLASH + 0x800)             // internal FLASH solution
    #define UPLOAD_FILE_LOCATION   (unsigned char *)uFILE_START          // location in internal FLASH
    #define UTASK_APP_LENGTH       FILE_SYSTEM_SIZE                          // 128k



Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: AVR32 bare-minimum boot loader
« Reply #3 on: September 24, 2010, 10:44:21 PM »
Hi

Sorry for a late replay to your question.

uTaskerFileCreate.exe has several functions and its use is described in http://www.utasker.com/docs/uTasker/uTaskerUserFiles.PDF and http://www.utasker.com/docs/uTasker/uTaskerLCD.PDF

uTaskerCombine.exe is used to combine files together (eg. two binary files into one) but also supports some output conversion (eg. generating Intex hex of the combined binary). It also can encrypt the content and add a special header as described in http://www.utasker.com/docs/uTasker/uTaskerBoot_003.PDF


The boot loader and the conversion works like this (assuming GCC and the bat file Build_AVR32.bat are being used):

make -f make_uTaskerV1.4_GNU_AVR32 all
uTaskerCombine "../../uTaskerBoot/GNU_AVR32/uTaskerBootLoader.bin" uTaskerV1.4_BM.bin 0x800 uTaskerBM.bin
uTaskerConvert.exe uTaskerV1.4_BM.bin H_Upload.bin -0x1234 -a748b6531124


The make builds the project, generating a binary output uTaskerV1.4_BM.bin, which is linked at the address 0x80000800.
In the boot loader directory it is assumed that the boot loader project has been build, resulting in the file uTaskerBootLoader.bin, which is less that 0x800 bytes in size and linked to the address 0x80000000.

uTaskerCombine takes these two binary inputs and combines them into a single binary output uTaskerBM.bin. The input has been added after uTaskerBootLoader.bin and any space between the end of this and 0x800 has been filled with 0xff. Note that the binary file doesn't have an address (0x80000000 is simply equivalent to the start of it).

uTaskerBM.bin can be loaded to the board (with offset 0x80000000) and boots the boot-loader, which should then jump to 0x80000800 and thus start the application)..


uTaskerConvert takes the file uTaskerV1.4_BM.bin (this is the application linked at 0x80000800 without the boot loader) and generates a file called H_Upload.bin. It adds a header to it containing its check sum and other details, meaning that it is then in a form to be accepted by the "bare-minimum" boot loader and so can be uploaded to an operating board (with uTaskerBM.bin already running) via FTP or Web Browser to perform a SW update.

Regards

Mark


Offline kmjackson

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: AVR32 bare-minimum boot loader
« Reply #4 on: September 25, 2010, 12:35:41 AM »
Thank you,

Kenneth