• Fri 2021.09.24

    I had VSCode running and building on Win10 two years ago running through instructions at:

    https://github.com/espruino/Espruino/blo­b/master/README_BuildProcess.md

    This week I cloned the current git source to work on a related project. After several failed attempts, I decided to perform a sanity check with a basic PICO build version, from notes created two years ago.

    Now, just making the attempt to set the environment var, causes this error:

    rgc@DESKTOP-R7T0VUC:/mnt/c/Users/robin/E­spruino$ BOARD=PICO make
    CC /mnt/c/Users/robin/Espruino/targetlibs/s­tm32f4/lib/startup_stm32f401xx.o
    make: arm-none-eabi-gcc: Command not found
    Makefile:810: recipe for target '/mnt/c/Users/robin/Espruino/targetlibs/­stm32f4/lib/startup_stm32f401xx.o' failed
    make: *** [/mnt/c/Users/robin/Espruino/targetlibs/­stm32f4/lib/startup_stm32f401xx.o] Error 127
    



    Upon checking my local folder structure, I notice there is a board of the same file name with extention 's' rather than 'o'

    C:\Users\robin\Documents\Espruino\Esprui­no\targetlibs\stm32f4\lib\startup_stm32f­401xx.s

    Honestly, I don't have enough experience to know what should be happening under the hood. Did I miss something in the build process instructions, or is the current new clone not building the 'o' ext that is now causing this error?

    Posted early, I'm going back over the instructions to see if I missed something.

  • Later that day:

    Attempted to install a cross compiler per:  (although I am unable to truly understand what this might do)

    https://stackoverflow.com/questions/6413­1523/arm-none-eabi-gcc-not-found-on-wind­ows-10-stm32ide

    gcc-arm-none-eabi-10.3-2021.07-win32.exe­
    Windows 32-bit Installer (Signed for Windows 10 and later) (Formerly SHA2 signed binary)
    MD5: f32c295f416d00c6de463d513675fbbc
    

    Upgraded VSCode to 1.60.2

    Version: 1.60.2 (system setup)
    Commit: 7f6ab5485bbc008386c4386d08766667e155244e­
    Date: 2021-09-22T12:00:31.514Z
    Electron: 13.1.8
    Chrome: 91.0.4472.164
    Node.js: 14.16.0
    V8: 9.1.269.39-electron.0
    OS: Windows_NT x64 10.0.19042
    

    But alas, still the same error.

  • Trying to re-install GCC

    https://code.visualstudio.com/docs/cpp/c­onfig-mingw

    Mistake - That hosed my PATH var.

    Spending next hour re-editing / re-building

  • Espruino is using gcc arm 8 q4, not sure if 10 like you installed will compile smoothly.

    check provision.sh https://github.com/espruino/Espruino/blo­b/042dbffdd585a1b1654b18688be0be9c9b6a7f­96/scripts/provision.sh#L225

  • Sat 2021.09.25 06:59am CST

    Thank you for taking a peek into this @MaBe   Just put on the first pot of coffee to get back at this. That link should assist in a basic understanding of what parts (apps?) should be in place, although it's a bit convoluted for my understanding at the moment.

    I took that user response at face value and just gave it a try as I didn't have any true idea of what is going on. A simple un-install might cure that, as it appears that only a part of the PATH var was prefixed. Something else to repair.

    It just dawned on me that I upgraded nRFConnect and specifically the Programmer sub-app three weeks ago. I'm wondering if anything in it's set of flashing tools might have hosed something.

    Off to check as I start on this first cup! . . . .

  • Sat 2021.09.25 07:41am CST

    Well, this really Bites!

    BEWARE and take note - others on Windows10

    As I set a restore point before I performed the nRFConnect upgrade three weeks ago, I went to restore to that point just before that upgrade in order to determine if VSCode would run as it did before the nRFConnect upgrade.

    Sadly, this new version of Windows10 ver 20H2 performs a system Automatic Restore Point AND removes all the previous restore points prior. S#!t

    Until around 18 months ago it was possible to restore all the way back to when Windows was first installed. A limit was put in place shortly after that kept the number of restore points to around the last five. Now I am unable to even go back before the last three days, and I performed my own restore point creation three weeks ago. This does indeed BITE!

  • If you are on Windows 10 then I'd suggest to do it in WSL - Windows subsystem for Winux with some Ubuntu inside. I have Ubuntu 18.04 in WSL1 and Ubuntu 20.04 in WSL2 and both builds Espruino, WSL1 with older Ubuntu is probably easier to setup.

    see https://wiki.ubuntu.com/WSL

    If you already have WSL (previously called Bash on Windows) (because of /mnt/c/Users/robin/Espruino?) then I don't understand why you try to install gcc toolchain on windows side. Maybe even running Espruino provision script would get it for you?

    Or are you using mingw? Then I'd recommend installing WSL instead , version 1 should be enough. Mingw is good for building linux/posix stuff as windows native binaries, you don't need that with Espruino and WSL gives you better compatibility.

    As for VSCode on windows side - there is WSL remoting plugin for VSCode so you can have Espruino inside WSL linux distro and VSCode can connect to it for editing and working with GIT. The ubuntu wiki page mentions it too.

  • Sat 2021.09.25 - 09:18am CST

    Thank you for responding @fanoush

    re: 'then I don't understand why you try to install gcc toolchain on windows side'

    As pointed out above, two years ago with the assistance of @AkosLukacs thread, I was able to get VSCode running with a WSL terminal Window. I was successful in building the PICO build then. Total cumulative experience, <2 hrs.

    I have no clue why a perfectly working setup would all of a sudden stop working. other than installs corrupting as I surmise

    It appears, post #5 and #6 that my install of nRFConnect did something mysterious as when I first loaded VSCode and tried examples that I couldn't get past the very first instruction setting the env var. I started this thread.

    I installed gcc as a user on StackExchange indicated doing that task solved his issue. I knew it was a long shot, so I tried it lacking any near immediate response within this thread, and trying to get a head start on solving the configuration issue before the weekend started so that I could perform some flashing this weekend. Maybe in my haste, I've added another headache???? We'll see.

    I've just gone over all the Win10 environment vars, and am satisfied, so a reboot is in order. Just making a few notes and backups before I reboot and get ready for what doesn't happen after Ctrl+Alt+Del.

    Will be off line for fifteen minutes inspecting what may not recover ;-)

  • reply to post #7

    I'm running a WSL terminal window from inside VSCode. No virtual drive.

    'Maybe even running Espruino provision script would get it for you?'

    Using suggestions from:

    Espruino Build issues using README_BuildProcess.md

    and

    https://github.com/espruino/Espruino/blo­b/master/README_Building.md#for-espruino­

    Simply run the following with the name of your board to set your computer up ready for a build:

    rgc@DESKTOP-R7T0VUC:/mnt/c/Users/robin/E­spruino$ source scripts/provision.sh PICO
    Traceback (most recent call last):
      File "scripts/get_board_info.py", line 39, in <module>
        board = importlib.import_module(boardname)
      File "/usr/lib/python2.7/importlib/__init__.p­y", line 37, in import_module
        __import__(name)
    ImportError: No module named PICO
    UNKNOWN BOARD (PICO)
    rgc@DESKTOP-R7T0VUC:/mnt/c/Users/robin/E­spruino$
    



    So, is it Python that isn't running???? I just cloned the Espruino respository a day or two ago.

    PICO board file is there:

    C:\Users\robin\Documents\Espruino\Esprui­no\boards\PICO_R1_3.py

    I noticed while reviewing the Env Vars that nRFConnect installs a more recent version of Python and changes the path.

    I've just edited the path back to what it was and will now reboot.

  • Sat 2021.09.25 - 09:58am CST

    I'm running a WSL terminal window from inside VSCode. No virtual drive.

    https://github.com/espruino/Espruino/blo­b/master/README_Building.md#for-espruino­

    sudo apt-get update
    sudo apt-get install -y \
      build-essential git python python-pip
    sudo pip install --upgrade pip
    # User choice for placement of source repos
    mkdir -p ~/source/repos/github/espruino
    cd ~/source/repos/github/espruino
    git clone https://github.com/espruino/Espruino.git­
    cd Espruino
    make clean && make
    chmod +x espruino && sudo cp espruino /usr/local/bin
    


    Just re-entered these commands and the second to last, the make clean && make now runs for an extended period which it hadn't before.

    So I thought success. Except when I run:

    rgc@DESKTOP-R7T0VUC:/mnt/c/Users/robin/E­spruino$ BOARD=PICO make
    CC /mnt/c/Users/robin/Espruino/targetlibs/s­tm32f4/lib/startup_stm32f401xx.o
    make: arm-none-eabi-gcc: Command not found
    Makefile:810: recipe for target '/mnt/c/Users/robin/Espruino/targetlibs/­stm32f4/lib/startup_stm32f401xx.o' failed
    make: *** [/mnt/c/Users/robin/Espruino/targetlibs/­stm32f4/lib/startup_stm32f401xx.o] Error 127    
    rgc@DESKTOP-R7T0VUC:/mnt/c/Users/robin/E­spruino$
    



    Just looked and there isn't a startup_stm32f401xx.o file just a startup_stm32f401xx.s

    Does that provide a clue to anyone??

  • Just looked and there isn't a startup_stm32f401xx.o file just a startup_stm32f401xx.s

    Isn't arm-none-eabi-gcc: Command not found message in plain English? It cannot compile startup_stm32f401xx.s into startup_stm32f401xx.o without compiler.

    You should run the provision script with board name that exists there i.e. PICO_R1_3
    there is no boards/PICO.py file

  • Sat 2021.09.25 - 11:18am CST

    'Isn't arm-none-eabi-gcc: Command not found message in plain English?'

    Okay, I'll take the bullet for that one, but which part of the environment is complaining?
    The command for: WSL the terminal window, Make, GCC, Python or the Make script itself?

    While I'll freely admit I have only around <2hrs of practical poking my nose around two years ago after getting VSCode to actually do something useful and haven't made a build attempt since, it's likely you have >2000+ hrs combined over the years.

    How is one to deduce that a file is to be created when the error states a 'Command not found' prompt? The error suggests an issue with the 'recipe' file.

    Still too cryptic from a casual observer view.

  • Sat 2021.09.25 - 11:49am CST

    'there is no boards/PICO.py file'

    Somewhere in the documentation I took the literal text 'PICO' as the only valid board name in the list of available boards. 'PICO_R1_3.py' is a filename. Subtle difference, but I'm following the documentation verbatim. Just can't find that location on github right now, but will post when I stumble across it.

    So, no this error doesn't explain what may be intuitive to you.

    'Isn't arm-none-eabi-gcc: Command not found message in plain English?'



    I guess it comes with experience:

    'Experience is what you get when you dont get what you wanted!'

  • Sat 2021.09.25 - 12:24pm CST

    Back online after two separate reboots. The PATH Env var is now half it's expected corrupt size, and using the clarification text now allows the installation of gcc which both @MaBe and @fanoush expected was the culprit.

    Not 100% sure the actual configuration fix, but likely the fact two versions of Python were present, the unexpected 2nd as a result of updating nRFConnect as from my original hunch.

    This is new:

    Provision FAMILY = STM32F4 
    ===== ARM
    installing gcc-arm-embedded
    rgc@DESKTOP-R7T0VUC:/mnt/c/Users/robin/E­spruino$
    



    A new version GCC being installed

  • Sat 2021.09.25 - 12:41pm CST

    Finally progress! Make is trying to do something.

    Thank you @fanoush as I now see the .o files being built within the terminal window.



    Even with a preceeding:

    make clean && make
    

    not out of the woods yet,

    and knowing I just recently cloned Espruino, still won't build without error;

    libs/filesystem/fat_sd/spi_diskio.c:556:­23: warning: conversion to 'DWORD' {aka 'long unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion]
           *(DWORD*)buff = ((WORD)((csd[10] & 124) >> 2) + 1) * (((csd[11] & 3) << 3) + ((csd[11] & 224) >> 5) + 1);
                           ^
    CC targets/stm32/jshardware.o
    libs/tv/tv.c:80:30: error: unknown type name 'TIM_TypeDef'
     unsigned int jshGetTimerFreq(TIM_TypeDef *TIMx);
                                  ^~~~~~~~~~~
    libs/tv/tv.c: In function 'TIM4_IRQHandler':
    libs/tv/tv.c:91:3: error: implicit declaration of function 'TIM_ClearITPendingBit' [-Werror=implicit-function-declaration]
       TIM_ClearITPendingBit(TVTIMER, TIM_IT_Update);
       ^~~~~~~~~~~~~~~~~~~~~
    libs/tv/tv.c:64:31: error: 'TIM4' undeclared (first use in this function)
     [#define](https://forum.espruino.com/sea­rch/?q=%23define) TVTIMER               TIM4
                                   ^~~~
    libs/tv/tv.c:108:27: error: 'SPI_I2S_IT_RXNE' undeclared (first use in this function)
       SPI_I2S_ITConfig(TVSPI, SPI_I2S_IT_RXNE, DISABLE);
                               ^~~~~~~~~~~~~~~
    libs/tv/tv.c:108:44: error: 'DISABLE' undeclared (first use in this function)
       SPI_I2S_ITConfig(TVSPI, SPI_I2S_IT_RXNE, DISABLE);
                                                ^~~~~~~
    libs/tv/tv.c:111:3: error: implicit declaration of function 'RCC_AHB1PeriphClockCmd'; did you mean 'RCC_AHB1Periph_TVDMA'? [-Werror=implicit-function-declaration]
       RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_TV­DMA, ENABLE);
       ^~~~~~~~~~~~~~~~~~~~~~
       RCC_AHB1Periph_TVDMA
    libs/tv/tv.c:62:32: error: 'RCC_AHB1Periph_DMA2' undeclared (first use in this function); did you mean 'RCC_AHB1Periph_TVDMA'?
     [#define](https://forum.espruino.com/sea­rch/?q=%23define) RCC_AHB1Periph_TVDMA   RCC_AHB1Periph_DMA2
                                    ^~~~~~~~~~~~~~~~~~~
    libs/tv/tv.c:111:26: note: in expansion of macro 'RCC_AHB1Periph_TVDMA'
       RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_TV­DMA, ENABLE);
                              ^~~~~~~~~~~~~~~~~~~~
    libs/tv/tv.c:111:48: error: 'ENABLE' undeclared (first use in this function)
       RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_TV­DMA, ENABLE);
                                                    ^~~~~~
    libs/tv/tv.c:117:3: error: unknown type name 'DMA_InitTypeDef'
       DMA_InitTypeDef DMA_InitStructure;
       ^~~~~~~~~~~~~~~
    libs/tv/tv.c:118:3: error: implicit declaration of function 'DMA_StructInit'; did you mean 'graphicsStructInit'? [-Werror=implicit-function-declaration]
       DMA_StructInit(&DMA_InitStructure);
       ^~~~~~~~~~~~~~
       graphicsStructInit
    libs/tv/tv.c:119:20: error: request for member 'DMA_PeripheralBaseAddr' in something not a structure or union
       DMA_InitStructure.DMA_PeripheralBaseAddr­ = (uint32_t)(&(TVSPI->DR));
                        ^
    libs/tv/tv.c:120:20: error: request for member 'DMA_PeripheralDataSize' in something not a structure or union
       DMA_InitStructure.DMA_PeripheralDataSize­ = DMA_PeripheralDataSize_Byte; // DMA_PeripheralDataSize_HalfWord and 16 bit?
                        ^
    libs/tv/tv.c:120:46: error: 'DMA_PeripheralDataSize_Byte' undeclared (first use in this function)   DMA_InitStructure.DMA_PeripheralDataSize­ = DMA_PeripheralDataSize_Byte; // DMA_PeripheralDataSize_HalfWord and 16 bit?
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    libs/tv/tv.c:121:20: error: request for member 'DMA_PeripheralInc' in something not a structure or union
       DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;
                        ^
    CC targets/stm32/stm32_it.o
    libs/tv/tv.c:121:41: error: 'DMA_PeripheralInc_Disable' undeclared (first use in this function)  
       DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~
    libs/tv/tv.c:122:20: error: request for member 'DMA_MemoryDataSize' in something not a structure 
    or union
       DMA_InitStructure.DMA_MemoryDataSize = DMA_PeripheralDataSize_Byte;
                        ^
    libs/tv/tv.c:123:20: error: request for member 'DMA_MemoryInc' in something not a structure or union
       DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;
                        ^
    libs/tv/tv.c:123:37: error: 'DMA_MemoryInc_Enable' undeclared (first use in this function)       
       DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;
    



    Is there any way to get the make output to stop generating output once an error is detected?

    The terminal window scrolls the earliest off the top.

    Ctrl+C    hit-n-miss

  • Sat 2021.09.25 - 12:53pm CST

    Similar errors occur for WIFI also:

    make clean && make
    source scripts/provision.sh ESPRUINOWIFI
    BOARD=ESPRUINOWIFI make
    
    CC libs/tv/tv.o
    CC targets/stm32/jshardware.o
    CC targets/stm32/stm32_it.o
    libs/tv/tv.c:80:30: error: unknown type name 'TIM_TypeDef'
     unsigned int jshGetTimerFreq(TIM_TypeDef *TIMx);
                                  ^~~~~~~~~~~
    libs/tv/tv.c: In function 'TIM4_IRQHandler':
    libs/tv/tv.c:91:3: error: implicit declaration of function 'TIM_ClearITPendingBit' [-Werror=implicit-function-declaration]
       TIM_ClearITPendingBit(TVTIMER, TIM_IT_Update);
       ^~~~~~~~~~~~~~~~~~~~~
    libs/tv/tv.c:64:31: error: 'TIM4' undeclared (first use in this function)
     [#define](https://forum.espruino.com/sea­rch/?q=%23define) TVTIMER               TIM4
                                   ^~~~
    libs/tv/tv.c:91:25: note: in expansion of macro 'TVTIMER'
       TIM_ClearITPendingBit(TVTIMER, TIM_IT_Update);
                             ^~~~~~~
    
    cc1: some warnings being treated as errors
    Makefile:797: recipe for target 'targets/stm32/jshardware.o' failed
    make: *** [targets/stm32/jshardware.o] Error 1
    rgc@DESKTOP-R7T0VUC:/mnt/c/Users/robin/E­spruino$
    
  • Thr 2021.09.30

    This parallels the build issues here:

    build error: src/jslex.o make: *** [espruino_2v08.220_nrf52840.elf] Error 1

    Rather than monitor two separate threads, I'm continuing resolution at the above link.

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

Firmware build for PICO fails - make: *** [lib/startup_stm32f401xx.o] Error 127

Posted by Avatar for Robin @Robin

Actions