SEC Tool v7 fails to write image with SB file when using custom FCB with imxrt600

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SEC Tool v7 fails to write image with SB file when using custom FCB with imxrt600

Jump to solution
663 Views
george_iyo
Contributor II

We are using as our external flash a Macronix QSPI flash chip (MX25U6432F). Using the tool to generate a standard QSPI NOR flash configuration interface using 1-wire read/writes enables an SB file write to succeed - however, we would like to use our custom flash configuration interface to be written at the 0x400 image offset, which enables the 4READ protocol and enabling/disabling the quad spi protocol


Is there a way to generate the secure boot file to use the standard 1-wire read/writes for erase functions, but then set the flash config block image header located at 0x400 to the configuration we prefer for our application? We would prefer to use the 4READ protocol for QSPI flash reads for faster performance.

 

As an attached reference is our flexspi_nor_config_t struct that we typically used for plain XIP images while testing, and attached is the .bin version of the configuration block that we use for configuring the build image.

 

0 Kudos
1 Solution
603 Views
marek-trmac
NXP Employee
NXP Employee

Hi George,

I do not see any problem in your BD file. We're planning to support two separate FCB files in SEC tool v8 too.

 

Regards,
Marek

View solution in original post

0 Kudos
2 Replies
637 Views
george_iyo
Contributor II

I think I might have solved my problem, but I would like an NXP employee to confirm if truly addresses the problem:

 

under bd_files/ each .bd file defines what the shadow write application performs which includes setting the flash block configuration in the application images + the flash block configuration provided to the ROM bootloader. In section (0), I make amendments such that the flash block configuration given to the ROM bootloader is the simplified NOR flash configuration, and the flash block configuration given to the images is given the flash configuration block attached earlier, like so:

```

section (0) {
// Configure external memory
load "basic_debug_porta_qspi_nor.bin" > 0x0010C000;
enable @0x9 0x0010C000;

erase 0x08000000..0x08012000; //Erase FLASH

load "flash_config_mx25u6432f.bin" > 0x08000400;
load "gen_sb/image_version.bin" > 0x08000600;

encrypt (0) {
load inputFile > 0x08001000;
}

erase 0x08040000..0x08052000; //Erase FLASH for dual boot image 1

load "flash_config_mx25u6432f.bin" > 0x08040400;
load "gen_sb/image_version.bin" > 0x08040600;

encrypt (0) {
load inputFile > 0x08041000;
}

```

 

the .sb file seems to be executed appropriately afterwards, and the application seems to function fine. This does mean that I have to call the build_image script in terminal and not through the application, because the application otherwise will change this file.

604 Views
marek-trmac
NXP Employee
NXP Employee

Hi George,

I do not see any problem in your BD file. We're planning to support two separate FCB files in SEC tool v8 too.

 

Regards,
Marek
0 Kudos