[SOLVED] JLink.exe (CLI) - Efm32gg - No Popup if device is locked

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

  • [SOLVED] JLink.exe (CLI) - Efm32gg - No Popup if device is locked

    Hi

    I need to be able to verify that the chip (MCU) is properly locked during production.
    so it basically is not this important what i do (example i could read a couple of words in flash, if i succeed, my verification would tell me that i did not lock my chip correctly.

    if i try any action on a locked cpu, the JLink will popup saying the chip is locked and if i want to unlock it (mass erase).

    can i somehow disallow the JLink.exe to generate this popup and rather give me some feedback (this will then either be a actual readback of a word in flash for example if the mcu is not properly locked or an "Error String" telling me it failed because the chip is locked, which in my case will be converted into a suggessful verification of the chip lock.

    thanks
  • Hi,
    Thank you for your inquiry.

    There is no generic way to check if a device is secured or not due to this being very device specific.
    For some devices, this can be checked via a debug register, some deactivate the debug interface and cannot be accessed at all.
    Further more, we do not recommend to check the locked state by writing/reading from the memory,
    because you can never be sure if the memory cannot be read because the device is secured or because the setup is faulty (e.g. defective cable etc).
    Therefore we also do not plan to implement such a feature.

    We suggest to make use of the J-Link SDK. With the SDK you could write your own application which handles download, secure and security check for your specific device.

    You can also use the J-Link Commander, set the "remember decision" option and click on "no" in the unlock dialog.
    This way the J-Link Commander will try to connect to the target device without unlocking it.
    After the connect was successful you could then either read the related registers or try to write/read the memory of the device and see if it succeeds or fails, but yet again, this is not recommended.

    Does this answer your question?

    Best regards,
    Fabian
    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.
  • sort of, thank you.

    i see your point of the approach checking if the lock is in place.
    the issue with the EFM32GG is that after the chip lock (write a specific register), i cannot verify because the register will simply tell me its locked.
    unfortunatelly, this is not true unless after the write to the register, a HARD-reset is performed (either by SWD nRESET or by the /RESET pin). before that, the chip lock was just installed, but not active yet.

    Therefore, during production, i have a program which follows those steps.

    the idea was to add an extension during production to verify, that the program executed suggessfully by checking if the flash lock really did happen.

    so, you are correct by pointing out why this is a bad idea, but since its just a verification, i would like to do so.

    the issue im having is just with the popup of jlink as the program is basically a script, which is automatically executed, so i cannot support GUI popups where the user needs to activate.

    so by your answer, i take it that its not possible to give JLink a parameter to say: "hey, if you cannot connect because the chip is locked, return with a status message rather than poping up a window"

    so ill lock for another approach.



    QUESTION: what is the pricing of the SDK?
  • Hi,

    Please find information about the SDK here:
    segger.com/products/debug-prob…nk/technology/j-link-sdk/
    And the pricing here:
    segger.com/purchase/pricing/jlink-related/

    Do you have any further questions?

    Best regards,
    Fabian
    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.