Author Topic: Enable Code Read Protection via command-line  (Read 587 times)

thgid

  • Jr. Member
  • **
  • Posts: 1
    • View Profile
Enable Code Read Protection via command-line
« on: October 12, 2016, 07:05:16 am »
I would like to enable the Code Read Protection feature via command-line on NXP NHS3100 ARM microcontrollers.

It looked like this would be possible via the SECURITY command, and the documentation (FlashMagic GUI and Command Line Manual, Rev 2.05) says "for the ARM devices, bit1 = code read protection".

However, all of the following failed:
SECURITY(1) -> Invalid parameters for SECURITY directive
SECURITY(1,0,0) -> Security bit programming failed: invalid command
SECURITY(1,1,1) -> Security bit programming failed: invalid command

Any idea how this could be done?

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2114
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Enable Code Read Protection via command-line
« Reply #1 on: November 17, 2016, 01:27:44 am »
Code Read Protection is set in the hex file. Typically this is achieved by setting the value in the startup code. For example with Keil compilers the startup code defines "CRP" and a value to use.

The manual is out of date and we will fix that - sorry for the confusion.
Embedded Systems Academy, Inc.
support at esacademy dot com