MBDT toolbox for generating and flashing an example code to S32K12 using J-link.

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

MBDT toolbox for generating and flashing an example code to S32K12 using J-link.

Jump to solution
1,609 Views
jyoti_c
Contributor II

Hi, 

Am trying to build and flash the example provided by MBDT for NXP toolbox on to S32K312 board using Jlink.

Am providing path to Jlink executables as below in the image. 

jyoti_c_0-1770715820371.png

But once I try to build and deploy the example on to the board, the Execution is getting stuck at 
this line(from log), 

C:\Users\sel.mechanical.lab1\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\NXP_MBDToolbox_S32K3\S32K3_Examples\pwm\s32k312_pwm_lcu_mod_carrier_s32ct\s32k312_pwm_lcu_mod_carrier_s32ct_ert_rtw>if "~""" == "" ("C:\NXP\S32DS.3.5\Drivers\Segger\JLinkGDBServerCL.exe" -if SWD -speed auto -commanderscript "C:\Users\sel.mechanical.lab1\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\NXP_MBDToolbox_S32K3\S32K3_Examples\pwm\s32k312_pwm_lcu_mod_carrier_s32ct\script.jlink" -device S32K312 1>"C:\Users\sel.mechanical.lab1\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\NXP_MBDToolbox_S32K3\S32K3_Examples\pwm\s32k312_pwm_lcu_mod_carrier_s32ct\program_board.log" ) else ("C:\NXP\S32DS.3.5\Drivers\Segger\JLinkGDBServerCL.exe" -if SWD -speed auto -jlinkscriptfile "" -commanderscript "C:\Users\sel.mechanical.lab1\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\NXP_MBDToolbox_S32K3\S32K3_Examples\pwm\s32k312_pwm_lcu_mod_carrier_s32ct\script.jlink" -device S32K312 1>"C:\Users\sel.mechanical.lab1\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\NXP_MBDToolbox_S32K3\S32K3_Examples\pwm\s32k312_pwm_lcu_mod_carrier_s32ct\program_board.log" )

seems like it is waiting for connection continuously.

However, It works when I directly flash (i.e., from S32 Design Studio 3.5)

can you please help me to know what am missing and help to fix this issue.

 MBDT S32K312EVB-Q172   #JLINK 

 

Tags (1)
0 Kudos
Reply
1 Solution
1,594 Views
dragostoma
NXP Employee
NXP Employee

Hi, @jyoti_c

Thank you for your interest into Model-Based Design Toolbox for S32K3.

Based on the screenshot you provided, the J-Link location appears to be incorrectly configured. This is the primary cause of the error you are encountering.

To successfully deploy using the J-Link interface, the correct JLink.exe location must be specified.

For additional guidance, please refer to the following article, which demonstrates the deployment process using a J-Link device: Interacting with Digital Inputs/Outputs on MR-CANHUBK344

 

Best regards,

Dragos

 

View solution in original post

0 Kudos
Reply
4 Replies
1,595 Views
dragostoma
NXP Employee
NXP Employee

Hi, @jyoti_c

Thank you for your interest into Model-Based Design Toolbox for S32K3.

Based on the screenshot you provided, the J-Link location appears to be incorrectly configured. This is the primary cause of the error you are encountering.

To successfully deploy using the J-Link interface, the correct JLink.exe location must be specified.

For additional guidance, please refer to the following article, which demonstrates the deployment process using a J-Link device: Interacting with Digital Inputs/Outputs on MR-CANHUBK344

 

Best regards,

Dragos

 

0 Kudos
Reply
1,543 Views
jyoti_c
Contributor II

Hey @dragostoma ,

Thank you for your support.

I am trying to run freeMaster but getting few errors.

S32K312 board is connect to PC via segger J-link.

Initially when I open **.pmpx file with freeMaster and click on GO, I got this error (image Error_FM.jpj)

I tried to configure few things on the tool but still did not succeed to.( image freeMAster_snip.jpj) with baudrate 11520.

can you please provide me any detailed reference for freeMaster tool configuration using Segger-Jlink.

Also, can you please provide me some detailed reference examples which use potentiometer and ADC ports?

FREEMASTER MBDT #S32k312

Thank you 
Jyoti C




 

0 Kudos
Reply
1,526 Views
dragostoma
NXP Employee
NXP Employee

Hi, @jyoti_c,

To ensure the J-Link interface is configured correctly in FreeMASTER, please refer to the following documentation:

1. Click on Tools -> Connection Wizard

image.png

2. Click Next

image.png

3. Select Connect through a debugger probe or on-board debugger interface

image.png

4. Select J-Link or J-Trace interface from Segger Microcontroller (Also supports RTT)

image.png

5. Select Direct access to target microcontroller memory

image.png

6. Click on Read more link in order to access the guide on how to set up the connection using J-Link

image.png

image.png

7. Press Plug-in Configuration in order to apply the instructions from the above guide

8. Once the configuration is completed and the connection test passes successfully, you can establish a connection to the target board via J-Link.

 

For detailed examples showcasing the potentiometers and ADC ports, you can refer to the following model examples from adc folder:

  • s32k3xx_adc_ctu_ebt
  • s32k3xx_adc_single_read_s32ct
  • s32k3xx_adc_stream_read_ebt

 

Best regards,

Dragos

 

 

0 Kudos
Reply
1,509 Views
jyoti_c
Contributor II

Hi @dragostoma ,

I tried with the above steps, but I still face with following issue :

1. After making all the configuration , when I click on GO, I get a pop up saying device name is "Unspecified". (image On_Go.jpj )

On_Go.jpg



2. After that , I get an option to select the target. And I select my board i.e. S32K312. (image SelTarget.jpj ) 

SelTarget.jpg

3. After that the TestConnection runs proper and I get the connected pop up (image FM_Config.jpg ) 

FM_Config.jpg


4. But , once the connection is done, the varible value is getting stuck at whereever it was running. (like if red LED was blinking, it stops at RED. ) ( image StoppingAtLastValue.jpj)

StoppingAtlastValue.jpg



can you help me to know whats the mistake ? 

Also, I see my configuration is asking for Jlink Script path, but I dont see it in the configuration GUI thats mentioned in Readmore doc. (image JlinkScriptPath.jpj) 

JlinkScriptPath.jpg

0 Kudos
Reply