FLASH "LOCK FLASH"

Lock specified blocks.

Syntax

FLASH "LOCK FLASH burn_alg [exec_init] blocks"

Parameters

burn_alg

One of the following values:

TRUE

Transfers the burn algorithm the target.

FALSE

Uses the existing burn algorithm on the target.

exec_init

One of the following values:

TRUE

Executes the initialization script specified in the configuration window before locking the flash.

FALSE

Locks flash without reinitializing the target before. This is the default value.

blocks

One of the following values:

ALL

Locks all blocks.

BOOT

Locks all boot blocks.

DATA

Locks all data blocks.

INDIVIDUAL 'block_list'

Locks individual blocks.

The mandatory parameter block_list specifies the block numbers of the blocks to be locked.

Description

The command FLASH "LOCK FLASH" locks the specified flash memory blocks.

The initialization script and the download of the burn algorithm to the target need to be executed only once per session. Changes to the target RAM memory or registers may require an additional execution. The burn_alg parameter has no effect on the RAM-free burning method.

Note

  • Separate single blocks and block ranges by “,”.

  • Specify block ranges by using “-” between the first and the last block of the range.

  • Specify the blocks in ascending order.

  • Select only blocks from the range of available blocks.

  • Follow the correct syntax for specifying blocks, otherwise the blocks are not locked and the debugger displays an error message.

Example

FLASH "LOCK FLASH TRUE INDIVIDUAL '16,32,44-48'"

This locks the blocks number 16, number 32, and number 44-48 in the flash memory.

See Also

For more complete information about compiler optimizations, see our Optimization Notice.