mirror of
https://github.com/apache/nuttx.git
synced 2026-09-28 15:54:57 +08:00
boards/arm/am67: Add support for t3-gem-o1 board.
This commit introduces basic support for the T3 Gemstone O1 (t3-gem-o1) development board, including board configuration, linker scripts, and drivers for NSH. Currently only UART console is supported. All necessary files and configurations are added to enable building and running NuttX on this TI AM67-based board. Co-authored-by: Emre Cecanpunar <emreleno@gmail.com> Co-authored-by: Abdullah Türkmen <abdullahturkmen@protonmail.com> Co-authored-by: Muhammet Onur Bayraktar <mobayraktar@t3gemstone.org> Co-authored-by: Bayram Akay <bakay@t3gemstone.org> Co-authored-by: Nazmi Aras <nazmi.aras@t3gemstone.org> Signed-off-by: Erkan Vatan <evatan@t3gemstone.org>
This commit is contained in:
committed by
Alin Jerpelea
co-authored by
Emre Cecanpunar
Abdullah Türkmen
Muhammet Onur Bayraktar
Bayram Akay
Nazmi Aras
parent
94f094cbfe
commit
9bb24d43ce
@@ -29,6 +29,8 @@
|
||||
#include <nuttx/irq.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <arch/barriers.h>
|
||||
|
||||
#include "arm_internal.h"
|
||||
#include "irq/irq.h"
|
||||
|
||||
@@ -71,8 +73,6 @@ static void intr_set_irq_pri(uint32_t int_num, uint32_t priority);
|
||||
static uint32_t intr_get_irq_vec_addr(void);
|
||||
static void intr_set_irq_vec_addr(uint32_t int_num, uintptr_t vec_addr);
|
||||
|
||||
static void utils_data_and_instruction_barrier(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
@@ -185,33 +185,6 @@ static void intr_set_irq_vec_addr(uint32_t int_num, uintptr_t vec_addr)
|
||||
INTRC_BASE_ADDR + VIM_INT_VEC(int_num));
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: utils_data_and_instruction_barrier
|
||||
*
|
||||
* Description:
|
||||
* Enforces CPU memory ordering by executing an Instruction Synchronization
|
||||
* Barrier (ISB) followed by a Data Synchronization Barrier (DSB),
|
||||
* ensuring all previous instructions complete and memory accesses are
|
||||
* synchronized before continuing execution.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void utils_data_and_instruction_barrier(void)
|
||||
{
|
||||
__asm__ __volatile__(
|
||||
" isb"
|
||||
"\n\t"
|
||||
:
|
||||
:
|
||||
: "memory");
|
||||
__asm__ __volatile__(
|
||||
" dsb"
|
||||
"\n\t"
|
||||
:
|
||||
:
|
||||
: "memory");
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
@@ -236,7 +209,7 @@ void up_enable_irq(int int_num)
|
||||
{
|
||||
uint32_t bit_pos;
|
||||
|
||||
utils_data_and_instruction_barrier();
|
||||
UP_MB();
|
||||
|
||||
bit_pos = VIM_BIT_POS(int_num);
|
||||
|
||||
@@ -261,7 +234,7 @@ void up_disable_irq(int int_num)
|
||||
putreg32(((uint32_t)0x1 << bit_pos),
|
||||
INTRC_BASE_ADDR + VIM_INT_DIS(int_num));
|
||||
|
||||
utils_data_and_instruction_barrier();
|
||||
UP_MB();
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
|
||||
#define AM67_DDR_SIZE (2ul * 1024 * 1024 * 1024)
|
||||
|
||||
#define AM67_SCTLR_BG_REGION_EN (1 << 17)
|
||||
|
||||
/* REGISTER_REGION
|
||||
* Not Cacheable
|
||||
* Not Bufferable
|
||||
@@ -135,7 +137,7 @@
|
||||
static inline void am67_mpu_disable_br(void)
|
||||
{
|
||||
unsigned int sctlr = cp15_rdsctlr();
|
||||
sctlr &= ~(1 << 17); /* Clear bit 17 (disable background region) */
|
||||
sctlr &= ~AM67_SCTLR_BG_REGION_EN; /* Clear bit 17 (disable background region) */
|
||||
cp15_wrsctlr(sctlr);
|
||||
}
|
||||
|
||||
|
||||
@@ -397,7 +397,7 @@ int timer_tick_isr(int irq, void *context, void *arg)
|
||||
am67_timer_clear_overflow_int(AM67_DMTIMER1_1MS_TIMER0_VADDR);
|
||||
|
||||
nxsched_process_timer();
|
||||
return 0;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@@ -441,8 +441,8 @@ int up_timer_gettime(struct timespec *ts)
|
||||
|
||||
internal_timer = am67_timer_get_count(AM67_DMTIMER1_1MS_TIMER0_VADDR);
|
||||
|
||||
ts->tv_nsec = internal_timer * 1000000;
|
||||
ts->tv_sec = internal_timer / 1000;
|
||||
ts->tv_nsec = (uint32_t)(internal_timer * 1000000);
|
||||
ts->tv_sec = (uint32_t)(internal_timer / 1000);
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -457,8 +457,9 @@ int up_timer_gettime(struct timespec *ts)
|
||||
|
||||
int up_timer_start(struct timespec const *ts)
|
||||
{
|
||||
DEBUGASSERT(ts != NULL);
|
||||
am67_timer_start(AM67_DMTIMER1_1MS_TIMER0_VADDR);
|
||||
return 0;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@@ -471,8 +472,9 @@ int up_timer_start(struct timespec const *ts)
|
||||
|
||||
int up_timer_cancel(struct timespec *ts)
|
||||
{
|
||||
DEBUGASSERT(ts != NULL);
|
||||
am67_timer_stop(AM67_DMTIMER1_1MS_TIMER0_VADDR);
|
||||
return 0;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -1665,6 +1665,12 @@ config ARCH_BOARD_BEAGLEBONE_BLACK
|
||||
---help---
|
||||
This is the port of NuttX to the TI Beaglebone Black board.
|
||||
|
||||
config ARCH_BOARD_T3_GEM_O1
|
||||
bool "T3 Gemstone O1"
|
||||
depends on ARCH_CHIP_AM67
|
||||
---help---
|
||||
This is the port of NuttX to the T3 Gemstone O1 board.
|
||||
|
||||
config ARCH_BOARD_PIC32MX_STARTERKIT
|
||||
bool "Microchip PIC32MX Ethernet Starter Kit (DM320004)"
|
||||
depends on ARCH_CHIP_PIC32MX795F512L
|
||||
@@ -3956,6 +3962,7 @@ config ARCH_BOARD
|
||||
default "stm32vldiscovery" if ARCH_BOARD_STM32VL_DISCOVERY
|
||||
default "mikroe-stm32f4" if ARCH_BOARD_MIKROE_STM32F4
|
||||
default "sure-pic32mx" if ARCH_BOARD_SUREPIC32MX
|
||||
default "t3-gem-o1" if ARCH_BOARD_T3_GEM_O1
|
||||
default "teensy-2.0" if ARCH_BOARD_TEENSY_20
|
||||
default "teensy-3.x" if ARCH_BOARD_TEENSY_3X
|
||||
default "teensy-4.x" if ARCH_BOARD_TEENSY_4X
|
||||
@@ -4047,6 +4054,9 @@ endif
|
||||
if ARCH_BOARD_BEAGLEBONE_BLACK
|
||||
source "boards/arm/am335x/beaglebone-black/Kconfig"
|
||||
endif
|
||||
if ARCH_BOARD_T3_GEM_O1
|
||||
source "boards/arm/am67/t3-gem-o1/Kconfig"
|
||||
endif
|
||||
if ARCH_BOARD_C5471EVM
|
||||
source "boards/arm/c5471/c5471evm/Kconfig"
|
||||
endif
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/am67/t3-gem-o1/CMakeLists.txt
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy of
|
||||
# the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations under
|
||||
# the License.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
add_subdirectory(src)
|
||||
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||
#
|
||||
|
||||
if ARCH_BOARD_T3_GEM_O1
|
||||
|
||||
endif
|
||||
@@ -0,0 +1,49 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_ARMV7R_HAVE_GICv2 is not set
|
||||
CONFIG_16550_ADDRWIDTH=32
|
||||
CONFIG_16550_REGWIDTH=32
|
||||
CONFIG_16550_UART0=y
|
||||
CONFIG_16550_UART0_BASE=0x2810000
|
||||
CONFIG_16550_UART0_CLOCK=48000000
|
||||
CONFIG_16550_UART0_IRQ=211
|
||||
CONFIG_16550_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_16550_UART=y
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="t3-gem-o1"
|
||||
CONFIG_ARCH_BOARD_T3_GEM_O1=y
|
||||
CONFIG_ARCH_CHIP="am67"
|
||||
CONFIG_ARCH_CHIP_AM67=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=4096
|
||||
CONFIG_ARCH_LOWVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARM_MPU=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=2813
|
||||
CONFIG_BOOT_RUNFROMISRAM=y
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_LIBC_ARCH_ATOMIC=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_PSEUDOFS_ATTRIBUTES=y
|
||||
CONFIG_PSEUDOFS_FILE=y
|
||||
CONFIG_PSEUDOFS_SOFTLINKS=y
|
||||
CONFIG_RAM_SIZE=14680064
|
||||
CONFIG_RAM_START=0xA2200000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RPTUN=y
|
||||
CONFIG_SCHED_CHILD_STATUS=y
|
||||
CONFIG_SCHED_HAVE_PARENT=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SIG_DEFAULT=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
@@ -0,0 +1,41 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/am67/t3-gem-o1/include/board.h
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_AM67_T3_GEM_O1_INCLUDE_BOARD_H
|
||||
#define __BOARDS_ARM_AM67_T3_GEM_O1_INCLUDE_BOARD_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Assembly Language Macros
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
.macro config_sdram
|
||||
.endm
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __BOARDS_ARM_AM67_T3_GEM_O1_INCLUDE_BOARD_H */
|
||||
@@ -0,0 +1,42 @@
|
||||
############################################################################
|
||||
# boards/arm/am67/t3-gem-o1/scripts/Make.defs
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership. The
|
||||
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance with the
|
||||
# License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include $(TOPDIR)/.config
|
||||
include $(TOPDIR)/tools/Config.mk
|
||||
include $(TOPDIR)/arch/arm/src/armv7-r/Toolchain.defs
|
||||
|
||||
LDSCRIPT = sdram.ld
|
||||
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
|
||||
|
||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 -ffixed-r10
|
||||
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
|
||||
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
|
||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
|
||||
AFLAGS := $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
# NXFLAT module definitions
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)$(DELIM)binfmt$(DELIM)libnxflat$(DELIM)gnu-nxflat-pcrel.ld -no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
@@ -0,0 +1,172 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/am67a/t3-gem-o1/scripts/sdram.ld
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
atcm (rwx): ORIGIN = 0x00000000, LENGTH = 32K /* Instruction TCM for vectors/boot code */
|
||||
btcm (rwx): ORIGIN = 0x41010000, LENGTH = 32K /* Data TCM, ideal for stack */
|
||||
ddr_rsctable (rwx): ORIGIN = 0xA2100000, LENGTH = 1K /* Resource Table for RemoteProc/IPC */
|
||||
ddr (rwx): ORIGIN = 0xA2200000, LENGTH = 0xE00000 /* Main DDR RAM */
|
||||
}
|
||||
|
||||
EXTERN(_vector_start)
|
||||
ENTRY(_vector_start)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.vectors :
|
||||
{
|
||||
_stext = ABSOLUTE(.);
|
||||
KEEP(*(.vectors))
|
||||
KEEP(*arm_head*.o*(.text))
|
||||
KEEP(*(.text.arm_boot))
|
||||
KEEP(*(.text.am67_mpu_init))
|
||||
KEEP(*(.text.mpu_control))
|
||||
KEEP(*(.text.cp15_rdsctlr))
|
||||
KEEP(*(.text.am67_mpu_reset))
|
||||
KEEP(*(.text.mpu_set_region_zero))
|
||||
KEEP(*(.text.am67_mpu_disable_br))
|
||||
KEEP(*(.text.mpu_configure_region))
|
||||
KEEP(*(.text.mpu_allocregion))
|
||||
KEEP(*(.text.mpu_modify_region))
|
||||
KEEP(*(.text.mpu_set_rgnr))
|
||||
KEEP(*(.text.mpu_set_drbar))
|
||||
KEEP(*(.text.mpu_log2regionceil))
|
||||
KEEP(*(.text.mpu_subregion))
|
||||
KEEP(*(.text.mpu_subregion_ms))
|
||||
KEEP(*(.text.mpu_subregion_ls))
|
||||
KEEP(*(.text.mpu_set_drsr))
|
||||
KEEP(*(.text.mpu_set_dracr))
|
||||
KEEP(*(.text.cp15_wrsctlr))
|
||||
KEEP(*(.text.nx_start))
|
||||
KEEP(*(.tick_timer))
|
||||
KEEP(*(.text.nxsched_process_timer))
|
||||
KEEP(*(.text.clock_timer))
|
||||
KEEP(*(.text.wd_timer))
|
||||
KEEP(*(.text.clock_systime_ticks))
|
||||
} > atcm
|
||||
|
||||
.resource_table :
|
||||
{
|
||||
KEEP(*(.resource_table))
|
||||
. = ALIGN(1024);
|
||||
} > ddr_rsctable
|
||||
|
||||
.text :
|
||||
{
|
||||
*(.text .text.*)
|
||||
*(.fixup)
|
||||
*(.gnu.warning)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
*(.gcc_except_table)
|
||||
} > ddr
|
||||
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata .rodata.*)
|
||||
*(.gnu.linkonce.r.*)
|
||||
*(.got)
|
||||
} > ddr
|
||||
|
||||
.ARM.extab :
|
||||
{
|
||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||
} > ddr
|
||||
|
||||
.ARM.exidx :
|
||||
{
|
||||
__exidx_start = .;
|
||||
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||
__exidx_end = .;
|
||||
} > ddr
|
||||
|
||||
_etext = ABSOLUTE(.); /* End of code/read-only sections */
|
||||
_sidata = _etext; /* Start of initial values for .data (LMA) */
|
||||
|
||||
.init_section :
|
||||
{
|
||||
_sinit = ABSOLUTE(.);
|
||||
KEEP(*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
|
||||
KEEP(*(.init_array EXCLUDE_FILE(*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o) .ctors))
|
||||
_einit = ABSOLUTE(.);
|
||||
} > ddr
|
||||
|
||||
.data : AT ( _sidata )
|
||||
{
|
||||
_sdata = ABSOLUTE(.);
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
CONSTRUCTORS
|
||||
. = ALIGN(4);
|
||||
_edata = ABSOLUTE(.);
|
||||
} > ddr
|
||||
|
||||
.noinit (NOLOAD) :
|
||||
{
|
||||
_snoinit = ABSOLUTE(.);
|
||||
*(.noinit*)
|
||||
_enoinit = ABSOLUTE(.);
|
||||
} > ddr
|
||||
|
||||
.bss (NOLOAD) :
|
||||
{
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.bss .bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > ddr
|
||||
|
||||
.heap (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
_sheap = ABSOLUTE(.);
|
||||
_end = _sheap;
|
||||
. = . + 64K;
|
||||
_eheap = ABSOLUTE(.);
|
||||
} > ddr
|
||||
|
||||
.stack (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
_sstack = ABSOLUTE(.);
|
||||
. = . + 8K;
|
||||
_estack = ABSOLUTE(.);
|
||||
} > btcm
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_info 0 : { *(.debug_info) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/am67/t3-gem-o1/src/CMakeLists.txt
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy of
|
||||
# the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations under
|
||||
# the License.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
set(SRCS am67_bringup.c am67_appinit.c)
|
||||
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/sdram.ld")
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
@@ -0,0 +1,27 @@
|
||||
############################################################################
|
||||
# boards/arm/am67/t3-gem-o1/src/Makefile
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership. The
|
||||
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance with the
|
||||
# License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include $(TOPDIR)/Make.defs
|
||||
|
||||
CSRCS = am67_bringup.c am67_appinit.c
|
||||
|
||||
include $(TOPDIR)/boards/Board.mk
|
||||
@@ -0,0 +1,80 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/am67/t3-gem-o1/src/am67_appinit.c
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "t3-gem-o1.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_app_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform application specific initialization. This function is never
|
||||
* called directly from application code, but only indirectly via the
|
||||
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
|
||||
*
|
||||
* Input Parameters:
|
||||
* arg - The boardctl() argument is passed to the board_app_initialize()
|
||||
* implementation without modification. The argument has no
|
||||
* meaning to NuttX; the meaning of the argument is a contract
|
||||
* between the board-specific initialization logic and the
|
||||
* matching application logic. The value could be such things as a
|
||||
* mode enumeration value, a set of DIP switch switch settings, a
|
||||
* pointer to configuration data read from a file or serial FLASH,
|
||||
* or whatever you would like to do with it. Every implementation
|
||||
* should accept zero/NULL as a default configuration.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success; a negated errno value is returned on
|
||||
* any failure to indicate the nature of the failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int board_app_initialize(uintptr_t arg)
|
||||
{
|
||||
#ifdef CONFIG_BOARD_LATE_INITIALIZE
|
||||
/* Board initialization already performed by board_late_initialize() */
|
||||
|
||||
return OK;
|
||||
#else
|
||||
/* Perform board-specific initialization */
|
||||
|
||||
return am67_bringup();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BOARD_LATE_INITIALIZE
|
||||
void board_late_initialize(void)
|
||||
{
|
||||
am67_bringup();
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,66 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/am67/t3-gem-o1/src/am67_bringup.c
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "t3-gem-o1.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: am67_bringup
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture-specific initialization.
|
||||
*
|
||||
* CONFIG_BOARD_LATE_INITIALIZE=y :
|
||||
* Called from board_late_initialize().
|
||||
*
|
||||
* CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y :
|
||||
* Called from the NSH library.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int am67_bringup(void)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/am67/t3-gem-o1/src/t3-gem-o1.h
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_T3_GEM_O1_SRC_T3_GEM_O1_H
|
||||
#define __BOARDS_ARM_T3_GEM_O1_SRC_T3_GEM_O1_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: am67_bringup
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture-specific initialization
|
||||
*
|
||||
* CONFIG_BOARD_LATE_INITIALIZE=y :
|
||||
* Called from board_late_initialize().
|
||||
*
|
||||
* CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y :
|
||||
* Called from the NSH library
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int am67_bringup(void);
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_ARM_T3_GEM_O1_SRC_T3_GEM_O1_H */
|
||||
Reference in New Issue
Block a user