diff --git a/README.md b/README.md index 318d3e8d..28c24dc3 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,8 @@ microcontrollers will be added later. Relocating the interrupt vector can be dis ### Examples provided +Additional examples available on our GitHub wolfBoot-examples repository [here](https://github.com/wolfSSL/wolfBoot-examples). + The following steps are automated in the default `Makefile` target, using the baremetal test application as an example to create the factory image. By running `make`, the build system will: diff --git a/docs/Targets.md b/docs/Targets.md index 993dbdcf..7ac5bc70 100644 --- a/docs/Targets.md +++ b/docs/Targets.md @@ -28,8 +28,8 @@ For testing wolfBoot here are the changes required: * TARGET=hifive1 ``` - make ARCH=RISCV TARGET=hifive1 clean - make ARCH=RISCV TARGET=hifive1 + make ARCH=RISCV TARGET=hifive1 RAMCODE=1 clean + make ARCH=RISCV TARGET=hifive1 RAMCODE=1 ``` 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: 2. `include/target.h` Bootloader Size: 0x10000 (64KB) - -```c -#define WOLFBOOT_SECTOR_SIZE 0x10000 -#define WOLFBOOT_PARTITION_BOOT_ADDRESS 0x20010000 -``` - Application Size 0x40000 (256KB) ```c +#define WOLFBOOT_SECTOR_SIZE 0x10000 #define WOLFBOOT_PARTITION_SIZE 0x40000 -#define WOLFBOOT_PARTITION_UPDATE_ADDRESS 0x20020000 -#define WOLFBOOT_PARTITION_SWAP_ADDRESS 0x20060000 + +#define WOLFBOOT_PARTITION_BOOT_ADDRESS 0x20020000 +#define WOLFBOOT_PARTITION_UPDATE_ADDRESS 0x20060000 +#define WOLFBOOT_PARTITION_SWAP_ADDRESS 0x20070000 ``` ### Build Options diff --git a/include/target.h b/include/target.h index 2a7fe109..835a8c74 100644 --- a/include/target.h +++ b/include/target.h @@ -25,49 +25,29 @@ #ifndef H_TARGETS_TARGET_ #define H_TARGETS_TARGET_ -#ifndef ARCH_FLASH_OFFSET - #define ARCH_FLASH_OFFSET 0x0 -#endif - /* Example flash partitioning. * Ensure that your firmware entry point is * at FLASH_AREA_IMAGE_0_OFFSET + 0x100 */ -#ifndef WOLFBOOT_SECTOR_SIZE - #define WOLFBOOT_SECTOR_SIZE 0x20000 -#endif -#ifndef WOLFBOOT_PARTITION_BOOT_ADDRESS - #define WOLFBOOT_PARTITION_BOOT_ADDRESS 0x20000 -#endif +#define WOLFBOOT_SECTOR_SIZE 0x20000 +#define WOLFBOOT_PARTITION_BOOT_ADDRESS 0x20000 #ifdef EXT_FLASH /* Test configuration with 1MB external memory */ /* (Addresses are relative to the beginning of the ext)*/ -#ifndef WOLFBOOT_PARTITION_SIZE - #define WOLFBOOT_PARTITION_SIZE 0x80000 -#endif -#ifndef WOLFBOOT_PARTITION_UPDATE_ADDRESS - #define WOLFBOOT_PARTITION_UPDATE_ADDRESS 0x00000 -#endif -#ifndef WOLFBOOT_PARTITION_SWAP_ADDRESS - #define WOLFBOOT_PARTITION_SWAP_ADDRESS 0x80000 -#endif +#define WOLFBOOT_PARTITION_SIZE 0x80000 +#define WOLFBOOT_PARTITION_UPDATE_ADDRESS 0x00000 +#define WOLFBOOT_PARTITION_SWAP_ADDRESS 0x80000 #else /* Test configuration with internal memory */ -#ifndef WOLFBOOT_PARTITION_SIZE - #define WOLFBOOT_PARTITION_SIZE 0x20000 -#endif -#ifndef WOLFBOOT_PARTITION_UPDATE_ADDRESS - #define WOLFBOOT_PARTITION_UPDATE_ADDRESS 0x40000 -#endif -#ifndef WOLFBOOT_PARTITION_SWAP_ADDRESS - #define WOLFBOOT_PARTITION_SWAP_ADDRESS 0x60000 -#endif +#define WOLFBOOT_PARTITION_SIZE 0x20000 +#define WOLFBOOT_PARTITION_UPDATE_ADDRESS 0x40000 +#define WOLFBOOT_PARTITION_SWAP_ADDRESS 0x60000 #endif