2008-07-21 10:33 PM
2008-06-27 06:41 AM
Hi,
[ This message was edited by: amoreno on 19-02-2009 17:38 ]2008-07-04 02:54 AM
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. ALFA2008-07-04 09:18 AM
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, - mike2008-07-05 02:42 AM
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 Spen2008-07-08 10:53 PM
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 ]2008-07-08 11:14 PM
Probably because the project was written for IAR 4x.
Have a look at the migration guide included with IAR to update to v5. Cheers Spen2008-07-17 05:59 AM
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.2008-07-21 10:33 PM
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.