FreeMASTER use J-Link to communicate

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

FreeMASTER use J-Link to communicate

Jump to solution
2,279 Views
xgy_upc
Contributor III

I want to use J-Link to communicate between FreeMASTER and FRDM-KV31. May I ask what should I do

0 Kudos
1 Solution
2,250 Views
MichalH
NXP Apps Support
NXP Apps Support

Hello, this is indeed very strange, it seems the installer was not able to register the plug-ins in the Windows system. Please follow these steps to re-register all plug-ins:

  1. Exit FreeMASTER
  2. Locate the file "c:\NXP\FreeMASTER 3.1\FreeMASTER\register.bat" in the Windows explorer
  3. Run the register.bat with administrator rights (use the right mouse button to display context menu and select "Run as administrator...").
  4. If possible, watch the console output for any error messages.
  5. Re-start the FreeMASTER to see if plug-ins are available.

If not, please try to register the JTAG plug-in manually: 

  1. Locate the Command Line in Windows (cmd) and run it as administrator
  2. Type the command:
    regsvr32 "c:\NXP\FreeMASTER 3.1\FreeMASTER\plugins\bdm\bdmpgi.dll"
  3. You should see the success message box.

Please let me know the results.

Thanks,
Michal

View solution in original post

0 Kudos
9 Replies
2,234 Views
xgy_upc
Contributor III

The problem of "The Pulg in Module drop-down list was empty" has been solved as you suggested.

What's the problem now? Start the communication by pressing the GO!Button (Ctrl+G). The FreeMASTER will Prompt me to Specified the ELF File.As shown in the figure below.I wonder where I can find this document.

figure.PNG

0 Kudos
2,229 Views
MichalH
NXP Apps Support
NXP Apps Support

The ELF file is the executable file of the MCU application. FreeMASTER needs to read it to know variable names and addresses.

You will find this file in the output folder of your MCU project. Typically, this is a file with .elf, .out. or .axf extension.

This topic is described in the FreeMASTER 3.1 User Guide section 5.2. I also recommend to read sections 4.2 and 4.2.1.

Regards,
Michal

0 Kudos
2,267 Views
MichalH
NXP Apps Support
NXP Apps Support

Hello,

there are two options to use SEGGER j-Link device. The one that I show below is the basic use to enable direct access to target memory. In this direct mode, the target KV31 application does not need to run any specific code to support the communication. FreeMASTER will simply access the memory directly while the CPU is running. You will need to load the application ELF file in FreeMASTER so it knows all variable addresses. FreeMASTER will be able to read and write target variables, but it will not have an access to advanced FreeMASTER features which require full protocol communication like high-speed Recorder, password protection or TSA.

In order to enable the full set of FreeMASTER protocol features, you will need to use the PD-BDM plug-in and configure it to use the j-Link plug-in as its low-level communication. The PD-BDM uses the direct memory read and write access to exchange communication frames. So rather than accessing the variable memory directly, the PD-BDM plug-in actually communicates with the target similarly as if serial line or CAN bus would be used. With PD-BDM, you will need to add the FreeMASTER communication driver to the target KV31 application – you may get it from the MCUXpresso SDK package. If you face any issues with this approach, please post a separate/new question to the forum and I will give you more information there.

 

So, for the basic use of SEGGER j-Link device with FreeMASTER, go to the Options and select plug-in connection. In the plug-ins list, select the JLink option:

MichalH_0-1606296351124.png

Press the Configure button to open the JLink plug-in configuration dialog:

MichalH_1-1606296351168.png

The plug-in configuration dialog opens.

jlink2.png

 

Note that the plug-in uses the latest version of the Segger JLinkARM.dll library which is installed in the system (6.86e in my case). The path to the loaded DLL is displayed in the dialog. If using the latest version causes any issues, you may specify a full path to an older/tested DLL distributed with the FreeMASTER in C:\NXP\FreeMASTER 3.1\FreeMASTER\plugins\bdm\JLinkARM.dll.

For the whole Kinetis family, it is enough to select the “Core Type” before connecting. It is not needed to specify the exact CPU type. For the KV31 device, just select Cortex-M4/M7.

Press the Test Connection button and you should see an OK message :

 
 

Press the OK to accept the plug-in settings and return to the FreeMASTER Options dialog. Press OK to close also the Options dialog.

Start the communication by pressing the GO! button (Ctrl+G). If you have not specified the ELF file earlier, the FreeMASTER will prompt you to do it. As I wrote at the beginning, using ELF file is needed with any direct JTAG/BDM access plug-ins because the TSA protocol feature is not available. Read more about the TSA feature in the FreeMASTER User Guide.

MichalH_4-1606296351252.png

You should now be able to create FreeMASTER variables and display them in the Variable Watch or in the Oscilloscope graphs.

Again: you will not be able to use Recorder graphs and Pipes unless you switch to the PD-BDM plug-in which requires to run a FreeMASTER driver to run in the target application and also requires additional configuration on the PC side. Please post a new forum question if you are interested in this option.

Regards,
Michal

 

0 Kudos
76 Views
NAG
Contributor II

Hello Michal,

This solution worked for my case. I have manually selected the Jlink dll with the path as

"C:\NXP\FreeMASTER 3.2\FreeMASTER\plugins\bdm\JLinkArm.dll", then it started working.

Thanks for showing the way.

Kudos,

Naga.

0 Kudos
2,261 Views
xgy_upc
Contributor III

 

Now the problem is that I used J-Link to connect FRDM-Kv31 to the computer and opened options. The pulg in Module drop-down list was empty

1.JPG

0 Kudos
2,256 Views
MichalH
NXP Apps Support
NXP Apps Support

Hello,

this typically happens when FreeMASTER is not installed properly or if installation is aborted before it finishes. Please get the latest installer version 3.1 and re-install FreeMASTER. 

Let me know if this helps.

Thanks,
Michal

0 Kudos
2,253 Views
xgy_upc
Contributor III

I have re-installed FreeMASTER,and FreeMASTER is  installed properly.But the same problem remains

0 Kudos
2,251 Views
MichalH
NXP Apps Support
NXP Apps Support

Hello, this is indeed very strange, it seems the installer was not able to register the plug-ins in the Windows system. Please follow these steps to re-register all plug-ins:

  1. Exit FreeMASTER
  2. Locate the file "c:\NXP\FreeMASTER 3.1\FreeMASTER\register.bat" in the Windows explorer
  3. Run the register.bat with administrator rights (use the right mouse button to display context menu and select "Run as administrator...").
  4. If possible, watch the console output for any error messages.
  5. Re-start the FreeMASTER to see if plug-ins are available.

If not, please try to register the JTAG plug-in manually: 

  1. Locate the Command Line in Windows (cmd) and run it as administrator
  2. Type the command:
    regsvr32 "c:\NXP\FreeMASTER 3.1\FreeMASTER\plugins\bdm\bdmpgi.dll"
  3. You should see the success message box.

Please let me know the results.

Thanks,
Michal

0 Kudos
2,190 Views
MichalH
NXP Apps Support
NXP Apps Support

Hello, 

is there any conclusion in this issue? Have you succeeded when registering the FreeMASTER plug-ins manually?

Thanks,
Michal

0 Kudos