using flip with serial bootloader on uc3b0256

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi everyone,

I am having a hard time. I need a serial bootloader for my board with a UC3B0256. So I took the example uart bootloader project for the UC3L, and I modified it to work with the UC3B; I rewrote the clock section and the serial comms. I also used the Boot.S from the 1.7.0 framework to get everything to work well.

Now I use my jtag ice mkII to program the bootloader onto the chip.

Once that is done, I am able to use the Atmel Flip program to load my main application project onto the chip.

Here is my problem: When I use Flip, it seems to erase my bootloader. The main app is loaded and works, however the bootloader is no longer in place.

How can I either preserve my bootloader with flip when loading my main application or else reload the bootloader and the main application together ?
Is there perhaps a way I can merge my bootloader hex and application hex files together ?

Could someone perhaps guide me on how I could do this with the batchisp program that comes with flip, if not flip itself ?

Any help/guidance/advice would be much appreciated.

Thanks,

Steed.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Edit: So I used a prog called srecord to try and combine my 2 hex files, however it complains that they both have conflicting sections at 0x80000000. I believe this may be the trampoline in my main program. Can someone perhaps guide me on how to change the linker settings to not include the trampoline at 0x80000000 but still have the main code start at 0x80002000 ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

steed wrote:
Can someone perhaps guide me on how to change the linker settings to not include the trampoline at 0x80000000 but still have the main code start at 0x80002000 ?
Do you know where to find the linker script you're using? If so, then take a look at how I did it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

you must cut out the correct regions with srecord, do you have a bash available?
if so I can give you a nice srecord scipt but you also may derive something from Atmel's example scripts by yourself:
http://www.atmel.com/Images/avr3...

-sb

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PS: there is no need to modify the linkerscript - just use srecord as shown in the examples contained in the zip's msc-bl-prog folder.

-sb

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What's srecord?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sambrown wrote:
you must cut out the correct regions with srecord, do you have a bash available?
if so I can give you a nice srecord scipt but you also may derive something from Atmel's example scripts by yourself:
http://www.atmel.com/Images/avr3...

-sb

Hiya,

Thanks for your help. The examples in that zip file show how to use srec_cat for what I need. I just had to change the -crop parameters to match the memory ranges for my bootloader and main application. It seems to be working correctly now.

Thanks and Regards,

Steed.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Steed,

 

Any chances of you sharing that UC3B bootloader? I'm about to embark on the same task of porting the UC3L bootloader for a UC3B0256. It looks a bit daunting though.

 

Any help or guidance would be much appreciated.

 

Thanks,

 

Al