Hii Community ,
I was trying to build a project using the command prompt , on board S32K144 .
For importing , I faced the below issue
For building , I faced the below issue .
So in the "D:\Others\NXP\S32DS_ARM_v2.2\eclipse" directory I have run the below commands :
eclipsec.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild --launcher.suppressErrors -data D:\Others\NXP demo codes -import D:\Others\NXP demo codes\Read_Pin
eclipsec.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild --launcher.suppressErrors -data D:\Others\NXP_demo_codes -build Read_Pin
I have been working NXP s32k144 since December 2023 , and this is just the thing holding me back that is building and flashing projects in command prompts .
For the above issue I have been seeking help from @Ankit @Abhishek and @kunal which are NXP employees .
Regards,
Chandan Mohanty .
Hi @smow_chandan18,
You can refer to the following post for instructions on importing and compiling: HOWTO: S32 Design Studio Command Line Interface - NXP Community
The syntax for the command is the following:
eclipse -nosplash
-application org.eclipse.cdt.managedbuilder.core.headlessbuild
-import {[uri:/]/path/to/project}
-build {project_name | all}
-cleanBuild {project_name | all}
So, for example, with the workspace at "C:\Users\nxp\workspaceS32DS.3.5\" and the project to import at "C:\Projects\CANFD_MCAL_S32K344", you can use the following template, which will generate all the files at "CANFD_MCAL_S32K344/Debug_FLASH".
eclipsec.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data C:\Users\nxp\workspaceS32DS.3.5\ -import C:\Projects\CANFD_MCAL_S32K344 -cleanBuild CANFD_MCAL_S32K344/Debug_FLASH
Best regards,
Julián
Hii @Julián_AragónM ,
I have used the build commands provided by you which did help me to build the projects but they weren't producing any .elf file which is need for flashing the project .
I have uploaded the result of the build command above
The command written is above .
So I want to know about the commands which would help me with producing the .elf file .
Also I would like to get the flash commands for flashing the files on command prompt .
Regards,
Chandan .
Hi @smow_chandan18,
I've tested a hello_world example just as a test:
The .elf should be generated in the specified folder (in my case, \Debug_FLASH
Also, for flashing the device, you could use either PROG Flash Programming Software (Customer Classic Interface) or J-Link's Flash Download, which includes support for CLI:
Keep in mind you need a debugger from the respective program in order to program the device.
Best regards,
Julián
Hii @Julián_AragónM ,
I am very thankful for your help on building the projects on command prompts .
Now I wanted to do flashing, according to your method I will have to buy some paid software's which we would not prefer at this moment ,but I have found some commands and ways to do the flashing of the project on command prompt .
I have listed the method below :
flash code
cd %NXP_FOLDER%\S32DS_ARM_v2.2\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_4.4.6.201912192052\win32
eg. cd C:\NXP\S32DS_ARM_v2.2\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_4.4.6.201912192052\win32
pegdbserver_console.exe -startserver -device=NXP_S32K1xx_S32K144F512M150N77P
cd %NXP_FOLDER%\S32DS_ARM_v2.2\S32DS\build_tools\gcc_v6.3\gcc-6.3-arm32-eabi\bin
cd C:\NXP\S32DS_ARM_v2.2\S32DS\build_tools\gcc_v6.3\gcc-6.3-arm32-eabi\bin
arm-none-eabi-gdb.exe --command=%MY_COMMANDS_TXT_FOLDER%\my_commands.txt
In my_commands.txt :
target remote localhost:7224
load D:\Others\NXP_demo_codes\Read_Pin\Debug_FLASH\Read_Pin.elf
Do let me know if this above method is possible or do I have to add something in the above .
I have referred the below article :
https://mcuoneclipse.com/2015/03/25/command-line-programming-and-debugging-with-gdb/
Regards ,
Chandan
Hi @smow_chandan18,
Just FYI, SEGGER's J-Flash is free of cost as of now, and the guide for CLI is inside the installation path.
Looking though Erich Styger's post it seems to be a generic solution for debugging. Since S32DS uses the same plugins this should work. Keep in mind you need the external debugger.
Best regards,
Julián
Hii Julián
Thank you for your quick response now I am able to build projects successfully ,it would be great if you could help me with flashing and monitoring the project on command prompt .
I have been searching this for quite a time now , but I am having hard luck finding the commands and it will be highly appreciated if you could help me with finding ways or steps to flash and monitor the project on the command prompt itself just as we have done for build .
Waiting for your response as soon as possible !
Regards,
Chandan .