Suppose you created an application project for one MCU (S32K144, for example), but your requirements changed, or perhaps you are reusing a previous project to start a new project on a different MCU (derivative from same family). If you are working with the S32 SDK, there is a way to do it. We have detailed the steps in this document.
1) Open the project to be modified and select the C/C++ perspective, ensure that the Processor Expert views are shown
2) From the Components Library, Processors tab, select the new MCU derivative
3) Either double-click OR right-click and select 'Add to project', to add the new processor to your components list for your project. Be sure to select just one of the pin packages, whichever is appropriate for you application.
4) From the Component Inspector*, you will see a message in red text asking if you would like to switch into the configuration for the new processor. Click on the button 'Switch Configuration'.
*may have to select pin_mux:PinSettings in the Components view for the project to see the message
5) Open the Project Properties, either select from File menu or right-click on project name and select from the menu. Then go to C/C++ Build -> Settings -> Standard S32DS C Compiler -> Includes and delete all include paths starting with $(S32K1**_SDK_VER_PATH). Repeat this step for the Standard S32DS Assembler -> General include paths. Note: For all changes in C/C++ Build -> Settings, make sure to repeat for all build configurations (RAM, FLASH, Debug, Release, etc.).
6) The paths to the SDK should now be gone. The result should look similar to this:
7) In Standard S32DS C Compiler -> Preprocessor settings, change the defined symbol to the one which is appropriate for the new MCU and click OK. (e.g. CPU_S32K142 for S32K142, CPU_S32K148 for S32K148, etc.) If you are not sure what should be here, then create a new empty project for the new MCU and refer to the settings there.
8) The Preprocessor setting after the change
9) Click on the 'Generate Processor Expert Code' button in the Components view for your project
10) From Project Explorer, remove the startup and linker files from Project Settings folder
11) Copy startup and linker files for the new MCU from <SDK_PATH>/platform/devices/<CPU>/startup/<Compiler> and <SDK_PATH>/platform/devices/<CPU>/linker/<Compiler>
12) Open the Project Properties, then C/C++ Build -> Settings -> Standard S32DS C Linker -> General and update the linker file path to reflect the new filename and click OK. (in this case: S32K144_64_flash.id to S32K142_32_flash.id)
13) After the change
14) Perform a Clean and a Build operations of the project.
15) Update the device in the debug configurations
Now you can change your MCU derivatives!
Hello mikedoidge
I am working on to porting the s32k146 project to s32k148. Here I am facing an issue.
In step 3
After double-click OR right-click and select 'Add to project', but 'Add to project' option is not available or shaded out for me.
Could you please provide input on this issue?
NOTE:
I took the s32k146 project from (https://www.nxp.com/docs/en/application-note-software/AN12218SW.zip) , it contains 3 projects for s32k146, I am trying to port all these 3 projects to s3k148.
I am facing an issue,
In step 3
After double-click OR right-click and select 'Add to project', but 'Add to project' option is not available or shaded out for me.
Refer the screen shot below.
anybody faced/resolved is issue, could you please share the details??
Regards
Sathish
Hello sathish.sekar@hsae.eu,
Apologies for the late reply. The example project, AN12218SW, is not an SDK-based project. The instructions in this HOWTO only apply to SDK-based projects.
Hope it helps,
Mike
hello,Mike Doidge .
I encountered some problems, about the project settings file linker_files and starup_code is S32K144, did not replace with S32K142. How can I replace it, please?Thank you!
Hello wangaoyuan@glb-auto.com,
To replace the files, you should first remove the existing files. Right-click on each one and select 'Delete' from the menu. After you have removed the files, then you can use Windows Explorer to locate the new ones. Once you have located the new files, you can drag and drop them onto the appropriate folders within Project Explorer in S32 Design Studio.
Hope it helps,
Mike
hello sir
1st line what is select C/C++ perspective
Hello abhishek.k@sloki.in,
The C/C++ Perspective is an Eclipse Perspective. A Perspective in is a collection of views and toolbars that helps you to perform a particular task. The C/C++ Perspective is focused on C/C++ development. You can find more details at: Help - Eclipse Platform
To identify if your currently selected perspective is the C/C++ perspective, look in the title bar at the top.
If you do not see this, you need to switch to the C/C++ perspective. This can be done by clicking on the button in the toolbar at the upper right.
Hope it helps,
Mike