Skip to content

Commit dee6be0

Browse files
miyazakhdanielinux
authored andcommitted
update SW only case and fix SCE use case
1 parent 25bca04 commit dee6be0

File tree

6 files changed

+78
-134
lines changed

6 files changed

+78
-134
lines changed

IDE/Renesas/e2studio/RA6M4/Readme.md

Lines changed: 21 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22

33
## 1. Overview
44

5-
This example demonstrates simple secure firmware update by wolfBoot. A sample application v1 is
6-
securely updated to v2. Both versions behave the same except displaying its version of v1 or v2.
7-
They are compiled by e2Studio and running on the target board.
5+
This example demonstrates simple secure firmware update by wolfBoot. A sample application v1 is securely updated to v2. Both versions behave the same except displaying its version of v1 or v2. They are compiled by e2Studio and running on the target board.
86

9-
In this demo, you may download two versions of application binary file by Renesas Flash Programmer.
10-
You can download and execute wolfBoot by e2Studio debugger. Use a USB connection between PC and the
11-
board for the debugger and flash programmer.
7+
In this demo, you may download two versions of application binary file by Renesas Flash Programmer. You can download and excute wolfBoot by e2Studio debugger. Use a USB connection between PC and the board for the debugger and flash programmer.
128

139
Please see `Readme_wSCE.md` for Renesas SCE use case.
1410

@@ -66,8 +62,7 @@ Flash Allocation:
6662
This section describes about how to build wolfBoot and application and use them.
6763

6864
### 1) Key generation
69-
It has key tools running under the host environment such as Linux, Windows or MacOS.
70-
For comiling the tools, follow the instruction described in the user manual.
65+
It has key tools running under the host environment such as Linux, Windows or MacOS. For comiling the tools, follow the instruction described in the user manual.
7166

7267

7368
```
@@ -77,11 +72,7 @@ $ keygen --ecc256 -g ./pri-ecc256.der # ECC256
7772
$ keygen --rsa2048 -g ./pri-rsa2048.der # RSA2048
7873
```
7974

80-
It generates a pair of private and public key with -g option. The private key is stored
81-
in the specified file. The public key is stored in a key store as a C source code
82-
in "src/keystore.c" so that it can be compiled and linked with wolfBoot.
83-
If you have an existing key pair, you can use -i option to import the pablic
84-
key to the store.
75+
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 pablic key to the store.
8576

8677
You can specify various signature algorithms such as
8778

@@ -91,17 +82,14 @@ You can specify various signature algorithms such as
9182

9283
### 2) Compile wolfBoot
9384

94-
Open project under IDE/Renesas/e2studio/RA6M4/wolfBoot with e2Studio, and build the project.
95-
Project properties are preset for the demo.\
85+
Open project under IDE/Renesas/e2studio/RA6M4/wolfBoot with e2Studio, and build the project. Project properties are preset for the demo.
9686

97-
WOLFBOOT_PARTION_INFO is for debug information about partitions.
98-
Eliminate them for operational use.
87+
`WOLFBOOT_PARTION_INFO` is for debug information about partitions. Eliminate them for operational use.
9988

10089

10190
### 3) Compile the sample application
10291

103-
Open project under IDE/Renesas/e2studio/RA6M4/app_RA with e2Studio, and build the project.
104-
Project properties are preset for the demo.
92+
Open project under IDE/Renesas/e2studio/RA6M4/app_RA with e2Studio, and build the project. Project properties are preset for the demo.
10593

10694
#### 3-1). Prepare SEGGER_RTT for logging
10795
+ Download J-Link software from [Segger](https://www.segger.com/downloads/jlink)
@@ -113,7 +101,7 @@ Project properties are preset for the demo.
113101
SEGGER_RTT_Conf.h\
114102
SEGGER_RTT_printf.c
115103
+ Open `SEGGER_RTT_Conf.h` and Set `SEGGER_RTT_MEMCPY_USE_BYTELOOP` to `1`
116-
+ To connect RTT block, you can configure RTT viewer configuration based on where RTT block is in map file\
104+
+ To connect RTT block, you can configure RTT viewer configuration based on where RTT block is in map file
117105

118106
e.g.[app_RA.map]
119107

@@ -129,7 +117,9 @@ Project properties are preset for the demo.
129117
130118
131119
Need to set:
132-
#define BSP_FEATURE_FLASH_SUPPORTS_ACCESS_WINDOW (1)\
120+
```
121+
#define BSP_FEATURE_FLASH_SUPPORTS_ACCESS_WINDOW (1)
122+
```
133123
134124
Code Origin and entry point is "0x00010200". app_RA.elf is generated under Debug.
135125
@@ -140,10 +130,7 @@ You can derive bair binary file (app_RA.bin) by objcopy command as follows.
140130
$ aarch64-none-elf-objcopy.exe -O binary -j .text -j .data app_RA.elf app_RA.bin
141131
```
142132
143-
"sign" command under tools/keytools benerates a signature for the binary with a specified version.
144-
It generates a file contain a partition header and application image. The partition header
145-
contain generated signature and other control fields. Output file name is made up from
146-
the input file name and version like app_RenesasRx01_v1.0_signed.bin.
133+
"sign" command under tools/keytools benerates a signature for the binary with a specified version. It generates a file contain a partition header and application image. The partition header contain 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.
147134
148135
```
149136
$ sign --ecc256 app_RA.bin ../../../../../pri-ecc256.der 1.0
@@ -164,20 +151,15 @@ Output image(s) successfully created.
164151
165152
### 5) Download the app V1
166153
167-
You can convert the binary file to hex format and download it to the board by Flash Programmer.
168-
The partition starts at "0x00010000".
154+
You can convert the binary file to hex format and download it to the board by Flash Programmer. The partition starts at "0x00010000".
169155
170156
```
171157
$ aarch64-none-elf-objcopy.exe -I binary -O srec --change-addresses=0x00010000 app_RA_v1.0_signed.bin app_RA_v1.0_signed.hex
172158
```
173159
160+
### 6) Execute inital boot
174161
175-
### 6) Execute initial boot
176-
177-
Now, you can download and start wolfBoot program by e2Studio debugger.
178-
After starting the program, you can see the partition information as follows.
179-
If the boot program succeeds integrity and authenticity check, it initiate the
180-
application V1.
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.
181163
182164
```
183165
| ------------------------------------------------------------------- |
@@ -210,7 +192,6 @@ Calling wolfBoot_success()
210192
211193
The application is calling wolfBoot_success() to set boot partition state.
212194
213-
214195
```
215196
Called wolfBoot_success()
216197
=== Boot Partition[00010000] ===
@@ -225,14 +206,12 @@ Version: 00
225206
Status: FF
226207
Tail Mgc:
227208
```
228-
You can see the state is Success("00") and Tail Magic number becomes "BOOT". You can also see flashing each LED light in 1 second.
229-
Notable things about V1 application, it will also call wolfBoot_update_trigger() so that it tells wolfBoot that new version exists.
230-
We are going to generate and download V2 application into "Update pertition".
209+
210+
You can see the state is Success("00") and Tail Magic number becomes "BOOT". You can also see flashing each LED light in 1 second. Notable things about V1 application, it will also call wolfBoot_update_trigger() so that it tells wolfBoot that new version exists. We are going to generate and download V2 application into "Update pertition".
231211
232212
### 7) Generate Signed app V2 and download it
233213
234-
Similar to V1, you can signe and generate a binary of V2. The update partition starts at "0x00080000".
235-
You can download it by the flash programmer.
214+
Similar to V1, you can signe and generate a binary of V2. The update partition starts at "0x00080000". You can download it by the flash programmer.
236215
237216
Updtate partition:
238217
-change-addresses=0x00080000
@@ -246,11 +225,11 @@ $ aarch64-none-elf-objcopy.exe -I binary -O srec --change-addresses=0x00080000 a
246225
247226
### 8) Re-boot and secure update to V2
248227
249-
The boot program checks integrity and authenticity of V2, swap the partition
250-
safely and initiates V2. You will see following message after the partition
228+
The boot program checks integrity and authenticity of V2, swap the partition safely and initiates V2. You will see following message after the partition
251229
information.
252230
253231
```
232+
254233
| ------------------------------------------------------------------- |
255234
| Renesas RA User Application in BOOT partition started by wolfBoot |
256235
| ------------------------------------------------------------------- |
@@ -289,7 +268,5 @@ Version: 01
289268
Status: FF
290269
Tail Mgc:
291270
```
292-
You can see "Current Firmware Version : 2". The state is Success("00") and Tail Magic number becomes "BOOT".
293-
You can also see flashing each LED light in 5 second at this new version.
294-
295271
272+
You can see "Current Firmware Version : 2". The state is Success("00") and Tail Magic number becomes "BOOT". You can also see flashing each LED light in 5 second at this new version.

0 commit comments

Comments
 (0)