Monday, October 5, 2015

FreeRTOS on Zynq : recipe for target '*.s' failed

If you are working on FreeRTOS on Zynq, chances are high that you have come across this error while compiling FreeRTOS on Eclipse.

Running Make libs in ps7_cortexa9_0/libsrc/freertos822_xilinx_v1_0/src
make -C ps7_cortexa9_0/libsrc/freertos822_xilinx_v1_0/src -s libs  "SHELL=/bin/sh" "COMPILER=arm-xilinx-eabi-gcc" "ARCHIVER=arm-xilinx-eabi-ar" "COMPILER_FLAGS=  -O2 -c" "EXTRA_COMPILER_FLAGS=-g"
/bin/sh: arm-none-eabi-gcc: command not found
<builtin>: recipe for target '*.s' failed
make[1]: *** [*.s] Error 127
Makefile:27: recipe for target 'ps7_cortexa9_0/libsrc/freertos822_xilinx_v1_0/src/make.libs' failed


Fixing it is rather easy.
open the file Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Makefile_ps7_cortexa9

line 101 reads,
KERNEL_AR_OBJS = *.c *.S *.s

change it to read
KERNEL_AR_OBJS = *.c *.S

Save and exit

Re-Generate BSP sources and compile.

What happened is that, since there are no .s files at the very first go, make complains about it and halts processing. From next time onwards, since there are .s files created in the previous compilations, it does not complain or stop processing.

Looks like this is a bug in FreeRTOS makefile (In microblaze make file, there is no .s in the corresponding line)