Closed soramame21 closed 6 years ago
cc @bcostm @LMESTM @adustm @jeromecoutant
@theotherjimmy
@soramame21 Please add arm-none-eabi-gcc
and friends to your path.
@theotherjimmy what do you mean?
C:\ioT\testpod\oob5.6\mbed-os-example-fat-filesystem>arm-none-eabi-gcc --version arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437] Copyright (C) 2016 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.
You need to be able to run the executable arm-none-eabi-gcc
and other executables named arm-none-eabi-*
without specifying the full path to that executable. To do this add the location of these executables to your PATH environment variable.
@theotherjimmy yes, I added my PATH setting in the description.
~Did you make sure to restart the terminal you were using after setting up your path?~
So you clearly did.
Odd, If that works, then the makefile should work from the same terminal
I didn't change PATH setting for gcc. because it works well so far. now I verified and found 2 versions of arm-none-eabi-gcc are installed. my environment variable are as following.
MBED_GCC_ARM_PATH=C:\Program Files (x86)\GNU Tools ARM Embedded\5.4 2016q3\bin PATH=;;; C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin;...
The 2nd version (6-2017-q2-update) is valid on command line.
@soramame21 I really don't know what's going wrong with your setup. I can't reproduce the issue on my machine. Though my machine does use Linux...
@soramame21 Maybe the space in front of the ;
in the path? On the other hand, If you can run the compiler from the command line, I don't know why make can't run the compiler.
@theotherjimmy the following path included in the generated Makefile is correct?? "../" must be removed.
INCLUDE_PATHS += -I../ INCLUDE_PATHS += -I../. INCLUDE_PATHS += -I.././DebugConfig INCLUDE_PATHS += -I.././mbed-os INCLUDE_PATHS += -I.././mbed-os/cmsis INCLUDE_PATHS += -I.././mbed-os/cmsis/TARGET_CORTEX_M INCLUDE_PATHS += -I.././mbed-os/cmsis/TARGET_CORTEX_M/TOOLCHAIN_GCC INCLUDE_PATHS += -I.././mbed-os/cmsis/TOOLCHAIN_GCC INCLUDE_PATHS += -I.././mbed-os/drivers INCLUDE_PATHS += -I.././mbed-os/events INCLUDE_PATHS += -I.././mbed-os/events/equeue INCLUDE_PATHS += -I.././mbed-os/features
the following path included in the generated Makefile is correct??
Those paths are correct
"../" must be removed.
../
must not be removed.
The garbage looking stuff at the top of the makefile re-runs make in the build directory, required the ../
prefix on include paths.
INCLUDE_PATHS += -I.././DebugConfig
This looks like you did one export after another without cleaning between. That is not supported, and you should make sure to clean up your directories after doing an export.
@soramame21 Further, those issues that you mention have nothing to do with the error you are seeing.
make (e=2): The system cannot find the file specified.
Is the error you get when you can't run the compiler. If it was complaining about not finding an include file, you would get a gcc-style error as well.
I modified tools/export/GettingStarted.html following the pull reuqest below, but still get the same error. https://github.com/ARMmbed/mbed-os/pull/5149/files
@soramame21 Yeah, that's just a documentation thing. It's not going to affect the Makefile at all.
@theotherjimmy I uploaded my generated Makefile, Could you verify it please?
@soramame21 I don't know what you want me to verify about it. It looks like an exported makefile, and nothing catches my eye as wrong.
@theotherjimmy I rebooted my PC, windows 10 and ran following command then got the same error.
C:\ioT\testpod\oob5.6\mbed-os-example-fat-filesystem\BUILD>arm-none-eabi-g++ -std=gnu++98 -fno-rtti -Wvla -c -o main.o ../main.cpp arm-none-eabi-g++: error: CreateProcess: No such file or directory
once I removed ../main.cpp, then I got the expected error.
C:\ioT\testpod\oob5.6\mbed-os-example-fat-filesystem\BUILD>arm-none-eabi-g++ -std=gnu++98 -fno-rtti -Wvla -c -o main.o arm-none-eabi-g++: fatal error: no input files compilation terminated.
@soramame21 Thanks for the debug info. That's very strange.
Oh, That might be related to the fact that GCC will execute the preprocessor/assembler in a process...
You might want to check that the arm-none-eabi-* binutils are in your path.
I think that you need:
arm-none-eabi-as
(asseblmer)arm-none-eabi-cpp
(preprocessor)arm-none-eabi-g++
(c++ compiler)arm-none-eabi-c++
(also the c++ compiler)arm-none-eabi-gcc
(the frontend to all of the others)arm-none-eabi-ld
(the linker)There might be a few more, let me llook and get back to you.
Looking about the internet, I have seen reports that you may need to run make
from within the appropriate Mingw or Cygwin environment if that's where you installed the arm-none-eabi-gcc toolchain.
Also according to various reports from all over the internet, a reboot may solve it.
it looks like a gcc installation problem, here are a lot of reports: https://stackoverflow.com/questions/3848357/createprocess-no-such-file-or-directory Do you have some other MinGW or Cygwin stuff installed and in the environment? That may interfere.
@theotherjimmy, @JojoS62 Thanks for your comments. I don't install MinGW or Crgwin on my environment so far. I'm just using windows command prompt, mbed compile with gcc_arm works well and Makefile generated by "mbed export -i make_iar" can make without error.
@theotherjimmy, @JojoS62 I can build the example after reinstalling Gnu toolchain, and passed the test. thank you for your support, I close this issue. cc @MarceloSalazar
Description
Bug
Target NUCLEO_F767ZI |??
Toolchain: GCC
PATH setting Path=;;; C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin; ;;;
Toolchain version: arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437]
mbed-cli version: 1.2.0
mbed-os sha: mbed-os-example-fat-filesystem (08607866ff3f09b75e429ac0432587478d5e1fc3) mbed-os (6e087488e10143222b3b08790eb45600c784a309)
Expected behavior Make can pass to generate a binary executable without error.
Actual behavior Make get failed.
Steps to reproduce
generated Makefile
Makefile.zip