build errors with recent gcc-arm-none-eabi

Information on the latest releases
Post Reply
ag123
Posts: 742
Joined: Thu Jul 21, 2016 4:24 pm

build errors with recent gcc-arm-none-eabi

Post by ag123 » Wed Apr 05, 2017 6:27 pm

hi sorry to bother as i'm rather 'newbie' in this, need a little guidance :lol:

after much procrastinating i finally got around to installing arduino ide 1.8.2 https://www.arduino.cc/en/Main/Software
and installing aduino_stm32 (https://github.com/rogerclarkmelbourne/Arduino_STM32)
following pretty much these instructions: https://github.com/rogerclarkmelbourne/ ... stallation

i noted that gcc-arm is not part of the arduino ide, hence i got gcc-arm-none-eabi from https://developer.arm.com/open-source/g ... /downloads (i'd think it may be good to mention it in the Arduino_STM32 installation wiki as well as arm none gcc isn't distributed as part of it too)
i'm using version 6-2017-q1-update Released: February 23, 2017 (the current release as of this post)

when i build a sketch, these errors occurred

Code: Select all

In file included from /opt4/opt/arduino-1.8.2/hardware/Arduino_STM32/STM32F1/cores/maple/WString.cpp:23:0:
/opt4/opt/arduino-1.8.2/hardware/Arduino_STM32/STM32F1/cores/maple/itoa.h:34:14: error: conflicting declaration of C function 'char* utoa(long unsigned int, char*, int)'
 extern char* utoa( unsigned long value, char *string, int radix ) ;
              ^~~~
In file included from /opt4/opt/gcc-arm-none-eabi-6-2017-q1-update/arm-none-eabi/include/stdlib.h:11:0,
                 from /opt4/opt/gcc-arm-none-eabi-6-2017-q1-update/arm-none-eabi/include/c++/6.3.1/cstdlib:75,
                 from /opt4/opt/gcc-arm-none-eabi-6-2017-q1-update/arm-none-eabi/include/c++/6.3.1/stdlib.h:36,
                 from /opt4/opt/arduino-1.8.2/hardware/Arduino_STM32/STM32F1/cores/maple/WString.h:26,
                 from /opt4/opt/arduino-1.8.2/hardware/Arduino_STM32/STM32F1/cores/maple/WString.cpp:22:
/opt4/opt/gcc-arm-none-eabi-6-2017-q1-update/arm-none-eabi/include/stdlib.h:223:8: note: previous declaration 'char* utoa(unsigned int, char*, int)'
 char * _EXFUN(utoa,(unsigned, char *, int));
while i'm inclined to attempt patching up Arduino_STM32 codes to attempt to resolve the errors, is arm's gcc-arm-none-eabi from arm website the correct arm gcc to go with Arduino_STM32?

thanks much in advance

stevestrong
Posts: 1609
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: build errors with recent gcc-arm-none-eabi

Post by stevestrong » Wed Apr 05, 2017 6:41 pm

You missed this step:
https://github.com/rogerclarkmelbourne/ ... ds-Manager
I think it is now the SAM boards (Cortex-M3) which should be installed.

ag123
Posts: 742
Joined: Thu Jul 21, 2016 4:24 pm

Re: build errors with recent gcc-arm-none-eabi

Post by ag123 » Wed Apr 05, 2017 6:47 pm

thanks ! all works :D

fpiSTM
Posts: 192
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: build errors with recent gcc-arm-none-eabi

Post by fpiSTM » Wed May 10, 2017 3:29 pm

To solve this issue if you update the arm toolchain:
https://github.com/stm32duino/Arduino_C ... 06f86b9281

User avatar
RogerClark
Posts: 6911
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: build errors with recent gcc-arm-none-eabi

Post by RogerClark » Thu May 11, 2017 10:13 am

fpiSTM wrote:To solve this issue if you update the arm toolchain:
https://github.com/stm32duino/Arduino_C ... 06f86b9281
I've added this to the LibMaple issues list, and I will deploy the same fix when I have time

aster
Posts: 100
Joined: Thu Mar 30, 2017 2:41 pm
Location: bella italy
Contact:

Re: build errors with recent gcc-arm-none-eabi

Post by aster » Thu May 18, 2017 12:13 am

stevestrong wrote:You missed this step:
https://github.com/rogerclarkmelbourne/ ... ds-Manager
I think it is now the SAM boards (Cortex-M3) which should be installed.
are you sure? i installed the SAMD boards (cortex M0) and it works ok

ag123
Posts: 742
Joined: Thu Jul 21, 2016 4:24 pm

Re: build errors with recent gcc-arm-none-eabi

Post by ag123 » Thu May 18, 2017 7:50 am

installing the SAMD boards would install arm-none-gcc 4.8.3-2014q1 as part of it. it normally goes into your $home/.arduino15 folders. if you would like to use the recent gcc compiler that's directly from arm on https://developer.arm.com/open-source/g ... /downloads, you would need to make those minor updates for the itoa.c and itoa.h in the libmaple core source codes. the issue only arise as the more recent arm-none-gcc e.g. v6 (6.3.1) compiler tool chain delivers a functional utoa() as part of its libraries and includes, prior around 4.9.9 (see fpiSTM's link) it isn't there ;)

aster
Posts: 100
Joined: Thu Mar 30, 2017 2:41 pm
Location: bella italy
Contact:

Re: build errors with recent gcc-arm-none-eabi

Post by aster » Thu May 18, 2017 11:28 am

I will wait to fill more the flash of the f1 chip for now i have enough space free for my projects :D

Post Reply