Loading and executing an .elf file in RAM on S32K148 using CLI

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

Loading and executing an .elf file in RAM on S32K148 using CLI

Jump to solution
2,322 Views
wboag
Contributor II

I have an executable that I want to load and run from a script.

I am using  PEMicro Multilink Universal.

How do I go about doing this using S32 Design Studio?

Tags (4)
0 Kudos
1 Solution
2,227 Views
juan_see
Contributor III

PEmicro has C/C++ and Delphi library modules which allow the creation of custom PC applications to control PEmicro hardware interfaces. With the UNITACMP dll, you can load your custom .elf file into RAM after creating your own custom application. 

For more information please see:

https://www.pemicro.com/products/product_viewDetails.cfm?product_id=15320183&productTab=1

 

PROGACMP/CPROGACMP is only for flash programming and not for loading RAM data. 

View solution in original post

13 Replies
1,874 Views
Mehul_Patel_NXP
NXP Employee
NXP Employee

Hi, @wboag ,

 

Which Design studio version you are using? 

 

Are you loading from JTAG?

 

Please can you provide more information related to it. 

 

Thank you. Kind regards. 

 

-Mehul Patel

 

0 Kudos
2,201 Views
wboag
Contributor II

I have two boards - one with the processor in a Daisy Chain and the other without.  I have been able to load and run the executable on the board without Daisy Chaining.

How do I configure pegdbserver_console to handle Daisy Chaining?

0 Kudos
2,188 Views
juan_see
Contributor III

To configure pegdbserver_console to handle Daisy Chaining, you have to provide a "config.ini" file. The command to provide the config.ini file is '-configfile=config.ini. 

 

In the config.ini file, you have to create a section called STARTUP, with your daisy chain settings. 

  • jtag_use_daisy_chain: Boolean which enables the use of daisy chaining.
  • jtag_tap_num: The nth JTAG device of the daisy chain.
  • jtag_numbits_pre_ir: The number of IR bits following the selected TAP. ARM devices always consume 4 IR bits each so this value can be determined as follows:
    • pre_ir = 4*(total_devices - tap_num)

For example, in your config.ini, you would have the following:

 

[STARTUP]
jtag_use_daisy_chain=1
user_specified_daisy_chain=1
jtag_tap_num=0
jtag_numbits_pre_ir=0

0 Kudos
2,013 Views
wboag
Contributor II

Thank you. This works. I put these at the top of my config.ini file and the Daisy Chained board now works.

0 Kudos
2,137 Views
wboag
Contributor II

Do you know where I can get the documentation about the configuration settings?

Including these settings had no effect on the behavior of either board - with and without Daisy Chaining.

0 Kudos
2,085 Views
Mehul_Patel_NXP
NXP Employee
NXP Employee

Hi, @wboag , 

Please can you elaborate exactly what information you are looking for?

Which device you are using? (If you are looking for the specific information for the particular device) 

 

For information regarding how to use the configuration tools can be found How to Documents from the below software forum : 

https://community.nxp.com/t5/S32-Design-Studio/bd-p/s32ds

 

Please also check the below community pages, which may be helpful  

https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/Getting-Started-Overview-of-S32-Config...

https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/HOWTO-Add-a-new-debugger-configuration...

 

Thank you. Kind regards. 

- Mehul Patel

0 Kudos
2,051 Views
wboag
Contributor II

I am using pegdbserver_console directly, not through S32DS. My target is NXP_S32K1xx_S32K148F2M0M11 and I am using PE Micro Multilink Univeral.

Configuring Daisy Chaining in S32DS is simply a check box in the Advanced Options on the PEmicro Debugger tab of the debugger configuration window.

I need the "[STARTUP]" configuration settings to put into config.ini.

A document that describes all of the configuration settings available to pegdbserver_console would be ideal. If that is not possible, configuration settings that actually work would be adequate.

0 Kudos
2,045 Views
juan_see
Contributor III

Hi @wboag ,

Since you wish to use daisy chain configuration, make sure you include the "-usejtag" command line argument when launching the pegdbserver_console.exe. Otherwise, it will default to "SWD" protocolo and the jtag daisy chain configurations will be ignored. 

0 Kudos
2,035 Views
wboag
Contributor II

I am using the -usejtag argument.

0 Kudos
2,299 Views
Mehul_Patel_NXP
NXP Employee
NXP Employee

Hi, @wboag , 

Please can you provide more information related to the issue. 

Have you built the project on S32 Design studio and you want to generated elf file to loaded into RAM as part of launch?

Or please can you describe in more detail related to it. 

Thank you, Kind regards, 

- Mehul

0 Kudos
2,286 Views
wboag
Contributor II

I have an .elf file created from an S32 DS project. It has my custom downloader. I want to give it to manufacturing to load and execute using a script that can run without operator interaction so they can then download our firmware into Flash on a blank processor.

0 Kudos
2,228 Views
juan_see
Contributor III

PEmicro has C/C++ and Delphi library modules which allow the creation of custom PC applications to control PEmicro hardware interfaces. With the UNITACMP dll, you can load your custom .elf file into RAM after creating your own custom application. 

For more information please see:

https://www.pemicro.com/products/product_viewDetails.cfm?product_id=15320183&productTab=1

 

PROGACMP/CPROGACMP is only for flash programming and not for loading RAM data. 

2,235 Views
jiri_kral
NXP Employee
NXP Employee
0 Kudos