Build a firmware , command "make" not working

Hello,

I wanted to share an error that appeared when i tried to call function “make” after creating a Firmware,
when i try to run a project using Target Platform, it workes succesfully.
But i wanted to know where might be the problem that “make” command doesnt work and gives me error “[makedefs:195: gcc/RTOSDemo.axf] Error 1”.

Thanks to everyone,
Hamza.

Hello Hamza,

These symbols are usually defined by the OS. In the embedded world, it could happen that these symbols are not implemented. You could implement these methods yourself. Otherwise they could be available in BSP provided for the hardware by the manufacturer, or even a 3rd party.

Did you follow this tutorial: Create a MicroEJ Firmware From Scratch — MicroEJ Documentation?

In it we use the implementations of theses syscalls of the libnosys.a.

Hope it helps.
Gaëtan

Hello Gaetan,

Yes i did follow the tutorial Create a MicroEJ Firmware From Scratch — MicroEJ Documentation , i was very carefull at those file that needed to be updated.

Regards,
Hamza.

OK it may be an issue that you have a space in your path semester 7, can you try without it? We already had issues with builds where spaces are involved in a path.

Regards,
Gaëtan

I tried even without spaces it shows the same error.

Regards,
Hamza.

Hi again Hamza,

At the very least for the _srbk symbol you should have the lib added to your makedef:

diff --git a/FreeRTOS/Demo/CORTEX_LM3S6965_GCC/makedefs b/FreeRTOS/Demo/CORTEX_LM3S6965_GCC/makedefs
--- a/FreeRTOS/Demo/CORTEX_LM3S6965_GCC/makedefs
+++ b/FreeRTOS/Demo/CORTEX_LM3S6965_GCC/makedefs
@@ -107,6 +107,11 @@ LIBC=${shell ${CC} -mthumb -march=armv6t2 -print-file-name=libc.a}
 #
 LIBM=${shell ${CC} -mthumb -march=armv6t2 -print-file-name=libm.a}

+#
+# Get the location of libnosys.a from the GCC front-end.
+#
+LIBNOSYS=${shell ${CC} -mthumb -march=armv6t2 -print-file-name=libnosys.a}
+
 #
 # The command for extracting images from the linked executables.
 #
@@ -202,12 +207,12 @@ ifeq (${COMPILER}, gcc)
                        --entry ${ENTRY_${notdir ${@:.axf=}}} \
                        ${LDFLAGSgcc_${notdir ${@:.axf=}}}    \
                        ${LDFLAGS} -o ${@} --start-group ${^} \
-                       '${LIBM}' '${LIBC}' '${LIBGCC}' --end-group; \
+                       '${LIBNOSYS}' '${LIBM}' '${LIBC}' '${LIBGCC}' --end-group; \
         fi
        @${LD} -T ${SCATTER_${notdir ${@:.axf=}}}    \
               --entry ${ENTRY_${notdir ${@:.axf=}}} \
               ${LDFLAGSgcc_${notdir ${@:.axf=}}}    \
               ${LDFLAGS} -o ${@} --start-group ${^} \
-              '${LIBM}' '${LIBC}' '${LIBGCC}' --end-group;
+              '${LIBNOSYS}' '${LIBM}' '${LIBC}' '${LIBGCC}' --end-group;
        @${OBJCOPY} -O binary ${@} ${@:.axf=.bin}
 endif

Do you have the libnosys.a in your link path? What is the result of the command line defining LIBNOSYS in QEMU?

Regards,
Gaëtan for MicroEJ

Hii Gaetan,

This file was the problem.
I succeed to fix it, thanks for the help.

Regards,
Hamza.