Download two programs in the same flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Download two programs in the same flash

1,103 Views
AceMax
Contributor I

I want to download my code at starting specific address. Is it possible using codewarrior.

 

My point is to load first a "monitor" and after a "Application program" together.

Ex.:

 

MON_FLASH  : ORIGIN = 0x00000000, LENGTH = 0x00002C00    /* 11 kbytes for monitor code     */
APP_FLASH   : ORIGIN = 0x00003000, LENGTH = 0x0000CC00    /* 51 kbytes for application code */

 

-MCF51CN128 (coldfire v1)

-Coldfire V6.2

 

Thanks,

 

André Fernandes

Message Edited by AceMax on 2010-02-10 06:06 PM
Labels (1)
0 Kudos
3 Replies

316 Views
J2MEJediMaster
Specialist I
Using the handy forum search function, I found the following thread that is tackling the same sort of problem.
0 Kudos

316 Views
AceMax
Contributor I
Guess my problem will not be solved by LCF or otrer configuration file. I don't want to organize code in memory (actually I know how to do that).

 

What I really want is to load one code from "X" to "Y" and, after that, load another code from "Y" to "Z" whitout erase the previous one.

 

Maybe there is any option to "divide" flash memory when load the code.

Ex:

addr "X" to addr "Y" will be called "Monitor"

addr "Y" to addr "Z" will be called "Application"

When I load the code I would choose to lode it in "Monitor" block or "Application" block without erase the other block.

 

Thank you for the fast reply.

 

0 Kudos

316 Views
ronco
NXP Employee
NXP Employee

I see two ways to accomplish what I think you're trying to do:

 

  - Build your two files, Monitor and Application, separately and to their respective absolute addresses.  Make sure the starting address of the file going to the higher address starts on a flash-sector boundary above the ending address of your lower-address file, since flash devices can be erased by sectors only (or by the whole device if supported), not by individual words.  If each file builds to its own binary or S-Record file then each file can be flashed independently of the other.

 

  - Use the Flash Programmer's 'Restrict Address Range' (and 'Apply Address Offset' if working with .bin files) to mask off the parts of flash you want to program.  With this feature enabled any data that fall outside of the defined "Restricted" window will be ignored.  Refer to your CodeWarrior's "Targeting" manual, found in the /Help folder, for details.

 

I hope this helps.

 

-Ron

0 Kudos