• Hello, I'm not at all familiar with compiling code, beyond some trusted AUR packages for Linux. All of this is quite foreign. After recieving this error, I went looking in espruino-master which i pulled down previously. I found many ".o" files adjacent to many like-named ".c" and ".h" files. Why are only a few of these ".o" files missing, while they're clearly needed to build a binary?

    [user@hostname Espruino-master]$ sudo STM32F411DISCOVERY=1 RELEASE=1 WIZNET=1 make serialflash
    [sudo] password for user: 
    fatal: Not a git repository (or any of the parent directories): .git
    fatal: Not a git repository (or any of the parent directories): .git
    fatal: Not a git repository (or any of the parent directories): .git
    fatal: Not a git repository (or any of the parent directories): .git
    fatal: Not a git repository (or any of the parent directories): .git
    
    ... more fatal errors ...
    
    fatal: Not a git repository (or any of the parent directories): .git
    fatal: Not a git repository (or any of the parent directories): .git
    fatal: Not a git repository (or any of the parent directories): .git
    CC libs/network/wiznet/network_wiznet.o
    In file included from /home/user/Downloads/Espruino-master/src­/jsvar.h:17:0,
                     from /home/user/Downloads/Espruino-master/src­/jsparse.h:17,
                     from /home/user/Downloads/Espruino-master/src­/jsinteractive.h:17,
                     from libs/network/wiznet/network_wiznet.c:14:­
    /home/user/Downloads/Espruino-master/src­/jsutils.h:20:20: fatal error: string.h: No such file or directory
     [#include](http://forum.espruino.com/sea­rch/?q=%23include) <string.h>
                        ^
    compilation terminated.
    make: *** [Makefile:1875: libs/network/wiznet/network_wiznet.o] Error 1
    [user@hostname Espruino-master]$ 
    

    Also noteworthy is that im using a FT232RL USB-Serial converter and plugging into a breadboard with bare STM32F411CEU6 broken out to 0.1". No peripherals, just the capacitors that ST and my 3.3V regulator calls for. Pin 44(BOOT0) is connected to 3.3V and pin 20(PB2) is connected to GND

    Are Rx and Tx supposed to cross on their way from FT232RL to STM32?

    Any pointers are appreciated, thank you

  • Yes, RX and TX should be swapped, but you're not getting that far.

    Could you try getting the code using git clone https://github.com/espruino/Espruino first? It looks like maybe you downloaded a zip or something and that's causing some issues.

    The lack of string.h in the error is a bit worrying though - that should be part of GCC really, so it sounds like your compiler isn't set up right. Did you follow the docs on GitHub?

  • In fact I had downloaded a zip. But today I tried the

    git clone https://github.com/espruino/Espruino
    

    method. And sort of good news, I got a different error.

    [user@hostname Espruino]$ sudo STM32F411DISCOVERY=1 WIZNET=1 make
    CC src/jslex.o
    In file included from /home/user/Downloads/building-espruino-4­11/Espruino/targetlibs/arm/core_cm4.h:14­3:0,
                     from /home/user/Downloads/building-espruino-4­11/Espruino/targetlibs/stm32f4/lib/stm32­f411xe.h:160,
                     from /home/user/Downloads/building-espruino-4­11/Espruino/targetlibs/stm32f4/lib/stm32­f4xx.h:173,
                     from /home/user/Downloads/building-espruino-4­11/Espruino/gen/platform_config.h:13,
                     from src/jsutils.h:17,
                     from src/jslex.h:17,
                     from src/jslex.c:14:
    /usr/lib/gcc/arm-none-eabi/6.2.0/include­/stdint.h:9:26: fatal error: stdint.h: No such file or directory
     # include_next <stdint.h>
                              ^
    compilation terminated.
    make: *** [Makefile:1884: src/jslex.o] Error 1
    [user@hostname Espruino]$ 
    
    

    I see it knew to grab my /usr/lib/gcc/arm-none-eabi this time, so i assume it's not a path problem.

  • the contents of

    /usr/lib/gcc/arm-none-eabi/6.2.0/include­/stdint.h
    

    are:

    ifndef _GCC_WRAP_STDINT_H
    if __STDC_HOSTED__
     if defined __cplusplus && __cplusplus >= 201103L
      undef __STDC_LIMIT_MACROS
      define __STDC_LIMIT_MACROS
      undef __STDC_CONSTANT_MACROS
      define __STDC_CONSTANT_MACROS
     endif
     include_next <stdint.h>
    else
     include "stdint-gcc.h"
    endif
    define _GCC_WRAP_STDINT_H
    endif
    
    

    [NOTE: in the contents above, I removed the "#" at the beginning of each line to prevent forum language from seeping through like this]

    [#endif](https://forum.espruino.com/sear­ch/?q=%23endif)
    

    , seems like it is trying to call itself, via

    # include_next <stdint.h>
    

    and failing.

  • Looks like you're maybe using the wrong compiler version. It's 6.2?

    Looking at https://launchpad.net/gcc-arm-embedded (the recommended one) the lastest stable version there is 5.4. Maybe you could try using that?

  • Okay I'm back. This time, I ditched Arch for Ubuntu 14.04 temporarily (This is a gnome-boxes VM) . And I ran the following commands starting inside the home folder:

    sudo apt-get install git ### install git dependency
    git clone https://github.com/espruino/Espruino ### download the repository into the home folder as ~/Espruino/
    sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa ### add the untrusted ppa as instructed by launchpad.net
    sudo apt-get update ### refresh repository databases
    sudo apt-get install apt-file
    sudo apt-file update ### apt-file needed to search for the proper toolchain package
    apt-file search arm-none ### conduct search; shows gcc-arm-none-eabi
    sudo apt-get install gcc-arm-none-eabi
    cd Espruino/ ### will receive an error here if not in home folder
    STM32F411DISCOVERY=1 RELEASE=1 make ### as per Espruino github instructions
    

    I received the following error:

    cc1: some warnings being treated as errors
    make: *** [targets/stm32/jshardware.o] Error 1
    make: *** wait: No child processes.  Stop.
    

    The stack trace is very long, but I can provide it if necessary via a bash output file.

  • which version of GCC is it? try arm-none-eabi-gcc --version.

    I usually:

    And then run make.

  • The output of:

    arm-none-eabi-gcc --version
    

    is:

    arm-none-eabi-gcc (4.8.2-14ubuntu1+6) 4.8.2
    Copyright (C) 2013 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    

    so it's not 5.4 like you said earlier. I'll work on the tar-extraction method now.

  • The output of:

    arm-none-eabi-gcc --version
    

    is:

    arm-none-eabi-gcc (4.8.2-14ubuntu1+6) 4.8.2
    Copyright (C) 2013 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    

    so it's not 5.4 like you said earlier. I'll work on the tar-extraction method now.

    EDIT

    I removed the compiler package with

    
    Then, downloaded the tarball ```gcc-arm-none-eabi-5_4-2016q3-20160926­-linux.tar.bz2```
    
    It has a SHA1 hash of ```e87bbefaccbb43d30c084faeb945f4e96e7ec­780```
    
    unpacked it into my home folder, and afterward, listing home folder contents with ls:
    
    

    Desktop Downloads examples.desktop Music Public Videos
    Documents Espruino gcc-arm-none-eabi-5_4-2016q3 Pictures Templates

    
    Then I editted the ```/etc/environment``` file to be ```PATH="/usr/local/sbin:/usr/local/bin:­/usr/sbin:/usr/bin:/sbin:/bin:/usr/games­:/usr/local/games:/home/user/gcc-arm-non­e-eabi-5_4-2016q3"```
    
    Rebooted then ```cd ~/Espruino```.
    
    At this point, ```make``` returns
    
    

    LD espruino
    /usr/bin/ld: cannot find -lstdc++
    collect2: error: ld returned 1 exit status
    make: *** [espruino] Error 1

    and ```STM32F411DISCOVERY=1 RELEASE=1 make``` returns
    
    

    CC targets/stm32/jshardware.o
    make: gcc-arm-none-eabi: Command not found
    make: *** [targets/stm32/jshardware.o] Error 127
    ```

  • make failing is just because you don't have the stuff installed to build for Linux - that's not an issue.

    But gcc-arm-none-eabi: Command not found is odd, since it should be trying to execute arm-none-eabi-gcc. Did you modify the makefile to work with the compiler you tried previously?

  • I understand that once i fix the Command not found issue, make will sort itself out by taking instructions from the makefile

    What method do you normally use to add a command to the path? In my limitted understanding, I managed to get the /etc/environment file to work for me before, but if there's a better way, please comment. I'm here again with a freshly installed Ubuntu 14.04 VM.

    The build process was successful on Arch Linux without a VM. I installed the compiler in the following manner: yaourt arm-none-eabi-gcc49-linaro

    The AUR package took about 30 minutes to build on a 4GHz Core i7
    And Espruino took maybe 5 minute to build.

    Now for the hardware step

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

having trouble building espruino for STM32F411DISCOVERY

Posted by Avatar for user66772 @user66772

Actions