Hi All,
I’m new to FreeRTOS and I’m just trying to run the Posix GCC demo on my Ubuntu ARM64 server VM which is hosted on a MAC M1 silicon.
The compilation works just fine, but as soon as I try to run “posix_demo” I immediatly get a segmentation fault.
Here’s the gdb trace:
Trace started.
The trace will be dumped to disk if a call to configASSERT() fails.
Starting full demo
Thread 1 "posix_demo" received signal SIGSEGV, Segmentation fault.
pxPortInitialiseStack (pxTopOfStack=pxTopOfStack@entry=0xaab2aac19838, pxEndOfStack=0xaaaaaac19840,
pxCode=pxCode@entry=0xaaaaaaaa2e50 <prvCheckTask>, pvParameters=pvParameters@entry=0x0)
at /home/develop/FreeRTOS/FreeRTOS/Source/portable/ThirdParty/GCC/Posix/port.c:166
166 pxTopOfStack = ( StackType_t * ) thread - 1;
Do you have any idea on why this happens?
Here’s my GCC configuration:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-linux-gnu/13/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 13.2.0-23ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-13/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-13 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-offload-targets=nvptx-none=/build/gcc-13-dIwDw0/gcc-13-13.2.0/debian/tmp-nvptx/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.0 (Ubuntu 13.2.0-23ubuntu4)
Many thanks in advance for the help