CodeWarrior Power Architecture New Project Files

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

CodeWarrior Power Architecture New Project Files

1,262 Views
Kirilian
Contributor I

I apologize if this topic has been brought up before.  If so, could someone please tell me how to find previous threads regarding this topic.

 

I am new to CodeWarrior.  I am using version 2.3. 

 

I see that when I create a new project (for the MPC5566), there are several files that are generated for me.  I am having trouble understanding how these files work.  If I run this default program (main.c does nothing but loop forever), the program runs correctly.  However, main.c doesn't seem to call any of the functions in these files such as MPC55xx_init.c or __ppc_eabi_init.c.

 

Also, if I load any of the example programs in the Freescale folder, these programs run properly and they don't seem to use anything in these files either.

 

I understand the purpose of the lcf files.

 

What do all of these files do?  Which ones are really needed if the programs run without calling any functions in these files?

 

Also, I have Rappid for MPC5566.  I am thinking that to use the Rappid generated code, I would still create a new project with this wizard (which creates these files in question), and add the Rappid generated code to it??  Or do I just use the Rappid code and nothing else?

 

Thanks!!

Message Edited by Kirilian on 2009-08-19 10:34 PM
Labels (1)
0 Kudos
1 Reply

271 Views
stanish
NXP Employee
NXP Employee

Hello Kirillian,

 

CodeWarrior Project Wizard allows you to create ready-to-use project. Such project includes:

*) Stack, SDA register, Global/static variables initialization... (__startup.c, Runtime.PPCEABI.v.UC.a)

*) Initialization of HW registers: floating point, SPE, Flash, cache ... (__ppc_eabi_init.c)

*) Init external bus, Reset vector setup, Exception and INTC controller init. (MPC5xx_init.c, Exception.c, IntcInterrupts.c)

*) call main(__startup.c, Runtime.PPCEABI.v.UC.a)

 

These initialization routines are executed prior to calling main() so main.c doesn't contain any reference to them.

 

The references are often available in __startup() function which is part of Runtime library included in project by default (e.g. Runtime.PPCEABI.v.UC.a).

 

I'd recommend you keep all these files within the project otherwise you can get the linker errors due to missing functions. 

 

As far as I know RAppID tool uses it's own initializations that may interfere with default CW project (Interrupt vectors, INTC controller, Flash, ...) So I assume in order to use RAppID generated source files in project generated by CodeWarrior some modifications of default project are needed.

 

Stanish

Message Edited by stanish on 2009-08-21 10:52 AM
0 Kudos