[SOLVED] Secure Kinetis MCU

  • [SOLVED] Secure Kinetis MCU

    Hi,

    I need to secure my kinetis MCU. I am using Keil IDE. There isn't any "allow security" option available with the device name. J-LINK isn't permitting me to change the security configuration.

    Your help will be highly appreciated

    The post was edited 1 time, last by waqasbutt ().

  • Hi,


    could you provide me with the exact device name you are referring to?

    Best regards,
    Niklas
    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.
  • Hi,


    the device "MK20FX512xxx12 (allow security)" is supported by the J-Link DLL.
    It is also publicly listed as a supported device: segger.com/jlink_supported_devices.html?m=Freescale#sel
    You can test this by executing the command "device MK20FX512xxx12 (allow security)" in J-Link Commander (jlink.exe) , which is included in the J-Link software & documentation pack .


    Do I understand you correctly that you were able to access security bits with other devices? Could you post a screenshot showing this issue?

    Best regards,
    Niklas
    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.
  • Hi,


    Thanks for the quick response,
    You are right. "MK20FX512xxx12 (allow security)" is available in jlink commander. May be i couldn't communicate properly.


    I am trying to say that Keil is not showing any controller with "allow security" option as available in jlink commander. So how can i configure the security in Keil IDE itself, as there is no "allow security" option available in keil.


    Same can be seen from the attached image
    Images
    • Options1.png

      45.7 kB, 635×473, viewed 610 times
  • Hi,

    i will take a look at Keil MDK.
    In the mean time (as a workaround), you can manually edit the Keil_Project_Name.jlink file that is created usually next to the project's .uvguix , .uvoptx and .uvprojx files

    It will look similar to this :

    Source Code

    1. [BREAKPOINTS]
    2. ForceImpTypeAny = 0
    3. ShowInfoWin = 1
    4. EnableFlashBP = 2
    5. BPDuringExecution = 0
    6. [CFI]
    7. CFISize = 0x00
    8. CFIAddr = 0x00
    9. [CPU]
    10. OverrideMemMap = 0
    11. AllowSimulation = 1
    12. ScriptFile=""
    13. [FLASH]
    14. CacheExcludeSize = 0x00
    15. CacheExcludeAddr = 0x00
    16. MinNumBytesFlashDL = 0
    17. SkipProgOnCRCMatch = 1
    18. VerifyDownload = 1
    19. AllowCaching = 1
    20. EnableFlashDL = 2
    21. Override = 0
    22. Device="UNSPECIFIED"
    23. [GENERAL]
    24. WorkRAMSize = 0x00
    25. WorkRAMAddr = 0x00
    26. RAMUsageLimit = 0x00
    27. [SWO]
    28. SWOLogFile=""
    29. [MEM]
    30. RdOverrideOrMask = 0x00
    31. RdOverrideAndMask = 0xFFFFFFFF
    32. RdOverrideAddr = 0xFFFFFFFF
    33. WrOverrideOrMask = 0x00
    34. WrOverrideAndMask = 0xFFFFFFFF
    35. WrOverrideAddr = 0xFFFFFFFF
    Display All


    (Please do not copy this, just edit the existing one)
    In the section [FLASH], you can edit the parameter Device="UNSPECIFIED" to Device="MK20FX512xxx12 (allow security)", which will override any parameter passed by Keil to the J-Link DLL.

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