How can I use jflash to read device memory and save to file?

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

    • How can I use jflash to read device memory and save to file?

      We need to read the device memory as MAC address and generate public signature based on it.

      It is easy to do with j-link.

      savebin mac.bin, 0x00280028, 8

      I am aware of the fact that segger strongly discourages using j-link in production. Although frankly I am not at all convinced by the reasons I am willing to follow the rule to use j-flash instead.

      So please instruct me how to do it in j-flash.

      Thanks a lot.
    • Hello,

      Thank you for your inquiry.
      The reason we do not encourage using J-Link Commander for production is that the Commander is more a debugging and troubleshooting tool which is under constant changes and new features are added etc.
      This is usually unwanted by customers who want a stable production environment that will work for years even after updates.
      That is what J-Flash is for + many other production features the Commander does not have.

      To read back the MAC and save it you can use the CL options of J-Flash and automate it with batch processing.
      You can use -readrange<SADDR>,<EADDR> to read the mac and -save[<SADDR>,<EADDR>] to save the bin.

      More information about CL options and automation can be found in the J-Flash UM08003 in your J-Link install directory under /Doc/Manuals.


      Best regards,

      Nino
      Please read the forum rules before posting: Forum Rules

      Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
      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 contact us per e-mail.
      Alternatively our support ticketing system can be used as well: segger.com/ticket/
    • Thanks for your quick response.
      I have tried readrange and save, and saveas. Unfortunately they don't work.
      I got all 0xFF from that range. j-link works very well though.
      I MCU is TI CC2538. The address is not in the flash section. Is it the reason that j-flash won't work?
    • New

      Hello,

      weiqj wrote:

      I MCU is TI CC2538. The address is not in the flash section. Is it the reason that j-flash won't work?
      Yes in that case J-Flash is the wrong tool to use.
      This could be achieved with J-Flash via init or exit steps but it is much more complex than doing it with J-Link Commander.
      However using the J-Link Commander for production comes with the mentioned drawbacks.
      To have 100% control over your setup we suggest getting a J-Link SDK and write a simple tool based on J-Link Commander (which is available as a sample in the SDK) which solves your task reliably.

      Best regards,
      Nino
      Please read the forum rules before posting: Forum Rules

      Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
      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 contact us per e-mail.
      Alternatively our support ticketing system can be used as well: segger.com/ticket/