Hello 🦀,
I measured the execution time of the same C nbody benchmark program on top of FreeRTOS & Tock.
(I only modified variable n in the main function to be const volatile int n = 50000;)
(Both cases were tested on NucleoF429ZI board)
nbody on FreeRTOS : 13.037325 seconds
nbody on Tock : 360.536 seconds
I found that Tock apps are currently built with gcc flag -mfloat-abi=soft
I tried replacing the flag with
-mfloat-abi=hard,
but I received the following error.
lonelyjoe@lonelyjoe-desktop:~/workspace/libtock-c/examples/n-body$ make
CC main.c
In file included from ./../../support/warning_header.h:6:0,
from <command-line>:0:
/usr/include/newlib/stdio.h: In function '__sputc_r':
/usr/include/newlib/stdio.h:671:39: sorry, unimplemented: Thumb-1 hard-float VFP ABI
_ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
^~~~~~
On Stm32CubeIDE which provides newlib-nano as the default runtime library,
I had no errors while building the same C program on top of FreeRTOS with the -mfloat-abi=hard configuration.
One thing I see is that the instruction set I used in stm32cubeide was Thumb-2,
while the error from building Tock tells me Thumb-1 hard-float VFP ABI is not implemented.
(below is an image of the build configuration I used for building nbody on FreeRTOS)

Is there a way to work around this error to build apps with flag -mfloat-abi=soft?
Or is it currently possible to use Thumb-2 instruction set instead of Thumb-1?
Thank you for checking out this issue 👍 👍
Hello 🦀,
I measured the execution time of the same C
nbodybenchmark program on top of FreeRTOS & Tock.(I only modified variable
nin the main function to beconst volatile int n = 50000;)(Both cases were tested on
NucleoF429ZIboard)nbodyon FreeRTOS : 13.037325 secondsnbodyon Tock : 360.536 secondsI found that Tock apps are currently built with gcc flag
-mfloat-abi=softlibtock-c/Configuration.mk
Line 138 in 3d96d35
I tried replacing the flag with
-mfloat-abi=hard,but I received the following error.
On
Stm32CubeIDEwhich providesnewlib-nanoas the default runtime library,I had no errors while building the same C program on top of FreeRTOS with the
-mfloat-abi=hardconfiguration.One thing I see is that the instruction set I used in
stm32cubeidewasThumb-2,while the error from building Tock tells me
Thumb-1 hard-float VFP ABIis not implemented.(below is an image of the build configuration I used for building

nbodyon FreeRTOS)Is there a way to work around this error to build apps with flag
-mfloat-abi=soft?Or is it currently possible to use
Thumb-2instruction set instead ofThumb-1?Thank you for checking out this issue 👍 👍