Failed to build SPE rt-aux-cpu-demo on TX2

Hi,

I am trying to build the rt-aux-cpu-demo on my TX2 but I encounter the following error when trying to make the sample code:

/home/henryzh47/Projects/nvidia-SPE/gcc-arm-none-eabi/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc: 1: /home/henryzh47/Projects/nvidia-SPE/gcc-arm-none-eabi/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc: ELF��4�U: not found
/home/henryzh47/Projects/nvidia-SPE/gcc-arm-none-eabi/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc: 2: /home/henryzh47/Projects/nvidia-SPE/gcc-arm-none-eabi/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc: Syntax error: word unexpected (expecting ")")
Makefile:296: recipe for target '/home/henryzh47/Projects/nvidia-SPE/l4t_rt_aux_cpu_src/l4t-rt/out/t18x/OBJ/clk.o' failed
make: *** [/home/henryzh47/Projects/nvidia-SPE/l4t_rt_aux_cpu_src/l4t-rt/out/t18x/OBJ/clk.o] Error 2

Any ideas why this would generate the error? Thanks!

I suspect this might be an issue with gcc-arm installation. What I did is just untar the file downloaded from the tutorial link: https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q3-update

Also, when I tried to run the extracted compiler binary, it says exec format error. I’m guessing this might be a 32/64 bit issue? How do I have this running on 64 bit 18.04?

Let me know if you need any other information!

Use tar -xpf gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2 instead others tools to extract the tool chains.

Thanks I tried to use the above command to uncompress the toolchains but it still outputs the same error when I trying to compile the program.

I also tried to flash the TX2 with the latest Jetpack 4.2.1. The issue persists.

Can you think of anything else that could cause the problem? Thanks!

I am build it with 18.04 without problem.

snchen@snchen-HP:~/data/JEP/J4.2/spe$ export CROSS_COMPILE=~/data/JEP/J4.2/spe/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-
snchen@snchen-HP:~/data/JEP/J4.2/spe$ cd l4t-rt/rt-aux-cpu-demo/
snchen@snchen-HP:~/data/JEP/J4.2/spe/l4t-rt/rt-aux-cpu-demo$ make
    CC clk.c
    CC init_padctrl.c
    CC spe-pm-sequencer.c
    CC armv7-exceptions.S
    CC newlib-syscalls.c
    CC err-hook-printf.c
    CC arm-vic.c
    CC irqapi-vic.c
    CC tke-tegra.c
    CC cache-cortex-r5.c
    CC armv7-exception.c
    CC tke-tegra-udelay.c
    CC hsp-tegra.c
    CC debug.c
    CC tegra-ivc.c
    CC wake-tegra.c
    CC ast-tegra.c
    CC tke-tegra-ids.c
    CC hsp-tegra-ids.c
    CC ast-tegra-ids.c
    CC irqapi-vic-ids.c
    CC clk-tegra.c
    CC portASM.S
    CC list.c
    CC heap_3.c
    CC port.c
    CC queue.c
    CC tasks.c
    CC timers.c
    CC event_groups.c
    CC ivc-echo-task.c
    CC bpmp-ipc.c
    CC interrupt.c
    CC irq-handlers.S
    CC ivc-channels.c
    CC spe-vic.c
    CC spe-pm.c
    CC debug_init.c
    CC ivc-channel-ids.c
    CC boot.S
    CC main.c
    CPP spe.ld.in
    LINK spe.elf
    OBJCOPY spe.bin
    DISASM spe.dis
snchen@snchen-HP:~/data/JEP/J4.2/spe/l4t-rt/rt-aux-cpu-demo$

Turns out I shouldn’t try to compile the spe binary on TX2 itself and should do that on the host machine instead.

This is quite a newbie problem but it seems that it could potentially be clearer to point that out at the beginning of the instruction.

Thanks!