forked from nuttx/nuttx-update
arm64/imx9: Add board for imx93-evk
Adds board definition for imx93-evk board - Support for the Cortex-A55 core in i.MX93, support for the Cortex-M33 core is _not_ provided - "nsh" profile is provided, this includes a minimalistic feature set which boots the SoM to nsh console - A bootloader is required, u-boot has been tested
This commit is contained in:
parent
46bd210ae4
commit
a7713af0ef
15 changed files with 905 additions and 0 deletions
145
Documentation/platforms/arm64/imx9/boards/imx93-evk/README.txt
Normal file
145
Documentation/platforms/arm64/imx9/boards/imx93-evk/README.txt
Normal file
|
@ -0,0 +1,145 @@
|
|||
README.txt
|
||||
==========
|
||||
|
||||
The kit i.MX93 Evaluation Kit has a pre-installed Linux image which contains
|
||||
u-boot and the i.MX93 reference Linux installation.
|
||||
|
||||
u-boot is required to boot NuttX (for now) as it initializes the hardware for
|
||||
us, i.e. DDR, clocks, I/O muxes etc.
|
||||
|
||||
==========================================
|
||||
|
||||
How to run nuttx on i.MX93 Evaluation Kit.
|
||||
|
||||
==========================================
|
||||
|
||||
Below is a set of instructions on how to run NuttX on the i.MX93 EVK
|
||||
|
||||
==========================================
|
||||
|
||||
Pre-requisites
|
||||
|
||||
==========================================
|
||||
|
||||
- imx93_ca55.JLinkScript which is a custom file, put it wherever you want
|
||||
|
||||
==========================================
|
||||
|
||||
U-Boot configuration
|
||||
|
||||
==========================================
|
||||
|
||||
Two things need to be configured on u-boot before NuttX can be loaded:
|
||||
|
||||
- u-boot data cache must be turned off
|
||||
- u-boot must stop to the u-boot console, i.e. the Linux payload must not be loaded
|
||||
|
||||
Manual option:
|
||||
|
||||
1. Disable u-boot autostart (needs to be done only once):
|
||||
|
||||
Hit any key to stop autoboot: 0
|
||||
u-boot=> setenv bootdelay -1
|
||||
u-boot=> saveenv
|
||||
Saving Environment to MMC... Writing to MMC(0)... OK
|
||||
u-boot=> reset
|
||||
|
||||
2. On every boot, the data cache must be disabled for options 2 and 3 to work
|
||||
|
||||
u-boot=> dcache off
|
||||
|
||||
Automated option:
|
||||
|
||||
1. Replace the default bootcmd to disable dcache automatically:
|
||||
|
||||
u-boot=> setenv bootcmd dcache off
|
||||
u-boot=> saveenv
|
||||
Saving Environment to MMC... Writing to MMC(0)... OK
|
||||
u-boot=> reset
|
||||
|
||||
To restore the default bootcmd which starts Linux automatically:
|
||||
|
||||
u-boot=> setenv bootcmd run distro_bootcmd;run bsp_bootcmd
|
||||
u-boot=> saveenv
|
||||
Saving Environment to MMC... Writing to MMC(0)... OK
|
||||
u-boot=> reset
|
||||
|
||||
The default bootcmd is:
|
||||
|
||||
u-boot=> env print bootcmd
|
||||
bootcmd=run distro_bootcmd;run bsp_bootcmd
|
||||
|
||||
==========================================
|
||||
|
||||
Loading and running the NuttX image
|
||||
|
||||
==========================================
|
||||
|
||||
You have three options:
|
||||
|
||||
1 - Load via u-boot from SD-card
|
||||
2 - Load via gdb
|
||||
3 - Load via JLink
|
||||
|
||||
==========================================
|
||||
|
||||
Option 1: load via u-boot from SD-card:
|
||||
|
||||
==========================================
|
||||
|
||||
1. Build nuttx, and move nuttx.bin to SD-card
|
||||
|
||||
2. Load from SD-card and start nuttx payload
|
||||
|
||||
u-boot=> dcache off; fatload mmc 1 0x80000000 nuttx.bin; go 0x80000000
|
||||
|
||||
==========================================
|
||||
|
||||
Option 2: start via gdb:
|
||||
|
||||
==========================================
|
||||
|
||||
1. Start JLinkGDBServer
|
||||
|
||||
JLinkGDBServer -device CORTEX-A55 -JLinkScriptFile <path_to>/imx93_ca55.JLinkScript
|
||||
|
||||
2. Start gdb
|
||||
|
||||
$ aarch64-none-elf-gdb
|
||||
|
||||
2.1 Attach and load nuttx
|
||||
|
||||
(gdb) target remote localhost:2331
|
||||
(gdb) set mem inaccessible-by-default off
|
||||
(gdb) load <path_to>/nuttx
|
||||
(gdb) monitor go
|
||||
|
||||
==========================================
|
||||
|
||||
Option 3: load with JLink:
|
||||
|
||||
==========================================
|
||||
|
||||
1. Start JLink
|
||||
|
||||
$ JLinkExe -device CORTEX-A55 -if JTAG -jtagconf -1,-1 -speed 4000 -JLinkScriptFile <path_to>/imx93_ca55.JLinkScript
|
||||
|
||||
1.1 Add -AutoConnect 1 to connect automatically
|
||||
|
||||
$ JLinkExe -device CORTEX-A55 -if JTAG -jtagconf -1,-1 -speed 4000 -JLinkScriptFile <path_to>/imx93_ca55.JLinkScript -AutoConnect 1
|
||||
|
||||
2. Connect JLink
|
||||
|
||||
2.1 Connect to the debugger
|
||||
|
||||
Type "connect" to establish a target connection, '?' for help
|
||||
J-Link>connect
|
||||
|
||||
You should now have a JLink prompt.
|
||||
|
||||
Cortex-A55 identified.
|
||||
J-Link>
|
||||
|
||||
3. Load nuttx. Note that JLink expects the .elf extension, the default build output of nuttx is just "nuttx" without the extension, so it must be added to the file...
|
||||
|
||||
J-Link>LoadFile <path_to>/nuttx.elf
|
|
@ -0,0 +1,6 @@
|
|||
==========
|
||||
imx93-evk
|
||||
==========
|
||||
|
||||
.. include:: README.txt
|
||||
:literal:
|
12
Documentation/platforms/arm64/imx9/index.rst
Normal file
12
Documentation/platforms/arm64/imx9/index.rst
Normal file
|
@ -0,0 +1,12 @@
|
|||
=========
|
||||
NXP i.MX9
|
||||
=========
|
||||
|
||||
Supported Boards
|
||||
================
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
:maxdepth: 1
|
||||
|
||||
boards/*/*
|
|
@ -2119,6 +2119,14 @@ config ARCH_BOARD_IMX8QM_MEK
|
|||
This options selects support for NuttX on the NXP i.MX8 QuadMax CPUs MEK
|
||||
configure board with ARM Cortex-A53.
|
||||
|
||||
config ARCH_BOARD_IMX93_EVK
|
||||
bool "NXP i.MX93 CPUs EVK board"
|
||||
depends on ARCH_CHIP_IMX93
|
||||
select ARCH_HAVE_IRQBUTTONS
|
||||
---help---
|
||||
This options selects support for NuttX on the NXP i.MX93 CPUs EVK
|
||||
board with ARM Cortex-A55.
|
||||
|
||||
config ARCH_BOARD_SAMA5D2_XULT
|
||||
bool "Atmel SAMA5D2 Xplained Ultra development board"
|
||||
depends on ARCH_CHIP_ATSAMA5D27
|
||||
|
@ -3306,6 +3314,7 @@ config ARCH_BOARD
|
|||
default "fvp-armv8r" if ARCH_BOARD_FVP_ARMV8R
|
||||
default "fvp-armv8r-aarch32" if ARCH_BOARD_FVP_ARMV8R_AARCH32
|
||||
default "imx8qm-mek" if ARCH_BOARD_IMX8QM_MEK
|
||||
default "imx93-evk" if ARCH_BOARD_IMX93_EVK
|
||||
default "sama5d2-xult" if ARCH_BOARD_SAMA5D2_XULT
|
||||
default "giant-board" if ARCH_BOARD_GIANT_BOARD
|
||||
default "jupiter-nano" if ARCH_BOARD_JUPITER_NANO
|
||||
|
@ -3524,6 +3533,9 @@ endif
|
|||
if ARCH_BOARD_IMX8QM_MEK
|
||||
source "boards/arm64/imx8/imx8qm-mek/Kconfig"
|
||||
endif
|
||||
if ARCH_BOARD_IMX93_EVK
|
||||
source "boards/arm64/imx9/imx93-evk/Kconfig"
|
||||
endif
|
||||
if ARCH_BOARD_IMXRT1020_EVK
|
||||
source "boards/arm/imxrt/imxrt1020-evk/Kconfig"
|
||||
endif
|
||||
|
|
7
boards/arm64/imx9/imx93-evk/Kconfig
Normal file
7
boards/arm64/imx9/imx93-evk/Kconfig
Normal file
|
@ -0,0 +1,7 @@
|
|||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||
#
|
||||
|
||||
if ARCH_BOARD_IMX9QM_MEK
|
||||
endif
|
61
boards/arm64/imx9/imx93-evk/configs/nsh/defconfig
Normal file
61
boards/arm64/imx9/imx93-evk/configs/nsh/defconfig
Normal file
|
@ -0,0 +1,61 @@
|
|||
#
|
||||
# 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_ARCH="arm64"
|
||||
CONFIG_ARCH_ARM64=y
|
||||
CONFIG_ARCH_BOARD="imx93-evk"
|
||||
CONFIG_ARCH_BOARD_IMX93_EVK=y
|
||||
CONFIG_ARCH_CHIP="imx9"
|
||||
CONFIG_ARCH_CHIP_IMX93=y
|
||||
CONFIG_ARCH_CHIP_IMX9=y
|
||||
CONFIG_ARCH_EARLY_PRINT=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=4096
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_ASSERTIONS=y
|
||||
CONFIG_DEBUG_FEATURES=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SCHED=y
|
||||
CONFIG_DEBUG_SCHED_ERROR=y
|
||||
CONFIG_DEBUG_SCHED_INFO=y
|
||||
CONFIG_DEBUG_SCHED_WARN=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DEFAULT_TASK_STACKSIZE=8192
|
||||
CONFIG_DEV_ZERO=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_ROMFS=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=8192
|
||||
CONFIG_IMX9_UART1=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_PREALLOC_TIMERS=4
|
||||
CONFIG_RAMLOG=y
|
||||
CONFIG_RAM_SIZE=134217728
|
||||
CONFIG_RAM_START=0x80000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_HPWORKPRIORITY=192
|
||||
CONFIG_SPINLOCK=y
|
||||
CONFIG_STACK_COLORATION=y
|
||||
CONFIG_START_MONTH=3
|
||||
CONFIG_START_YEAR=2022
|
||||
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_SYSTEM=y
|
||||
CONFIG_SYSTEM_TIME64=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART1_SERIAL_CONSOLE=y
|
59
boards/arm64/imx9/imx93-evk/include/board.h
Normal file
59
boards/arm64/imx9/imx93-evk/include/board.h
Normal file
|
@ -0,0 +1,59 @@
|
|||
/****************************************************************************
|
||||
* boards/arm64/imx9/imx93-evk/include/board.h
|
||||
*
|
||||
* 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_ARM64_IMX9_IMX93_EVK_INCLUDE_BOARD_H
|
||||
#define __BOARDS_ARM64_IMX9_IMX93_EVK_INCLUDE_BOARD_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_ARM64_IMX9_IMX93_EVK_INCLUDE_BOARD_H */
|
59
boards/arm64/imx9/imx93-evk/include/board_memorymap.h
Normal file
59
boards/arm64/imx9/imx93-evk/include/board_memorymap.h
Normal file
|
@ -0,0 +1,59 @@
|
|||
/****************************************************************************
|
||||
* boards/arm64/imx9/imx93-evk/include/board_memorymap.h
|
||||
*
|
||||
* 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_ARM64_IMX9_IMX93_EVK_INCLUDE_BOARD_MEMORYMAP_H
|
||||
#define __BOARDS_ARM64_IMX9_IMX93_EVK_INCLUDE_BOARD_MEMORYMAP_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_ARM64_IMX9_IMX93_EVK_INCLUDE_BOARD_MEMORYMAP_H */
|
48
boards/arm64/imx9/imx93-evk/scripts/Make.defs
Normal file
48
boards/arm64/imx9/imx93-evk/scripts/Make.defs
Normal file
|
@ -0,0 +1,48 @@
|
|||
############################################################################
|
||||
# boards/arm64/imx9/imx93-evk/scripts/Make.defs
|
||||
#
|
||||
# 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/arm64/src/Toolchain.defs
|
||||
|
||||
LDSCRIPT = dramboot.ld
|
||||
|
||||
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
|
||||
|
||||
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
|
||||
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
|
||||
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
|
||||
|
||||
# ELF module definitions
|
||||
|
||||
CELFFLAGS = $(CFLAGS) -mlong-calls # --target1-abs
|
||||
CXXELFFLAGS = $(CXXFLAGS) -mlong-calls # --target1-abs
|
||||
|
||||
LDELFFLAGS = -r -e main
|
||||
LDELFFLAGS += -T $(call CONVERT_PATH,$(TOPDIR)/binfmt/libelf/gnu-elf.ld)
|
157
boards/arm64/imx9/imx93-evk/scripts/dramboot.ld
Normal file
157
boards/arm64/imx9/imx93-evk/scripts/dramboot.ld
Normal file
|
@ -0,0 +1,157 @@
|
|||
/****************************************************************************
|
||||
* boards/arm64/imx9/imx93-evk/scripts/dramboot.ld
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
OUTPUT_ARCH(aarch64)
|
||||
|
||||
ENTRY(__start)
|
||||
EXTERN(__start)
|
||||
|
||||
/* Memory is organized as follows:
|
||||
* - Uboot reserved area is 0x00000000 - 0x00a00000
|
||||
* - NuttX is loaded to 0x80000000, u-boot expects us here
|
||||
* - NuttX ROM and RAM are one continuous region, starting from 0x80000000
|
||||
with a size of 128MB
|
||||
* - Heap memory is allocated from dram end to idlestack top
|
||||
*/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
dram (rwx) : ORIGIN = 0x80000000, LENGTH = 128M
|
||||
}
|
||||
|
||||
PHDRS
|
||||
{
|
||||
/* R = 100, W = 010, X = 001 */
|
||||
|
||||
text PT_LOAD FLAGS(5); /* RX */
|
||||
rodata PT_LOAD FLAGS(4); /* R */
|
||||
data PT_LOAD FLAGS(6); /* RW */
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text :
|
||||
{
|
||||
_stext = ABSOLUTE(.); /* Text section */
|
||||
*(.text.__start) /* Place __start here */
|
||||
*(.text .text.*)
|
||||
*(.text.cold)
|
||||
*(.text.unlikely)
|
||||
*(.fixup)
|
||||
*(.gnu.warning)
|
||||
} > dram :text
|
||||
|
||||
.init_section :
|
||||
{
|
||||
_sinit = ABSOLUTE(.);
|
||||
KEEP(*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
|
||||
KEEP(*(.init_array .ctors))
|
||||
_einit = ABSOLUTE(.);
|
||||
} > dram :text
|
||||
|
||||
/* Vector table must be page aligned */
|
||||
|
||||
.vector : ALIGN(4096)
|
||||
{
|
||||
_vector_start = ABSOLUTE(.);
|
||||
KEEP(*(.exc_vector_table))
|
||||
KEEP(*(".exc_vector_table.*"))
|
||||
KEEP(*(.vectors))
|
||||
_vector_end = ABSOLUTE(.);
|
||||
} > dram :text
|
||||
|
||||
/* End of text data must be aligned to page boundary */
|
||||
|
||||
. = ALIGN(4096);
|
||||
_etext = .;
|
||||
_sztext = _etext - _stext;
|
||||
|
||||
/* Start of RO data must be page aligned (mapped as read only) */
|
||||
|
||||
.rodata : ALIGN(4096)
|
||||
{
|
||||
_srodata = ABSOLUTE(.); /* Read-only data */
|
||||
*(.rodata .rodata.*)
|
||||
*(.data.rel.ro)
|
||||
*(.data.rel.ro.*)
|
||||
} > dram :rodata
|
||||
|
||||
/* End of RO data must be page aligned */
|
||||
|
||||
. = ALIGN(4096);
|
||||
|
||||
_erodata = .; /* End of read-only data */
|
||||
_szrodata = _erodata - _srodata;
|
||||
_eronly = .; /* End of read-only data */
|
||||
|
||||
.data : ALIGN(4096)
|
||||
{
|
||||
_sdata = ABSOLUTE(.);
|
||||
*(.data.page_aligned)
|
||||
*(.data .data.*)
|
||||
. = ALIGN(8);
|
||||
*(.data.rel)
|
||||
*(.data.rel.*)
|
||||
CONSTRUCTORS
|
||||
. = ALIGN(8);
|
||||
_edata = ABSOLUTE(.);
|
||||
} > dram :data
|
||||
|
||||
.bss :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.bss .bss.*)
|
||||
. = ALIGN(8);
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > dram :data
|
||||
|
||||
_szbss = _ebss - _sbss;
|
||||
|
||||
.initstack :
|
||||
{
|
||||
_s_initstack = ABSOLUTE(.);
|
||||
*(.initstack)
|
||||
} > dram :data
|
||||
|
||||
/* End of data must be page aligned */
|
||||
. = ALIGN(4096);
|
||||
|
||||
g_idle_topstack = .;
|
||||
_e_initstack = .;
|
||||
_szdata = _e_initstack - _sdata;
|
||||
|
||||
/* Sections to be discarded */
|
||||
/DISCARD/ : {
|
||||
*(.exit.text)
|
||||
*(.exit.data)
|
||||
*(.exitcall.exit)
|
||||
*(.eh_frame)
|
||||
}
|
||||
|
||||
/* 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) }
|
||||
}
|
29
boards/arm64/imx9/imx93-evk/src/Makefile
Normal file
29
boards/arm64/imx9/imx93-evk/src/Makefile
Normal file
|
@ -0,0 +1,29 @@
|
|||
############################################################################
|
||||
# boards/arm64/imx9/emx93-evk/src/Makefile
|
||||
#
|
||||
# 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 = imx9_boardinit.c imx9_bringup.c
|
||||
|
||||
ifeq ($(CONFIG_BOARDCTL),y)
|
||||
CSRCS += imx9_appinit.c
|
||||
endif
|
||||
|
||||
include $(TOPDIR)/boards/Board.mk
|
59
boards/arm64/imx9/imx93-evk/src/imx93-evk.h
Normal file
59
boards/arm64/imx9/imx93-evk/src/imx93-evk.h
Normal file
|
@ -0,0 +1,59 @@
|
|||
/****************************************************************************
|
||||
* boards/arm64/imx9/imx93-evk/src/imx93-evk.h
|
||||
*
|
||||
* 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_ARM64_IMX9_IMX93_EVK_SRC_IMX93_EVK_H
|
||||
#define __BOARDS_ARM64_IMX9_IMX93_EVK_SRC_IMX93_EVK_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: imx9_bringup
|
||||
*
|
||||
* Description:
|
||||
* Bring up board features
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_BOARDCTL) || defined(CONFIG_BOARD_LATE_INITIALIZE)
|
||||
int imx9_bringup(void);
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_ARM64_IMX9_IMX93_EVK_SRC_IMX93_EVK_H */
|
76
boards/arm64/imx9/imx93-evk/src/imx9_appinit.c
Normal file
76
boards/arm64/imx9/imx93-evk/src/imx9_appinit.c
Normal file
|
@ -0,0 +1,76 @@
|
|||
/****************************************************************************
|
||||
* boards/arm64/imx9/imx93-evk/src/imx9_appinit.c
|
||||
*
|
||||
* 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 <sys/types.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
|
||||
#include "imx93-evk.h"
|
||||
|
||||
#ifdef CONFIG_BOARDCTL
|
||||
|
||||
/****************************************************************************
|
||||
* 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)
|
||||
{
|
||||
UNUSED(arg);
|
||||
#ifndef CONFIG_BOARD_LATE_INITIALIZE
|
||||
/* Perform board initialization */
|
||||
|
||||
return imx9_bringup();
|
||||
#else
|
||||
return OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* CONFIG_BOARDCTL */
|
113
boards/arm64/imx9/imx93-evk/src/imx9_boardinit.c
Normal file
113
boards/arm64/imx9/imx93-evk/src/imx9_boardinit.c
Normal file
|
@ -0,0 +1,113 @@
|
|||
/****************************************************************************
|
||||
* boards/arm64/imx9/imx93-evk/src/imx9_boardinit.c
|
||||
*
|
||||
* 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 <stdint.h>
|
||||
#include <nuttx/board.h>
|
||||
#include "imx93-evk.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: imx9_memory_initialize
|
||||
*
|
||||
* Description:
|
||||
* All i.MX8 architectures must provide the following entry point. This
|
||||
* entry point is called early in the initialization before memory has
|
||||
* been configured. This board-specific function is responsible for
|
||||
* configuring any on-board memories.
|
||||
*
|
||||
* Logic in imx9_memory_initialize must be careful to avoid using any
|
||||
* global variables because those will be uninitialized at the time this
|
||||
* function is called.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void imx9_memory_initialize(void)
|
||||
{
|
||||
/* SDRAM was initialized by a bootloader in the supported configurations. */
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: imx9_board_initialize
|
||||
*
|
||||
* Description:
|
||||
* All i.MX8 architectures must provide the following entry point. This
|
||||
* entry point is called in the initialization phase -- after
|
||||
* imx_memory_initialize and after all memory has been configured and
|
||||
* mapped but before any devices have been initialized.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void imx9_board_initialize(void)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
/* Configure on-board LEDs if LED support has been selected. */
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_late_initialize
|
||||
*
|
||||
* Description:
|
||||
* If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
|
||||
* initialization call will be performed in the boot-up sequence to a
|
||||
* function called board_late_initialize(). board_late_initialize() will be
|
||||
* called immediately after up_intitialize() is called and just before the
|
||||
* initial application is started. This additional initialization phase
|
||||
* may be used, for example, to initialize board-specific device drivers.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_BOARD_LATE_INITIALIZE
|
||||
void board_late_initialize(void)
|
||||
{
|
||||
/* Perform board initialization */
|
||||
|
||||
imx9_bringup();
|
||||
}
|
||||
#endif /* CONFIG_BOARD_LATE_INITIALIZE */
|
62
boards/arm64/imx9/imx93-evk/src/imx9_bringup.c
Normal file
62
boards/arm64/imx9/imx93-evk/src/imx9_bringup.c
Normal file
|
@ -0,0 +1,62 @@
|
|||
/****************************************************************************
|
||||
* boards/arm64/imx9/imx93-evk/src/imx9_bringup.c
|
||||
*
|
||||
* 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 <sys/types.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#include "imx93-evk.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: imx_bringup
|
||||
*
|
||||
* Description:
|
||||
* Bring up board features
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int imx9_bringup(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#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
|
||||
|
||||
UNUSED(ret);
|
||||
return OK;
|
||||
}
|
Loading…
Reference in a new issue