You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: IDE/Renesas/e2studio/RA6M4/Readme.md
+21-44Lines changed: 21 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,9 @@
2
2
3
3
## 1. Overview
4
4
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.
8
6
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.
12
8
13
9
Please see `Readme_wSCE.md` for Renesas SCE use case.
14
10
@@ -66,8 +62,7 @@ Flash Allocation:
66
62
This section describes about how to build wolfBoot and application and use them.
67
63
68
64
### 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.
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.
85
76
86
77
You can specify various signature algorithms such as
87
78
@@ -91,17 +82,14 @@ You can specify various signature algorithms such as
91
82
92
83
### 2) Compile wolfBoot
93
84
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.
96
86
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.
99
88
100
89
101
90
### 3) Compile the sample application
102
91
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.
105
93
106
94
#### 3-1). Prepare SEGGER_RTT for logging
107
95
+ Download J-Link software from [Segger](https://www.segger.com/downloads/jlink)
@@ -113,7 +101,7 @@ Project properties are preset for the demo.
113
101
SEGGER_RTT_Conf.h\
114
102
SEGGER_RTT_printf.c
115
103
+ 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
117
105
118
106
e.g.[app_RA.map]
119
107
@@ -129,7 +117,9 @@ Project properties are preset for the demo.
"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.
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.
The application is calling wolfBoot_success() to set boot partition state.
212
194
213
-
214
195
```
215
196
Called wolfBoot_success()
216
197
=== Boot Partition[00010000] ===
@@ -225,14 +206,12 @@ Version: 00
225
206
Status: FF
226
207
Tail Mgc:
227
208
```
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".
231
211
232
212
### 7) Generate Signed app V2 and download it
233
213
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.
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
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
-
295
271
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