@ -1,137 +0,0 @@ |
|||
/* |
|||
* Copyright : (C) 2022 Phytium Information Technology, Inc. |
|||
* All Rights Reserved. |
|||
* |
|||
* This program is OPEN SOURCE software: you can redistribute it and/or modify it |
|||
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, |
|||
* either version 1.0 of the License, or (at your option) any later version. |
|||
* |
|||
* This program 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 Phytium Public License for more details. |
|||
* |
|||
* |
|||
* FilePath: vector.S |
|||
* Date: 2022-02-10 14:53:41 |
|||
* LastEditTime: 2022-02-17 17:28:06 |
|||
* Description: This file is for the initial vector table for the processor |
|||
* |
|||
* Modify History: |
|||
* Ver Who Date Changes |
|||
* ----- ------ -------- -------------------------------------- |
|||
* 1.0 huanghe 2021/7/3 first release |
|||
*/ |
|||
|
|||
|
|||
|
|||
|
|||
.globl _boot |
|||
.globl _vector_table |
|||
|
|||
.globl FiqInterruptHandler |
|||
.globl IrqInterruptHandler |
|||
.globl SwInterruptHandler |
|||
.globl DataAbortInterruptHandler |
|||
.globl PrefetchAbortInterruptHandler |
|||
.globl UndefineInterruptHandler |
|||
|
|||
|
|||
.set EXCEPTION_FRAME_SIZE, (17*4) |
|||
.set EXCEPTION_PC_OFFSET, (15*4) |
|||
.set EXCEPTION_CPSR_OFFSET, (16*4) |
|||
.set EXCEPTION_SP_OFFSET, (13*4) |
|||
.set EXCEPTION_PC_OFFSET, (14*4) |
|||
|
|||
/* allocatable and executable */ |
|||
.section .vectors, "a" |
|||
|
|||
_vector_table: |
|||
B _boot |
|||
B Undefined |
|||
B SVCHandler |
|||
B PrefetchAbortHandler |
|||
B DataAbortHandler |
|||
NOP /* Placeholder for address exception vector*/ |
|||
B IrqHandler |
|||
B FiqHandler |
|||
|
|||
IrqHandler: /* 0x18 IRQ */ |
|||
stmdb sp!,{r0-r3,r12,lr} /* state save from compiled code*/ |
|||
vpush {d0-d7} |
|||
vpush {d16-d31} |
|||
vmrs r1, FPSCR |
|||
push {r1} |
|||
vmrs r1, FPEXC |
|||
push {r1} |
|||
|
|||
/* Read value from the interrupt acknowledge register, which is stored in r0 |
|||
for future parameter and interrupt clearing use. */ |
|||
mrc p15, 0, r0, c12, c12, 0 |
|||
isb |
|||
|
|||
/* save r0 which is interrupt num, lr pushed to maintain alignment */ |
|||
PUSH {r0, lr} |
|||
|
|||
bl FExceptionInterruptHandler /* IRQ vector */ |
|||
|
|||
/* get r0 value which is interrupt num */ |
|||
POP {r0, lr} |
|||
|
|||
/* Write the value read from ICCIAR to ICCEOIR, end interrupt.*/ |
|||
mcr p15, 0, r0, c12, c12, 1 |
|||
isb |
|||
|
|||
pop {r1} |
|||
vmsr FPEXC, r1 |
|||
pop {r1} |
|||
vmsr FPSCR, r1 |
|||
vpop {d16-d31} |
|||
vpop {d0-d7} |
|||
|
|||
ldmia sp!,{r0-r3,r12,lr} /* state restore from compiled code */ |
|||
|
|||
subs pc, lr, #4 /* adjust return */ |
|||
|
|||
|
|||
|
|||
|
|||
.macro PushExceptionReg |
|||
sub sp, sp, #EXCEPTION_FRAME_SIZE /* Sizeof(ExceptionFrame) */ |
|||
stmia sp, {r0 - r12} /* Calling r0-r12 */ |
|||
mov r0, sp |
|||
mrs r6, spsr /* Save CPSR */ |
|||
str lr, [r0, #15*4] /* Push PC */ |
|||
str r6, [r0, #16*4] /* Push CPSR */ |
|||
cps #0x1F /* C运行环境所运行的模式 */ |
|||
str sp, [r0, #13*4] /* Save calling SP */ |
|||
str lr, [r0, #14*4] /* Save calling PC */ |
|||
.endm |
|||
|
|||
|
|||
Undefined: /* Undefined handler */ |
|||
PushExceptionReg |
|||
cps #0x1B |
|||
bl UndefineInterruptHandler |
|||
bl . |
|||
|
|||
SVCHandler: |
|||
PushExceptionReg |
|||
bl SwInterruptHandler |
|||
bl . |
|||
|
|||
PrefetchAbortHandler: |
|||
PushExceptionReg |
|||
bl PrefetchAbortInterruptHandler |
|||
bl . |
|||
|
|||
DataAbortHandler: |
|||
PushExceptionReg |
|||
bl DataAbortInterruptHandler |
|||
bl . |
|||
|
|||
FiqHandler: /* FIQ vector handler */ |
|||
PushExceptionReg |
|||
bl FiqInterruptHandler |
|||
bl . |
|||
|
|||
.end |
@ -1,137 +0,0 @@ |
|||
/*
|
|||
* Copyright : (C) 2022 Phytium Information Technology, Inc. |
|||
* All Rights Reserved. |
|||
* |
|||
* This program is OPEN SOURCE software: you can redistribute it and/or modify it |
|||
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, |
|||
* either version 1.0 of the License, or (at your option) any later version. |
|||
* |
|||
* This program 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 Phytium Public License for more details. |
|||
* |
|||
* |
|||
* FilePath: fl3cache.c |
|||
* Date: 2022-03-08 21:56:42 |
|||
* LastEditTime: 2022-03-15 11:10:40 |
|||
* Description: This file is for l3 cache-related operations |
|||
* |
|||
* Modify History: |
|||
* Ver Who Date Changes |
|||
* ----- ------ -------- -------------------------------------- |
|||
* 1.0 huanghe 2022/03/15 first release |
|||
*/ |
|||
|
|||
|
|||
#include "fl3cache.h" |
|||
#include "sdkconfig.h" |
|||
|
|||
|
|||
|
|||
/***************************** Include Files *********************************/ |
|||
|
|||
/************************** Constant Definitions *****************************/ |
|||
|
|||
/**************************** Type Definitions *******************************/ |
|||
|
|||
/************************** Variable Definitions *****************************/ |
|||
|
|||
/***************** Macros (Inline Functions) Definitions *********************/ |
|||
/* FLUSH L3 CASHE */ |
|||
#ifdef CONFIG_USE_L3CACHE |
|||
#define HNF_BASE (unsigned long)(0x3A200000) |
|||
#define HNF_COUNT 0x8 |
|||
#define HNF_PSTATE_REQ (HNF_BASE + 0x10) |
|||
#define HNF_PSTATE_STAT (HNF_BASE + 0x18) |
|||
#define HNF_PSTATE_OFF 0x0 |
|||
#define HNF_PSTATE_SFONLY 0x1 |
|||
#define HNF_PSTATE_HALF 0x2 |
|||
#define HNF_PSTATE_FULL 0x3 |
|||
#define HNF_STRIDE 0x10000 |
|||
#endif |
|||
|
|||
/************************** Function Prototypes ******************************/ |
|||
|
|||
void FCacheL3CacheDisable(void) |
|||
{ |
|||
#ifdef CONFIG_USE_L3CACHE |
|||
int i, pstate; |
|||
|
|||
|
|||
for (i = 0; i < 8; i++) |
|||
{ |
|||
FtOut32(0x3A200010 + i * 0x10000, 1); |
|||
} |
|||
|
|||
for (i = 0; i < 8; i++) |
|||
{ |
|||
do |
|||
{ |
|||
pstate = FtIn32(0x3A200018 + i * 0x10000); |
|||
} |
|||
while ((pstate & 0xf) != (0x1 << 2)); |
|||
} |
|||
#endif |
|||
} |
|||
|
|||
|
|||
void FCacheL3CacheFlush(void) |
|||
{ |
|||
#ifdef CONFIG_USE_L3CACHE |
|||
int i, pstate; |
|||
|
|||
for (i = 0; i < HNF_COUNT; i++) |
|||
{ |
|||
FtOut64(HNF_PSTATE_REQ + i * HNF_STRIDE, HNF_PSTATE_SFONLY); |
|||
} |
|||
for (i = 0; i < HNF_COUNT; i++) |
|||
{ |
|||
do |
|||
{ |
|||
pstate = FtIn64(HNF_PSTATE_STAT + i * HNF_STRIDE); |
|||
} |
|||
while ((pstate & 0xf) != (HNF_PSTATE_SFONLY << 2)); |
|||
} |
|||
|
|||
for (i = 0; i < HNF_COUNT; i++) |
|||
{ |
|||
FtOut64(HNF_PSTATE_REQ + i * HNF_STRIDE, HNF_PSTATE_FULL); |
|||
} |
|||
|
|||
#endif |
|||
return ; |
|||
} |
|||
|
|||
|
|||
void FCacheL3CacheInvalidate(void) |
|||
{ |
|||
#ifdef CONFIG_USE_L3CACHE |
|||
int i, pstate; |
|||
|
|||
for (i = 0; i < HNF_COUNT; i++) |
|||
{ |
|||
FtOut64(HNF_PSTATE_REQ + i * HNF_STRIDE, HNF_PSTATE_SFONLY); |
|||
} |
|||
|
|||
for (i = 0; i < HNF_COUNT; i++) |
|||
{ |
|||
do |
|||
{ |
|||
pstate = FtIn64(HNF_PSTATE_STAT + i * HNF_STRIDE); |
|||
} |
|||
while ((pstate & 0xf) != (HNF_PSTATE_SFONLY << 2)); |
|||
} |
|||
|
|||
for (i = 0; i < HNF_COUNT; i++) |
|||
{ |
|||
FtOut64(HNF_PSTATE_REQ + i * HNF_STRIDE, HNF_PSTATE_FULL); |
|||
} |
|||
#endif |
|||
return ; |
|||
} |
|||
|
|||
|
|||
void FCacheL3CacheEnable(void) |
|||
{ |
|||
return ; |
|||
} |
@ -1,49 +0,0 @@ |
|||
/*
|
|||
* Copyright : (C) 2022 Phytium Information Technology, Inc. |
|||
* All Rights Reserved. |
|||
* |
|||
* This program is OPEN SOURCE software: you can redistribute it and/or modify it |
|||
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, |
|||
* either version 1.0 of the License, or (at your option) any later version. |
|||
* |
|||
* This program 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 Phytium Public License for more details. |
|||
* |
|||
* |
|||
* FilePath: fl3cache.h |
|||
* Date: 2022-03-08 21:56:42 |
|||
* LastEditTime: 2022-03-15 11:14:45 |
|||
* Description: This file is for l3 cache-related operations |
|||
* |
|||
* Modify History: |
|||
* Ver Who Date Changes |
|||
* ----- ------ -------- -------------------------------------- |
|||
* 1.0 huanghe 2021/10/21 first release |
|||
*/ |
|||
|
|||
|
|||
#ifndef FL3CACHE_H |
|||
#define FL3CACHE_H |
|||
|
|||
#include "fparameters.h" |
|||
#include "fio.h" |
|||
|
|||
#ifdef __cplusplus |
|||
extern "C" |
|||
{ |
|||
#endif |
|||
|
|||
/************************** Function Prototypes ******************************/ |
|||
|
|||
|
|||
void FCacheL3CacheEnable(void); |
|||
void FCacheL3CacheDisable(void); |
|||
void FCacheL3CacheInvalidate(void); |
|||
void FCacheL3CacheFlush(void); |
|||
|
|||
#ifdef __cplusplus |
|||
} |
|||
#endif |
|||
|
|||
#endif |
@ -1,96 +0,0 @@ |
|||
/*
|
|||
* Copyright : (C) 2022 Phytium Information Technology, Inc. |
|||
* All Rights Reserved. |
|||
* |
|||
* This program is OPEN SOURCE software: you can redistribute it and/or modify it |
|||
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, |
|||
* either version 1.0 of the License, or (at your option) any later version. |
|||
* |
|||
* This program 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 Phytium Public License for more details. |
|||
* |
|||
* |
|||
* FilePath: flinkage.h |
|||
* Date: 2022-02-10 14:53:41 |
|||
* LastEditTime: 2022-02-17 17:35:12 |
|||
* Description: This files is for assembler code format macro definition |
|||
* |
|||
* Modify History: |
|||
* Ver Who Date Changes |
|||
* ----- ------ -------- -------------------------------------- |
|||
* 1.0 huanghe 2021/11/06 first release |
|||
*/ |
|||
|
|||
|
|||
#ifndef FLINKAGE_H |
|||
#define FLINKAGE_H |
|||
|
|||
#ifdef __cplusplus |
|||
extern "C" |
|||
{ |
|||
#endif |
|||
|
|||
/* Some toolchains use other characters (e.g. '`') to mark new line in macro */ |
|||
#ifndef ASM_NL |
|||
#define ASM_NL ; |
|||
#endif |
|||
|
|||
#ifdef __cplusplus |
|||
#define CPP_ASMLINKAGE extern "C" |
|||
#else |
|||
#define CPP_ASMLINKAGE |
|||
#endif |
|||
|
|||
#ifndef asmlinkage |
|||
#define asmlinkage CPP_ASMLINKAGE |
|||
#endif |
|||
|
|||
#define SYMBOL_NAME_STR(X) #X |
|||
#define SYMBOL_NAME(X) X |
|||
#ifdef __STDC__ |
|||
#define SYMBOL_NAME_LABEL(X) X##: |
|||
#else |
|||
#define SYMBOL_NAME_LABEL(X) \ |
|||
X: |
|||
#endif |
|||
|
|||
#ifndef __ALIGN |
|||
#define __ALIGN .align 4 |
|||
#endif |
|||
|
|||
#ifndef __ALIGN_STR |
|||
#define __ALIGN_STR ".align 4" |
|||
#endif |
|||
|
|||
#define ALIGN __ALIGN |
|||
#define ALIGN_STR __ALIGN_STR |
|||
|
|||
#define LENTRY(name) \ |
|||
ALIGN ASM_NL \ |
|||
SYMBOL_NAME_LABEL(name) |
|||
|
|||
#define ENTRY(name) \ |
|||
.globl SYMBOL_NAME(name) ASM_NL \ |
|||
LENTRY(name) |
|||
|
|||
#define WEAK(name) \ |
|||
.weak SYMBOL_NAME(name) ASM_NL \ |
|||
LENTRY(name) |
|||
|
|||
#ifndef END |
|||
#define END(name) \ |
|||
.size name, .- name |
|||
#endif |
|||
|
|||
#ifndef ENDPROC |
|||
#define ENDPROC(name) \ |
|||
.type name STT_FUNC ASM_NL \ |
|||
END(name) |
|||
#endif |
|||
|
|||
#ifdef __cplusplus |
|||
} |
|||
#endif |
|||
|
|||
#endif |
@ -1,54 +0,0 @@ |
|||
/*
|
|||
* Copyright : (C) 2022 Phytium Information Technology, Inc. |
|||
* All Rights Reserved. |
|||
* |
|||
* This program is OPEN SOURCE software: you can redistribute it and/or modify it |
|||
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, |
|||
* either version 1.0 of the License, or (at your option) any later version. |
|||
* |
|||
* This program 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 Phytium Public License for more details. |
|||
* |
|||
* |
|||
* FilePath: fmacro.h |
|||
* Date: 2022-02-10 14:53:41 |
|||
* LastEditTime: 2022-02-17 17:35:17 |
|||
* Description: This files is for the current execution state selects the macro definition |
|||
* |
|||
* Modify History: |
|||
* Ver Who Date Changes |
|||
* ----- ------ -------- -------------------------------------- |
|||
* 1.0 huanghe 2021/11/06 first release |
|||
*/ |
|||
|
|||
|
|||
#ifndef FMACRO_H |
|||
#define FMACRO_H |
|||
|
|||
#ifdef __cplusplus |
|||
extern "C" |
|||
{ |
|||
#endif |
|||
|
|||
/*
|
|||
* Branch according to exception level |
|||
*/ |
|||
/*
|
|||
* Branch according to exception level |
|||
*/ |
|||
.macro switch_el, xreg, el3_label, el2_label, el1_label |
|||
mrs \xreg, CurrentEL |
|||
cmp \xreg, 0xc |
|||
b.eq \el3_label |
|||
cmp \xreg, 0x8 |
|||
b.eq \el2_label |
|||
cmp \xreg, 0x4 |
|||
b.eq \el1_label |
|||
.endm |
|||
|
|||
#ifdef __cplusplus |
|||
} |
|||
#endif |
|||
|
|||
#endif /* __ASM_ARM_MACRO_H__ */ |
@ -1,58 +0,0 @@ |
|||
/*
|
|||
* Copyright : (C) 2022 Phytium Information Technology, Inc. |
|||
* All Rights Reserved. |
|||
* |
|||
* This program is OPEN SOURCE software: you can redistribute it and/or modify it |
|||
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, |
|||
* either version 1.0 of the License, or (at your option) any later version. |
|||
* |
|||
* This program 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 Phytium Public License for more details. |
|||
* |
|||
* |
|||
* FilePath: ftrace.h |
|||
* Date: 2022-06-09 16:35:50 |
|||
* LastEditTime: 2022-06-09 16:35:51 |
|||
* Description: This file is for trace macro definition |
|||
* |
|||
* Modify History: |
|||
* Ver Who Date Changes |
|||
* ----- ------ -------- -------------------------------------- |
|||
* 1.0 zhugengyu 2022/6/13 first release |
|||
*/ |
|||
#ifndef FTRACE_H |
|||
#define FTRACE_H |
|||
|
|||
/***************************** Include Files *********************************/ |
|||
#if !defined(__ASSEMBLER__) |
|||
#include "ftypes.h" |
|||
#endif |
|||
|
|||
#include "fparameters.h" |
|||
|
|||
#ifdef __cplusplus |
|||
extern "C" |
|||
{ |
|||
#endif |
|||
|
|||
/************************** Constant Definitions *****************************/ |
|||
|
|||
/**************************** Type Definitions *******************************/ |
|||
|
|||
/***************** Macros (Inline Functions) Definitions *********************/ |
|||
#define FTRACE_UART_BASE FUART1_BASE_ADDR /* UART-1 as trace Uart */ |
|||
#define FTRACE_UART_UARTDR (FTRACE_UART_BASE + 0x0U) /* UART data register offset */ |
|||
#define FTRACE_UART_UARTFR (FTRACE_UART_BASE + 0x18U) /* UART status register offset */ |
|||
|
|||
/************************** Function Prototypes ******************************/ |
|||
|
|||
/************************** Variable Definitions *****************************/ |
|||
|
|||
/*****************************************************************************/ |
|||
|
|||
#ifdef __cplusplus |
|||
} |
|||
#endif |
|||
|
|||
#endif |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 172 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 22 KiB |
@ -1,170 +0,0 @@ |
|||
|
|||
# |
|||
# Project Configuration |
|||
# |
|||
CONFIG_TARGET_NAME="e2000s_baremetal_a32" |
|||
# end of Project Configuration |
|||
|
|||
CONFIG_USE_BAREMETAL=y |
|||
|
|||
# |
|||
# Platform Setting |
|||
# |
|||
|
|||
# |
|||
# Arch Configuration |
|||
# |
|||
CONFIG_TARGET_ARMV8_AARCH32=y |
|||
# CONFIG_TARGET_ARMV8_AARCH64 is not set |
|||
CONFIG_USE_CACHE=y |
|||
CONFIG_USE_MMU=y |
|||
# CONFIG_USE_SYS_TICK is not set |
|||
CONFIG_USE_AARCH64_L1_TO_AARCH32=y |
|||
# CONFIG_BOOT_WITH_FLUSH_CACHE is not set |
|||
# end of Arch Configuration |
|||
|
|||
# |
|||
# Board Configuration |
|||
# |
|||
# CONFIG_TARGET_F2000_4 is not set |
|||
# CONFIG_TARGET_D2000 is not set |
|||
# CONFIG_TARGET_E2000Q is not set |
|||
# CONFIG_TARGET_E2000D is not set |
|||
CONFIG_TARGET_E2000S=y |
|||
CONFIG_TARGET_E2000=y |
|||
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set |
|||
# end of Board Configuration |
|||
|
|||
# |
|||
# Components Configuration |
|||
# |
|||
# CONFIG_USE_SPI is not set |
|||
# CONFIG_USE_QSPI is not set |
|||
CONFIG_USE_GIC=y |
|||
CONFIG_ENABLE_GICV3=y |
|||
# CONFIG_USE_SERIAL is not set |
|||
# CONFIG_USE_GPIO is not set |
|||
# CONFIG_USE_ETH is not set |
|||
# CONFIG_USE_CAN is not set |
|||
# CONFIG_USE_I2C is not set |
|||
# CONFIG_USE_TIMER is not set |
|||
# CONFIG_USE_MIO is not set |
|||
# CONFIG_USE_SDMMC is not set |
|||
# CONFIG_USE_PCIE is not set |
|||
# CONFIG_USE_WDT is not set |
|||
# CONFIG_USE_DMA is not set |
|||
# CONFIG_USE_NAND is not set |
|||
# CONFIG_USE_RTC is not set |
|||
# CONFIG_USE_SATA is not set |
|||
# CONFIG_USE_USB is not set |
|||
CONFIG_USE_ADC=y |
|||
|
|||
# |
|||
# ADC Configuration |
|||
# |
|||
CONFIG_USE_FADC=y |
|||
# end of ADC Configuration |
|||
|
|||
# CONFIG_USE_PWM is not set |
|||
# CONFIG_USE_IPC is not set |
|||
# CONFIG_USE_MEDIA is not set |
|||
# CONFIG_USE_SCMI_MHU is not set |
|||
# end of Components Configuration |
|||
# end of Platform Setting |
|||
|
|||
# |
|||
# Building Option |
|||
# |
|||
# CONFIG_LOG_VERBOS is not set |
|||
# CONFIG_LOG_DEBUG is not set |
|||
# CONFIG_LOG_INFO is not set |
|||
# CONFIG_LOG_WARN is not set |
|||
CONFIG_LOG_ERROR=y |
|||
# CONFIG_LOG_NONE is not set |
|||
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y |
|||
CONFIG_INTERRUPT_ROLE_MASTER=y |
|||
# CONFIG_INTERRUPT_ROLE_SLAVE is not set |
|||
# CONFIG_LOG_EXTRA_INFO is not set |
|||
# CONFIG_LOG_DISPALY_CORE_NUM is not set |
|||
# CONFIG_BOOTUP_DEBUG_PRINTS is not set |
|||
|
|||
# |
|||
# Linker Options |
|||
# |
|||
CONFIG_AARCH32_RAM_LD=y |
|||
# CONFIG_AARCH64_RAM_LD is not set |
|||
# CONFIG_USER_DEFINED_LD is not set |
|||
CONFIG_LINK_SCRIPT_ROM=y |
|||
CONFIG_ROM_START_UP_ADDR=0x80100000 |
|||
CONFIG_ROM_SIZE_MB=1 |
|||
CONFIG_LINK_SCRIPT_RAM=y |
|||
CONFIG_RAM_START_UP_ADDR=0x81000000 |
|||
CONFIG_RAM_SIZE_MB=64 |
|||
CONFIG_HEAP_SIZE=2 |
|||
CONFIG_SVC_STACK_SIZE=0x1000 |
|||
CONFIG_SYS_STACK_SIZE=0x1000 |
|||
CONFIG_IRQ_STACK_SIZE=0x1000 |
|||
CONFIG_ABORT_STACK_SIZE=0x1000 |
|||
CONFIG_FIQ_STACK_SIZE=0x1000 |
|||
CONFIG_UNDEF_STACK_SIZE=0x1000 |
|||
# end of Linker Options |
|||
|
|||
# |
|||
# Compiler Options |
|||
# |
|||
|
|||
# |
|||
# Cross-Compiler Setting |
|||
# |
|||
CONFIG_GCC_OPTIMIZE_LEVEL=0 |
|||
# CONFIG_USE_EXT_COMPILER is not set |
|||
# CONFIG_USE_KLIN_SYS is not set |
|||
# end of Cross-Compiler Setting |
|||
|
|||
CONFIG_OUTPUT_BINARY=y |
|||
# end of Compiler Options |
|||
# end of Building Option |
|||
|
|||
# |
|||
# Library Configuration |
|||
# |
|||
CONFIG_USE_NEW_LIBC=y |
|||
# end of Library Configuration |
|||
|
|||
# |
|||
# Third-Party Configuration |
|||
# |
|||
# CONFIG_USE_LWIP is not set |
|||
# CONFIG_USE_LETTER_SHELL is not set |
|||
# CONFIG_USE_AMP is not set |
|||
# CONFIG_USE_SDMMC_CMD is not set |
|||
# CONFIG_USE_YMODEM is not set |
|||
# CONFIG_USE_SFUD is not set |
|||
CONFIG_USE_BACKTRACE=y |
|||
# CONFIG_USE_FATFS_0_1_4 is not set |
|||
CONFIG_USE_TLSF=y |
|||
# CONFIG_USE_SPIFFS is not set |
|||
# CONFIG_USE_LITTLE_FS is not set |
|||
# CONFIG_USE_LVGL is not set |
|||
# CONFIG_USE_FREEMODBUS is not set |
|||
# end of Third-Party Configuration |
|||
|
|||
# |
|||
# PC Console Configuration |
|||
# |
|||
CONFIG_CONSOLE_PORT="/dev/ttyS3" |
|||
CONFIG_CONSOLE_YMODEM_RECV_DEST="./" |
|||
CONFIG_CONSOLE_BAUD_115200B=y |
|||
# CONFIG_CONSOLE_BAUD_230400B is not set |
|||
# CONFIG_CONSOLE_BAUD_921600B is not set |
|||
# CONFIG_CONSOLE_BAUD_2MB is not set |
|||
# CONFIG_CONSOLE_BAUD_OTHER is not set |
|||
CONFIG_CONSOLE_BAUD_OTHER_VAL=115200 |
|||
CONFIG_CONSOLE_BAUD=115200 |
|||
# CONFIG_CONSOLE_UPLOAD_TFTP is not set |
|||
CONFIG_CONSOLE_UPLOAD_YMODEM=y |
|||
CONFIG_CONSOLE_UPLOAD_DIR="/mnt/d/tftboot" |
|||
CONFIG_CONSOLE_UPLOAD_IMAGE_NAME="baremetal" |
|||
# end of PC Console Configuration |
@ -1,166 +0,0 @@ |
|||
|
|||
# |
|||
# Project Configuration |
|||
# |
|||
CONFIG_TARGET_NAME="e2000s_baremetal_a64" |
|||
# end of Project Configuration |
|||
|
|||
CONFIG_USE_BAREMETAL=y |
|||
|
|||
# |
|||
# Platform Setting |
|||
# |
|||
|
|||
# |
|||
# Arch Configuration |
|||
# |
|||
# CONFIG_TARGET_ARMV8_AARCH32 is not set |
|||
CONFIG_TARGET_ARMV8_AARCH64=y |
|||
CONFIG_USE_CACHE=y |
|||
CONFIG_USE_MMU=y |
|||
# CONFIG_USE_SYS_TICK is not set |
|||
# CONFIG_MMU_DEBUG_PRINTS is not set |
|||
# CONFIG_BOOT_WITH_FLUSH_CACHE is not set |
|||
# end of Arch Configuration |
|||
|
|||
# |
|||
# Board Configuration |
|||
# |
|||
# CONFIG_TARGET_F2000_4 is not set |
|||
# CONFIG_TARGET_D2000 is not set |
|||
# CONFIG_TARGET_E2000Q is not set |
|||
# CONFIG_TARGET_E2000D is not set |
|||
CONFIG_TARGET_E2000S=y |
|||
CONFIG_TARGET_E2000=y |
|||
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set |
|||
# end of Board Configuration |
|||
|
|||
# |
|||
# Components Configuration |
|||
# |
|||
# CONFIG_USE_SPI is not set |
|||
# CONFIG_USE_QSPI is not set |
|||
CONFIG_USE_GIC=y |
|||
CONFIG_ENABLE_GICV3=y |
|||
# CONFIG_USE_SERIAL is not set |
|||
# CONFIG_USE_GPIO is not set |
|||
# CONFIG_USE_ETH is not set |
|||
# CONFIG_USE_CAN is not set |
|||
# CONFIG_USE_I2C is not set |
|||
# CONFIG_USE_TIMER is not set |
|||
# CONFIG_USE_MIO is not set |
|||
# CONFIG_USE_SDMMC is not set |
|||
# CONFIG_USE_PCIE is not set |
|||
# CONFIG_USE_WDT is not set |
|||
# CONFIG_USE_DMA is not set |
|||
# CONFIG_USE_NAND is not set |
|||
# CONFIG_USE_RTC is not set |
|||
# CONFIG_USE_SATA is not set |
|||
# CONFIG_USE_USB is not set |
|||
CONFIG_USE_ADC=y |
|||
|
|||
# |
|||
# ADC Configuration |
|||
# |
|||
CONFIG_USE_FADC=y |
|||
# end of ADC Configuration |
|||
|
|||
# CONFIG_USE_PWM is not set |
|||
# CONFIG_USE_IPC is not set |
|||
# CONFIG_USE_MEDIA is not set |
|||
# CONFIG_USE_SCMI_MHU is not set |
|||
# end of Components Configuration |
|||
# end of Platform Setting |
|||
|
|||
# |
|||
# Building Option |
|||
# |
|||
# CONFIG_LOG_VERBOS is not set |
|||
# CONFIG_LOG_DEBUG is not set |
|||
# CONFIG_LOG_INFO is not set |
|||
# CONFIG_LOG_WARN is not set |
|||
CONFIG_LOG_ERROR=y |
|||
# CONFIG_LOG_NONE is not set |
|||
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y |
|||
CONFIG_INTERRUPT_ROLE_MASTER=y |
|||
# CONFIG_INTERRUPT_ROLE_SLAVE is not set |
|||
# CONFIG_LOG_EXTRA_INFO is not set |
|||
# CONFIG_LOG_DISPALY_CORE_NUM is not set |
|||
# CONFIG_BOOTUP_DEBUG_PRINTS is not set |
|||
|
|||
# |
|||
# Linker Options |
|||
# |
|||
# CONFIG_AARCH32_RAM_LD is not set |
|||
CONFIG_AARCH64_RAM_LD=y |
|||
# CONFIG_USER_DEFINED_LD is not set |
|||
CONFIG_LINK_SCRIPT_ROM=y |
|||
CONFIG_ROM_START_UP_ADDR=0x80100000 |
|||
CONFIG_ROM_SIZE_MB=1 |
|||
CONFIG_LINK_SCRIPT_RAM=y |
|||
CONFIG_RAM_START_UP_ADDR=0x81000000 |
|||
CONFIG_RAM_SIZE_MB=64 |
|||
CONFIG_HEAP_SIZE=2 |
|||
CONFIG_STACK_SIZE=0x400 |
|||
CONFIG_FPU_STACK_SIZE=0x1000 |
|||
# end of Linker Options |
|||
|
|||
# |
|||
# Compiler Options |
|||
# |
|||
|
|||
# |
|||
# Cross-Compiler Setting |
|||
# |
|||
CONFIG_GCC_OPTIMIZE_LEVEL=0 |
|||
# CONFIG_USE_EXT_COMPILER is not set |
|||
# CONFIG_USE_KLIN_SYS is not set |
|||
# end of Cross-Compiler Setting |
|||
|
|||
CONFIG_OUTPUT_BINARY=y |
|||
# end of Compiler Options |
|||
# end of Building Option |
|||
|
|||
# |
|||
# Library Configuration |
|||
# |
|||
CONFIG_USE_NEW_LIBC=y |
|||
# end of Library Configuration |
|||
|
|||
# |
|||
# Third-Party Configuration |
|||
# |
|||
# CONFIG_USE_LWIP is not set |
|||
# CONFIG_USE_LETTER_SHELL is not set |
|||
# CONFIG_USE_AMP is not set |
|||
# CONFIG_USE_SDMMC_CMD is not set |
|||
# CONFIG_USE_YMODEM is not set |
|||
# CONFIG_USE_SFUD is not set |
|||
CONFIG_USE_BACKTRACE=y |
|||
# CONFIG_USE_FATFS_0_1_4 is not set |
|||
CONFIG_USE_TLSF=y |
|||
# CONFIG_USE_SPIFFS is not set |
|||
# CONFIG_USE_LITTLE_FS is not set |
|||
# CONFIG_USE_LVGL is not set |
|||
# CONFIG_USE_FREEMODBUS is not set |
|||
# end of Third-Party Configuration |
|||
|
|||
# |
|||
# PC Console Configuration |
|||
# |
|||
CONFIG_CONSOLE_PORT="/dev/ttyS3" |
|||
CONFIG_CONSOLE_YMODEM_RECV_DEST="./" |
|||
CONFIG_CONSOLE_BAUD_115200B=y |
|||
# CONFIG_CONSOLE_BAUD_230400B is not set |
|||
# CONFIG_CONSOLE_BAUD_921600B is not set |
|||
# CONFIG_CONSOLE_BAUD_2MB is not set |
|||
# CONFIG_CONSOLE_BAUD_OTHER is not set |
|||
CONFIG_CONSOLE_BAUD_OTHER_VAL=115200 |
|||
CONFIG_CONSOLE_BAUD=115200 |
|||
# CONFIG_CONSOLE_UPLOAD_TFTP is not set |
|||
CONFIG_CONSOLE_UPLOAD_YMODEM=y |
|||
CONFIG_CONSOLE_UPLOAD_DIR="/mnt/d/tftboot" |
|||
CONFIG_CONSOLE_UPLOAD_IMAGE_NAME="baremetal" |
|||
# end of PC Console Configuration |
@ -1,89 +0,0 @@ |
|||
/*
|
|||
* Copyright : (C) 2022 Phytium Information Technology, Inc. |
|||
* All Rights Reserved. |
|||
* |
|||
* This program is OPEN SOURCE software: you can redistribute it and/or modify it |
|||
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, |
|||
* either version 1.0 of the License, or (at your option) any later version. |
|||
* |
|||
* This program 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 Phytium Public License for more details. |
|||
* |
|||
* |
|||
* FilePath: timer.c |
|||
* Date: 2022-08-23 09:17:20 |
|||
* LastEditTime: 2022-08-23 09:17:20 |
|||
* Description: This file is for provide the timer for test |
|||
* |
|||
* Modify History: |
|||
* Ver Who Date Changes |
|||
* ----- ------ -------- -------------------------------------- |
|||
* 1.0 Wangzq 2022/12/20 Modify the format and establish the version |
|||
*/ |
|||
|
|||
/***************************** Include Files *********************************/ |
|||
|
|||
#include "fgeneric_timer.h" |
|||
#include "finterrupt.h" |
|||
#include "ftypes.h" |
|||
#include "fparameters.h" |
|||
#include "lv_port_disp.h" |
|||
|
|||
/************************** Variable Definitions *****************************/ |
|||
#ifdef __aarch64__ |
|||
volatile u64 timer_hz = 1000; |
|||
#else |
|||
volatile u32 timer_hz = 1000; |
|||
#endif |
|||
|
|||
/************************** Function Prototypes ******************************/ |
|||
static void GenericTimerIrq(s32 vector, void *param) |
|||
{ |
|||
|
|||
lv_tick_inc(1); |
|||
GenericTimerCompare(GenericTimerFrequecy() / timer_hz); |
|||
} |
|||
|
|||
static void TimerSetup(void) |
|||
{ |
|||
u32 cntFrq; |
|||
|
|||
/* disable timer and get system frequency */ |
|||
GenericTimerStop(); |
|||
cntFrq = GenericTimerFrequecy(); |
|||
|
|||
/* set tick rate */ |
|||
GenericTimerCompare(cntFrq / timer_hz); |
|||
GenericTimerInterruptEnable(); |
|||
} |
|||
|
|||
static void TimerSetupInterrupts(void) |
|||
{ |
|||
/* set generic timer intrrupt */ |
|||
InterruptSetPriority(GENERIC_TIMER_NS_IRQ_NUM, 0); |
|||
|
|||
/* install tick handler */ |
|||
InterruptInstall(GENERIC_TIMER_NS_IRQ_NUM, GenericTimerIrq, |
|||
(void *)timer_hz, "GenericTimerTick"); |
|||
} |
|||
|
|||
void TimerInit(void) |
|||
{ |
|||
TimerSetup(); |
|||
TimerSetupInterrupts(); |
|||
} |
|||
|
|||
void TimerEnable(void) |
|||
{ |
|||
/* enable intrrupt */ |
|||
InterruptUmask(GENERIC_TIMER_NS_IRQ_NUM); |
|||
GenericTimerStart(); |
|||
} |
|||
|
|||
void TimerDisable(void) |
|||
{ |
|||
/* enable intrrupt */ |
|||
InterruptMask(GENERIC_TIMER_NS_IRQ_NUM); |
|||
GenericTimerStop(); |
|||
} |
@ -1,19 +0,0 @@ |
|||
/*
|
|||
* SPDX-License-Identifier: BSD-3-Clause |
|||
*/ |
|||
|
|||
#ifndef RPMSG_ECHO_H |
|||
#define RPMSG_ECHO_H |
|||
|
|||
#ifdef __cplusplus |
|||
extern "C" |
|||
{ |
|||
#endif |
|||
|
|||
#define RPMSG_SERVICE_NAME "rpmsg-openamp-demo-channel" |
|||
|
|||
#ifdef __cplusplus |
|||
} |
|||
#endif |
|||
|
|||
#endif /* RPMSG_ECHO_H */ |