Closed NilsMinor closed 4 years ago
Hi @NilsMinor ,
It looks like your version of gcc is using an old C standard by default (older than C11). This can be fixed by upgrading your version of gcc. Note: newt does not use gcc
when building that target, it uses arm-none-eabi-gcc
(cross compiler). You can check your gcc version with
arm-none-eabi-gcc -v
The recommended minimum gcc version for Mynewt is gcc 7.
Hi @ccollins476ad ,
thanks for your help. You were right, I used the wrong compiler + an old version ^^.
I updated my ar-none-eabi-gcc.
arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/arm-none-eabi-gcc/9-2019-q4-major/gcc/bin/../lib/gcc/arm-none-eabi/9.2.1/lto-wrapper
Target: arm-none-eabi
Configured with: /tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/src/gcc/configure --target=arm-none-eabi --prefix=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/install-native --libexecdir=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/install-native/lib --infodir=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/install-native/arm-none-eabi --build=x86_64-apple-darwin10 --host=x86_64-apple-darwin10 --with-gmp=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/build-native/host-libs/usr --with-mpfr=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/build-native/host-libs/usr --with-mpc=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/build-native/host-libs/usr --with-isl=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/build-native/host-libs/usr --with-libelf=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/build-native/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-lstdc++ -lm' --with-pkgversion='GNU Tools for Arm Embedded Processors 9-2019-q4-major' --with-multilib-list=rmprofile
Thread model: single
gcc version 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599] (GNU Tools for Arm Embedded Processors 9-2019-q4-major)
I use now the latest version 9.2.1
I changed the same project to 1-latest and 0-dev and used newt 1.9.0-dev and 1.7.0 but when building the app I now get this error. What have I missed?
Error: In file included from repos/apache-mynewt-core/kernel/os/include/os/os_fault.h:26,
from repos/apache-mynewt-core/libc/baselibc/include/assert.h:24,
from repos/mcuboot/boot/mynewt/src/main.c:22:
repos/mcuboot/boot/mynewt/src/main.c: In function 'main':
repos/apache-mynewt-core/hw/hal/include/hal/hal_debug.h:49:17: error: implicit declaration of function 'hal_debug_break' [-Werror=implicit-function-declaration]
49 | (hal_debug_break(), 1))
| ^~~~~~~~~~~~~~~
repos/apache-mynewt-core/kernel/os/include/os/os_fault.h:38:21: note: in expansion of macro 'HAL_DEBUG_BREAK'
38 | #define OS_CRASH() (HAL_DEBUG_BREAK(), __assert_func(NULL, 0, NULL, NULL))
| ^~~~~~~~~~~~~~~
repos/apache-mynewt-core/libc/baselibc/include/assert.h:26:36: note: in expansion of macro 'OS_CRASH'
26 | #define assert(x) ((x) ? (void)0 : OS_CRASH())
| ^~~~~~~~
repos/mcuboot/boot/mynewt/src/main.c:222:5: note: in expansion of macro 'assert'
222 | assert(rc == 0);
| ^~~~~~
cc1: all warnings being treated as errors
Thanks for your support, Nils
UPDATE -----------------------------------------------------------------------------------------
My goal ist to build a nimble firmware for an nrf52832 chip, but I started with the Arduino Blinky example to get started with newt ^^. I created a new target for nordic_pca10040 board and followed the https://mynewt.apache.org/latest/tutorials/blinky/nRF52.html example and it worked for me ! Any Idea what was wrong on the Arduino example build? I also noticed that the bsp nrf52dk is not part of the core repo (any more?) so this should maybe be changed in the docs. If I understand a bit more about the newt project I will create an PR to change this, I think this is allowed? ^^
BR, Nils
Hey newt-team,
I am trying to run the example project https://mynewt.apache.org/v1_5_0/tutorials/blinky/arduino_zero.html but I have some problems building it.
I followed the instructions from the arduino_zero tutorial. After creating the target I run newt upgrade I get the following versions.
my project.yml looks like :
But I am always failing to build the target. The output looks like:
I am using OS X (10.15.4 Catalina) with the following gcc (gcc --version)
Newt version:
I tested different newt versions (latest 1.7, 1.8 ..) and I changed the git versions in the project.yml. But I was not able to build the example. What am I doing wrong? Any help would be appreciated :)
BTW, newt looks really like an awesome project!
Thanks, Nils
UPDATE: ----------------------------------------------------------------------------------------
I updated gcc to 9.3
And also updated newt :
Apache Newt 1.9.0-dev / b86d086-dirty / 2020-05-04_22:24
But I still get the same error message :/