We are very interested in utilizing the Cortex R5 core available on NX, but have a few questions after reading " Jetson Sensor Processing Engine (SPE)" documentation:
Does this core have an FP unit?
Which toolchain we can use to compile the code for it? Documentation talks about very old cross compilation toolchain available on 4.8-2014-q3-update : Series 4.8 : GNU Arm Embedded Toolchain, however we would like to compile natively on NX board itself. Can we use default GCC available in Ubuntu “gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)” or we need to build gcc-arm-embedded/4.8/4.8-2014-q3-update to run natively on NX linux?
How we can start Cortex R5 firmware on NX DevKIt? From what I see in the documentation, the firmware need to be flashed to “spe-fw” partition (on eMMC which we don’t have on NX DevKit)? Where should we put the F/W image on NX DevKit for it to be used? Which bootloader loads this F/W to Cortex R5 core and starts it? Is there any way to reload a different F/W from inside the linux system?
Thanks in advance!
It’s not recommended. Different toolchain is not strictly verified and may result in unexpected issues.
SPE firmware is loaded and starting to run at bootloader stage (MB1). SPE firmware will be located at eMMC or SDCARD, depending on NV devkit you got. But it’s not possible to reload a different SPE firmware inside Linux system.
We have NX DevKit, so no eMMC, but there’s SDCARD. Where should we put the SPE firmware image for it to be read by the bootloader? If we update the SPE firmware image, is rebooting the only way to restart R5 with the new code?
Hello, albertr;
When you flash the device, the SPE firmware will be flashed to the storage media together with other components, like boot-loader, DTB, kernel, etc. So don’t worry about that.
Generally, after flashing, the device will reboot and so new SPE firmware will be loaded automatically.
We are using the NX DevKIt here, so it has SDCARD, but no eMMC and no flashing for us. The kernel, DTB and initrd are loaded from ext4 filesystem on SDCARD. Can you please let us know where SPE firmware image is located in our setup?
I don’t want to put it into recovery mode, and I don’t see any reason to. Can you tell me how I can write the SPE firmware from inside the linux running on NX itself?
What is the name of the partition it’s located in? And which flash memory device is holding this partition on NX module that came with DevKit? I think there’re two devices on this NX module: Winbond SPI flash chip and Spansion NOR flash chip. Do you know which one is holding this partition and what is the partition’s name or number? Can this partition be moved to SDCARD (will bootloader look for it there)?
Hello, albertr:
You can check the bootloader/flash.xml after a successful flashing. That file describes the layout of storage media.
For NX devkit, first part is SPI, and you can see spe-fw, which stores SPE R5 firmware. That cannot be moved to SDCARD in current release.
Hello, Andrey:
You can download the SPE source package from Jetson Download Center | NVIDIA Developer
Check files in doc and you can get primary information for SPE firmware.
@jachen thank you for your response
I already downloaded sources.
However, it turned out that they have steps defined for TX2 & AGX.
Using the documentation for AGX I was able to flash spe-firmware with flash.sh to AGX device. FreeRTOS and Sensor Processing Engine - #11 by _av
Moreover, I anticipate that flashing the same to NX will likely need adjusted steps, as otherwise discrepancies in the device tree and file structure might emerge multiple issues, in my opinion.
Could you also suggest basic samples to try after flashing the spe to jetson just to confirm it worked correctly, please?
Hello, Andrey:
yes. SPE in NX is very similar to AGX, except those pins exported due to different carrier board.
You can start from some examples like timer (doc/timer-app.md), or ivc (doc/devicetree-ivc.md)
But for other apps, like GPIO, UART, CAN, etc., you may have to double check the pins in NX and AGX. Those can work as long as the correct pins are connected.
SPE firmware for NX is still under development.
the .dtsi files need to be compiled into .dtb files. where is the procedure for that and the procedure for running the modules for testing? This flash worked: sudo ./flash.sh -k spe-fw jetson-xavier-nx-devkit mmcblk0p1 I believe we are looking at make TARGET=t18x as indicatd by the l4t release Tegra186_Linux_R32.4.2_aarch64. However this release only contains the device tree binaries as opposed to the device tree source.
@jachen given we want to implment SPE UART on NX, could you provide update steps, please?
# For Jetson AGX #
There are 2 UART ports in AON cluster for Jetson AGX:
- UARTC (base address: 0x0c280000) (See Warning below!)
- UARTG (base address: 0x0c290000)
@warning UARTC is the default system debug UART port in Jetson
AGX. PLEASE DO NOT ACCESS UARTC IN R5 FIRMWARE. OR THE SYSTEM MAY MALFUNCTION!
In order to access a AON UART from the Cortex-R5 SPE/AON for Jetson AGX; the
UART SCR, and pinmux settings need to be updated as described in below steps.
1. Check SCR values as below in the file tegra194-mb1-bct-scr-cbb-mini.cfg:
scr.2609.6 = 0x18001616; # AON_NOC_UARTG_BLF_CONTROL_REGISTER_0
2. Check default pinmux configuration as below in the file
`tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg`.
pinmux.0x0c302048 = 0x00000401; # spi2_sck_pcc0: uartg,
pinmux.0x0c302050 = 0x00000459; # spi2_miso_pcc1: uartg,
3. Compile device tree and flash the entire board to ensure that the SCR,
and pinmux settings are flashed on the board.
After the UART test task runs, it will continuously output following messages
to desired UART port:
Message from SPE R5 UART
It will also print received characters to debug port.
4. A simple way to test UARTG function in Jetson AGX board.
4.1. Follow above steps from 1 to 3 and power up the device.
4.2. Use a wire to connect UARTG TX and Rx (in Jetson AGX board, they are
A5 and A6 in J6), then the following message will output from
SPE firmware debug UART port:
Message from SPE R5 UART
Hello, Andrey:
NX and AGX share the same chip, but different carrier board.
Unfortunately, UARTG pins are occupied in NX (BT_M2_EN and PWR_LED_CTRL), and so that’s not supported in NX devkit.