boards/am67/t3-gem-o1: Add support for T3 Gemstone O1 board#17229
boards/am67/t3-gem-o1: Add support for T3 Gemstone O1 board#17229ghost wants to merge 5 commits intoapache:masterfrom
Conversation
linguini1
left a comment
There was a problem hiding this comment.
Thanks for this awesome port!
-
I see this has ARM64 cores and R5F cores, and this is just support for the R5F cores. I suppose that's why it lives under
arch/arminstead ofarch/arm64. Have you considered getting NuttX to run on the A53 cores (that's already supported on other boards)? I wonder what the approach would be for that scenario, two different NuttX images on a per-core-type basis? Just curious, nothing to do with this PR. -
For your documentation, could you tweak it a little bit to follow the format from the standard board documentation template? It can be found in Documentation/contributing/doc_templates/board.rst. Your docs look pretty close to it right now, but could have information about how to flash it, some information about what the naming is for configuring your board (i.e. what is the board name for
tools/configure.shto find), an image, etc. Also, I would mark this board asexperimentalin the tags section, since it has very minimal support right now. Also, a warning about which peripherals are supported only would be good:
.. tags:: chip:am67, experimental
.. warning::
This board currently only supports a basic implementation of NuttX with
only UART console as a supported peripheral. Please see the contributing
documentation if you would like to help contribute to the support.
linguini1
left a comment
There was a problem hiding this comment.
Please add support for the CMake build system as well.
| * | ||
| ****************************************************************************/ | ||
|
|
||
| static void utils_data_and_instruction_barrier(void) |
There was a problem hiding this comment.
I think there might be an architecture implementation for this for all ARM chips, you should re-use that instead. I think UP_DMB is for data memory, there is probably something similar for other barriers.
| static inline void am67_mpu_disable_br(void) | ||
| { | ||
| unsigned int sctlr = cp15_rdsctlr(); | ||
| sctlr &= ~(1 << 17); /* Clear bit 17 (disable background region) */ |
There was a problem hiding this comment.
I would recommend that you give these special bits a name in your register mapping definition file, it makes the code much easier to read.
Ex:
#define AM67_SCTLR_BG_REGION_EN (1 << 17)
/* later in your function */
sctlr &= ~AM67_SCTLR_BG_REGION_EN;Also, this would be a good place to use modreg32 instead of the cp15_wrsctlr/cp16_rdsctlr functions.
| * | ||
| ****************************************************************************/ | ||
|
|
||
| int up_timer_gettime(struct timespec *ts) |
There was a problem hiding this comment.
Not incredibly familiar with the up_timer_* functions, but I don't think your implementation matches the requirements at all?
This function should return 0 on success, negated errno on failure. Your implementation returns the contents of some timer register. The timespec argument is unused, but it must contain the up-time you pull from the timer.
I would also suggest adding a DEBUGASSERT(ts != NULL).
There was a problem hiding this comment.
Ditto for the remaining timer functions, make sure you adhere to the function specification.
Real‑Time Linux is deployed on the four Cortex‑A53 cores. Those cores provide the high‑performance compute power needed for demanding workloads such as image‑processing pipelines, vision algorithms, and other application‑level tasks. For safety‑critical functions—e.g., the autopilot control loop—we are planning on running NuttX on the dedicated Cortex‑R5F cores. The R5F cores are purpose‑built for deterministic, low‑latency execution, which makes them ideal for hard real‑time control code. Communication between the two domains will be performed through the RPMsg framework. RPMsg provides a lightweight, message‑based inter‑processor communication (IPC) channel that lets the Linux side exchange data with the NuttX side while preserving isolation and real‑time guarantees. |
|
@erkan-vatan please squash patch 4 to patch 3 and patch 5 to patch 2. |
3eb2972 to
0ecaf44
Compare
|
@erkan-vatan https://github.com/apache/nuttx/actions/runs/18779303663/job/53582075265?pr=17229#logs |
0ecaf44 to
299d4e0
Compare
|
@linguini1 inside |
|
@simbit18 any ideas? |
299d4e0 to
9a28c92
Compare
9a28c92 to
34af2ae
Compare
34af2ae to
ec9aca1
Compare
|
@linguini1 target_link_options(nuttx PRIVATE -Wl,--entry=_vector_start) |
ec9aca1 to
c0eedfe
Compare
|
@erkan-vatan The chip supports MPU, so why isn't it enabled in the configuration (defconfig) ? In this case, it might be better to proceed as follows:
|
|
@simbit18 When the MPU was enabled in the configuration, the build inserted the MPU enable routine at the very beginning of the program, preventing execution from reaching that line (https://github.com/t3gemstone/nuttx/blob/c0eedfef556bc709229b6624d3612f62c6ccee65/arch/arm/src/am67/am67_mpuinit.c#L67 ) . Since we couldn't disable the MPU once it was already enabled, we had to disable it in the configuration first to adjust the settings. After configuring it properly, we re enable the MPU later in the flow. I know this is a bit of a shortcut. Is it okay or do you have any suggestion ? |
|
@AbduNaber Ok, but the change I described above only affects the Make and CMake build. Have you tried it? |
The previous use of `%u` and `%X` for `uint32_t` values triggered compiler warnings. These have been replaced with the appropriate format‑specifier macros to ensure type‑correctness and eliminate the warnings. Signed-off-by: Erkan Vatan <evatan@t3gemstone.org>
Previously, arm_mpu.c was only compiled when CONFIG_BUILD_PROTECTED was enabled. This caused build failures when CONFIG_ARM_MPU was set without CONFIG_BUILD_PROTECTED. The build logic has been updated to include arm_mpu.c whenever either CONFIG_ARM_MPU or CONFIG_BUILD_PROTECTED is enabled. Signed-off-by: Erkan Vatan <evatan@t3gemstone.org>
This commit introduces basic support for running NuttX on main domain R5F core of TI AM67 chips, including irq, mpu, pinmux, timer, and serial configurations. Currently only UART console is supported. NuttX can be loaded into R5F core from U-Boot or Linux via RemoteProc. 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> Signed-off-by: Erkan Vatan <evatan@t3gemstone.org>
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> Signed-off-by: Erkan Vatan <evatan@t3gemstone.org>
Add documentation for the T3 Gemstone O1 (t3-gem-o1) development board, including board specifications, serial console, available configurations (nsh), and installation instructions via RemoteProc. Signed-off-by: Erkan Vatan <evatan@t3gemstone.org>
c0eedfe to
9599ad1
Compare
|
@erkan-vatan could you please refresh your config to fix the CI error? Basically: |
Summary
This PR 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.
For more information about the board:
Impact
Add support for TI AM67 chip.
Add new TI AM67-based board named
t3-gem-o1.Provide defconfigs:
Testing
Tested on host: Ubuntu 24.04 noble, with arm-none-eabi-gcc (15:13.2.rel1-2) 13.2.1 20231009 toolchain.
Board: t3-gem-o1
nsh
Configure and build:
Open NuttShell on UART-MAIN1: