Skip to content

Commit 33e3607

Browse files
committed
Updates to documentation for RISC-V addresses. Added link to wolfBoot-examples repo. Revert target.h changes.
1 parent 1b68506 commit 33e3607

3 files changed

Lines changed: 17 additions & 38 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ microcontrollers will be added later. Relocating the interrupt vector can be dis
5151

5252
### Examples provided
5353

54+
Additional examples available on our GitHub wolfBoot-examples repository [here](https://github.com/wolfSSL/wolfBoot-examples).
55+
5456
The following steps are automated in the default `Makefile` target, using the baremetal test
5557
application as an example to create the factory image. By running `make`, the build system will:
5658

docs/Targets.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ For testing wolfBoot here are the changes required:
2828
* TARGET=hifive1
2929

3030
```
31-
make ARCH=RISCV TARGET=hifive1 clean
32-
make ARCH=RISCV TARGET=hifive1
31+
make ARCH=RISCV TARGET=hifive1 RAMCODE=1 clean
32+
make ARCH=RISCV TARGET=hifive1 RAMCODE=1
3333
```
3434
3535
If using the `riscv64-unknown-elf-` cross compiler you can add `CROSS_COMPILE=riscv64-unknown-elf-` to your `make` or modify `arch.mk` as follows:
@@ -44,18 +44,15 @@ For testing wolfBoot here are the changes required:
4444
2. `include/target.h`
4545
4646
Bootloader Size: 0x10000 (64KB)
47-
48-
```c
49-
#define WOLFBOOT_SECTOR_SIZE 0x10000
50-
#define WOLFBOOT_PARTITION_BOOT_ADDRESS 0x20010000
51-
```
52-
5347
Application Size 0x40000 (256KB)
5448
5549
```c
50+
#define WOLFBOOT_SECTOR_SIZE 0x10000
5651
#define WOLFBOOT_PARTITION_SIZE 0x40000
57-
#define WOLFBOOT_PARTITION_UPDATE_ADDRESS 0x20020000
58-
#define WOLFBOOT_PARTITION_SWAP_ADDRESS 0x20060000
52+
53+
#define WOLFBOOT_PARTITION_BOOT_ADDRESS 0x20020000
54+
#define WOLFBOOT_PARTITION_UPDATE_ADDRESS 0x20060000
55+
#define WOLFBOOT_PARTITION_SWAP_ADDRESS 0x20070000
5956
```
6057

6158
### Build Options

include/target.h

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -25,49 +25,29 @@
2525
#ifndef H_TARGETS_TARGET_
2626
#define H_TARGETS_TARGET_
2727

28-
#ifndef ARCH_FLASH_OFFSET
29-
#define ARCH_FLASH_OFFSET 0x0
30-
#endif
31-
3228
/* Example flash partitioning.
3329
* Ensure that your firmware entry point is
3430
* at FLASH_AREA_IMAGE_0_OFFSET + 0x100
3531
*/
3632

37-
#ifndef WOLFBOOT_SECTOR_SIZE
38-
#define WOLFBOOT_SECTOR_SIZE 0x20000
39-
#endif
40-
#ifndef WOLFBOOT_PARTITION_BOOT_ADDRESS
41-
#define WOLFBOOT_PARTITION_BOOT_ADDRESS 0x20000
42-
#endif
33+
#define WOLFBOOT_SECTOR_SIZE 0x20000
34+
#define WOLFBOOT_PARTITION_BOOT_ADDRESS 0x20000
4335

4436
#ifdef EXT_FLASH
4537

4638
/* Test configuration with 1MB external memory */
4739
/* (Addresses are relative to the beginning of the ext)*/
4840

49-
#ifndef WOLFBOOT_PARTITION_SIZE
50-
#define WOLFBOOT_PARTITION_SIZE 0x80000
51-
#endif
52-
#ifndef WOLFBOOT_PARTITION_UPDATE_ADDRESS
53-
#define WOLFBOOT_PARTITION_UPDATE_ADDRESS 0x00000
54-
#endif
55-
#ifndef WOLFBOOT_PARTITION_SWAP_ADDRESS
56-
#define WOLFBOOT_PARTITION_SWAP_ADDRESS 0x80000
57-
#endif
41+
#define WOLFBOOT_PARTITION_SIZE 0x80000
42+
#define WOLFBOOT_PARTITION_UPDATE_ADDRESS 0x00000
43+
#define WOLFBOOT_PARTITION_SWAP_ADDRESS 0x80000
5844

5945
#else
6046

6147
/* Test configuration with internal memory */
62-
#ifndef WOLFBOOT_PARTITION_SIZE
63-
#define WOLFBOOT_PARTITION_SIZE 0x20000
64-
#endif
65-
#ifndef WOLFBOOT_PARTITION_UPDATE_ADDRESS
66-
#define WOLFBOOT_PARTITION_UPDATE_ADDRESS 0x40000
67-
#endif
68-
#ifndef WOLFBOOT_PARTITION_SWAP_ADDRESS
69-
#define WOLFBOOT_PARTITION_SWAP_ADDRESS 0x60000
70-
#endif
48+
#define WOLFBOOT_PARTITION_SIZE 0x20000
49+
#define WOLFBOOT_PARTITION_UPDATE_ADDRESS 0x40000
50+
#define WOLFBOOT_PARTITION_SWAP_ADDRESS 0x60000
7151

7252
#endif
7353

0 commit comments

Comments
 (0)