How to build a CodeWarrior project using codes  generated by toolbox

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

How to build a CodeWarrior project using codes  generated by toolbox

6,258 Views
hjhjhj
Contributor IV

Hi,

     I want to  build a MPC5643L CodeWarrior project using codes  generated by toolbox,   but there're some errors I never met .Can anybody give me some suggestion to configured the CodeWarrior project?

 

Thank you!

Hj

Original Attachment has been moved to: can_simple_block_rappid_rtw.rar

4 Replies

5,962 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

I would like to ask you to NOT create duplicated threads at NXP community, because of our resources.

About your issue, there is a problem with mixing code generated by Rappid and code generated by CodeWarrior.

At first, if you use conditional translation in assembly file, you must create specific file for symbols. Please see figures below.

I created defines.inc file and I added this file to your project. In this file I created symbol VLE_IS_ON 1 which you use in crt0.s

pastedImage_1.png

Second step is to tell to EPPC Assembler there is defines.inc file. Click project settings, select EPPC assembler, check Generate Listing File and choose the file.

pastedImage_2.png

After this steps are done, there are another compile (linker) errors, because in crt0.s file you use linker symbols which does not exist in linker file. You have two possible solutions. First one is to define this symbols in linker file, second one is not use symbols only symbols defined in linker file.

In general, it is not good to mix these two project together, because there another dependencies like exception and interrupts settings and some other and this could cause some other issues.

If you have any other questions, please feel free to write me back.

Regards,

Martin

0 Kudos
Reply

5,962 Views
hjhjhj
Contributor IV

Hi Martin,

      I try to define the   crt0.s file  symbols  in   linker file  once more ,but don't succeed.Can you give me some suggestions to complete  it?

170621.PNG

Thank you !

Hj

0 Kudos
Reply

5,962 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

when you look at the linker file, there are some symbols defined by default:

_stack_addr = ADDR(stack)+SIZEOF(stack);
_stack_end  = ADDR(stack);
_heap_addr  = ADDR(heap);
_heap_end   = ADDR(heap)+SIZEOF(heap);

So for example, if you use symbol called __SP_INIT in your project, you must define it in linker. It should look like:

__SP_INIT = _stack_addr;

Now it is up to you to create all necessary symbols and assign correct addresses to them.

For more information about linker and all it's features and settings, please read the document in post attachment.

Regards,

Martin

0 Kudos
Reply

5,962 Views
hjhjhj
Contributor IV

Hi Martin,

     First of all,I'm sorry for  creating duplicated threads at NXP community because I was  hurried to ask for help .For some reasons,we try to add all the codes generated by toolbox to a CodeWarrior project ,hoping that it's possible for us to write  codes  in both simulink model and  CodeWarrior project.

    Besides,I want to use linker symbols in crt0.s file to eliminate the compile (linker) errors .Can you help me  to define these symbols in linker file?

170620.PNG

Thank you !

Hj

0 Kudos
Reply