Support files in CodeWarrior

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

Support files in CodeWarrior

7,258 Views
TTA
Contributor I
Hi,
I have a query on the support files in codewarrior. I created a project with the target as mcf5282. I set the Connection selection in the Remote Debugger Settings as CCS-SIM (simulator).
 
vectors.s contains the IVT and then a start entry point. Here it sets the status register and jumps to asm_startmeup. Here it initializes the registers, Initializes mcf5282 peripherals and then jumps to main.
 
Even if i comment the jmp main instruction and execute the program it goes to the main() function in main.c.
1. Is it that main() function and not "start" is the starting point of execution?
2. Are the support files significant only if we download the software to the target?
 
Also , do let me know if there is any documentation on these support files.
 
Labels (1)
0 Kudos
Reply
7 Replies

1,564 Views
TTA
Contributor I

Hi,

Tht was an error.

Initially i had set the selection as M5282 Console Debug, here the support files (vectors.s etc..) were not included, hence i changed the selection to M5282EVB Internal ROM to include the support files.

My objective here is to interrupt my program using a programmable interval timer(PIT) of 5282. Is it possible using the CCS-SIM? If so, how can i do it?

What i did was change the interrupt vector 0x37 in vectors.s (corresponding to PIT0) and change the ISR of 0x37 to timer_handler (written by me).

Thanks.

 

0 Kudos
Reply

1,564 Views
CrasyCat
Specialist III

Hello

Are you planning to run the application on the simulator?

The simulator is an instruction set simulator only. It does not simulate the timer.

In order to be able to test an application with an interrupt you will have to use the real hardware board.

Then you have to decide if you want to debug in RAM or in Flash (I think for debugging you rather stay in RAM) and finally adjust the project to what you want to do.

Here I would not just switch to ROM target just because the vector table is not initialized in the debug target. I would rather add the vector table to the debug target.

CrasyCat

0 Kudos
Reply

1,564 Views
TTA
Contributor I
Hi,
This time,
1. i created a project with M5282EVB. 
2. I selected the M5282EVB Internal ROM selection.
3. I executed the Project > Make. The elf file was created.
4. Selected the Flash Programmer Software. and set the Target Configuration as CCS-SIM and the target initialization file was M5282EVB_intROM.cfg.
4.1 The Flash Configuration Setting: Flash Base Address = 0xF0000000 and the Organization = 512K*8*1.
4.2 In the Program/Verify Selection, Set the selected file as the elf file that was generated in Point No. 3. Set the FRestricted Address Range from 0xF0000000 to 0xF007FFFF. Set the File Type = elf Format.
It gives me the following error details:
 
Flash Programmer: Can not initialize the target: "5282" Please make sure "D:\\CodeWarrior\Timer1\M5282EVB_intROM.cfg" exists and it is a valid configuration file.  Additional error information: €
 
Could you please let me know why this is happening?
0 Kudos
Reply

1,564 Views
CrasyCat
Specialist III

Hello

Flash programmer tool is used to program flash on the hardware device. You cannot use the flash programmer with the simulator.

Could eventually explain what you are trying to achieve here. I am not sure we are going in the right direction.

Crasycat

0 Kudos
Reply

1,564 Views
TTA
Contributor I

Hi,

Thanks for the response. I changed the settings to M5282EVB External ROM. It goes to asm_startmeup function. But after that i run into problems, the execution goes into an infinite loop.. Any suggestions.

Regards,

TTA

0 Kudos
Reply

1,564 Views
CrasyCat
Specialist III

Hello

Did you program the generated code into flash using the flash programmer?

The M5282EVB External ROM target is configured to be programmed into flash and executed from there.

Pressing the Debug button will not program the application into flash.

CrasyCat

0 Kudos
Reply

1,564 Views
CrasyCat
Specialist III

Hello

If you are building a "Console Debug" or a "UART Debug" version of the project, the support files are not linked to the application.

For these build target the _start function from the MSL library is used as application startup point.

this function can be found in following source file:

"{Install}\E68K_Support\Runtime\Runtime_68K\Runtime_ColdFire\(Source)\E68k_startup.c"

where {Install} stands for your CodeWarrior installation directory

CrasyCat

0 Kudos
Reply