When I dragged a generated code project into Code Warrior10.7 and build,there was a error:
Does somebody encounter the same problem with me
Hello niequanwei@aochutec.com
I think there is a problem with the settings you have, because I see that you are using something from mingw. I'd suggest a simpler way (but more of a workaround) - take an example project and replace the source files with the ones that you need. We do that so we have other settings already done. This is an older toolbox and we have no auto-importer as we do on S32K14x for example.
To do this, please follow the next steps:
Step1:
Go to the Import menu and select CodeWarrior->Example Project
Step2:
Select HCS12Z Example Projects
Step3:
Select one project from the list (in the photo WaterLevel project was selected)
Step4:
In this step, all the files should have been copied and present into the Project tab. You will need to delete the files present in Generated_Code folder.
Step5:
Now you have to delete the starts12z.c file from Startup_Code and all the sources from Sources folder.
Step6:
Go to the folder where the code for your model was generated (the <model_name>_rtw folder). Select all files and drag them into CodeWarrior, over the Sources folder.
Step7:
Select Copy files option so you modify files that have been copied from the _rtw folder, rather than on the original ones (they might get deleted/modified when regenerating the model).
Step8:
Go to mcd_main.c file and add the _EntryPoint() function like in the picture. ProcessorExpert uses this function as it’s enty point, so we only use it to call our main() function. After this you can click on the build button, and the project should build with no errors.
Step9:
You should have the ELF generated (and you can see it in Binaries folder).
Hope this helps.
Kind regards,
Razvan.