Keil Logo Arm Logo

Discussion Forum

Initializing unused memory location using Linker Script or any other method

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Denn G
Posted
20-Feb-2009 07:39 GMT
Toolset
C51
New! Initializing unused memory location using Linker Script or any other method

Hello,

Is there any option within the Kiel Compiler ( using Linker Script ) for filling the unused memory location (0x00) with the user determined byte say 0x02 for 8051 type MCUs

Best regards,
Denn

Read-Only
Author
Andy Neil
Posted
20-Feb-2009 07:54 GMT
Toolset
C51
New! RE: Initializing unused memory location using Linker Script or any other method

You would have to do this in the startup file:

http://www.keil.com/support/man/docs/c51/c51_ap_customfiles.htm

Read-Only
Author
Denn G
Posted
20-Feb-2009 08:14 GMT
Toolset
C51
New! RE: Initializing unused memory location using Linker Script or any other method

Dear Andy Nel,

I meant to say the Flash memory location.

Its better to initialise the unused flash locations with a known byte 0x02 before programming the MCU.Is there any way to do that in Keil IDE

regards,
Denn

Read-Only
Author
Andy Neil
Posted
20-Feb-2009 08:53 GMT
Toolset
C51
New! RE: Initializing unused memory location using Linker Script or any other method

Usually, device programmers have this facility.

Otherwise, you would do it as part of the conversion to Intel Hex format, or whatever.

Note that 0x02 wouldn't be a particularly good choice for an 8051; the standard flash erased state of 0xFF is fairly innocuous, and a NOP is 0x00...

See: http://www.8052.com/users/wek/8051op.pdf
And: http://www.nxp.com/acrobat_download/various/80C51_FAM_PROG_GUIDE_1.pdf

Read-Only
Author
Andy Neil
Posted
20-Feb-2009 08:55 GMT
Toolset
C51
New! RE: Initializing unused memory location using Linker Script or any other method

http://www.keil.com/forum/docs/thread14220.asp

Next Thread | Thread List | Previous Thread Start a Thread | Settings

arm-logo-small

Keil logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.