Rt-aux-cpu-demo compilation error

I am trying to compile rt-aux-cpu-demo from l4t_rt_aux_cpu_src on my host machine by running ‘make’. However it is getting the following compilation errors.

    CC tke-tegra-ids.c
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/code-soc/t186-aon/tke-tegra-ids.c:44:34: error: redundant redeclaration of 'tegra_tke_id_timer0' [-Werror=redundant-decls]
   44 | extern const struct tegra_tke_id tegra_tke_id_timer0
      |                                  ^~~~~~~~~~~~~~~~~~~
In file included from /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/code-soc/t186-aon/tke-tegra-ids.c:33:
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/include-soc/t186-aon/tke-tegra-hw.h:32:34: note: previous declaration of 'tegra_tke_id_timer0' was here
   32 | extern const struct tegra_tke_id tegra_tke_id_timer0;
      |                                  ^~~~~~~~~~~~~~~~~~~
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/code-soc/t186-aon/tke-tegra-ids.c:54:34: error: redundant redeclaration of 'tegra_tke_id_timer1' [-Werror=redundant-decls]
   54 | extern const struct tegra_tke_id tegra_tke_id_timer1
      |                                  ^~~~~~~~~~~~~~~~~~~
In file included from /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/code-soc/t186-aon/tke-tegra-ids.c:33:
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/include-soc/t186-aon/tke-tegra-hw.h:33:34: note: previous declaration of 'tegra_tke_id_timer1' was here
   33 | extern const struct tegra_tke_id tegra_tke_id_timer1;
      |                                  ^~~~~~~~~~~~~~~~~~~
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/code-soc/t186-aon/tke-tegra-ids.c:64:34: error: redundant redeclaration of 'tegra_tke_id_timer2' [-Werror=redundant-decls]
   64 | extern const struct tegra_tke_id tegra_tke_id_timer2
      |                                  ^~~~~~~~~~~~~~~~~~~
In file included from /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/code-soc/t186-aon/tke-tegra-ids.c:33:
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/include-soc/t186-aon/tke-tegra-hw.h:34:34: note: previous declaration of 'tegra_tke_id_timer2' was here
   34 | extern const struct tegra_tke_id tegra_tke_id_timer2;
      |                                  ^~~~~~~~~~~~~~~~~~~
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/code-soc/t186-aon/tke-tegra-ids.c:74:34: error: redundant redeclaration of 'tegra_tke_id_timer3' [-Werror=redundant-decls]
   74 | extern const struct tegra_tke_id tegra_tke_id_timer3
      |                                  ^~~~~~~~~~~~~~~~~~~
In file included from /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/code-soc/t186-aon/tke-tegra-ids.c:33:
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/include-soc/t186-aon/tke-tegra-hw.h:35:34: note: previous declaration of 'tegra_tke_id_timer3' was here
   35 | extern const struct tegra_tke_id tegra_tke_id_timer3;
      |                                  ^~~~~~~~~~~~~~~~~~~
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/code-soc/t186-aon/tke-tegra-ids.c:84:34: error: redundant redeclaration of 'tegra_tke_id_noirq_timer0' [-Werror=redundant-decls]
   84 | extern const struct tegra_tke_id tegra_tke_id_noirq_timer0
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/code-soc/t186-aon/tke-tegra-ids.c:33:
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/include-soc/t186-aon/tke-tegra-hw.h:37:34: note: previous declaration of 'tegra_tke_id_noirq_timer0' was here
   37 | extern const struct tegra_tke_id tegra_tke_id_noirq_timer0;
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/code-soc/t186-aon/tke-tegra-ids.c:94:34: error: redundant redeclaration of 'tegra_tke_id_noirq_timer1' [-Werror=redundant-decls]
   94 | extern const struct tegra_tke_id tegra_tke_id_noirq_timer1
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/code-soc/t186-aon/tke-tegra-ids.c:33:
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/include-soc/t186-aon/tke-tegra-hw.h:38:34: note: previous declaration of 'tegra_tke_id_noirq_timer1' was here
   38 | extern const struct tegra_tke_id tegra_tke_id_noirq_timer1;
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/code-soc/t186-aon/tke-tegra-ids.c:104:34: error: redundant redeclaration of 'tegra_tke_id_noirq_timer2' [-Werror=redundant-decls]
  104 | extern const struct tegra_tke_id tegra_tke_id_noirq_timer2
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/code-soc/t186-aon/tke-tegra-ids.c:33:
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/include-soc/t186-aon/tke-tegra-hw.h:39:34: note: previous declaration of 'tegra_tke_id_noirq_timer2' was here
   39 | extern const struct tegra_tke_id tegra_tke_id_noirq_timer2;
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/code-soc/t186-aon/tke-tegra-ids.c:114:34: error: redundant redeclaration of 'tegra_tke_id_noirq_timer3' [-Werror=redundant-decls]
  114 | extern const struct tegra_tke_id tegra_tke_id_noirq_timer3
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/code-soc/t186-aon/tke-tegra-ids.c:33:
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/freertos-common/include-soc/t186-aon/tke-tegra-hw.h:40:34: note: previous declaration of 'tegra_tke_id_noirq_timer3' was here
   40 | extern const struct tegra_tke_id tegra_tke_id_noirq_timer3;
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:370: /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/rt-aux-cpu-demo/out/t18x/tke-tegra-ids.o] Error 1

Have a check below link if help on it.

Thankyou this link was helpful. I made the changes outlined in that link to main.c, Makefile, bpmp-ipc.c, and ivc-channels.c, however I am now getting linker errors. I tested with the same GCC version 9.2.1 as used in that link. I am not enabling any of the example applications.

/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/rt-aux-cpu-demo/out/t18x/bpmp-ipc.o: in function `bpmp_ipc_irq':
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/rt-aux-cpu-demo/drivers/bpmp-ipc.c:72: undefined reference to `tegra_hsp_id_aon'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/rt-aux-cpu-demo/drivers/bpmp-ipc.c:72: undefined reference to `tegra_hsp_id_aon'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/rt-aux-cpu-demo/out/t18x/bpmp-ipc.o: in function `bpmp_ipc_init':
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/rt-aux-cpu-demo/drivers/bpmp-ipc.c:196: undefined reference to `tegra_hsp_id_aon'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/rt-aux-cpu-demo/drivers/bpmp-ipc.c:196: undefined reference to `tegra_hsp_id_aon'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/rt-aux-cpu-demo/out/t18x/ivc-channels.o: in function `ivc_ccplex_carveout_configure':
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/rt-aux-cpu-demo/drivers/ivc-channels.c:138: undefined reference to `tegra_hsp_id_aon'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/rt-aux-cpu-demo/out/t18x/ivc-channels.o:/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/rt-aux-cpu-demo/drivers/ivc-channels.c:138: more undefined references to `tegra_hsp_id_aon' follow
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/rt-aux-cpu-demo/out/t18x/main.o: in function `setup_timer_interrupt':
/home/jarod/l4t_rt_aux_cpu_src/l4t-rt/rt-aux-cpu-demo/main.c:256: undefined reference to `tegra_tke_id_timer0'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/rt-aux-cpu-demo/main.c:256: undefined reference to `tegra_tke_id_timer0'
collect2: error: ld returned 1 exit status
make: *** [Makefile:371: /home/jarod/l4t_rt_aux_cpu_src/l4t-rt/rt-aux-cpu-demo/out/t18x/spe.elf] Error 1

Is there any project or repo available that is able to compile?

Did you also check this document?

https://docs.nvidia.com/jetson/spe/rt-compiling.html

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.