mirror of https://github.com/ARMmbed/mbed-os.git
Support Bootloader for GR-PEACH and GR-LYCHEE
The mainly changes is below: - Update scatter file, linker file for bootloader support - Update the file for RZ/A1 serial flash boot loader - Add "device name" and "bootloader_supported" in targets.jsonpull/7375/head
parent
a08c3ec5db
commit
16f09712ee
|
@ -9,25 +9,42 @@
|
||||||
|
|
||||||
#include "mem_RZ_A1LU.h"
|
#include "mem_RZ_A1LU.h"
|
||||||
|
|
||||||
|
#if !defined(MBED_APP_START)
|
||||||
|
#define MBED_APP_START 0x18000000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(MBED_APP_SIZE)
|
||||||
|
#define MBED_APP_SIZE 0x800000
|
||||||
|
#endif
|
||||||
|
|
||||||
LOAD_TTB __TTB_BASE __TTB_SIZE ; Page 0 of On-Chip Data Retention RAM
|
LOAD_TTB __TTB_BASE __TTB_SIZE ; Page 0 of On-Chip Data Retention RAM
|
||||||
{
|
{
|
||||||
TTB +0 EMPTY 0x4000
|
TTB +0 EMPTY 0x4000
|
||||||
{ } ; Level-1 Translation Table for MMU
|
{ } ; Level-1 Translation Table for MMU
|
||||||
}
|
}
|
||||||
|
|
||||||
SFLASH __ROM_BASE __ROM_SIZE ; load region size_region
|
SFLASH MBED_APP_START MBED_APP_SIZE ; load region size_region
|
||||||
{
|
{
|
||||||
BOOT_LOADER_BEGIN __ROM_BASE FIXED
|
#if (MBED_APP_START == 0x18000000)
|
||||||
|
BOOT_LOADER_BEGIN MBED_APP_START FIXED
|
||||||
{
|
{
|
||||||
* (BOOT_LOADER)
|
* (BOOT_LOADER)
|
||||||
}
|
}
|
||||||
|
|
||||||
VECTORS __VECTOR_BASE FIXED
|
VECTORS (MBED_APP_START + 0x4000) FIXED
|
||||||
{
|
{
|
||||||
* (RESET, +FIRST) ; Vector table and other startup code
|
* (RESET, +FIRST) ; Vector table and other startup code
|
||||||
* (InRoot$$Sections) ; All (library) code that must be in a root region
|
* (InRoot$$Sections) ; All (library) code that must be in a root region
|
||||||
* (+RO-CODE) ; Application RO code (.text)
|
* (+RO-CODE) ; Application RO code (.text)
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
VECTORS MBED_APP_START FIXED
|
||||||
|
{
|
||||||
|
* (RESET, +FIRST) ; Vector table and other startup code
|
||||||
|
* (InRoot$$Sections) ; All (library) code that must be in a root region
|
||||||
|
* (+RO-CODE) ; Application RO code (.text)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
RO_DATA +0
|
RO_DATA +0
|
||||||
{ * (+RO-DATA) } ; Application RO data (.constdata)
|
{ * (+RO-DATA) } ; Application RO data (.constdata)
|
||||||
|
|
|
@ -42,10 +42,6 @@
|
||||||
// <o1> ROM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
// <o1> ROM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
// </h>
|
// </h>
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
#define __ROM_BASE 0x18000000
|
|
||||||
#define __ROM_SIZE 0x08000000
|
|
||||||
|
|
||||||
#define __VECTOR_BASE 0x18004000
|
|
||||||
|
|
||||||
/*--------------------- RAM Configuration -----------------------------------
|
/*--------------------- RAM Configuration -----------------------------------
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -1,14 +1,33 @@
|
||||||
/* Linker script for mbed RZ_A1LU */
|
/* Linker script for mbed RZ_A1LU */
|
||||||
|
|
||||||
/* Linker script to configure memory regions. */
|
/* Linker script to configure memory regions. */
|
||||||
|
|
||||||
|
#if !defined(MBED_APP_START)
|
||||||
|
#define MBED_APP_START 0x18000000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(MBED_APP_SIZE)
|
||||||
|
#define MBED_APP_SIZE 0x800000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define BOOT_LOADER_ADDR (MBED_APP_START)
|
||||||
|
#if (MBED_APP_START == 0x18000000)
|
||||||
|
#define BOOT_LOADER_SIZE (0x00004000)
|
||||||
|
#else
|
||||||
|
#define BOOT_LOADER_SIZE (0x00000000)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define SFLASH_ADDR (MBED_APP_START + BOOT_LOADER_SIZE)
|
||||||
|
#define SFLASH_SIZE (MBED_APP_SIZE - BOOT_LOADER_SIZE)
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
ROM (rx) : ORIGIN = 0x00000000, LENGTH = 0x02000000
|
ROM (rx) : ORIGIN = 0x00000000, LENGTH = 0x02000000
|
||||||
BOOT_LOADER (rx) : ORIGIN = 0x18000000, LENGTH = 0x00004000
|
BOOT_LOADER (rx) : ORIGIN = BOOT_LOADER_ADDR, LENGTH = BOOT_LOADER_SIZE
|
||||||
SFLASH (rx) : ORIGIN = 0x18004000, LENGTH = 0x07FFC000
|
SFLASH (rx) : ORIGIN = SFLASH_ADDR, LENGTH = SFLASH_SIZE
|
||||||
L_TTB (rw) : ORIGIN = 0x20000000, LENGTH = 0x00004000
|
L_TTB (rw) : ORIGIN = 0x20000000, LENGTH = 0x00004000
|
||||||
RAM (rwx) : ORIGIN = 0x20020000, LENGTH = 0x001E0000
|
RAM (rwx) : ORIGIN = 0x20020000, LENGTH = 0x001E0000
|
||||||
RAM_NC (rwx) : ORIGIN = 0x20200000, LENGTH = 0x00100000
|
RAM_NC (rwx) : ORIGIN = 0x20200000, LENGTH = 0x00100000
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Linker script to place sections and symbol values. Should be used together
|
/* Linker script to place sections and symbol values. Should be used together
|
||||||
|
@ -41,17 +60,18 @@ ENTRY(Reset_Handler)
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
|
#if (MBED_APP_START == 0x18000000)
|
||||||
.boot :
|
.boot :
|
||||||
{
|
{
|
||||||
KEEP(*(.boot_loader))
|
KEEP(*(.boot_loader))
|
||||||
} > BOOT_LOADER
|
} > BOOT_LOADER
|
||||||
|
#endif
|
||||||
|
|
||||||
.text :
|
.text :
|
||||||
{
|
{
|
||||||
|
|
||||||
Image$$VECTORS$$Base = .;
|
Image$$VECTORS$$Base = .;
|
||||||
* (RESET)
|
* (RESET)
|
||||||
. += 0x00000400;
|
|
||||||
|
|
||||||
KEEP(*(.isr_vector))
|
KEEP(*(.isr_vector))
|
||||||
*(SVC_TABLE)
|
*(SVC_TABLE)
|
||||||
|
|
|
@ -2,10 +2,20 @@
|
||||||
/*-Editor annotation file-*/
|
/*-Editor annotation file-*/
|
||||||
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
|
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
|
||||||
/*-Specials-*/
|
/*-Specials-*/
|
||||||
define symbol __ICFEDIT_intvec_start__ = 0x18004000;
|
if (!isdefinedsymbol(MBED_APP_START)) {
|
||||||
|
define symbol MBED_APP_START = 0x18000000;
|
||||||
|
}
|
||||||
|
if (MBED_APP_START == 0x18000000) {
|
||||||
|
define symbol __ICFEDIT_intvec_start__ = MBED_APP_START + 0x4000;
|
||||||
|
} else {
|
||||||
|
define symbol __ICFEDIT_intvec_start__ = MBED_APP_START;
|
||||||
|
}
|
||||||
|
if (!isdefinedsymbol(MBED_APP_SIZE)) {
|
||||||
|
define symbol MBED_APP_SIZE = 0x800000;
|
||||||
|
}
|
||||||
/*-Memory Regions-*/
|
/*-Memory Regions-*/
|
||||||
define symbol __ICFEDIT_region_ROM_start__ = 0x18000000;
|
define symbol __ICFEDIT_region_ROM_start__ = MBED_APP_START;
|
||||||
define symbol __ICFEDIT_region_ROM_end__ = 0x187FFFFF;
|
define symbol __ICFEDIT_region_ROM_end__ = MBED_APP_START + MBED_APP_SIZE - 1;
|
||||||
define symbol __ICFEDIT_region_TTB_start__ = 0x20000000;
|
define symbol __ICFEDIT_region_TTB_start__ = 0x20000000;
|
||||||
define symbol __ICFEDIT_region_TTB_end__ = 0x2001FFFF;
|
define symbol __ICFEDIT_region_TTB_end__ = 0x2001FFFF;
|
||||||
define symbol __ICFEDIT_region_RAM_start__ = 0x20020000;
|
define symbol __ICFEDIT_region_RAM_start__ = 0x20020000;
|
||||||
|
|
|
@ -26,6 +26,15 @@
|
||||||
* $Date:: $
|
* $Date:: $
|
||||||
* @brief RZ_A1 serial flash boot loader
|
* @brief RZ_A1 serial flash boot loader
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
#if !defined(APPLICATION_ADDR)
|
||||||
|
#define APPLICATION_ADDR 0x18000000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (APPLICATION_ADDR != 0x18000000)
|
||||||
|
const char * boot_loader = (char *)0x18000000;
|
||||||
|
|
||||||
|
#else /* (APPLICATION_ADDR == 0x18000000) */
|
||||||
|
|
||||||
#if defined (__CC_ARM)
|
#if defined (__CC_ARM)
|
||||||
#pragma arm section rodata = "BOOT_LOADER"
|
#pragma arm section rodata = "BOOT_LOADER"
|
||||||
const char boot_loader[] __attribute__((used)) =
|
const char boot_loader[] __attribute__((used)) =
|
||||||
|
@ -825,3 +834,4 @@ const char boot_loader[] __attribute__ ((section(".boot_loader"), used)) =
|
||||||
#pragma arm section
|
#pragma arm section
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* APPLICATION_ADDR */
|
||||||
|
|
|
@ -9,25 +9,42 @@
|
||||||
|
|
||||||
#include "mem_RZ_A1H.h"
|
#include "mem_RZ_A1H.h"
|
||||||
|
|
||||||
|
#if !defined(MBED_APP_START)
|
||||||
|
#define MBED_APP_START 0x18000000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(MBED_APP_SIZE)
|
||||||
|
#define MBED_APP_SIZE 0x800000
|
||||||
|
#endif
|
||||||
|
|
||||||
LOAD_TTB __TTB_BASE __TTB_SIZE ; Page 0 of On-Chip Data Retention RAM
|
LOAD_TTB __TTB_BASE __TTB_SIZE ; Page 0 of On-Chip Data Retention RAM
|
||||||
{
|
{
|
||||||
TTB +0 EMPTY 0x4000
|
TTB +0 EMPTY 0x4000
|
||||||
{ } ; Level-1 Translation Table for MMU
|
{ } ; Level-1 Translation Table for MMU
|
||||||
}
|
}
|
||||||
|
|
||||||
SFLASH __ROM_BASE __ROM_SIZE ; load region size_region
|
SFLASH MBED_APP_START MBED_APP_SIZE ; load region size_region
|
||||||
{
|
{
|
||||||
BOOT_LOADER_BEGIN __ROM_BASE FIXED
|
#if (MBED_APP_START == 0x18000000)
|
||||||
|
BOOT_LOADER_BEGIN MBED_APP_START FIXED
|
||||||
{
|
{
|
||||||
* (BOOT_LOADER)
|
* (BOOT_LOADER)
|
||||||
}
|
}
|
||||||
|
|
||||||
VECTORS __VECTOR_BASE FIXED
|
VECTORS (MBED_APP_START + 0x4000) FIXED
|
||||||
{
|
{
|
||||||
* (RESET, +FIRST) ; Vector table and other startup code
|
* (RESET, +FIRST) ; Vector table and other startup code
|
||||||
* (InRoot$$Sections) ; All (library) code that must be in a root region
|
* (InRoot$$Sections) ; All (library) code that must be in a root region
|
||||||
* (+RO-CODE) ; Application RO code (.text)
|
* (+RO-CODE) ; Application RO code (.text)
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
VECTORS MBED_APP_START FIXED
|
||||||
|
{
|
||||||
|
* (RESET, +FIRST) ; Vector table and other startup code
|
||||||
|
* (InRoot$$Sections) ; All (library) code that must be in a root region
|
||||||
|
* (+RO-CODE) ; Application RO code (.text)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
RO_DATA +0
|
RO_DATA +0
|
||||||
{ * (+RO-DATA) } ; Application RO data (.constdata)
|
{ * (+RO-DATA) } ; Application RO data (.constdata)
|
||||||
|
|
|
@ -42,10 +42,6 @@
|
||||||
// <o1> ROM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
// <o1> ROM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
// </h>
|
// </h>
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
#define __ROM_BASE 0x18000000
|
|
||||||
#define __ROM_SIZE 0x08000000
|
|
||||||
|
|
||||||
#define __VECTOR_BASE 0x18004000
|
|
||||||
|
|
||||||
/*--------------------- RAM Configuration -----------------------------------
|
/*--------------------- RAM Configuration -----------------------------------
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -1,14 +1,33 @@
|
||||||
/* Linker script for mbed RZ_A1H */
|
/* Linker script for mbed RZ_A1H */
|
||||||
|
|
||||||
/* Linker script to configure memory regions. */
|
/* Linker script to configure memory regions. */
|
||||||
|
|
||||||
|
#if !defined(MBED_APP_START)
|
||||||
|
#define MBED_APP_START 0x18000000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(MBED_APP_SIZE)
|
||||||
|
#define MBED_APP_SIZE 0x800000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define BOOT_LOADER_ADDR (MBED_APP_START)
|
||||||
|
#if (MBED_APP_START == 0x18000000)
|
||||||
|
#define BOOT_LOADER_SIZE (0x00004000)
|
||||||
|
#else
|
||||||
|
#define BOOT_LOADER_SIZE (0x00000000)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define SFLASH_ADDR (MBED_APP_START + BOOT_LOADER_SIZE)
|
||||||
|
#define SFLASH_SIZE (MBED_APP_SIZE - BOOT_LOADER_SIZE)
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
ROM (rx) : ORIGIN = 0x00000000, LENGTH = 0x02000000
|
ROM (rx) : ORIGIN = 0x00000000, LENGTH = 0x02000000
|
||||||
BOOT_LOADER (rx) : ORIGIN = 0x18000000, LENGTH = 0x00004000
|
BOOT_LOADER (rx) : ORIGIN = BOOT_LOADER_ADDR, LENGTH = BOOT_LOADER_SIZE
|
||||||
SFLASH (rx) : ORIGIN = 0x18004000, LENGTH = 0x07FFC000
|
SFLASH (rx) : ORIGIN = SFLASH_ADDR, LENGTH = SFLASH_SIZE
|
||||||
L_TTB (rw) : ORIGIN = 0x20000000, LENGTH = 0x00004000
|
L_TTB (rw) : ORIGIN = 0x20000000, LENGTH = 0x00004000
|
||||||
RAM (rwx) : ORIGIN = 0x20020000, LENGTH = 0x008E0000
|
RAM (rwx) : ORIGIN = 0x20020000, LENGTH = 0x008E0000
|
||||||
RAM_NC (rwx) : ORIGIN = 0x20900000, LENGTH = 0x00100000
|
RAM_NC (rwx) : ORIGIN = 0x20900000, LENGTH = 0x00100000
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Linker script to place sections and symbol values. Should be used together
|
/* Linker script to place sections and symbol values. Should be used together
|
||||||
|
@ -41,17 +60,18 @@ ENTRY(Reset_Handler)
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
|
#if (MBED_APP_START == 0x18000000)
|
||||||
.boot :
|
.boot :
|
||||||
{
|
{
|
||||||
KEEP(*(.boot_loader))
|
KEEP(*(.boot_loader))
|
||||||
} > BOOT_LOADER
|
} > BOOT_LOADER
|
||||||
|
#endif
|
||||||
|
|
||||||
.text :
|
.text :
|
||||||
{
|
{
|
||||||
|
|
||||||
Image$$VECTORS$$Base = .;
|
Image$$VECTORS$$Base = .;
|
||||||
* (RESET)
|
* (RESET)
|
||||||
. += 0x00000400;
|
|
||||||
|
|
||||||
KEEP(*(.isr_vector))
|
KEEP(*(.isr_vector))
|
||||||
*(SVC_TABLE)
|
*(SVC_TABLE)
|
||||||
|
|
|
@ -2,10 +2,20 @@
|
||||||
/*-Editor annotation file-*/
|
/*-Editor annotation file-*/
|
||||||
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
|
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
|
||||||
/*-Specials-*/
|
/*-Specials-*/
|
||||||
define symbol __ICFEDIT_intvec_start__ = 0x18004000;
|
if (!isdefinedsymbol(MBED_APP_START)) {
|
||||||
|
define symbol MBED_APP_START = 0x18000000;
|
||||||
|
}
|
||||||
|
if (MBED_APP_START == 0x18000000) {
|
||||||
|
define symbol __ICFEDIT_intvec_start__ = MBED_APP_START + 0x4000;
|
||||||
|
} else {
|
||||||
|
define symbol __ICFEDIT_intvec_start__ = MBED_APP_START;
|
||||||
|
}
|
||||||
|
if (!isdefinedsymbol(MBED_APP_SIZE)) {
|
||||||
|
define symbol MBED_APP_SIZE = 0x800000;
|
||||||
|
}
|
||||||
/*-Memory Regions-*/
|
/*-Memory Regions-*/
|
||||||
define symbol __ICFEDIT_region_ROM_start__ = 0x18000000;
|
define symbol __ICFEDIT_region_ROM_start__ = MBED_APP_START;
|
||||||
define symbol __ICFEDIT_region_ROM_end__ = 0x187FFFFF;
|
define symbol __ICFEDIT_region_ROM_end__ = MBED_APP_START + MBED_APP_SIZE - 1;
|
||||||
define symbol __ICFEDIT_region_TTB_start__ = 0x20000000;
|
define symbol __ICFEDIT_region_TTB_start__ = 0x20000000;
|
||||||
define symbol __ICFEDIT_region_TTB_end__ = 0x2001FFFF;
|
define symbol __ICFEDIT_region_TTB_end__ = 0x2001FFFF;
|
||||||
define symbol __ICFEDIT_region_RAM_start__ = 0x20020000;
|
define symbol __ICFEDIT_region_RAM_start__ = 0x20020000;
|
||||||
|
|
|
@ -26,6 +26,15 @@
|
||||||
* $Date:: $
|
* $Date:: $
|
||||||
* @brief RZ_A1 serial flash boot loader
|
* @brief RZ_A1 serial flash boot loader
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
#if !defined(APPLICATION_ADDR)
|
||||||
|
#define APPLICATION_ADDR 0x18000000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (APPLICATION_ADDR != 0x18000000)
|
||||||
|
const char * boot_loader = (char *)0x18000000;
|
||||||
|
|
||||||
|
#else /* (APPLICATION_ADDR == 0x18000000) */
|
||||||
|
|
||||||
#if defined (__CC_ARM)
|
#if defined (__CC_ARM)
|
||||||
#pragma arm section rodata = "BOOT_LOADER"
|
#pragma arm section rodata = "BOOT_LOADER"
|
||||||
const char boot_loader[] __attribute__((used)) =
|
const char boot_loader[] __attribute__((used)) =
|
||||||
|
@ -826,3 +835,4 @@ const char boot_loader[] __attribute__ ((section(".boot_loader"), used)) =
|
||||||
#pragma arm section
|
#pragma arm section
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* APPLICATION_ADDR */
|
||||||
|
|
|
@ -2847,7 +2847,9 @@
|
||||||
"supported_form_factors": ["ARDUINO"],
|
"supported_form_factors": ["ARDUINO"],
|
||||||
"extra_labels_add": ["RZA1H", "MBRZA1H", "RZ_A1_EMAC"],
|
"extra_labels_add": ["RZA1H", "MBRZA1H", "RZ_A1_EMAC"],
|
||||||
"device_has_add": ["EMAC", "FLASH"],
|
"device_has_add": ["EMAC", "FLASH"],
|
||||||
"release_versions": ["2", "5"]
|
"release_versions": ["2", "5"],
|
||||||
|
"device_name": "R7S72100",
|
||||||
|
"bootloader_supported": true
|
||||||
},
|
},
|
||||||
"VK_RZ_A1H": {
|
"VK_RZ_A1H": {
|
||||||
"inherits": ["RZ_A1XX"],
|
"inherits": ["RZ_A1XX"],
|
||||||
|
@ -2863,6 +2865,8 @@
|
||||||
"device_has_remove": ["ETHERNET"],
|
"device_has_remove": ["ETHERNET"],
|
||||||
"features_remove": ["LWIP"],
|
"features_remove": ["LWIP"],
|
||||||
"release_versions": ["2", "5"],
|
"release_versions": ["2", "5"],
|
||||||
|
"device_name": "R7S72103",
|
||||||
|
"bootloader_supported": true,
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"network-default-interface-type": null
|
"network-default-interface-type": null
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue