Trying to understand difference between Jlink Commander and JLINK DLL

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Trying to understand difference between Jlink Commander and JLINK DLL

      Hello,

      I have a custom bord with the following hardware configuration:
      • microcontroller: NXP IMXRT1176
      • external memory: Infineon Hyperflash S26HL512T with Hyperbus configuration
      I'd like to use J-Link to handle write, read and erase commands for my microcontroller's memory. I would like to have a possibility to operate it in an autonomous way via python script.
      Even though my uC does not have internal memory, and have specific hyperbus interface to operate the memory, I have a flash loader .FLM file that can write, read and erase the data for that memory.
      I could achieve the above by executing J-Link Commander commands in a python's process, but since there is already pylink library that does that (github.com/square/pylink), I thought that I could just reuse it for my purposes.

      If possible, I would like to understand the following topics:
      1. It turned out that pylink works somewhat differently that J-Link Commander. One example is the erase functionality, I can erase by sectors using J-Link Commander, but I can't do the same using pylink that uses Jlink DLL API. I thought both tools use the same DLL underneath (Jlink DLL API does not list Erase sector functionality, it only allows for Erase Chip functionality). For my purpose it's essential to be able to erase by sectors as my memory has 64MB of space and only a tiny portion of it is used, so it's much quicker to erase selective sectors instead of whole chip memory. Even if we do not consider python, but only functions available in from Jlink DLL, then I do not see this possibility I mentioned before.
      Could you explain to me the difference here?

      2. Is it possible to perform memory erase by range of addresses using functions from DLL? If so, I could then implement that on the python side.
    • New

      Hello,

      The J-Link Commander indeed uses only the JLINKARMDLL for communication with J-Link.
      To erase a range of addresses using the J-Link DLL, you can use the following approach:

      C Source Code

      1. pf = (JLINK_FUNC_ERASE*)JLINK_GetpFunc(JLINK_IFUNC_ERASE);
      2. if (pf) {
      3. r = pf(SAddr, EAddr);
      4. }
      Best regards,

      Simon
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.