EmbeddedRelated.com
Forums

C8051F300 bootloader using AN112( Keil Linker ?)

Started by Eric June 12, 2006
 I am trying to get the loader_F30x.c program to work.

https://www.mysilabs.com/public/documents/tpub_doc/anote/Microcontrollers/Precision_Mixed-Signal/en/an112.pdf

I'm following the appnote's instructions and get the following output
over hyperterminal:

C8051F30x Selective Code Loader Example
------------------------------------------
1. Erase the flash page at 0x1000
2. Receive HEX file
3. Execute the function at 0x1000
?. Print Command List

Enter a command > 1

The problem is when I press "1" <CR> the program stops.

I assume the problem is that I'm not locating my code "loader_F30x.c"
above 0x1000 and I'm trashing my code.

So I'm trying to locate my file in a different location via the linker
and I get this error:

RS(256) PL(68) PW(78) CODE(?PR?*?LOADER_F30X(1500h))

*** FATAL ERROR L252: RESTRICTED VERSION: CODE MUST BE ABOVE 4000H

I think my problem is in my linker directives
"CODE(?PR?*?LOADER_F30X(1500h))"

Is an * valid in the above statement?

Thanks

Eric

Eric wrote:

> 1. Erase the flash page at 0x1000 > > The problem is when I press "1" <CR> the program stops. > > I assume the problem is that I'm not locating my code "loader_F30x.c" > above 0x1000 and I'm trashing my code.
Sounds like this diagnosis is incorrect:
> *** FATAL ERROR L252: RESTRICTED VERSION: CODE MUST BE ABOVE 4000H
it sounds like you're using the free demo version of Keil that restricts where you can put your code. So your code can't possibly be at location 1000h, hence this is not your problem. Put some more debug messages in the code, see what it's doing immediately before it hangs.