Flash Magic Forum

In-System Programming Support => ARM Cortex => Topic started by: thgid on October 12, 2016, 07:05:16 AM

Title: Enable Code Read Protection via command-line
Post by: thgid 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?
Title: Re: Enable Code Read Protection via command-line
Post by: Andy Ayre 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.