forked from apache/nuttx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
15 changed files
with
905 additions
and
0 deletions.
There are no files selected for viewing
145 changes: 145 additions & 0 deletions
145
Documentation/platforms/arm64/imx9/boards/imx93-evk/README.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
6 changes: 6 additions & 0 deletions
6
Documentation/platforms/arm64/imx9/boards/imx93-evk/index.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
========== | ||
imx93-evk | ||
========== | ||
|
||
.. include:: README.txt | ||
:literal: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
========= | ||
NXP i.MX9 | ||
========= | ||
|
||
Supported Boards | ||
================ | ||
|
||
.. toctree:: | ||
:glob: | ||
:maxdepth: 1 | ||
|
||
boards/*/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 */ |
Oops, something went wrong.