mirror of https://github.com/wolfSSL/wolfBoot.git
Merge pull request #444 from miyazakh/renesas_rz_rsip
Add RSIP use to Renesas RZ supportpull/450/head
commit
0ddde6f074
|
@ -160,6 +160,8 @@ IDE/Renesas/e2studio/RZN2L/app_RZ/.api_xml
|
|||
IDE/Renesas/e2studio/RZN2L/app_RZ/.secure_azone
|
||||
IDE/Renesas/e2studio/RZN2L/app_RZ/.secure_xml
|
||||
IDE/Renesas/e2studio/RZN2L/app_RZ/configuration.xml
|
||||
IDE/Renesas/e2studio/RZN2L/app_RZ/rzn_cfg.txt
|
||||
IDE/Release/e2Studio/RZN2L/app_RZ/JLinkLog.log
|
||||
IDE/Renesas/e2studio/RZN2L/flash_app/Debug
|
||||
IDE/Renesas/e2studio/RZN2L/flash_app/rzn
|
||||
IDE/Renesas/e2studio/RZN2L/flash_app/rzn_gen
|
||||
|
@ -169,6 +171,10 @@ IDE/Renesas/e2studio/RZN2L/flash_app/.api_xml
|
|||
IDE/Renesas/e2studio/RZN2L/flash_app/.secure_azone
|
||||
IDE/Renesas/e2studio/RZN2L/flash_app/.secure_xml
|
||||
IDE/Renesas/e2studio/RZN2L/flash_app/configuration.xml
|
||||
IDE/Renesas/e2studio/RZN2L/flash_app/rzn_cfg.txt
|
||||
IDE/Release/e2Studio/RZN2L/flash_app/JLinkLog.log
|
||||
IDE/Renesas/e2studio/RZN2L/flash_app/flash_simple_loader.elf.jlink
|
||||
IDE/Renesas/e2studio/RZN2L/flash_app/flash_simple_loader.elf.launch
|
||||
IDE/Renesas/e2studio/RZN2L/wolfboot/Debug
|
||||
IDE/Renesas/e2studio/RZN2L/wolfboot/rzn
|
||||
IDE/Renesas/e2studio/RZN2L/wolfboot/rzn_gen
|
||||
|
@ -178,6 +184,13 @@ IDE/Renesas/e2studio/RZN2L/wolfboot/.api_xml
|
|||
IDE/Renesas/e2studio/RZN2L/wolfboot/.secure_azone
|
||||
IDE/Renesas/e2studio/RZN2L/wolfboot/.secure_xml
|
||||
IDE/Renesas/e2studio/RZN2L/wolfboot/configuration.xml
|
||||
IDE/Renesas/e2studio/RZN2L/wolfboot/rzn_cfg.txt
|
||||
IDE/Release/e2Studio/RZN2L/wolfboot/JLinkLog.log
|
||||
IDE/Renesas/e2studio/RZN2L/wolfboot/wolfBoot_RZ.elf.jlink
|
||||
IDE/Renesas/e2studio/RZN2L/wolfboot/wolfBoot_RZ.elf.launch
|
||||
IDE/Renesas/e2studio/RZN2L/wolfboot/.cache/*
|
||||
IDE/Renesas/e2studio/RZN2L/flash_app/.cache/*
|
||||
IDE/Release/e2studio/RZN2L/app_RZ/.cache/*
|
||||
|
||||
|
||||
tpm_seal_key.key
|
||||
|
|
|
@ -17,7 +17,7 @@ You can download and execute wolfBoot by e2Studio debugger. Use a USB connection
|
|||
|Item|Name/Version|Note|
|
||||
|:--|:--|:--|
|
||||
|Board|Renesas RZN2L RSK||
|
||||
|Device|R9A07G084M04GBG||
|
||||
|Device|R9A07G084M08GBG||
|
||||
|Toolchain|GCC ARM Embedded 10.3.1.20210824|Included in GCC for Renesas RZ|
|
||||
|FSP Version|1.3.0|Download from Renesas site|
|
||||
|IDE|e2studio 2024-01.1 (24.1.1)|Download from Renesas site|
|
||||
|
@ -25,16 +25,19 @@ You can download and execute wolfBoot by e2Studio debugger. Use a USB connection
|
|||
|Key tool|keygen and sign|Included in wolfBoot|
|
||||
|
||||
|
||||
|FIT Components|Version|
|
||||
|:--|:--|
|
||||
|Board Support Package Common Files|v1.3.0|
|
||||
|I/O Port|v1.3.0|
|
||||
|Arm CMSIS Version 5 - Core (M)|v5.7.0+renesas.1|
|
||||
|Board support package for R9A07G084M04GBG|v1.3.0|
|
||||
|Board support package for RZN2L|v1.3.0|
|
||||
|Board support package for RZN2L - FSP Data|v1.3.0|
|
||||
|RSK+RZN2L Board Support Files (xSPI0 x1 boot mode)|v1.3.0|
|
||||
|SDRAM on Bus State Controller|v1.3.0|
|
||||
|FIT Components|Version|Note|
|
||||
|:--|:--|:--|
|
||||
|Board Support Package Common Files|v1.3.0||
|
||||
|I/O Port|v1.3.0||
|
||||
|Arm CMSIS Version 5 - Core (M)|v5.7.0+renesas.1||
|
||||
|Board support package for R9A07G084M04GBG|v1.3.0|Note1|
|
||||
|Board support package for RZN2L|v1.3.0||
|
||||
|Board support package for RZN2L - FSP Data|v1.3.0||
|
||||
|RSK+RZN2L Board Support Files (xSPI0 x1 boot mode)|v1.3.0||
|
||||
|SDRAM on Bus State Controller|v1.3.0||
|
||||
|
||||
Note1:\
|
||||
To use RSIP drive, a devvice type should be `R9A07G084M04GBG`. However, choosing `R9A07G084M04GBG` won't allow to select `RSK+RZN2L` board. This example uses LED and external flash memory on `RSK + RZN2L` board. Therefore, the example temporary `R9A07G084M04GBG` for the device type. Updating e2studio or fsp could resolve the issue.
|
||||
|
||||
|
||||
### 2-2. Project folders
|
||||
|
@ -147,15 +150,23 @@ ORIGINAL
|
|||
BSP_TARGET_ARM void mpu_cache_init (void)
|
||||
{
|
||||
...
|
||||
#if BSP_CFG_C_RUNTIME_INIT
|
||||
#if BSP_CFG_C_RUNTIME_INIT && !defined(EXTERNAL_LOADER)
|
||||
|
||||
/* Copy the loader data from external Flash to internal RAM. */
|
||||
bsp_loader_data_init();
|
||||
|
||||
/* Clear loader bss section in internal RAM. */
|
||||
bsp_loader_bss_init();
|
||||
#endif
|
||||
...
|
||||
#if !(BSP_CFG_RAM_EXECUTION)
|
||||
|
||||
/* Copy the application program from external Flash to internal RAM. */
|
||||
bsp_copy_to_ram();
|
||||
|
||||
/* Clear bss section in internal RAM. */
|
||||
bsp_application_bss_init();
|
||||
#endif
|
||||
...
|
||||
}
|
||||
```
|
||||
|
@ -171,12 +182,19 @@ if BSP_CFG_C_RUNTIME_INIT && !defined(EXTERNAL_LOADER)
|
|||
|
||||
/* Copy the loader data from external Flash to internal RAM. */
|
||||
bsp_loader_data_init();
|
||||
....
|
||||
|
||||
#if !(BSP_CFG_RAM_EXECUTION) && !defined(EXTERNAL_LOADER)
|
||||
/* Clear loader bss section in internal RAM. */
|
||||
bsp_loader_bss_init();
|
||||
#endif
|
||||
...
|
||||
#if !(BSP_CFG_RAM_EXECUTION)
|
||||
|
||||
/* Copy the application program from external Flash to internal RAM. */
|
||||
bsp_copy_to_ram();
|
||||
/* bsp_copy_to_ram(); */
|
||||
|
||||
/* Clear bss section in internal RAM. */
|
||||
bsp_application_bss_init();
|
||||
#endif
|
||||
...
|
||||
}
|
||||
```
|
||||
|
@ -324,7 +342,7 @@ To run the application,
|
|||
+ Select `J-Link ARM`. Click OK.
|
||||
+ Select `R9A07G084M04`. Click OK.
|
||||
|
||||
This simple application just downloads binary files defined in `Flash_section.s` and `Flash_update.s` through J-Link Flash Downloader. `Flash_update.s` doesn't includes `the app v2` initially.
|
||||
This simple application just downloads binary files defined in `Flash_section.s` and `Flash_update.s` through J-Link Flash Downloader. `Flash_update.s` doesn't include `the app v2` initially.
|
||||
|
||||
Flash_update.s
|
||||
|
||||
|
@ -394,7 +412,7 @@ Type "connect" to establish a target connection, '?' for help
|
|||
J-Link>connect
|
||||
Please specify device / core. <Default>: R9A07G084M04
|
||||
Type '?' for selection dialog
|
||||
Device>R9A07G084M04GBG
|
||||
Device>R9A07G084M08GBG
|
||||
Please specify target interface:
|
||||
J) JTAG (Default)
|
||||
S) SWD
|
||||
|
@ -402,7 +420,7 @@ Please specify target interface:
|
|||
TIF>S
|
||||
Specify target interface speed [kHz]. <Default>: 4000 kHz
|
||||
Speed>
|
||||
Device "R9A07G084M04" selected.
|
||||
Device "R9A07G084M08" selected.
|
||||
...
|
||||
J-Link>exec EnableEraseAllFlashBanks
|
||||
```
|
||||
|
|
|
@ -0,0 +1,496 @@
|
|||
# wolfBoot for Renesas RZN2L with RSIP
|
||||
|
||||
## 1. Overview
|
||||
|
||||
This example demonstrates simple secure firmware boot from external flash by wolfBoot. The example uses SPI boot mode with external flash on the evaluation board. In addition to boot mode, this readme explains about RSIP driver use. RSIP provides Cryptographic accelerator, Random number generator and Secure key manegement.
|
||||
|
||||
|
||||
A sample application v1 is securely loaded into internal RAM if there is not higher version in update region. A sample application v2 will be loaded when it is in update region.Both versions behave the same except blinking LED Red(v1) or Yellow(v2). They are compiled by e2Studio and running on the target board.
|
||||
|
||||
|
||||
In this demo, you may download two versions of the application binary file.
|
||||
You can download and execute wolfBoot by e2Studio debugger. Use a USB connection between PC and the board for the debugger and flash programmer.
|
||||
|
||||
## 2. Components, Tools and Board Settings
|
||||
|
||||
### 2-1. Tools
|
||||
|Item|Name/Version|Note|
|
||||
|:--|:--|:--|
|
||||
|Board|Renesas RZN2L RSK||
|
||||
|Device|R9A07G084M08GBG||
|
||||
|Toolchain|GCC ARM Embedded 10.3.1.20210824|Included in GCC for Renesas RZ|
|
||||
|FSP Version|1.3.0|Download from Renesas site|
|
||||
|IDE|e2studio 2024-01.1 (24.1.1)|Download from Renesas site|
|
||||
|SEGGER J-Link|J-Link Commander V7.94j |Download from J-Link|
|
||||
|Key tool|keygen and sign|Included in wolfBoot|
|
||||
|
||||
|
||||
|FIT Components|Version|Note|
|
||||
|:--|:--|:--|
|
||||
|Board Support Package Common Files|v1.3.0||
|
||||
|I/O Port|v1.3.0||
|
||||
|Arm CMSIS Version 5 - Core (M)|v5.7.0+renesas.1||
|
||||
|Board support package for R9A07G084M04GBG|v1.3.0|Note1|
|
||||
|Board support package for RZN2L|v1.3.0||
|
||||
|Board support package for RZN2L - FSP Data|v1.3.0||
|
||||
|RSK+RZN2L Board Support Files (xSPI0 x1 boot mode)|v1.3.0||
|
||||
|SDRAM on Bus State Controller|v1.3.0||
|
||||
|Renesas Secure IP Driver|v1.3.0+fsp.1.2.0||
|
||||
|RSIP Engine for RZ/N2L|v1.3.0+fsp.1.2.0||
|
||||
|
||||
Note1:\
|
||||
To use RSIP drive, a devvice type should be `R9A07G084M04GBG`. However, choosing `R9A07G084M04GBG` won't allow to select `RSK+RZN2L` board. This example uses LED and external flash memory on `RSK + RZN2L` board. Therefore, the example temporary `R9A07G084M04GBG` for the device type. Updating e2studio or fsp could resolve the issue.
|
||||
|
||||
### 2-2. Project folders
|
||||
e2Studio Project:\
|
||||
wolfBoot IDE/Renesas/e2studio/RZN2L/wolfBoot\
|
||||
Sample app IDE/Renesas/e2studio/RZN2L/app_RZ\
|
||||
Flash Simple Loader IDE/Renesas/e2studio/RZN2L/flash_app
|
||||
|
||||
|
||||
### 2-3. Board Settings
|
||||
The switch and jumper settings required to run the sample program from external flash are shown below. For details on each setting, see the Renesas Starter Kit+ for RZN2L User's Manual.
|
||||
|
||||
|Project|SW4-1|SW4-2|SW4-3|SW4-4|SW4-7|
|
||||
|:--|:--|:--|:--|:--|:--|
|
||||
|xSPI0 boot mode|ON|ON|ON|ON|OFF|
|
||||
|
||||
|Project|CN8|CN24|
|
||||
|:--|:--|:--|
|
||||
|xSPI0 boot mode|Short 2-3|Short2-3|
|
||||
|
||||
## 3. Operation Overview
|
||||
The example uses SPI boot mode with external flash on the evaluation board. On this boot mode, the loader program, which is wolfBoot, is copied to the internal RAM(B-TCM). wolfBoot copies the encrypted RSIP key on flash memory and the application program from external flash memory to RAM(System RAM). As final step of wolfBoot the entry point of the copied application program is called if its integrity and authenticity are OK.
|
||||
|
||||

|
||||
|
||||
## 4. How to build and use
|
||||
This section describes about how to build wolfBoot and application and use them.
|
||||
|
||||
### 4-1) Key generation
|
||||
It has key tools running under the host environment such as Linux, Windows or MacOS.
|
||||
For compiling the tools, follow the instruction described in the user manual.
|
||||
|
||||
|
||||
```
|
||||
$ cd <wolfBoot>
|
||||
$ make keytools RENESAS_KEY=3
|
||||
$ export PATH=$PATH:<wolfBoot>/tools/keytools
|
||||
$ keygen --rsa2048 -g ./pri-rsa2048.der # RSA2048
|
||||
```
|
||||
|
||||
The `keygen` tool generates a pair of private and public key with -g option.
|
||||
The private key is stored in the specified file.
|
||||
The public key is stored in a key store as a C source code in "src/keystore.c" so that it can be compiled and linked with wolfBoot.
|
||||
If you have an existing key pair, you can use -i option to import the public key to the store.
|
||||
|
||||
The example for Renesas RZ with RSIP only supports RSA 2048 bit now.
|
||||
|
||||
### 5) Compile wolfBoot
|
||||
|
||||
Open project under IDE/Renesas/e2studio/RZN2L/wolfBoot with e2Studio, and build the project.
|
||||
|
||||
#### 5-1) Create `dummy_loader` application
|
||||
+ Click File->New->`RZ/N C/C++ FSP Project`.
|
||||
+ Select `RSK+RZN2L (xSPI0 x1 boot mode)` from Drop-down list.
|
||||
+ Check `Executable`.
|
||||
+ Select `No RTOS` from RTOS selection. Click Next.
|
||||
+ Check `Bare Metal Minimal`. Click Finish.
|
||||
+ Open Smart Configurator by clicking configuration.xml in the project
|
||||
+ Go to `BSP` tab and increase LDR_SIZE_NML under `RSK+RZN2L(xSIP0x1 boot mode)` on Properties page, e.g. 0x00010000
|
||||
+ Go to `BSP` tab and increase SVC Stack Size under `RZN2L stack size` on Properties page, e.g. 0x2000
|
||||
+ Go to `BSP` tab and increase Heap Size under `RZN2L` on Properties page, e.g. 0x10000
|
||||
+ Go to `Stacks` tab and add RSIP driver from `New Stack` -> `Security`
|
||||
+ Select `RSIP driver` on Threads pain and open its `property` page
|
||||
+ Disable algorithms except the following algorithms:\
|
||||
R_RSIP_KeyImportWithUFPK -> RSA-2048 PUblic Key (New format)\
|
||||
R_RSIP_RSA*Encrypt/Verify -> RSA-2048 (for new-format wrapped key)\
|
||||
R_RSIP_RSA*Decrypt/Sign -> RSA-2048 (for new-format wrapped key)
|
||||
|
||||
This helps to reduce a loader footprint.
|
||||
|
||||
+ Save `dummy_loader` FSP configuration
|
||||
+ Copy <u>configuration.xml</u> and pincfg under `dummy_loader` to `wolfBoot`
|
||||
+ Open Smart Configurator by clicking copied configuration.xml
|
||||
+ Click `Generate Project Content` on Smart Configurator
|
||||
+ Righ click on the project and Open property of the project
|
||||
+ Go to Cross ARM Linker
|
||||
+ Change Script files(-T) from `fsp_xspi0_boot.ld` to `fsp_xspi0_boot_loader.ld`
|
||||
+ Add/Modify FSP generated code :
|
||||
+ fsp/src/bsp/cmsis/Device/RENESAS/Source/startup.c
|
||||
|
||||
ORIGINAL
|
||||
```
|
||||
BSP_TARGET_ARM BSP_ATTRIBUTE_STACKLESS void __Vectors (void)
|
||||
{
|
||||
__asm volatile (
|
||||
" ldr pc,=Reset_Handler \n"
|
||||
```
|
||||
==>
|
||||
|
||||
MODIFIED
|
||||
```
|
||||
BSP_TARGET_ARM BSP_ATTRIBUTE_STACKLESS void __Vectors (void)
|
||||
{
|
||||
/* This software loops are only needed when debugging. */
|
||||
__asm volatile (
|
||||
" mov r0, #0 \n"
|
||||
" movw r1, #0xf07f \n"
|
||||
" movt r1, #0x2fa \n"
|
||||
"software_loop: \n"
|
||||
" adds r0, #1 \n"
|
||||
" cmp r0, r1 \n"
|
||||
" bne software_loop \n"
|
||||
::: "memory");
|
||||
__asm volatile (
|
||||
#if 0
|
||||
" ldr pc,=Reset_Handler \n"
|
||||
#else
|
||||
" ldr pc,=system_init \n"
|
||||
#endif
|
||||
```
|
||||
|
||||
ORIGINAL
|
||||
```
|
||||
BSP_TARGET_ARM void mpu_cache_init (void)
|
||||
{
|
||||
...
|
||||
#if BSP_CFG_C_RUNTIME_INIT && !defined(EXTERNAL_LOADER)
|
||||
|
||||
/* Copy the loader data from external Flash to internal RAM. */
|
||||
bsp_loader_data_init();
|
||||
|
||||
/* Clear loader bss section in internal RAM. */
|
||||
bsp_loader_bss_init();
|
||||
#endif
|
||||
...
|
||||
#if !(BSP_CFG_RAM_EXECUTION)
|
||||
|
||||
/* Copy the application program from external Flash to internal RAM. */
|
||||
bsp_copy_to_ram();
|
||||
|
||||
/* Clear bss section in internal RAM. */
|
||||
bsp_application_bss_init();
|
||||
#endif
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
==>
|
||||
|
||||
MODIFIED
|
||||
```
|
||||
BSP_TARGET_ARM void mpu_cache_init (void)
|
||||
{
|
||||
...
|
||||
if BSP_CFG_C_RUNTIME_INIT && !defined(EXTERNAL_LOADER)
|
||||
|
||||
/* Copy the loader data from external Flash to internal RAM. */
|
||||
bsp_loader_data_init();
|
||||
|
||||
/* Clear loader bss section in internal RAM. */
|
||||
bsp_loader_bss_init();
|
||||
#endif
|
||||
...
|
||||
#if !(BSP_CFG_RAM_EXECUTION)
|
||||
|
||||
/* Copy the application program from external Flash to internal RAM. */
|
||||
/* bsp_copy_to_ram(); */
|
||||
|
||||
/* Clear bss section in internal RAM. */
|
||||
bsp_application_bss_init();
|
||||
#endif
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
+ Build `wolfBoot` project
|
||||
|
||||
### 6) Compile the sample application
|
||||
|
||||
Open project under IDE/Renesas/e2studio/RZN2L/app_RZ with e2Studio, and build the project.
|
||||
|
||||
#### 6-1). Create `dummy_application`
|
||||
+ Click File->New->`RZ/N C/C++ FSP Project`.
|
||||
+ Select `RSK+RZN2L (xSPI0 x1 boot mode)` from Drop-down list.
|
||||
+ Check `Executable`.
|
||||
+ Select `No RTOS` from RTOS selection. Click Next.
|
||||
+ Check `Bare Metal Minimal`. Click Finish.
|
||||
+ Open Smart Configurator by clicking configuration.xml in the project
|
||||
+ Open Interrupts tab
|
||||
+ Select `INTCPU0` interrupts from `New User Event` -> `ICU`
|
||||
+ Enter `intcpu0_handler` as interruption name
|
||||
|
||||
+ Save `dummy_application` FSP configuration
|
||||
+ Copy <u>configuration.xml</u> and pincfg under `dummy_application` to `app_RZ`
|
||||
+ Open Smart Configurator by clicking copied configuration.xml
|
||||
+ Click `Generate Project Content` on Smart Configurator
|
||||
+ Right click on the project and Open property of the project
|
||||
+ Go to Cross ARM Linker
|
||||
+ Change Script files(-T) from `fsp_xspi0_boot.ld` to `fsp_xspi0_boot_app.ld`
|
||||
+ Add/Modify FSP generated code :
|
||||
+ fsp/src/bsp/cmsis/Device/RENESAS/Source/startup.c
|
||||
|
||||
ORIGINAL
|
||||
```
|
||||
BSP_TARGET_ARM BSP_ATTRIBUTE_STACKLESS void __Vectors (void)
|
||||
{
|
||||
__asm volatile (
|
||||
```
|
||||
|
||||
==>
|
||||
|
||||
MODIFIED
|
||||
```
|
||||
BSP_TARGET_ARM BSP_ATTRIBUTE_STACKLESS void __Vectors (void)
|
||||
{
|
||||
__asm volatile (
|
||||
#if 0
|
||||
" ldr pc,=Reset_Handler \n"
|
||||
#else
|
||||
" ldr pc,=local_system_init \n"
|
||||
#endif
|
||||
```
|
||||
|
||||
|
||||
ORIGINAL
|
||||
```
|
||||
BSP_TARGET_ARM void mpu_cache_init (void)
|
||||
{
|
||||
...
|
||||
#if BSP_CFG_C_RUNTIME_INIT
|
||||
|
||||
/* Copy the loader data from external Flash to internal RAM. */
|
||||
bsp_loader_data_init();
|
||||
...
|
||||
#if !(BSP_CFG_RAM_EXECUTION)
|
||||
|
||||
/* Copy the application program from external Flash to internal RAM. */
|
||||
bsp_copy_to_ram();
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
==>
|
||||
|
||||
MODIFIED
|
||||
```
|
||||
BSP_TARGET_ARM void mpu_cache_init (void)
|
||||
{
|
||||
...
|
||||
if BSP_CFG_C_RUNTIME_INIT && !defined(EXTERNAL_LOADER_APP)
|
||||
|
||||
/* Copy the loader data from external Flash to internal RAM. */
|
||||
bsp_loader_data_init();
|
||||
....
|
||||
|
||||
#if !(BSP_CFG_RAM_EXECUTION) && !defined(EXTERNAL_LOADER_APP)
|
||||
|
||||
/* Copy the application program from external Flash to internal RAM. */
|
||||
bsp_copy_to_ram();
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
+ Build `app_RZ` project
|
||||
|
||||
Code Origin and entry point is "0x10010000". app_RZ.bin is generated under Debug.
|
||||
|
||||
### 7) Generate a encryped Key for RSIP
|
||||
RSIP needs to have a encrypted key for sign verification installed in advance. This section describes how to use wolfBoot with RSIP encrypted key. Current version supports RSA2048. RSIP RSA Signature supports #PKCS 1, v1.5. You can generate a RSA key pair by wolfBoot "keygen" command along with Renesas Security Key Management Tool, a.ka. `skmt`. The `skmt` tool's CUI interface generates a encrypted key from a RAW key and generates C language initial data and a header file for an application program with RSIP.
|
||||
|
||||
|
||||
The example project assumes `rsa_pub`.h. Please specify `rsa_pub`.c for `/output` option. Similar to that, please specify `rsa_public` for `/keyname` option so that it can macth the example program expectation. After `rsa_pub`.h generated, you can copy the generated C header file to IDE/Renesas/e2studio/RZN2L/wolfboot/src.
|
||||
|
||||
```
|
||||
$ export PATH:$PATH:<wolfBoot>/tools/keytools
|
||||
$ export PATH:$PATH:<skmt>
|
||||
$ cd <wolfBoot>
|
||||
$ keygen --rsa2048 -g ./pri-rsa2048.der
|
||||
$ openssl rsa -in pri-rsa2048.der -pubout -out pub-rsa2048.pem
|
||||
$ skmt.exe /genkey /ufpk file=./ufpk_rzn2l.key /wufpk file=./ufpk_rzn2l.key_enc.key -key file=./pub-rsa2048.pem -mcu RZ-TSIP -keytype RSA-2048-public /output rsa_pub.c /filetype "csource" /keyname rsa_public
|
||||
Output File: C:\workspace\wolfBoot_work\rsa_pub.h
|
||||
Output File: C:\workspace\wolfBoot_work\rsa_pub.c
|
||||
UFPK: F907AF3E87A8D9FED6FFCD246590EB5DCC9CA9AB1BF9160A8AA8CA4A4AEF2C19
|
||||
W-UFPK: 00000000C0E4C5236974289C93F748C5C2C5310BDF1BE4753F4D8350D584F0674293F8F3
|
||||
IV: 7AB13913EC6390A1AC1EB80FF0286CB6
|
||||
Encrypted key: 9B27D2C45918828F224458CD38E8453D225B463906CE0C80FD330698B8E605389DE7D05620379D4BC33764779175D3CFCE22AB16E4E2EF271B7D9AA4CFB9F6514A93A93B9178CEB4FB5E9153078007B0D414087A7A42692D0DD3DD5E7A7E01FD8B4F69B7EBBAE4CCB7B3E8E3DE406EB9C8A5FBAFD33200FD1BDB5E83C3F4E5059C4CB8B39D5C7EB95AD26E6AE45664BE0C62A1217248EFAF031E6F2C0A7A9EDC3DB0DF2588EC600D21AC7EC7E69B5B58B9A92643400C42D110076670D7FD41B2B6A92C3765F1F273094FC0368CCE3C0AE856982C73C673A445F86C9E59EECA77B0B883B70562E62E453C65FB6690B354CB972D6B32B8C339B667C2F0BE85E04E8E409662B5B95CCFDAA47A12E137BC105A2ADFA1732018A66AD737FE078697DB
|
||||
$ cp rsa_pub.h IDE/Renesas/e2studio/RZN2L/wolfboot/src/rsa_pub.h
|
||||
```
|
||||
|
||||
To write a encrypted key to flash, it generates a binary key by skmt.
|
||||
|
||||
```
|
||||
$ skmt.exe /genkey /ufpk file=./ufpk_rzn2l.key /wufpk file=./ufpk_rzn2l.key_enc.key -key file=./pub-rsa2048.pem -mcu RZ-TSIP -keytype RSA-2048-public /output rsa_pub2048.bin /filetype "bin"
|
||||
$ cp rsa_pub2048.bin IDE/Renesas/e2studio/RZN2L/flash_app
|
||||
```
|
||||
|
||||
### 7) Generate Signature for app V1
|
||||
|
||||
The sign tool (`tools/keytools/sign`) generates a signature for the binary with a specified version.
|
||||
It generates a file contain a partition header and application image.
|
||||
The partition header contains the generated signature and other control fields.
|
||||
Output file name is made up from the input file name and version like app_RenesasRx01_v1.0_signed.bin.
|
||||
|
||||
```
|
||||
# export PATH=$PATH:/path/to/wolfBoot-root/tools/keytools
|
||||
$ cd IDE/Renesas/e2studio/RZN2L/app_RZ/Debug/
|
||||
$ sign --rsa2048enc app_RZ.bin ../../../../../../pri-rsa2048.der 1.0
|
||||
wolfBoot KeyTools (Compiled C version)
|
||||
wolfBoot version 2000000
|
||||
Update type: Firmware
|
||||
Input image: app_RZ.bin
|
||||
Selected cipher: RSA2048
|
||||
Selected hash : SHA256
|
||||
Public key: ../../../../../../pri-rsa2048.der
|
||||
Output image: app_RZ_v1.0_signed.bin
|
||||
Target partition id : 1
|
||||
image header size calculated at runtime (512 bytes)
|
||||
Calculating SHA256 digest...
|
||||
Signing the digest...
|
||||
Output image(s) successfully created.
|
||||
```
|
||||
Note2:\
|
||||
Please specify `--rsa2048enc` for `sign` tool option. Verify API of RSIP drive assumes to have `DigestInfo` for padding.
|
||||
|
||||
### 8) Download the app V1
|
||||
|
||||
To download the app V1 to external flash, you can use `flash_simple_loader` application which is located in /IDE/Renesas/e2studio/RZN2L/flash_app
|
||||
|
||||
Open project under IDE/Renesas/e2studio/RZN2L/flash_app with e2Studio, and build the project.
|
||||
|
||||
+ Copy <u>configuration.xml</u> and pincfg under `dummy_application` to `flash_simple_loader`
|
||||
+ Open Smart Configurator by clicking configuration.xml in the project
|
||||
+ Open Interrupts tab
|
||||
+ Select `INTCPU0` interrupts and remove it
|
||||
+ Click `Generate Project Content` on Smart Configurator
|
||||
+ Go to `BSP` tab and disable C Runtime Initialization under `RZN2L` on Properties page
|
||||
+ Right click on the project and Open property of the project
|
||||
+ Go to Cross ARM Linker
|
||||
+ Change Script files(-T) from `fsp_xspi0_boot.ld` to `fsp_xspi0_boot_loader.ld`
|
||||
+ Build `flash_simple_loader` project
|
||||
|
||||
To run the application,
|
||||
|
||||
+ Right-Click the Project name.
|
||||
+ Select `Debug As` -> `Renesas GDB Hardware Debugging`
|
||||
+ Select `J-Link ARM`. Click OK.
|
||||
+ Select `R9A07G084M04`. Click OK.
|
||||
|
||||
This simple application just downloads binary files defined in `Flash_section.s`, `Flash_update.s` and `Flash_wrappedkey_public.s` through J-Link Flash Downloader. `Flash_update.s` doesn't include `the app v2` initially and `Flash_wrappedkey_public.s` doesn't include key binary data. Please remove comment-out at `Flash_wrappedkey_public.s`, and then runs the program so that version 1 example and public key are downloaded to external flash memory.
|
||||
|
||||
Flash_wrappedkey_public.s
|
||||
|
||||
```
|
||||
/* To download the encrypted rsip key, please remove comment out. */
|
||||
/* .incbin "../rsa_pub2048.bin" */
|
||||
```
|
||||
|
||||
Flash_update.s
|
||||
|
||||
```
|
||||
/* To download the app v2, please remove comment out. */
|
||||
/* .incbin "../../app_RZ/Debug/app_RZ_v2.0_signed.bin" */
|
||||
```
|
||||
|
||||
### 9) Execute initial boot
|
||||
|
||||
Now, you can download and start wolfBoot program by e2Studio debugger.
|
||||
After starting the program, you can see the partition information as follows.
|
||||
If the boot program succeeds successfully and authenticity check then start application V1. To initially run `wolfBoot` project,
|
||||
1.) Right-Click the Project name.
|
||||
2.) Select `Debug As` -> `Renesas GDB Hardware Debugging`
|
||||
3.) Select `J-Link ARM`. Click OK.
|
||||
4.) Select `R9A07G084M04`. Click OK.
|
||||
|
||||
You can see RED LED blinking on the board.
|
||||
|
||||
### 10) Generate Signed app V2 and download it
|
||||
|
||||
Similar to V1, you can sign and generate a binary of V2. The update partition starts at "0x60180000".
|
||||
|
||||
```
|
||||
$ sign --rsa2048enc app_RA.bin ../../../../../pri-rsa2048.der 2.0
|
||||
```
|
||||
|
||||
To download the app V2, please remove comment out line in `Flash_update.s` of `flash_simple_loader`
|
||||
Flash_update.s
|
||||
|
||||
```
|
||||
/* To download the app v2, please remove comment out. */
|
||||
.incbin "../../app_RZ/Debug/app_RZ_v2.0_signed.bin"
|
||||
```
|
||||
|
||||
And then clean and build `flash_simple_loader`, run it
|
||||
|
||||
|
||||
### 11) Re-boot and execute the app V2
|
||||
|
||||
The boot program compares version number of download images in external flash memory. It simply chooses hight version number from two images to run.
|
||||
The boot program downloads the selected image from flash to System Ram.
|
||||
|
||||
You can see now YELLOW LED blinking.
|
||||
|
||||
|
||||
### 12) Erase flash memory
|
||||
If you want to erase flash memory for initialization, you can use J-Link Commander tool.
|
||||
|
||||
Launch J-Link Commander tool.
|
||||
|
||||
```
|
||||
SEGGER J-Link Commander V7.94j (Compiled Feb 14 2024 15:37:25)
|
||||
DLL version V7.94j, compiled Feb 14 2024 15:36:06
|
||||
|
||||
Connecting to J-Link via USB...O.K.
|
||||
Firmware: J-Link OB-S124 compiled Dec 13 2023 14:39:54
|
||||
Hardware version: V1.00
|
||||
J-Link uptime (since boot): 0d 01h 14m 48s
|
||||
S/N: 831910878
|
||||
USB speed mode: Full speed (12 MBit/s)
|
||||
VTref=3.300V
|
||||
|
||||
|
||||
Type "connect" to establish a target connection, '?' for help
|
||||
J-Link>connect
|
||||
Please specify device / core. <Default>: R9A07G084M04
|
||||
Type '?' for selection dialog
|
||||
Device>R9A07G084M08GBG
|
||||
Please specify target interface:
|
||||
J) JTAG (Default)
|
||||
S) SWD
|
||||
T) cJTAG
|
||||
TIF>S
|
||||
Specify target interface speed [kHz]. <Default>: 4000 kHz
|
||||
Speed>
|
||||
Device "R9A07G084M08" selected.
|
||||
...
|
||||
J-Link>exec EnableEraseAllFlashBanks
|
||||
```
|
||||
e.g. erase all flash
|
||||
```
|
||||
erase 0x60100000,0x603FFFFF
|
||||
```
|
||||
|
||||
e.g. erase BOOT PARTITION
|
||||
|
||||
```
|
||||
erase 0x60100000,0x60180000
|
||||
```
|
||||
|
||||
e.g. erase UPDATE PARTITION
|
||||
|
||||
```
|
||||
erase 0x601800000,0x601E0000
|
||||
```
|
||||
|
||||
### 13. References
|
||||
|
||||
For board settings:
|
||||
|
||||
[RZN2L FSP Getting Started](https://www.renesas.com/us/en/document/qsg/rzt2rzn2-getting-started-flexible-software-package)
|
||||
|
||||
Example Programs:
|
||||
|
||||
[RZ/T2, RZ/N2 Group Device Setup Guide for Flash boot Sample program](https://www.renesas.com/jp/ja/document/scd/rzt2-and-rzn2-group-device-setup-guide-flash-boot-sample-program?language=ja&r=1622651)
|
||||
|
||||
[RZ/N2L Group Example of separating loader program and application program projects](https://www.renesas.com/us/en/document/scd/rzn2l-group-example-separating-loader-program-and-application-program-projects?r=1622651)
|
|
@ -85,12 +85,14 @@
|
|||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.540261452" name="Language standard" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.c99" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1005365150" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_RENESAS_RZN_"/>
|
||||
<listOptionValue builtIn="false" value="WOLFBOOT_RENESAS_APP"/>
|
||||
<listOptionValue builtIn="false" value="EXTERNAL_LOADER_APP"/>
|
||||
<listOptionValue builtIn="false" value="_RZN_CORE=CR52_0"/>
|
||||
<listOptionValue builtIn="false" value="_RZN_ORDINAL=1"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.gcc.rz.option.compiler.include.117586756" name="Include paths (-I)" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.compiler.include" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""../../../RZN2L/""/>
|
||||
<listOptionValue builtIn="false" value="../../../../../../lib/wolfssl"/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/generate""/>
|
||||
<listOptionValue builtIn="false" value="".""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/src""/>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 93 KiB |
|
@ -28,6 +28,11 @@ MEMORY
|
|||
|
||||
SECTIONS
|
||||
{
|
||||
.PUBKEY_RAM 0x10000100 : AT(0x10000100)
|
||||
{
|
||||
PUBKEY_RAM_start = .;
|
||||
KEEP(*(PUBKEY_RAM))
|
||||
}
|
||||
.IMAGE_APP_RAM 0x10010000 : AT (0x10010000)
|
||||
{
|
||||
IMAGE_APP_RAM_start = .;
|
||||
|
@ -45,6 +50,12 @@ SECTIONS
|
|||
KEEP(./src/Flash_update.o(.IMAGE_APP_FLASH_update))
|
||||
IMAGE_APP_FLASH_update_end = .;
|
||||
}
|
||||
.WRAPPED_KEY_FLASH_PUB 0x60200000 : AT (0x60200000)
|
||||
{
|
||||
WRAPPED_KEY_FLASH_PUB_start = .;
|
||||
KEEP(./src/Flash_wrappedkey_public.o(.WRAPPED_KEY_FLASH_PUB))
|
||||
WRAPPED_KEY_FLASH_PUB_end = .;
|
||||
}
|
||||
.loader_param 0x60000000 : AT (0x60000000)
|
||||
{
|
||||
KEEP(*(.loader_param))
|
||||
|
|
|
@ -26,5 +26,5 @@
|
|||
the loader project. */
|
||||
|
||||
.section .IMAGE_APP_FLASH_update, "ax", %progbits
|
||||
/* To download the app v2, please remove comment out. */
|
||||
/* To download the app v2, please enable the line below. */
|
||||
/* .incbin "../../app_RZ/Debug/app_RZ_v2.0_signed.bin" */
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
/* Flash_wrappedkey_public.s
|
||||
*
|
||||
* Copyright (C) 2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfBoot.
|
||||
*
|
||||
* wolfBoot is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfBoot is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
/* This file is used to include the application update image into
|
||||
the loader project. */
|
||||
|
||||
.section .WRAPPED_KEY_FLASH_PUB, "ax", %progbits
|
||||
/* To download the encrypted rsip key, please enable the line below. */
|
||||
/* .incbin "../rsa_pub2048.bin" */
|
|
@ -0,0 +1,50 @@
|
|||
#!/bin/bash
|
||||
|
||||
#
|
||||
# convert elf to hex file
|
||||
# This simple shell script assumes to be run on WSL or equivarant environment.
|
||||
# This script is an example. You can update the script based on your environment.
|
||||
#
|
||||
# usage
|
||||
# rsip_key_gen.sh <SKMT PATH> ufpk w-ufpk
|
||||
#
|
||||
|
||||
if [ $# -ne 4 ];then
|
||||
echo "Usage: $0 <SKMT PATH> <ufpk> <w-ufpk> <public-key pem>";
|
||||
exit 1
|
||||
fi
|
||||
|
||||
WOLFBOOT_ADDRESS=0x00102000
|
||||
APP_RAM_ADDR=0x10010000
|
||||
FLASH_VER1_ADDR=0x60100000
|
||||
FLASH_VER2_ADDR=0x60180000
|
||||
RSA_SIGN="--rsa2048"
|
||||
|
||||
SKMT_PATH=$1
|
||||
UFPK_F=$2
|
||||
WUFPK_F=$3
|
||||
PUB_KEY=$4
|
||||
CURRENT=$(cd $(dirname $0);pwd)
|
||||
|
||||
PATH=$PATH:${SKMT_PATH}
|
||||
|
||||
echo "wolfBoot starts address in RAM : " $WOLFBOOT_ADDRESS
|
||||
echo "app starts RAM address : " $APP_RAM_ADDR
|
||||
echo "Version 2 app flash address : " $FLASH_VER1_ADDR
|
||||
echo "Version 1 app flash address : " $FLASH_VER1_ADDR
|
||||
echo "Version 2 app flash address : " $FLASH_VER1_ADDR
|
||||
|
||||
echo
|
||||
echo Generate RSA Public encrypted key : csource
|
||||
|
||||
pushd ../../../../
|
||||
|
||||
skmt.exe /genkey /ufpk file=${UFPK_F} /wufpk file=${WUFPK_F} -key file=${PUB_KEY} -mcu RZ-TSIP -keytype RSA-2048-public /output rsa_pub.c /filetype "csource" /keyname rsa_public
|
||||
|
||||
cp rsa_pub.h ${CURRENT}/wolfboot/src
|
||||
|
||||
skmt.exe /genkey /genkey /ufpk file=${UFPK_F} /wufpk file=${WUFPK_F} -key file=${PUB_KEY} -mcu RZ-TSIP -keytype RSA-2048-public /output rsa_pub2048.bin /filetype "bin"
|
||||
|
||||
cp rsa_pub2048.bin ${CURRENT}/flash_app/
|
||||
|
||||
popd
|
|
@ -0,0 +1,54 @@
|
|||
#!/bin/bash
|
||||
|
||||
#
|
||||
# convert elf to hex file
|
||||
# This simple shell script assumes to be run on WSL or equivarant environment.
|
||||
# This script is an example. You can update the script based on your environment.
|
||||
#
|
||||
# usage
|
||||
# sign.sh <RSIP:0,1> WOLFBOOT-FOLDER
|
||||
#
|
||||
|
||||
|
||||
if [ $# -ne 2 ];then
|
||||
echo "Usage: $0 <0 or 1 for RSIP use> WOLFBOOT-FOLDER";
|
||||
exit 1
|
||||
fi
|
||||
|
||||
WOLFBOOT_ADDRESS=0x00102000
|
||||
APP_RAM_ADDR=0x10010000
|
||||
FLASH_VER1_ADDR=0x60100000
|
||||
FLASH_VER2_ADDR=0x60180000
|
||||
RSA_SIGN="--rsa2048"
|
||||
|
||||
RSIPUSE=$1
|
||||
WOLFBOOT_DIR=$2
|
||||
CURRENT=$(cd $(dirname $0);pwd)
|
||||
APP_RZ=${CURRENT}/app_RZ
|
||||
|
||||
PATH=$PATH:${WOLFBOOT_DIR}/tools/keytools
|
||||
|
||||
if [ $RSIPUSE -eq 1 ]; then
|
||||
RSA_SIGN="--rsa2048enc"
|
||||
fi
|
||||
|
||||
echo "wolfBoot starts address in RAM : " $WOLFBOOT_ADDRESS
|
||||
echo "app starts RAM address : " $APP_RAM_ADDR
|
||||
echo "Version 1 app flash address : " $FLASH_VER1_ADDR
|
||||
echo "Version 2 app flash address : " $FLASH_VER2_ADDR
|
||||
echo "Signature method : " $RSA_SIGN
|
||||
|
||||
echo
|
||||
echo sign app_RZ.bin
|
||||
|
||||
pushd ${APP_RZ}/Debug
|
||||
|
||||
echo
|
||||
echo sign app_RA.bin for version 1
|
||||
sign ${RSA_SIGN} app_RZ.bin ../../../../../../pri-rsa2048.der 1.0
|
||||
|
||||
echo
|
||||
echo sign app_RA.bin for version 2
|
||||
sign ${RSA_SIGN} app_RZ.bin ../../../../../../pri-rsa2048.der 2.0
|
||||
|
||||
popd
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
#define WOLFBOOT_PARTITION_BOOT_ADDRESS WOLFBOOT_FLASH_ADDR
|
||||
#define WOLFBOOT_PARTITION_UPDATE_ADDRESS (WOLFBOOT_FLASH_ADDR + 0x80000)
|
||||
#define WOLFBOOT_PARTITION_SWAP_ADDRESS WOLFBOOT_FLASH_ADDR + 0xf0000
|
||||
#define WOLFBOOT_PARTITION_SWAP_ADDRESS (WOLFBOOT_FLASH_ADDR + 0xf0000)
|
||||
|
||||
#define WOLFBOOT_LOAD_ADDRESS 0x10010000
|
||||
|
||||
|
|
|
@ -31,19 +31,42 @@
|
|||
#define NO_XIP
|
||||
#define WOLFBOOT_DUALBOOT
|
||||
|
||||
/* For RSIP use, please enable the following line. */
|
||||
/* #define WOLFBOOT_RENESAS_RSIP */
|
||||
|
||||
#define WOLFBOOT_SIGN_RSA2048
|
||||
/* #defube WOLFBOOT_SIGN_RSA3072 */
|
||||
/* #defube WOLFBOOT_SIGN_RSA4096 */
|
||||
/* #define WOLFBOOT_SIGN_RSA3072 */
|
||||
/* #define WOLFBOOT_SIGN_RSA4096 */
|
||||
/* #define WOLFBOOT_SIGN_ED25519 */
|
||||
/* #define WOLFBOOT_SIGN_ED488 */
|
||||
/* #define WOLFBOOT_SIGN_ECC256 */
|
||||
/* #define WOLFBOOT_SIGN_ECC384 */
|
||||
/* #define WOLFBOOT_SIGN_ECC521 */
|
||||
|
||||
/*#ifdef WOLFBOOT_DUALBOOT
|
||||
#define FLASH_IN_DUAL_BANK_MODE (1)
|
||||
#define DUALBANK_SWAP
|
||||
#endif*/
|
||||
|
||||
#ifdef WOLFBOOT_RENESAS_RSIP
|
||||
#define WOLFSSL_RENESAS_RSIP
|
||||
#define WOLFSSL_RENESAS_FSPSM
|
||||
#define WOLFSSL_RENESAS_RSIP_CRYPTONLY
|
||||
#undef WOLFSSL_RENESAS_FSPSM_TLS
|
||||
#define WOLFSSL_RENESAS_FSPSM_CRYPTONLY
|
||||
|
||||
#define WOLFBOOT_SMALL_STACK
|
||||
#define WOLF_CRYPTO_CB
|
||||
#define RENESAS_RSIP_INSTALLEDKEY_FLASH_ADDR 0x60200000
|
||||
#define RENESAS_RSIP_INSTALLEDKEY_RAM_ADDR 0x10000100
|
||||
#define RENESAS_DEVID 7890
|
||||
|
||||
#if defined(WOLFBOOT_SIGN_RSA3072) ||\
|
||||
defined(WOLFBOOT_SIGN_RSA4096) ||\
|
||||
defined(WOLFBOOT_SIGN_ED25519) ||\
|
||||
defined(WOLFBOOT_SIGN_ED488) ||\
|
||||
defined(WOLFBOOT_SIGN_ECC256) ||\
|
||||
defined(WOLFBOOT_SIGN_ECC384) ||\
|
||||
defined(WOLFBOOT_SIGN_ECC521)
|
||||
#error "wolfBoot with RSIP supports RSA 2048 only."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define WOLFBOOT_HASH_SHA256
|
||||
|
||||
|
@ -156,7 +179,7 @@
|
|||
#ifdef WOLFBOOT_SIGN_RSA2048
|
||||
# define RSA_LOW_MEM
|
||||
# define WOLFSSL_RSA_VERIFY_INLINE
|
||||
# ifndef WOLFBOOT_RENESAS_SCEPROTECT
|
||||
# ifndef WOLFBOOT_RENESAS_RSIP
|
||||
# define WOLFSSL_RSA_VERIFY_ONLY
|
||||
# endif
|
||||
# define WC_NO_RSA_OAEP
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.995617288" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.1016449442" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.showCommand.281623932" name="Echo tool command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.showCommand"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.optimizationLevel.1456570845" name="Optimization Level" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.optimizationLevel" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.optimizationLevel.1456570845" name="Optimization Level" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.optimizationLevel" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.more" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.messagelenght.1382064896" name="Message length (-fmessage-length=0)" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.messagelenght" value="true" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.signedchar.713486244" name="'char' is signed (-fsigned-char)" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.signedchar" value="true" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.functionsection.1610806771" name="Function sections (-ffunction-sections)" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.functionsection" value="true" valueType="boolean"/>
|
||||
|
@ -78,6 +78,14 @@
|
|||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn_gen}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn_cfg/fsp_cfg/bsp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn_cfg/fsp_cfg}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rsip_common/private}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/common/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/sb_lib/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/otp/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/rsip/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/primitive}""/>
|
||||
</option>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.863054847" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
|
||||
</tool>
|
||||
|
@ -108,6 +116,14 @@
|
|||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn_gen}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn_cfg/fsp_cfg/bsp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn_cfg/fsp_cfg}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rsip_common/private}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/common/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/sb_lib/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/otp/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/rsip/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/primitive}""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.files.171365238" name="Include files (-include)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.files" useByScannerDiscovery="true" valueType="includeFiles">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/target.h}""/>
|
||||
|
@ -189,6 +205,70 @@
|
|||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<folderInfo id="com.renesas.cdt.managedbuild.gcc.rz.configuration.debug.update.932200727./rzn/fsp/src/r_rsip" name="r_rsip" resourcePath="rzn/fsp/src/r_rsip">
|
||||
<toolChain id="com.renesas.cdt.managedbuild.gcc.rz.toolchain.debug.update.1502203345" name="GCC for Renesas RZ" superClass="com.renesas.cdt.managedbuild.gcc.rz.toolchain.debug.update" unusedChildren="">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.2052307467.1274896665" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.2052307467"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.995617288.388598813" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.995617288"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.1016449442.1474224064" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.1016449442"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.showCommand.281623932.788673508" name="Echo tool command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.showCommand.281623932"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.optimizationLevel.1456570845.1146078082" name="Optimization Level" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.optimizationLevel.1456570845"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.messagelenght.1382064896.961177739" name="Message length (-fmessage-length=0)" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.messagelenght.1382064896"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.signedchar.713486244.1553698260" name="'char' is signed (-fsigned-char)" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.signedchar.713486244"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.functionsection.1610806771.1892480630" name="Function sections (-ffunction-sections)" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.functionsection.1610806771"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.datasections.1855573803.2139742090" name="Data sections (-fdata-sections)" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.datasections.1855573803"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.1782421493.337734415" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.1782421493"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.2067367476.1649511743" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.2067367476"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unused.1259918952.194366548" name="Warn on various unused elements (-Wunused)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unused.1259918952"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.uninitialized.897941722.436452062" name="Warn on uninitialized variables (-Wuninitialised)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.uninitialized.897941722"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn.892504953.1468808842" name="Enable all common warnings (-Wall)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn.892504953"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn.2101427717.1791206320" name="Enable extra warnings (-Wextra)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn.2101427717"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration.95583028.1601297453" name="Warn on undeclared global function (-Wmissing-declaration)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration.95583028"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion.676034855.1249731288" name="Warn on implicit conversions (-Wconversion)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion.676034855"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith.206051802.1964179621" name="Warn if pointer arithmetic (-Wpointer-arith)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith.206051802"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow.292738106.1059461916" name="Warn if shadowed variable (-Wshadow)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow.292738106"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop.430865431.999331551" name="Warn if suspicious logical ops (-Wlogical-op)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop.430865431"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn.1066443176.701570590" name="Warn if struct is returned (-Wagreggate-return)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn.1066443176"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal.1841918022.1654920501" name="Warn if floats are compared as equal (-Wfloat-equal)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal.1841918022"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.family.1197695446.1511520995" name="Arm family (-mcpu)" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.family.1197695446"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.floatunit.824196843.1523756796" name="FPU Type" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.floatunit.824196843"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.floatabi.277797748.497521864" name="Float ABI" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.floatabi.277797748"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.deviceName.165399804.1776252642" name="Device name" superClass="com.renesas.cdt.managedbuild.gcc.rz.deviceName.165399804"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.583176924.974125966" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.583176924"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.571466460.1933785296" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.571466460"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.instructionset.1607665079.75756703" name="Instruction set" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.instructionset.1607665079"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.56812190.456279899" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.56812190"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.1340661511.227163216" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.1340661511"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.1219374547.1030933253" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.1219374547"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.563609712.2131951418" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.563609712"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.715718418.1796988159" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.715718418"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.517146012.323179795" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.517146012"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.2116110882.1653444553" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.2116110882"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.1151164957.369435185" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.1151164957"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.1560835889.613160700" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.1560835889"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.assembler.646652107" name="Cross ARM GNU Assembler" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.assembler.2028425354">
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.902283512" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.compilerC.1153626070" name="Cross ARM C Compiler" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.compilerC.153554225">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.gcc.rz.option.compiler.userDefined.48163052" name="Other compiler flags" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.compiler.userDefined" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="-w"/>
|
||||
</option>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.602340420" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.compilerCPP.827625648" name="Cross ARM C++ Compiler" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.compilerCPP.823633299">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.gcc.rz.option.compiler.cpp.userDefined.286533291" name="Other compiler flags" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.compiler.cpp.userDefined" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="-w"/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.linker.c.49925892" name="Cross ARM C Linker" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.linker.c.1625414931"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.linker.cpp.1146085572" name="Cross ARM C++ Linker" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.linker.cpp.1656123744"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.archiver.56033559" name="Cross ARM GNU Archiver" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.archiver.1146591520"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.flash.1144505605" name="Cross ARM GNU Create Flash Image" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.flash.1308763203"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.listing.1509528326" name="Cross ARM GNU Create Listing" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.listing.148337051"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.size.940750042" name="Cross ARM GNU Print Size" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.size.174907462"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.libgen.1966808998" name="Library Generator" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.libgen.1331162773"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<folderInfo id="com.renesas.cdt.managedbuild.gcc.rz.configuration.debug.update.932200727./rzn/arm" name="arm" resourcePath="rzn/arm">
|
||||
<toolChain id="com.renesas.cdt.managedbuild.gcc.rz.toolchain.debug.update.903443456" name="GCC for Renesas RZ" superClass="com.renesas.cdt.managedbuild.gcc.rz.toolchain.debug.update" unusedChildren="">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.2052307467.1851839827" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.2052307467"/>
|
||||
|
@ -246,7 +326,8 @@
|
|||
<entry excluding="wolfcrypt|wolfboot|hal" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/hal"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/wolfboot"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/wolfcrypt"/>
|
||||
<entry excluding="port" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/wolfcrypt"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/wolfcrypt/port"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
@ -329,6 +410,14 @@
|
|||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn_gen}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn_cfg/fsp_cfg/bsp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn_cfg/fsp_cfg}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rsip_common/private}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/common/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/sb_lib/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/otp/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/rsip/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/primitive}""/>
|
||||
</option>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.1319480322" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
|
||||
</tool>
|
||||
|
@ -351,6 +440,14 @@
|
|||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn_gen}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn_cfg/fsp_cfg/bsp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn_cfg/fsp_cfg}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rsip_common/private}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/common/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/sb_lib/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/otp/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private/lib/rsip/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/private}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/rzn/fsp/src/r_rsip/rzt2n2/primitive}""/>
|
||||
</option>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1988230099" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
|
||||
</tool>
|
||||
|
@ -403,6 +500,70 @@
|
|||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<folderInfo id="com.renesas.cdt.managedbuild.gcc.rz.configuration.release.update.1352166227./rzn/fsp/src/r_rsip" name="r_rsip" resourcePath="rzn/fsp/src/r_rsip">
|
||||
<toolChain id="com.renesas.cdt.managedbuild.gcc.rz.toolchain.release.update.1120990530" name="GCC for Renesas RZ" superClass="com.renesas.cdt.managedbuild.gcc.rz.toolchain.release.update" unusedChildren="">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.2119877339.1502471465" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.2119877339"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.2145588168.1417268456" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.2145588168"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.1244176294.617691398" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.1244176294"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.showCommand.227125339.498362096" name="Echo tool command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.showCommand.227125339"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.optimizationLevel.426778119.2016941803" name="Optimization Level" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.optimizationLevel.426778119"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.messagelenght.151539748.1030987101" name="Message length (-fmessage-length=0)" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.messagelenght.151539748"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.signedchar.234115288.1996185094" name="'char' is signed (-fsigned-char)" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.signedchar.234115288"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.functionsection.1286017291.1459052588" name="Function sections (-ffunction-sections)" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.functionsection.1286017291"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.datasections.1002905504.1754697649" name="Data sections (-fdata-sections)" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.datasections.1002905504"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.1737309620.1323152407" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.1737309620"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.1237207993.1090915253" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.1237207993"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unused.419169226.1981834743" name="Warn on various unused elements (-Wunused)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unused.419169226"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.uninitialized.2043116261.2088680368" name="Warn on uninitialized variables (-Wuninitialised)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.uninitialized.2043116261"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn.724010099.1110692565" name="Enable all common warnings (-Wall)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn.724010099"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn.750009006.189530842" name="Enable extra warnings (-Wextra)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn.750009006"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration.2113666613.1211292039" name="Warn on undeclared global function (-Wmissing-declaration)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration.2113666613"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion.1908197559.648021076" name="Warn on implicit conversions (-Wconversion)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion.1908197559"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith.2090254709.1483762944" name="Warn if pointer arithmetic (-Wpointer-arith)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith.2090254709"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow.949172740.1695962744" name="Warn if shadowed variable (-Wshadow)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow.949172740"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop.2126486727.999096139" name="Warn if suspicious logical ops (-Wlogical-op)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop.2126486727"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn.1528485198.1953909410" name="Warn if struct is returned (-Wagreggate-return)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn.1528485198"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal.402612961.690779578" name="Warn if floats are compared as equal (-Wfloat-equal)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal.402612961"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.family.1049005922.1492365321" name="Arm family (-mcpu)" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.family.1049005922"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.floatunit.104203506.1952855032" name="FPU Type" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.floatunit.104203506"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.floatabi.801231735.1409264816" name="Float ABI" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.floatabi.801231735"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.deviceName.1450539936.108585767" name="Device name" superClass="com.renesas.cdt.managedbuild.gcc.rz.deviceName.1450539936"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.48620421.955451662" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.48620421"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.95554700.164344376" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.95554700"/>
|
||||
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.instructionset.926272596.537381328" name="Instruction set" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.instructionset.926272596"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.790837860.696757827" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.790837860"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.632238044.602841178" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.632238044"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.1231658066.850098416" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.1231658066"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.693806985.1713066414" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.693806985"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.418747455.828197949" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.418747455"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.988866939.1333958369" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.988866939"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.2142391678.1940332267" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.2142391678"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.176054863.1223635749" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.176054863"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.1473535265.2042971762" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.1473535265"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.assembler.68427702" name="Cross ARM GNU Assembler" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.assembler.676706800">
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.369373365" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.compilerC.91249074" name="Cross ARM C Compiler" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.compilerC.1391428788">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.gcc.rz.option.compiler.userDefined.68780380" name="Other compiler flags" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.compiler.userDefined" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="-w"/>
|
||||
</option>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.566548313" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.compilerCPP.2011830176" name="Cross ARM C++ Compiler" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.compilerCPP.428658025">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.gcc.rz.option.compiler.cpp.userDefined.156118752" name="Other compiler flags" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.compiler.cpp.userDefined" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="-w"/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.linker.c.418852925" name="Cross ARM C Linker" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.linker.c.1414530170"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.linker.cpp.784419110" name="Cross ARM C++ Linker" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.linker.cpp.804706146"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.archiver.968359144" name="Cross ARM GNU Archiver" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.archiver.1251823616"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.flash.1653185472" name="Cross ARM GNU Create Flash Image" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.flash.1196160786"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.listing.1297925329" name="Cross ARM GNU Create Listing" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.listing.423973108"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.size.1099305312" name="Cross ARM GNU Print Size" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.size.304215049"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.libgen.925053596" name="Library Generator" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.libgen.1615610288"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<folderInfo id="com.renesas.cdt.managedbuild.gcc.rz.configuration.release.update.1352166227./rzn/arm" name="arm" resourcePath="rzn/arm">
|
||||
<toolChain id="com.renesas.cdt.managedbuild.gcc.rz.toolchain.release.update.2107822395" name="GCC for Renesas RZ" superClass="com.renesas.cdt.managedbuild.gcc.rz.toolchain.release.update" unusedChildren="">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.2119877339.529921412" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.2119877339"/>
|
||||
|
@ -460,7 +621,8 @@
|
|||
<entry excluding="wolfcrypt|wolfboot|hal" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/hal"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/wolfboot"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/wolfcrypt"/>
|
||||
<entry excluding="port" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/wolfcrypt"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/wolfcrypt/port"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
|
|
@ -91,11 +91,6 @@
|
|||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/lib/wolfssl/wolfcrypt/src/memory.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/wolfboot/rsa.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/lib/wolfssl/wolfcrypt/src/rsa.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/wolfboot/spi_flash.c</name>
|
||||
<type>1</type>
|
||||
|
@ -166,6 +161,11 @@
|
|||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/lib/wolfssl/wolfcrypt/src/random.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/wolfcrypt/rsa.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/lib/wolfssl/wolfcrypt/src/rsa.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/wolfcrypt/sha256.c</name>
|
||||
<type>1</type>
|
||||
|
@ -196,5 +196,30 @@
|
|||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/lib/wolfssl/wolfcrypt/src/wolfmath.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/wolfcrypt/port/renesas_common.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/lib/wolfssl/wolfcrypt/src/port/Renesas/renesas_common.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/wolfcrypt/port/renesas_fspsm_aes.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/lib/wolfssl/wolfcrypt/src/port/Renesas/renesas_fspsm_aes.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/wolfcrypt/port/renesas_fspsm_rsa.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/lib/wolfssl/wolfcrypt/src/port/Renesas/renesas_fspsm_rsa.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/wolfcrypt/port/renesas_fspsm_sha.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/lib/wolfssl/wolfcrypt/src/port/Renesas/renesas_fspsm_sha.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/wolfcrypt/port/renesas_fspsm_util.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/lib/wolfssl/wolfcrypt/src/port/Renesas/renesas_fspsm_util.c</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
MEMORY
|
||||
{
|
||||
ATCM : ORIGIN = 0x00000000, LENGTH = 0x00020000
|
||||
BTCM : ORIGIN = 0x00100000, LENGTH = 0x00020000
|
||||
BTCM : ORIGIN = 0x00100000, LENGTH = 0x00060000
|
||||
SYSTEM_RAM : ORIGIN = 0x10000000, LENGTH = 0x00180000
|
||||
SYSTEM_RAM_MIRROR : ORIGIN = 0x30000000, LENGTH = 0x00180000
|
||||
xSPI0_CS0_SPACE_MIRROR : ORIGIN = 0x40000000, LENGTH = 0x04000000
|
||||
|
@ -28,6 +28,11 @@ MEMORY
|
|||
|
||||
SECTIONS
|
||||
{
|
||||
.PUBKEY_RAM 0x10000100 : AT(0x10000100)
|
||||
{
|
||||
PUBKEY_RAM_start = .;
|
||||
KEEP(*(PUBKEY_RAM))
|
||||
}
|
||||
.IMAGE_APP_RAM 0x10010000 : AT (0x10010000)
|
||||
{
|
||||
IMAGE_APP_RAM_start = .;
|
||||
|
@ -45,6 +50,12 @@ SECTIONS
|
|||
KEEP(*(IMAGE_APP_FLASH_update))
|
||||
IMAGE_APP_FLASH_update_end = .;
|
||||
}
|
||||
.WRAPPED_KEY_FLASH_PUB 0x60200000 : AT (0x60200000)
|
||||
{
|
||||
WRAPPED_KEY_FLASH_PUB_start = .;
|
||||
KEEP(*(WRAPPED_KEY_FLASH_PUB))
|
||||
WRAPPED_KEY_FLASH_PUB_end = .;
|
||||
}
|
||||
.loader_param 0x60000000 : AT (0x60000000)
|
||||
{
|
||||
KEEP(*(.loader_param))
|
||||
|
|
|
@ -28,6 +28,20 @@
|
|||
|
||||
#include "hal_data.h"
|
||||
|
||||
#if defined(WOLFBOOT_RENESAS_RSIP) && !defined(WOLFBOOT_RENESAS_APP)
|
||||
|
||||
#include "rsa_pub.h"
|
||||
#include "wolfssl/wolfcrypt/wc_port.h"
|
||||
#include "wolfssl/wolfcrypt/port/Renesas/renesas-fspsm-crypt.h"
|
||||
#include "wolfssl/wolfcrypt/port/Renesas/renesas-fspsm-types.h"
|
||||
|
||||
FSPSM_ST pkInfo;
|
||||
uint8_t wrapped_public_key[RSIP_BYTE_SIZE_WRAPPED_KEY_VALUE_RSA_2048_PUBLIC];
|
||||
rsip_wrapped_key_t *p_wrapped_public_key = (rsip_wrapped_key_t *) wrapped_public_key;
|
||||
|
||||
int wc_CryptoCb_CryptInitRenesasCmn(struct WOLFSSL* ssl, void* ctx);
|
||||
#endif
|
||||
|
||||
#define BSC_SDRAM_SPACE (0x30000000)
|
||||
|
||||
#ifdef DEBUG_FLASH_WRITE_VERIFY
|
||||
|
@ -113,6 +127,52 @@ void ext_flash_unlock(void)
|
|||
|
||||
void hal_init(void)
|
||||
{
|
||||
|
||||
#if defined(WOLFBOOT_RENESAS_RSIP) && !defined(WOLFBOOT_RENESAS_APP)
|
||||
|
||||
fsp_err_t err;
|
||||
int ret;
|
||||
rsa_public_t rsip_pub_key;
|
||||
const size_t key_size = sizeof(rsip_pub_key);
|
||||
|
||||
err = wolfCrypt_Init();
|
||||
if (err != 0) {
|
||||
printf("ERROR: wolfCrypt_Init %d\n", err);
|
||||
hal_panic();
|
||||
}
|
||||
|
||||
/* copy the key from ext flash to RAM */
|
||||
ret = ext_flash_read(RENESAS_RSIP_INSTALLEDKEY_FLASH_ADDR,
|
||||
(uint8_t*)RENESAS_RSIP_INSTALLEDKEY_RAM_ADDR, key_size);
|
||||
if (ret != key_size){
|
||||
wolfBoot_printf("Error reading public key at %lx\n",
|
||||
RENESAS_RSIP_INSTALLEDKEY_FLASH_ADDR);
|
||||
hal_panic();
|
||||
}
|
||||
/* import enrypted key */
|
||||
XMEMCPY(&rsip_pub_key, (const void*)RENESAS_RSIP_INSTALLEDKEY_RAM_ADDR, key_size);
|
||||
|
||||
err = R_RSIP_KeyImportWithUFPK(&rsip_ctrl, rsip_pub_key.wufpk,
|
||||
rsip_pub_key.initial_vector,
|
||||
RSIP_KEY_TYPE_RSA_2048_PUBLIC_ENHANCED,
|
||||
rsip_pub_key.encrypted_user_key,
|
||||
p_wrapped_public_key);
|
||||
|
||||
XMEMSET(&pkInfo, 0, sizeof(pkInfo));
|
||||
|
||||
pkInfo.wrapped_key_rsapub2048 =
|
||||
(rsip_wrapped_key_t*)p_wrapped_public_key;
|
||||
pkInfo.keyflgs_crypt.bits.rsapub2048_installedkey_set = 1;
|
||||
pkInfo.keyflgs_crypt.bits.message_type = 1;
|
||||
pkInfo.hash_type = RSIP_HASH_TYPE_SHA256;
|
||||
err = wc_CryptoCb_CryptInitRenesasCmn(NULL, &pkInfo);
|
||||
|
||||
if (err < 0) {
|
||||
wolfBoot_printf("ERROR: wc_CryptoCb_CryptInitRenesasCmn %d\n", err);
|
||||
hal_panic();
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void hal_prepare_boot(void)
|
||||
|
@ -145,7 +205,6 @@ void hal_flash_lock(void)
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
void* hal_get_primary_address(void)
|
||||
{
|
||||
return (void*)WOLFBOOT_PARTITION_BOOT_ADDRESS;
|
||||
|
@ -155,4 +214,3 @@ void* hal_get_update_address(void)
|
|||
{
|
||||
return (void*)WOLFBOOT_PARTITION_UPDATE_ADDRESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,9 @@ struct keystore_slot {
|
|||
|
||||
/* KeyStore API */
|
||||
int keystore_num_pubkeys(void);
|
||||
#if defined(WOLFBOOT_RENESAS_SCEPROTECT)
|
||||
#if defined(WOLFBOOT_RENESAS_SCEPROTECT) ||\
|
||||
defined(WOLFBOOT_RENESAS_TSIP) ||\
|
||||
defined(WOLFBOOT_RENESAS_RSIP)
|
||||
uint32_t *keystore_get_buffer(int id);
|
||||
#else
|
||||
uint8_t *keystore_get_buffer(int id);
|
||||
|
|
|
@ -276,7 +276,8 @@ static void wolfBoot_verify_signature(uint8_t key_slot,
|
|||
|
||||
/* wolfCrypt software RSA verify */
|
||||
#if defined(WOLFBOOT_RENESAS_SCEPROTECT) ||\
|
||||
defined(WOLFBOOT_RENESAS_TSIP)
|
||||
defined(WOLFBOOT_RENESAS_TSIP) ||\
|
||||
defined(WOLFBOOT_RENESAS_RSIP)
|
||||
ret = wc_InitRsaKey_ex(&rsa, NULL, RENESAS_DEVID);
|
||||
if (ret == 0) {
|
||||
XMEMCPY(output, sig, IMAGE_SIGNATURE_SIZE);
|
||||
|
@ -1046,7 +1047,8 @@ int wolfBoot_verify_authenticity(struct wolfBoot_image *img)
|
|||
pubkey_hint_size = get_header(img, HDR_PUBKEY, &pubkey_hint);
|
||||
if (pubkey_hint_size == WOLFBOOT_SHA_DIGEST_SIZE) {
|
||||
#if defined(WOLFBOOT_RENESAS_SCEPROTECT) ||\
|
||||
defined(WOLFBOOT_RENESAS_TSIP)
|
||||
defined(WOLFBOOT_RENESAS_TSIP) ||\
|
||||
defined(WOLFBOOT_RENESAS_RSIP)
|
||||
/* SCE wrapped key is installed at
|
||||
* RENESAS_SCE_INSTALLEDKEY_ADDR
|
||||
* TSIP encrypted key is installed ad
|
||||
|
|
|
@ -82,6 +82,8 @@ ifeq ($(RENESAS_KEY),1)
|
|||
CFLAGS+=-DWOLFBOOT_RENESAS_SCEPROTECT
|
||||
else ifeq ($(RENESAS_KEY),2)
|
||||
CFLAGS+=-DWOLFBOOT_RENESAS_TSIP
|
||||
else ifeq ($(RENESAS_KEY),3)
|
||||
CFLAGS+=-DWOLFBOOT_RENESAS_RSIP
|
||||
endif
|
||||
|
||||
# Sources
|
||||
|
|
|
@ -132,6 +132,8 @@ const char Cfile_Banner[]="/* Keystore file for wolfBoot, automatically generate
|
|||
"\n#include <stdint.h>\n#include \"wolfboot/wolfboot.h\"\n#include \"keystore.h\"\n"
|
||||
#if defined(WOLFBOOT_RENESAS_TSIP)
|
||||
"#include \"key_data.h\"\n"
|
||||
#elif defined(WOLFBOOT_RENESAS_RSIP)
|
||||
"#include \"rsa_pub.h\"\n"
|
||||
#endif
|
||||
"#ifdef WOLFBOOT_NO_SIGN\n\t#define NUM_PUBKEYS 0\n#else\n\n"
|
||||
"#if !defined(KEYSTORE_ANY) && (KEYSTORE_PUBKEY_SIZE != KEYSTORE_PUBKEY_SIZE_%s)\n\t"
|
||||
|
@ -148,17 +150,36 @@ const char Store_hdr[] = "\n"
|
|||
"#endif\n\n"
|
||||
"#define NUM_PUBKEYS %d\n"
|
||||
"const KEYSTORE_SECTION struct keystore_slot PubKeys[NUM_PUBKEYS] = {\n\n";
|
||||
const char Slot_hdr[] = "\t/* Key associated to file '%s' */\n"
|
||||
const char Slot_hdr[] =
|
||||
#if defined(WOLFBOOT_RENESAS_RSIP)
|
||||
"\t#if !defined(WOLFBOOT_RENESAS_RSIP)\n"
|
||||
#endif
|
||||
"\t/* Key associated to file '%s' */\n"
|
||||
"\t{\n\t\t.slot_id = %d,\n\t\t.key_type = %s,\n"
|
||||
"\t\t.part_id_mask = 0x%08X,\n\t\t.pubkey_size = %s,\n"
|
||||
"\t\t.pubkey = {\n\t\t\t";
|
||||
const char Slot_hdr_int_size[] = "\t /* Key associated to file '%s' */\n"
|
||||
const char Slot_hdr_int_size[] =
|
||||
"\t /* Key associated to file '%s' */\n"
|
||||
"\t{\n\t\t.slot_id = %d,\n\t\t.key_type = %s,\n"
|
||||
"\t\t.part_id_mask = 0x%08X,\n\t\t.pubkey_size = %u,\n"
|
||||
"\t\t.pubkey = {\n\t\t\t";
|
||||
const char Pubkey_footer[] = "\n\t\t},";
|
||||
const char Slot_footer[] = "\n\t},\n\n";
|
||||
const char Store_footer[] = "\n};\n\n";
|
||||
"\t\t.pubkey = {\n"
|
||||
#if defined(WOLFBOOT_RENESAS_RSIP)
|
||||
"#if !defined(WOLFBOOT_RENESAS_RSIP)\n"
|
||||
#elif defined(WOLFBOOT_RENESAS_TSIP)
|
||||
"#if !defined(WOLFBOOT_RENESAS_TSIP)\n"
|
||||
#elif defined(WOLFBOOT_RENESAS_SCEPROTECT)
|
||||
"#if !defined(WOLFBOOT_RENESAS_SCEPROTECT)\n"
|
||||
#endif
|
||||
"\t\t\t";
|
||||
const char Pubkey_footer[] =
|
||||
#if defined(WOLFBOOT_RENESAS_RSIP) ||\
|
||||
defined(WOLFBOOT_RENESAS_TSIP) ||\
|
||||
defined(WOLFBOOT_RENESAS_SCEPROTECT)
|
||||
"\n\t#endif\n"
|
||||
#endif
|
||||
"\n\t\t},";
|
||||
const char Slot_footer[] = "\n\t},\n\n";
|
||||
const char Store_footer[] = "\n};\n\n";
|
||||
|
||||
const char Keystore_API[] =
|
||||
"int keystore_num_pubkeys(void)\n"
|
||||
|
@ -168,6 +189,7 @@ const char Keystore_API[] =
|
|||
#if defined(WOLFBOOT_RENESAS_SCEPROTECT)
|
||||
"uint32_t *keystore_get_buffer(int id)\n"
|
||||
"{\n"
|
||||
" (void)id;\n"
|
||||
" return (uint32_t *)RENESAS_SCE_INSTALLEDKEY_ADDR;\n"
|
||||
"}\n\n"
|
||||
"int keystore_get_size(int id)\n"
|
||||
|
@ -177,12 +199,23 @@ const char Keystore_API[] =
|
|||
#elif defined(WOLFBOOT_RENESAS_TSIP)
|
||||
"uint32_t *keystore_get_buffer(int id)\n"
|
||||
"{\n"
|
||||
" (void)id;\n"
|
||||
" return (uint32_t *)RENESAS_TSIP_INSTALLEDKEY_ADDR;\n"
|
||||
"}\n\n"
|
||||
"int keystore_get_size(int id)\n"
|
||||
"{\n"
|
||||
" return (int)ENCRYPTED_KEY_BYTE_SIZE;\n"
|
||||
"}\n\n"
|
||||
#elif defined(WOLFBOOT_RENESAS_RSIP)
|
||||
"uint32_t *keystore_get_buffer(int id)\n"
|
||||
"{\n"
|
||||
" (void)id;\n"
|
||||
" return (uint32_t *)RENESAS_RSIP_INSTALLEDKEY_RAM_ADDR;\n"
|
||||
"}\n\n"
|
||||
"int keystore_get_size(int id)\n"
|
||||
"{\n"
|
||||
" return (int)sizeof(rsa_public_t);\n"
|
||||
"}\n\n"
|
||||
#else
|
||||
"uint8_t *keystore_get_buffer(int id)\n"
|
||||
"{\n"
|
||||
|
|
Loading…
Reference in New Issue