MCU User Forum
  Bootloader C8051F120 TCP/IP library help

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   Bootloader C8051F120 TCP/IP library help
panacea
New Member
posted August 16, 2010 05:57 AM     Click Here to See the Profile for panacea     Edit/Delete Message
Hi,

I written a Bootloader code for C8051F120. I am able to update firmware through ethernet. I have changed the start address to 0x2800 instead of 0x2400. All codes are working fine , but if I try to create application code for TCP/IP, I need to change the library files of TCP/IP with start address of 0x2800. Can any one send me the library files for the bootloader with start address of 0x2800.

Thanks,
Venkat Raju

IP: Logged

Tsuneo
Member
posted August 27, 2010 04:39 AM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
> have changed the start address to 0x2800 instead of 0x2400.

You mean that the code size of your bootloader has increased, compared with the original for 'F34x. When the start address is altered, the TCP/IP library should be re-compiled, as you've pointed out. The library files contain fixed address reference for redirected interrupt vectors, starting from 0x2400.

Instead of moving the start address, split the bootloader mapping into two areas at top and end on the program FLASH. And then, you can do without touching to existing libraries. It is done by linker flag.

Tsuneo

IP: Logged

panacea
New Member
posted August 27, 2010 05:06 AM     Click Here to See the Profile for panacea     Edit/Delete Message
Thanks for your reply TSUNEO,

Can you guide me how to change the linker settings to split the bootloader into two parts.

Venkat Raju

IP: Logged

Tsuneo
Member
posted August 27, 2010 10:47 PM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
I'll explain the idea on the original bootloader for 'F340. Because of banked code space, the procedure for 'F120 is much elaborated than 'F340.

The project of original F34x_Ethernet_Bootloader apply these linker flags.

RS(256) PL(68) PW(78) CODE(?CO?CRC(0xFA00))

The last directive, CODE(?CO?CRC(0xFA00)), places CRC table at 0xFA00
When we change this CODE directive into this one,

CODE(0 - 0x23FF, 0xF800 - 0xFBFE ?CO?CRC(0xFA00))

Linker allocates the code as follows.
- Linker fills the code address range (0 - 0x23FF) first.
- When above range overflows, Linker moves to next range (0xF800 - 0xFBFE)
- It locates CRC table at 0xFA00

In this way, you can split the bootloader code into two parts, so that the range (0x2400 - 0xF7FF) is reserved for the application firmware.

For the details of CODE directive, see Keil linker manual.

CODE Linker Directive
http://www.keil.com/support/man/docs/bl51/bl51_code.htm

You'll find more examples in this SiLabs KB,
Locating Code Segments using the Keil BL51 Linker
Wildcard will be useful for 'F120 procedure.

Tsuneo

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | MCU User Forum

Have you seen our MCU Knowledge Base?


Ultimate Bulletin Board 5.47b