Code not getting downloaded correctly on MC9S12DB128

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

Code not getting downloaded correctly on MC9S12DB128

4,087 Views
pammu
Contributor I
I am using MC9S12DB128 controller. In my linker file, I have given the following memory settings:
                            Start Address            Size
EEPROM              0x800                         7ff
RAM                      0x2000                      1fff
Stack                     0x2ffe
 
On downloading the code on my target using the Cosmic ZAP ICD through BDM, I get "IRAM Invalid Address - Can't program Flash" error.
 
The same code downloads and works fine when I have the following memory settings:
                            Start Address            Size
EEPROM              0x800                         7ff
RAM                      0x1000                      1fff
Stack                     0x1ffe
 
Can anyone tell me whats the problem? In the ZAP ICD, I choose the targer as DB128.
 
I dont face this problem on the DP256 evaluation board. DP256 has 12kb RAM and DB128 has 8kb RAM.
 
Labels (1)
0 Kudos
Reply
2 Replies

875 Views
Steve
NXP Employee
NXP Employee

I don't fully understand the problem pammu but I suspect it arises due to the reset position of the RAM. Check the databook, but in general the RAM block is aligned at 0x0000 at reset so an 8k RAM part has RAM from 0x0000 - 0x1FFF (12k is 0x1000 to 0x3FFF because it is in a 16k block which is top-aligned at reset).

So unless you move the RAM it will not exist above 0x2000 and will cause an error if you attempt to access it.

Have you tried asking Cosmic about this?

0 Kudos
Reply

875 Views
pammu
Contributor I

Steve,

What you say is correct. On reset the RAM is aligned to 0000. So in my code I am remapping EEPROM and RAM to begin at 800 and 2000 respectively. But this is not working. I am just unable to download the code. But if I remap the RAM to 1000, everything works fine.

I am in contact with Cosmic regarding this. Lets see what they reply.

 

 

Message Edited by pammu on 02-01-2006 11:11 AM

Message Edited by pammu on 02-01-2006 11:12 AM

0 Kudos
Reply