mirror of https://github.com/wolfSSL/wolfBoot.git
[SAMA5D3] Stub for test application
parent
4cbfdf8cf1
commit
bbd4e2b1c3
3
Makefile
3
Makefile
|
|
@ -131,9 +131,10 @@ ifeq ($(TARGET),nxp_t1024)
|
|||
endif
|
||||
|
||||
ifeq ($(TARGET),sama5d3)
|
||||
MAIN_TARGET:=wolfboot.bin
|
||||
MAIN_TARGET:=wolfboot.bin test-app/image_v1_signed.bin
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(FLASH_OTP_KEYSTORE),1)
|
||||
MAIN_TARGET+=tools/keytools/otp/otp-keystore-primer.bin
|
||||
endif
|
||||
|
|
|
|||
2
arch.mk
2
arch.mk
|
|
@ -177,6 +177,8 @@ ifeq ($(ARCH),ARM)
|
|||
|
||||
ifeq ($(TARGET),sama5d3)
|
||||
CORTEX_A5=1
|
||||
UPDATE_OBJS:=src/update_ram.o
|
||||
CFLAGS+=-DWOLFBOOT_DUALBOOT
|
||||
endif
|
||||
|
||||
## Cortex CPU
|
||||
|
|
|
|||
|
|
@ -45,9 +45,14 @@ SECTIONS
|
|||
_end_bss = .;
|
||||
}
|
||||
}
|
||||
|
||||
kernel_addr = 0x040000;
|
||||
update_addr = 0x080000;
|
||||
|
||||
_romsize = _end_data - _start_text;
|
||||
_sramsize = _end_bss - _start_text;
|
||||
END_STACK = _start_text;
|
||||
_stack_top = ORIGIN(DDR_MEM) + LENGTH(DDR_MEM);
|
||||
end = .; /* define a global symbol marking the end of application */
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,53 @@
|
|||
OUTPUT_FORMAT("elf32-littlearm")
|
||||
OUTPUT_ARCH(arm)
|
||||
|
||||
MEMORY
|
||||
{
|
||||
DDR_MEM(rwx): ORIGIN = 0x00300000, LENGTH = 0x000100000
|
||||
}
|
||||
|
||||
ENTRY(reset_vector_entry)
|
||||
SECTIONS
|
||||
{
|
||||
.text : {
|
||||
_start_text = .;
|
||||
*(.text)
|
||||
*(.rodata)
|
||||
*(.rodata*)
|
||||
. = ALIGN(4);
|
||||
*(.glue_7)
|
||||
. = ALIGN(4);
|
||||
*(.eh_frame)
|
||||
. = ALIGN(4);
|
||||
_end_text = . ;
|
||||
}
|
||||
|
||||
/* collect all initialized .data sections */
|
||||
/* .data : AT ( ADDR (.text) + SIZEOF (.text) SIZEOF (.ARM.*) { */
|
||||
|
||||
. = ALIGN(4);
|
||||
.dummy : {
|
||||
_edummy = .;
|
||||
}
|
||||
|
||||
.data : AT (LOADADDR(.dummy)) {
|
||||
_start_data = .;
|
||||
*(.vectors)
|
||||
*(.data)
|
||||
_end_data = .;
|
||||
}
|
||||
|
||||
/* collect all uninitialized .bss sections */
|
||||
.bss (NOLOAD) : {
|
||||
. = ALIGN(4);
|
||||
_start_bss = .;
|
||||
*(.bss)
|
||||
_end_bss = .;
|
||||
}
|
||||
}
|
||||
_romsize = _end_data - _start_text;
|
||||
_sramsize = _end_bss - _start_text;
|
||||
END_STACK = _start_text;
|
||||
_stack_top = ORIGIN(DDR_MEM) + LENGTH(DDR_MEM);
|
||||
end = .; /* define a global symbol marking the end of application */
|
||||
|
||||
|
|
@ -36,6 +36,7 @@ ifeq ($(HASH),SHA3_384)
|
|||
endif
|
||||
|
||||
|
||||
|
||||
ifeq ($(TARGET),ti_hercules)
|
||||
APP_OBJS:=app_$(TARGET).o ../test-app/libwolfboot.o
|
||||
CFLAGS+=-I"../include"
|
||||
|
|
@ -144,6 +145,11 @@ ifeq ($(TARGET),stm32c0)
|
|||
LSCRIPT_TEMPLATE=ARM-stm32c0.ld
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET),sama5d3)
|
||||
APP_OBJS+=../src/boot_arm32_start.o
|
||||
LSCRIPT_TEMPLATE:=$(ARCH)-$(TARGET).ld
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET),stm32l4)
|
||||
APP_OBJS+=$(STM32CUBE)/Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.o
|
||||
APP_OBJS+=$(STM32CUBE)/Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.o
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
/* app_sama5d3.c
|
||||
*
|
||||
* Test bare-metal boot application
|
||||
*
|
||||
* Copyright (C) 2021 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfBoot.
|
||||
*
|
||||
* wolfBoot is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfBoot is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "wolfboot/wolfboot.h"
|
||||
|
||||
#ifdef TARGET_sama5d3
|
||||
|
||||
volatile uint32_t time_elapsed = 0;
|
||||
void main(void) {
|
||||
|
||||
/* Wait for reboot */
|
||||
while(1)
|
||||
;
|
||||
}
|
||||
#endif /** TARGET_sama5d3 **/
|
||||
Loading…
Reference in New Issue