infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15

Thread: memtool - jlink batch file

  1. #1
    frankmag is on a distinguished road
    Join Date
    May 2013
    Posts
    26
    Points
    82.8125

    memtool - jlink batch file

    Hi,
    Does anyone have a simple batch file to use with Memtool in order to execute from command line?
    I need to Erase - program - verify an xmc4500 without opening the graphical interface. I see that I have to use a batch file but I don't find info about its configuration ( ie whats the command syntax for loading the hex file, start download ...).
    As I need a command line tool I tried also jlink. Everything works fine but first of all you have to open the jlink console, than from there you can send single commands.
    Is there anyway of doing all in one step?

    Thanks
    Frank

  2. #2
    Travis will become famous soon enough
    Join Date
    Feb 2013
    Location
    Singapore
    Posts
    749
    Points
    4580
    Hi frank,

    Please see my reply below in red.

    Quote Originally Posted by frankmag View Post
    Hi,
    Does anyone have a simple batch file to use with Memtool in order to execute from command line?
    Travis: Sorry there is no batch file to work with Memtool.

    I need to Erase - program - verify an xmc4500 without opening the graphical interface. I see that I have to use a batch file but I don't find info about its configuration ( ie whats the command syntax for loading the hex file, start download ...).
    Travis: I really don't understand what you are trying to do, these feature are already provided in the memtool and why do you need a batch file for?

    As I need a command line tool I tried also jlink. Everything works fine but first of all you have to open the jlink console, than from there you can send single commands.
    Is there anyway of doing all in one step?

    Thanks
    Frank

  3. #3
    frankmag is on a distinguished road
    Join Date
    May 2013
    Posts
    26
    Points
    82.8125
    My goal is to call a single file from command line (ie Download.bat ) and have the micro programmed without any other manual insertion into a GUI.
    If I call Memtool from command as follow:
    memtool command.mtb
    and inside command.mtb I put the commnd connect then memtool opens and automatically connct to the target.
    What are the ather commands that I have to insert into command.mtb in order to load the hex file, start the program session and then close memtool?

    Thanks

  4. #4
    Aaron Walsh
    Guest
    Hi Travis,

    I have a similar requirement for the following reasons....

    1) I need the end user to be able to perform the re-programming
    2) The end user is not an electronics or software engineer and so the process has to be simple
    3) The end user does not speak English and will not be able to operate the Memtool dialogs

    I need the end user to simply run a command file. I imagine this would do the following....

    a) Launch Memtool (possibly minimised)
    b) Pass the batch commands to Memtool or point to another file containing the batch commands

    Could you please advise if this or something similar is possible please.

    Thank you very much
    Aaron

  5. #5

    Infineon Employee
    Infineon Employee
    Expert
    Mike is on a distinguished road
    Join Date
    Nov 2011
    Posts
    19
    The professional version of Memtool which is available from PLS (www.pls-mc.com) supports scripting.
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  6. #6
    Aaron Walsh
    Guest
    Thanks Mike, I will have a look at the professional version of Memtool.

    I have received the Memtool batch command application note (see attached). It meets some of the requirements. So far I have not found a way to launch it silently and execute batch files so the end user doesn't have to speak English.

    memtool_batch_mode.pdf

    Best regards
    Aaron

  7. #7

    Infineon Employee
    Infineon Employee
    Expert
    Marillion is on a distinguished road
    Join Date
    Feb 2013
    Posts
    13

    JLINK commands in batch file for programming the XMC

    Here is the solution for JLINK. It works for all XMC kits with on-board dedugger (JLINK):

    1. Make sure "JLink.exe" and "JLinkARM.dll" is located in the same folder as the batch-file (see next step).

    2. Create a batch-file (e.g. program.bat) with following content:
    JLink.exe -CommanderScript testscript.jlink

    3. Create the JLINK script file (name "testscript.jlink" with the required commands e.g.:
    device XMC1100-T038F0064
    loadbin testprogram_v1_0.bin,0x10001000
    r
    exit


    This example is programing a binary file (testprogram_v1_0.bin) into the XMC1100. You get the binary file from DAVE, if you switch the "Output file format" to "binary" (Project>>Active Project Properties>>ARM-GCC Create Flash Image/Output)

    This works fine. I used this method several thousand times.

    Best Regards
    Marillion
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  8. #8
    Aaron Walsh
    Guest
    Hi Marillion,

    Thank you very much for your fast reply. I will try this method on the next production batch of pcb's.

    Best regards
    Aaron

  9. #9
    chrisbaggott
    Guest
    Hia, I have recently used the IMTMemtool.exe, via the command line interface, with a batch file to automate the reprogramming of a Tricore. Is there ant way to just erase the microprocessor as "erase" does not seem to be a valid batch command like "program" & "connect" are. Does anyone know if this is possible?

    Thanks

  10. #10

    Infineon Employee
    Infineon Employee
    Anoop is on a distinguished road
    Join Date
    Jul 2015
    Posts
    2
    Points
    35

    Regarding License

    Does any one know if "Segger Jlink" dll's and executable is free to distribute or licensed one?
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

+ Reply to Thread
Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.