cancel
Showing results for 
Search instead for 
Did you mean: 

Firmware upgrade. How?

amoreno
Associate II
Posted on July 22, 2008 at 07:33

Firmware upgrade. How?

8 REPLIES 8
amoreno
Associate II
Posted on June 27, 2008 at 15:41

Hi,

[ This message was edited by: amoreno on 19-02-2009 17:38 ]

amoreno
Associate II
Posted on July 04, 2008 at 11:54

Hi,

I cant believe that anybody has tried a bootloader or something to upgrade the firmware :-[

Please help me. I apprecite any help.

Thank

regards.

ALFA

kleshov
Associate II
Posted on July 04, 2008 at 18:18

I was thinking about answering, but I didn't know where to start. Perhaps, should be more specific with your questions.

That being said, I could share my experience with bootloaders and firmware upgrade.

The way I did this was like this:

1) Firmware consists of two parts: bootloader and main application.

2) Bootloader cannot be changed. If there is a bug in it, bad luck.

3) Bootloader starts at power-up. Normally bootloader passes control to main application on startup.

4) Bootloader can be triggered into firmware upgrade mode by a special key sequence, main firmware checksum failure, or the like.

5) In firmware upgrade mode, the bootloader follows a pre-designed protocol to receive new firmware and burn it to flash memory.

Things to watch out for:

1) You have to carefully plan the memory map of your firmware.

2) Think about interrupt vector table. It's possible to have interrupts in bootloader and main firmware, but normally it involves some memory remapping.

3) Don't re-invent the wheel. Try to reuse existing tools as much as possible. Intel HEX for data format, HyperTerminal for data transfer program (it's installed on every Windows machine.)

Regards,

- mike

sjo
Associate II
Posted on July 05, 2008 at 11:42

There are quite a few bootloader appnotes on this very site.

Have a look at AN2078 - uart based bootloader.

http://www.st.com/stonline/books/pdf/docs/11026.pdf

http://www.st.com/stonline/products/support/micro/files/an2078.zip

the usb dev kit contains a dfu bootloader

It also contains a cdc demo - tweak the cdc demo you could have a virtual comm bootloader.

Cheers

Spen

amoreno
Associate II
Posted on July 09, 2008 at 07:53

Hello,

Thanks for reply Mike and Spen.

I only know a little bit about bootloaders. I have only implemented my own bootloader in Microchip PIC microcontrollers.

But I don’t any experience with ARM bootloader neither 32bits processors.

Spen, I didn’t know this document, very interesting, this is exactly that I need !!

Unfortunately, the example doesn’t work for me. I use IAR WORKBENCH 5.11 and if I build the project it returns me the errors:

71x_init.s:

Expression is too complex: LTORG

71x_vect.s:

Bad instruction COMMON INTVEC:CODE(2)

init_table.s:

Section type missing RSEG CODE1:ROOT

Section type missing RSEG CODE_ROM:ROOT

Expression is too complex: DCD sfe(CODE_ROM) - sfb

CODE_ROM)

I’m not familiarized with these files. I don’t understand very well the meaning and the purpose of these files.

In my current ARM project (almost finished) I only use standard 71x_init.s and 71x_vect.s files (provided by IAR)

What is the init_table.s?

Are there any document where I can find information about these files?

I appreciate very much any help. I’m working alone with ARM processors.

Regards.

ALFA.

[ This message was edited by: amoreno on 09-07-2008 11:24 ]

[ This message was edited by: amoreno on 09-07-2008 11:25 ]

sjo
Associate II
Posted on July 09, 2008 at 08:14

Probably because the project was written for IAR 4x.

Have a look at the migration guide included with IAR to update to v5.

Cheers

Spen

amoreno
Associate II
Posted on July 17, 2008 at 14:59

Hi, 🙂

I have tried to adapt the IAP for IAR Workbench from 4.x version to 5.x.

I'm not an expert with this type of files (init.s, vect.s and init_table.s) neither ASM codes.

Only rest to modify one instruction on “init_table.s� file:

DCD sfe(CODE_ROM) - sfb(CODE_ROM) ;size of the segment

The compile returns me an error: Expression is too complex.

How I should modify it for IAR WB 5.0 ? really I don’t know it

Also I have tried to “comment� this line in order to test software (uart communication…)

Everything looks work fine (menu on hyperteminal) but when I send the file with YModem protocol, nothing happens. :-[

The Hyperterminal says “3 retries� and error “Unexpected reply“

Do you know why?

What is the purpose of “init_table.s� file? I can’t find information about this file :-[

I'm am lost and I need to solve this issue as fast as I can :-[

I appreciate very much any help.

Thanks and regards.

ALFA.

amoreno
Associate II
Posted on July 22, 2008 at 07:33

Hi,

I have modified

DCD sfe(CODE_ROM) - sfb(CODE_ROM)

for DCD 0x3FFFF

Now, I have no errors if I compile the project.

Sadly, is not working correctly.

I see the menu on HyperTerminal and selecting ''1'' I sent the file (Ymodem).

Nothing happens.

Has anybody tried this IAP solution?

By the way, I'm runnig UART at 38400 bauds because my STR711 can't reach 115000 (4Mhz oscillator. Could it that cause a problem??

Thanks you.