2559 views|2 replies

227

Posts

0

Resources
The OP
 

How to create a secure area for Flasher for secure burning? [Copy link]

Flasher is a programming tool for microcontrollers with on-chip or external Flash. Currently Flasher supports the creation of secure area, which allows the Flasher to be pre-configured with a given configuration file and then provided to an external production facility. After setting the secure area, the contents of the Flasher cannot be read out via MSD, FILE I/O functions (J-Link Commander) or RS232, etc. This article describes how to set the secure area on the Flasher and how to move configuration/data files into it.

Three modes of Flasher

Flasher can be started in 3 different modes:

1. PC-based mode

In this mode the Flasher can be used as a J-Link and is controlled by the software from the J-Link Software and Documentation package (J-Link Commander, J-Flash, ...).

2. Independent mode

This mode is entered when the Flasher has no valid USB/Ethernet connection to the host PC. For example, the Flasher is powered only by USB power.

3. MSD mode

With the Flasher connected via USB, press and hold the Flasher's Start/Stop button ("PROG" button on the Flasher) for at least 2 seconds. In this mode, the Flasher enumerates as a mass storage device on the PC (similar to a USB stick). Configuration + data files can be manually placed on the Flasher in this mode, and the Flasher log files can be read.

Create a secure area

By default, only the public memory area exists inside the Flasher (the Flasher Flash is accessible via MSD mode). The secure area must be created before it can be used. After the secure area is created, half of the Flasher memory space (~64 MB on current models) is reserved for the secure area. The secure area can also be removed at any time, making the complete Flasher memory space available to the public area again. The secure area can be created/deleted via the J-Link Commander, which is part of the software package included with the Flasher.

The following secure area related commands are provided in J-Link Commander:

securearea create

securearea remove

Note: When creating or deleting a secure area, all configuration and data files stored in the Flasher will be lost. Before creating/deleting a secure area, make sure these files are no longer needed.

Move files to a secure area
Before moving the configuration and data files to the secure area, you should test whether the Flasher is working properly in standalone mode. Once the setup is working as expected, do the following to move the configuration and data files to the secure area:

1. After creating the secure area in J-Link Commander, start Flasher in MSD mode and move FLASHER.cfg and FLASHER.dat to Flasher.

Figure 1 Moving files to Flasher

Note: FLASHER.CFG contains information used to configure the target device, while FLASHER.DAT contains the data to be programmed.

2. Create a folder "_SECURE".

3. Move all files that should be moved to the secure area into this folder.

Figure 3-2 Moving files to the secure area

4. Restart Flasher (do not start in MSD mode when you start again. Otherwise, the files will not be moved to the secure area). After starting, it may take a while for the Flasher power LED to light up, depending on the configuration and data file size. After lighting up, all files have been moved to the secure area and the _SECURE folder in the public area has been deleted.

5. Now Flasher can be used in standalone mode as usual, but users cannot read files.

Notes on using secure area
1. No program can read the contents of the secure area. When Flasher is run from the secure area, only FLASHER.LOG is placed in the public area and updated. This file records all the logging information about the commands executed in standalone mode.

2. If there are any files or folders in the public area besides FLASHER.LOG, and there are configuration and data files in the secure area, the flashing will fail in standalone mode because it is not clear which configuration and data files to use. In this case, the Flasher will output an error message in FLASHER.LOG when flashing.

Flasher Hardware Version Requirements
Older models of Flashers do not support this method. Flashers in the following serial number ranges are not supported:

1621xxxxx (Flasher ARM V2)

1630xxxxx (Flasher ARM V3)

4210xxxxx (Flasher PPC V1)

4110xxxxx (Flasher RX V1)

All other models/hardware versions support secure flashing.

Latest reply

Which of the three startup modes of Flasher is better? Standalone mode requires that you enter the mode while connected to a host PC. The third mode requires configuration and data files to be placed manually.   Details Published on 2021-5-15 09:26
Personal signature

»¶Ó­¹Ø×¢“Âó¿ËÌ©¼¼Êõ”

 
 

6555

Posts

0

Resources
2
 

Which of the three startup modes of Flasher is better?

Standalone mode requires that you enter the mode while connected to a host PC. The third mode requires configuration and data files to be placed manually.

 
 
 

227

Posts

0

Resources
3
 
Jacktang posted on 2021-5-15 09:26 Which of the three startup modes of Flasher is better? The independent mode requires that it must be connected to the host PC to enter, and the third mode requires configuration and data files to be manually...

Depending on the application scenario, burning is generally done in independent mode

Personal signature

»¶Ó­¹Ø×¢“Âó¿ËÌ©¼¼Êõ”

 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved ¾©B2-20211791 ¾©ICP±¸10001474ºÅ-1 µçÐÅÒµÎñÉóÅú[2006]×ÖµÚ258ºÅº¯ ¾©¹«Íø°²±¸ 11010802033920ºÅ
¿ìËٻظ´ ·µ»Ø¶¥²¿ Return list