How to import Simulink generated code in Code Warrior?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to import Simulink generated code in Code Warrior?

513 Views
mcgillformulael
Contributor I

Hello,

What is the best procedure to import Simulink generated code in CodeWarrior? From other posts on the forum it seems like the best way is to import the .elf file. However, Simulink is not generating the .elf file when I generate code. 

What steps should I take so that the .elf file is created? or perhaps I should use another method for importing code in CodeWarrior?

I attached the generated files if this can help, using one of the provided examples.

Many thanks. 

0 Kudos
2 Replies

301 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi mcgillformulaelectric‌,

First of all - if you have setup the Toolbox to use the CodeWarrior Compiler an ELF should always be generated. 

Can you check if your build procedure finished successfully in MATLAB build console. Usually both ELF and MOT files are being generated.

Secondly, there is no silver bullet to import the generated code into the CodeWarrior for these platform. FYI we have newer version that rely on a different IDE and the entire process is automated.

In case of older toolboxes and older IDE's the best advices i can give are:

- if you wish to perform the debugging over JTAG then just import the ELF file. That will allow you to debug the application with debugging support from C-source file

- if you wish to re-use part of the generated files into a larger project developed with an IDE, then just copy-paste or link with (if the IDE support this feature) the files what you need from MATLAB generated code.

Hope this helps!

Daniel

0 Kudos

301 Views
mcgillformulael
Contributor I

Hi Daniel,

Thank you for your reply. Since then we were able to fix our issue and now Simulink generated the .elf file and we are now able to import it into Codewarrior.

Thanks!

0 Kudos