mbed-cli: mbed.h: No such file or directory with mbed new --mbedlib
mbed new --mbedlib
not expand .h files.
Does https://mbed.org/users/mbed_official/code/mbed/builds/3a7713b1edbc
has problem?
C:\mbed>mbed new test --mbedlib
[mbed] Creating new program "test" (git)
[mbed] Adding library "mbed" from "https://mbed.org/users/mbed_official/code/mbed/builds" at branch/tag "tip"
[mbed] Unpacking library build "3a7713b1edbc" in "C:\mbed\test\mbed"
[mbed] Unpacking library build "3a7713b1edbc" in "C:\mbed\test\mbed"
[mbed] Updating reference "mbed" -> "https://mbed.org/users/mbed_official/code/mbed/builds/3a7713b1edbc"
[mbed] Couldn't find build tools in your program. Downloading the mbed 2.0 SDK tools...
C:\mbed>cd test
C:\mbed\test>notepad main.cpp
C:\mbed\test>mbed compile -t GCC_ARM -m LPC11U35_401
Building project test (LPC11U35_401, GCC_ARM)
Scan: test
Compile [100.0%]: main.cpp
[Fatal Error] main.cpp@1,18: mbed.h: No such file or directory
[ERROR] .\main.cpp:1:18: fatal error: mbed.h: No such file or directory
#include "mbed.h"
^
compilation terminated.
[mbed] ERROR: "c:\python27\python.exe" returned error.
Code: 1
Path: "C:\mbed\test"
Command: "c:\python27\python.exe -u C:\mbed\test\.temp\tools\make.py -t GCC_ARM -m LPC11U35_401 --source . --build .\BUILD\LPC11U35_401\GCC_ARM"
Tip: You could retry the last command with "-v" flag for verbose output
---
C:\mbed\test>
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 2
- Comments: 28 (10 by maintainers)
Hey folks, I took a look and indeed
mbed.h
is missing from the releases with the hashes65be27845400
and3a7713b1edbc
. I can confirm what @toyowata said (thanks very much!), thee95d10626187
revision does contain thembed.h
. If you need to work offline, I would recommend using that revision if possible. If you need the latest versions, I have found that the online compiler still seems to be working. I will be pursuing this issue more, thanks for raising this (and sorry for the slow response).@0xc0170 He sent the email to me.
@toyowata thanks, but it fails.
ends with strange thing that e95d10626187 is not a e95d10626187, it is 65be27845400:
Hey everyone, just dropping in on you all to say I’ve encountered this issue today with revision 65be27845400, trying to compile mbed OS 2 with mbed CLI for a STM32F042K6 eval board. Anything new on this issue ?
`mbed compile --clean --target nucleo_f042k6 --toolchain GCC_ARM --profile debug [mbed] Working path “/home/corentin/dev/test-mbed2-1” (program) WARNING: MBED_GCC_ARM_PATH set as environment variable but doesn’t exist [Error] @,: Compiler version mismatch: Have 7.3.1; expected version >= 6.0.0 and < 7.0.0 Building project test-mbed2-1 (NUCLEO_F042K6, GCC_ARM) Scan: test-mbed2-1 Compile [100.0%]: main.cpp [Fatal Error] main.cpp@1,10: mbed.h: No such file or directory [ERROR] ./main.cpp:1:10: fatal error: mbed.h: No such file or directory #include “mbed.h” ^~~~~~~~ compilation terminated.
[mbed] ERROR: “/usr/bin/python” returned error. Code: 1 Path: “/home/corentin/dev/test-mbed2-1” Command: “/usr/bin/python -u /home/corentin/dev/test-mbed2-1/.temp/tools/make.py -t GCC_ARM -m nucleo_f042k6 --profile debug --source . --build ./BUILD/NUCLEO_F042K6/GCC_ARM-DEBUG -c” Tip: You could retry the last command with “-v” flag for verbose output —`