Skip to content

Commit 8897228

Browse files
miyazakhdanielinux
authored andcommitted
update README including steps to create configuration.xml
1 parent 51fcb61 commit 8897228

File tree

2 files changed

+102
-16
lines changed

2 files changed

+102
-16
lines changed

IDE/Renesas/e2studio/RA6M4/Readme.md

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,30 @@ Open project under IDE/Renesas/e2studio/RA6M4/wolfBoot with e2Studio, and build
8686

8787
`WOLFBOOT_PARTION_INFO` is for debug information about partitions. Eliminate them for operational use.
8888

89-
89+
#### 2-1) Create `dummy_library` Static Library
90+
+ Click File->New->`RA C/C++ Project`.
91+
+ Select `EK-RA6M4` from Drop-down list.
92+
+ Check `Static Library`.
93+
+ Select `No RTOS` from RTOS selection. Click Next.
94+
+ Check `Bare Metal Minimal`. Click Finish.
95+
+ Open Smart Configurator by clicking configuration.xml in the project
96+
+ Go to `BSP` tab and increase Main Stack Size under `RA Common` on Properties page, e.g. 0x2000
97+
+ Go to `BSP` tab and increase Heap Size under `RA Common` on Properties page, e.g. 0x10000
98+
+ Go to `Stacks` tab
99+
+ Add `SCE Protected Mode` stack from `New Stack` -> `Security`
100+
+ Add `g_flash0 Flash(r_falsh_hp)` stack from `New Stack` -> `Storage`
101+
102+
Modify `g_flash0 Flash(r_flash_hp)` properites as follows:
103+
|Property|Value|
104+
|:--|:--|
105+
|Data Flash Background Operation|Disabled|
106+
107+
+ Save `dummy_library` FSP configuration
108+
+ Copy <u>configuration.xml</u> and pincfg under `dummy_library` to `wolfBoot`
109+
+ Open Smart Configurator by clicking copied configuration.xml
110+
+ Click `Generate Project Content` on Smart Configurator
111+
+ Set `BSP_FEATURE_FLASH_SUPPORTS_ACCESS_WINDOW` to 1)
112+
+ Build `wolfBoot` projet
90113
### 3) Compile the sample application
91114

92115
Open project under IDE/Renesas/e2studio/RA6M4/app_RA with e2Studio, and build the project. Project properties are preset for the demo.
@@ -115,11 +138,25 @@ Open project under IDE/Renesas/e2studio/RA6M4/app_RA with e2Studio, and build th
115138
OR
116139
you can specify "RTT control block" to 0x20000000 0x1000 by Search Range
117140
141+
#### 3-2). Create `dummy_application`
142+
+ Click File->New->`RA C/C++ Project`.
143+
+ Select `EK-RA6M4` from Drop-down list.
144+
+ Check `Executable`.
145+
+ Select `No RTOS` from RTOS selection. Click Next.
146+
+ Check `Bare Metal Minimal`. Click Finish.
147+
+ Go to `BSP` tab and Add `g_flash0 Flash(r_falsh_hp)` stack from `New Stack` -> `Storage`
148+
149+
Modify `g_flash0 Flash(r_flash_hp)` properites as follows:
150+
|Property|Value|
151+
|:--|:--|
152+
|Data Flash Background Operation|Disabled|
118153
119-
Need to set:
120-
```
121-
#define BSP_FEATURE_FLASH_SUPPORTS_ACCESS_WINDOW (1)
122-
```
154+
+ Save `dummy_application` FSP configuration
155+
+ Copy <u>configuration.xml</u> and pincfg under `dummy_application` to `app_RA`
156+
+ Open Smart Configurator by clicking copied configuration.xml
157+
+ Click `Generate Project Content` on Smart Configurator
158+
+ Set `BSP_FEATURE_FLASH_SUPPORTS_ACCESS_WINDOW` to 1)
159+
+ Build `app_RA` projet
123160
124161
Code Origin and entry point is "0x00010200". app_RA.elf is generated under Debug.
125162
@@ -159,7 +196,11 @@ $ aarch64-none-elf-objcopy.exe -I binary -O srec --change-addresses=0x00010000 a
159196
160197
### 6) Execute inital boot
161198
162-
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 integrity and authenticity check, it initiate the application V1.
199+
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 integrity and authenticity check, it initiate the application V1. To initially run `wolfBoot` project,
200+
1.) Right-Click the Project name.
201+
2.) Select `Debug As` -> `Renesas GDB Hardware Debugging`
202+
3.) Select `J-Link ARM`. Click OK.
203+
4.) Select `R7FA6M4AF`. Click OK.
163204
164205
```
165206
| ------------------------------------------------------------------- |
@@ -226,7 +267,7 @@ $ aarch64-none-elf-objcopy.exe -I binary -O srec --change-addresses=0x00080000 a
226267
### 8) Re-boot and secure update to V2
227268
228269
The boot program checks integrity and authenticity of V2, swap the partition safely and initiates V2. You will see following message after the partition
229-
information.
270+
information. You can also see flashing each LED light in 5 second.
230271
231272
```
232273

IDE/Renesas/e2studio/RA6M4/Readme_wSCE.md

Lines changed: 54 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,34 @@ Open project under IDE/Renesas/e2studio/RA6M4/wolfBoot with e2Studio, and build
7474

7575
Enabled `WOLFBOOT_RENESAS_SCEPROTECT` expects to use Renesas SCE.
7676

77+
78+
#### 2-1) Create `dummy_library` Static Library
79+
+ Click File->New->`RA C/C++ Project`.
80+
+ Select `EK-RA6M4` from Drop-down list.
81+
+ Check `Static Library`.
82+
+ Select `No RTOS` from RTOS selection. Click Next.
83+
+ Check `Bare Metal Minimal`. Click Finish.
84+
+ Open Smart Configurator by clicking configuration.xml in the project
85+
+ Go to `BSP` tab and increase Main Stack Size under `RA Common` on Properties page, e.g. 0x2000
86+
+ Go to `BSP` tab and increase Heap Size under `RA Common` on Properties page, e.g. 0x10000
87+
+ Go to `Stacks` tab
88+
+ Add `SCE Protected Mode` stack from `New Stack` -> `Security`
89+
+ Add `g_flash0 Flash(r_falsh_hp)` stack from `New Stack` -> `Storage`
90+
91+
Modify `g_flash0 Flash(r_flash_hp)` properites as follows:
92+
|Property|Value|
93+
|:--|:--|
94+
|Data Flash Background Operation|Disabled|
95+
96+
+ Save `dummy_library` FSP configuration
97+
+ Copy <u>configuration.xml</u> and pincfg under `dummy_library` to `wolfBoot`
98+
+ Open Smart Configurator by clicking copied configuration.xml
99+
+ Click `Generate Project Content` on Smart Configurator
100+
+ Set `BSP_FEATURE_FLASH_SUPPORTS_ACCESS_WINDOW` to 1)
101+
+ Build `wolfBoot` projet
77102
### 3) Compile the sample application
78103

79-
Open project under IDE/Renesas/e2studio/RA6M4/app_RA with e2Studio. Open `script` folder and copy orignal `fsp.ld` to `fsp.ld.org`. Copy `fsp_wsce.ld` to `fsp.ld`, and then build the project. Project properties are preset for the demo.
104+
Open project under IDE/Renesas/e2studio/RA6M4/app_RA with e2Studio.
80105

81106
#### 3-1). Prepare SEGGER_RTT for logging
82107
+ Download J-Link software from [Segger](https://www.segger.com/downloads/jlink)
@@ -102,12 +127,30 @@ Open project under IDE/Renesas/e2studio/RA6M4/app_RA with e2Studio. Open `script
102127
OR
103128
you can specify "RTT control block" to 0x20000000 0x1000 by Search Range
104129
130+
131+
#### 3-2). Create `dummy_application`
132+
+ Click File->New->`RA C/C++ Project`.
133+
+ Select `EK-RA6M4` from Drop-down list.
134+
+ Check `Executable`.
135+
+ Select `No RTOS` from RTOS selection. Click Next.
136+
+ Check `Bare Metal Minimal`. Click Finish.
137+
+ Go to `BSP` tab and Add `g_flash0 Flash(r_falsh_hp)` stack from `New Stack` -> `Storage`
138+
139+
Modify `g_flash0 Flash(r_flash_hp)` properites as follows:
140+
|Property|Value|
141+
|:--|:--|
142+
|Data Flash Background Operation|Disabled|
105143
106-
Need to set:
107-
#define BSP_FEATURE_FLASH_SUPPORTS_ACCESS_WINDOW (1)\
144+
+ Save `dummy_application` FSP configuration
145+
+ Copy <u>configuration.xml</u> and pincfg under `dummy_application` to `app_RA`
146+
+ Open Smart Configurator by clicking copied configuration.xml
147+
+ Click `Generate Project Content` on Smart Configurator
148+
+ Set `BSP_FEATURE_FLASH_SUPPORTS_ACCESS_WINDOW` to 1)
149+
+ Linker option update, Click project->`Properties`->`C/C++ Build`->`Settings`->`GNU Arm Cross Linker`->`Miscellaneous`. Modify `--defsym=FLASH_IMAGE_START=0x10200` to `--defsym=FLASH_IMAGE_START=0x10200`
150+
+ Build `app_RA` projet
108151
109-
Code Origin and entry point is "0x00010200". app_RA.elf is generated under Debug.
110152
153+
Code Origin and entry point is "0x00020200". app_RA.elf is gnerated under Debug.
111154
### 4) Generate Wrapped Key for SCE
112155
113156
SCE needs to have a wrapped key for sign verification installed in advance. This section describes how to use wolfBoot with SCE. Current version supports RSA2048. SCE 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 `skmt`. `skmt` command wraps the RAW key and generates C language initial data and a header file for an application program with SCE.
@@ -159,12 +202,14 @@ You can convert the binary file to hex format and download it to the board by Fl
159202
```
160203
$ aarch64-none-elf-objcopy.exe -I binary -O srec --change-addresses=0x00020000 app_RA_v1.0_signed.bin app_RA_v1.0_signed.hex
161204
```
162-
163-
164-
### 6) Execute initial boot
205+
### 6) Execute inital boot
165206
166207
Now, you can download and start wolfBoot program by e2Studio debugger. After starting the program, you can see the partition information as follows.
167-
If the boot program succeeds integlity and authenticity check, it initiate the application V1.
208+
If the boot program succeeds integlity and authenticity check, it initiate the application V1. To initially run `wolfBoot` project,
209+
1.) Right-Click the Project name.
210+
2.) Select `Debug As` -> `Renesas GDB Hardware Debugging`
211+
3.) Select `J-Link ARM`. Click OK.
212+
4.) Select `R7FA6M4AF`. Click OK.
168213
169214
```
170215
| ----------------------------------------------------------------------- |
@@ -230,7 +275,7 @@ $ aarch64-none-elf-objcopy.exe -I binary -O srec --change-addresses=0x00090000 a
230275
### 8) Reboot and secure update to V2
231276
232277
The boot program checks integlity and authenticity of V2, swap the partition safely and initiates V2. You will see following message after the partition
233-
information.
278+
information. You can also see flashing each LED light in 5 second.
234279
235280
```
236281
| ----------------------------------------------------------------------- |

0 commit comments

Comments
 (0)