Error in downloading program into Internal Flash of M5282EVB

cancel
Showing results for 
Search instead for 
Did you mean: 

Error in downloading program into Internal Flash of M5282EVB

3,617 Views
TTA
Contributor I
Hi,
 
In the M5282EVB Evaluation Board, I need to execute a simple helloworld program by downloading to Internal Flash.
I compiled the program using the selection as M5282EVB Internal ROM.
Modified the M5282EVB_INT_ROM.lcf,
Modified TEXT (RX) : ORIGIN = 0xF0000000, (Instead of the 0x00000000)
Also, __FLASH = 0xF0000000.
I am using an external CF FLasher software.
Set the Target Configuration = M5282EVB(CFM)
FLASHBAR = 0xF0000000, BDM Communication = PE_LPT.
I erased the Flash contents and loaded the new program.
When i select Debug on the Codewarrior, it goes to the starting instruction of
asm_startmeup (On the codewarrior IDE, the instruction that is shown is ori.b #0x0,d0).
And then subsequently it jumps to the asm_exception_handler. Am i missing something?
Can you please help me out..
 
But, in the dBug Prompt when i say go 0xF0000F38 (which is the starting address of asm_startmeup), it displays the message :smileyhappy:
Thanks
TTA
Labels (1)
0 Kudos
5 Replies

255 Views
TTA
Contributor I

Hi,

I could get the program executing from Internal Flash. I had to use the CFFLasher.exe s/w for this purpose. Also the INT_ROM.lcf file need not have any changes, the TEXT location should be same i.e., 0x00000000.

I am not able to use the codewarrior Flash Programmer since it gives me some error. Got to check it out why? If any body has some suggestions please let me know.

Also, I am able to debug from Codewarrior. Thanks for all help.

TTA

0 Kudos

255 Views
J2MEJediMaster
Specialist I
I'm not familiar with this particular processor, but it seems to me that the starting point of your firmware ought to have the address of your startup routine. If the Debugger is going to 0xF0000000, it's expecting a jump instruction or an address vector there that points to your routine at 0xF0000F38. As you've indicated, there's nothing there. Look at some other example programs and see how they setup the jump to the startup routine. Look at the declarations in the example code and the linker comand files carefully.

---Tom
0 Kudos

255 Views
J2MEJediMaster
Specialist I
Why are you using a separate Flash programming application?

Also, when you select Debug for CodeWarrior, what address is it pointing to? Next, take a look at the instruction at that address as hexadecimal data. I'd be willing to bet there's nothing but zeros in there or nonsense rather than a valid instruction or address. It appears that whatever the external Flash programmer is doing, it's not setting up a pointer to the actual starting address of your routine. The processor gets lost and triggers an exception.

---Tom
0 Kudos

255 Views
TTA
Contributor I

Hi,

Now, I used the Flash Programming software in the codewarrior to flash the internal flash.
Below are the settings in the Flash Programmer software:

Target Configuration:
=====================
Target Initialization: Used the file MCF5282C3_PnE.cfg

Target RAM Memory Buffer: 0x00000000 , Size = 0x00006000

Flash Configuration:
====================

Flash Memory Base Address: 0xF0000000
Device: M5282_CFM

Program/Verify:
===============

Selected file (The S19 file that i generated)
Restrict Address Range from F0000000 to F007FFFF.

I am able to erase the Flash contents and Program successfully.
When i Debug (in codewarrior) it goes to the starting location of asm_startmeup, but the data is junk (00000000) in that.
And then it jumps to asm_exceptionhandler.

So, i went to the dBug prompt and said go 0xF0001118 (Which was the starting location it showed when i said debug in prev step).Iam able to execute the application.

I have the following questions.

1. Any reason, why i am not able to debug in code warrior.

2. If i need to boot from the internal flash, what should i do? I set the SW1-8 and 9 to OFF (Internal 32-bit) and restarted the evaluation board, the execution must have started. It did not happen.

3. Any jumper settings need to be done?.
 

0 Kudos

255 Views
TTA
Contributor I

Hi,

Now, I used the Flash Programming software in the codewarrior to flash the internal flash.
Below are the settings in the Flash Programmer software:

Target Configuration:
=====================
Target Initialization: Used the file MCF5282C3_PnE.cfg

Target RAM Memory Buffer: 0x00000000 , Size = 0x00006000

Flash Configuration:
====================

Flash Memory Base Address: 0xF0000000
Device: M5282_CFM

Program/Verify:
===============

Selected file (The S19 file that i generated)
Restrict Address Range from F0000000 to F007FFFF.

I am able to erase the Flash contents and Program successfully.
When i Debug (in codewarrior) it goes to the starting location of asm_startmeup, but the data is junk (00000000) in that.
And then it jumps to asm_exceptionhandler.

So, i went to the dBug prompt and said go 0xF0001118 (Which was the starting location it showed when i said debug in prev step).Iam able to execute the application.

I have the following questions.

1. Any reason, why i am not able to debug in code warrior.

2. If i need to boot from the internal flash, what should i do? I set the SW1-8 and 9 to OFF (Internal 32-bit) and restarted the evaluation board, the execution must have started. It did not happen.

3. Any jumper settings need to be done?.

0 Kudos