Cannot find the mbed tools directory

Hello, I trying to compile project: https://github.com/ARM-software/ML-KWS-for-MCU/tree/master/Deployment, which was created by mbed. I worked with kws_realtime_test project for STM32F746NG board. I m trying to compile on Windows7 machine in command line.

I made step by step everything by the attached README.md file, from an above mentioned project.

When I call mbed deploy, than I get a warning message:

[mbed] WARNING: Cannot find the mbed tools directory in “D:\KWDetectOn746Dev_v00\Deploy\kws_realtime_test”

And when I try to compile than I get an error:

[mbed] ERROR: The mbed tools were not found in “D:\KWDetectOn746Dev_v00\Deploy\kws_realtime_test”.
You can run “mbed deploy” to install dependencies and tools.

On some forum I read, that I need to add mbed-os to my project
Link: https://os.mbed.com/questions/81212/warning-The-mbed-tools-were-not-found-in/

When I add that, I can deploy the project without any warning, but I have an error after compile:

Include
[ERROR] Library name ‘platform’ is not unique (defined in ‘D:\KWDetectOn746Dev_v00\Deploy\kws_realtime_test\mbed\65be27845400\TARGET_DISCO_F746NG\TOOLCHAIN_GCC_ARM\mbed_lib.json’ and ‘D:\KWDetectOn746Dev_v00\Deploy\kws_realtime_test\mbed-os\platform\mbed_lib.json’)
[mbed] Working path “”

I tried to remove one of .json files, and the compilation finally can start, but after 10% I get many compiler errors. My compiler cant compile source files from mbed-os directory. Im using GNU GCC compiler.

Part of error messages:

Compile [ 11.6%]: AUDIO_DISCO_F746NG.cpp
[Error] c++0x_warning.h@32,2: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
[Warning] Kernel.h@87,5: identifier ‘constexpr’ is a keyword in C++11 [-Wc++11-compat]
[Warning] mstd_new@43,1: identifier ‘noexcept’ is a keyword in C++11 [-Wc++11-compat]
[Warning] mstd_new@45,5: identifier ‘static_assert’ is a keyword in C++11 [-Wc++11-compat]
[Warning] mstd_type_traits@327,22: identifier ‘decltype’ is a keyword in C++11 [-Wc++11-compat]
[Warning] Callback.h@203,5: identifier ‘nullptr’ is a keyword in C++11 [-Wc++11-compat]
[Warning] Kernel.h@74,15: defaulted and deleted functions only available with ‘-std=c++11’ or ‘-std=gnu++11’
[Error] Kernel.h@76,11: expected nested-name-specifier before ‘duration’
[Error] Kernel.h@77,11: expected nested-name-specifier before ‘rep’
[Error] Kernel.h@78,11: expected nested-name-specifier before ‘period’
[Error] Kernel.h@80,11: expected nested-name-specifier before ‘time_point’
[Error] Kernel.h@87,12: ‘constexpr’ does not name a type
[Error] Kernel.h@88,12: ‘time_point’ does not name a type
[Error] Kernel.h@95,11: expected nested-name-specifier before ‘duration_u32’
[Error] Kernel.h@114,1: ‘constexpr’ does not name a type
[Error] Kernel.h@120,1: ‘constexpr’ does not name a type

  • So how can I compile that project?
  • Why I need mbed-os to my project? It is not mentioned in readme file. Is it not enough to install mbed-tools, and no whole mbed-os? I think my project do not use any OS functionality.

I 'm working on a compilation of a simple project few days, and is going to be a really nightmare for me.

Are there any simpler way to precompile this project?

Hello Béla,

The KWS project site suggests to create a simple KWS interface program by running the command:

mbed new kws_simple_test --mbedlib 

According to the mbed-cli documentation the --mbedlib option is used when creating a mbed os 2 program.

  • Unfortunately, ARM doesn’t support mbed os 2 anymore and the --mbedlib option has no effect. Consequently, no mbed library is downloaded to the kws_simple_test folder by such command. You have to do that manually from https://github.com/ARMmbed/mbed-dev. Copy the downloaded .zip file to the kws_simple_test folder and unzip. Then rename the mbed-dev-master folder to mbed and issue the mbed deploy command (from the kws_simple_test folder) to install the mbed tools into the mbed folder.

  • Another option is to create a mbed bare-metal project (mbed os 6 without os) rather than a mbed os 2. For more info have a look at https://os.mbed.com/docs/mbed-os/v6.1/bare-metal/index.html.

Best regards, Zoltán

1 Like

Hello Zoltán,

Mine main plan was to compile the: kws_realtime_test not the kws_simple_test.

But I tried to compile the kws_simple_test proj, too. After project creating with

mbed new kws_simple_test --mbedlib

this automatically downloads the mbed library, but I think it was not complete. When I compare it by a web resource: https://os.mbed.com/users/mbed_official/code/mbed/, than I cant found the drivers, hal and platform folders and the mbed.h file, too. So I copy them manually, and than I can compile the project.

With the same method I can compile the realtime version, too.

With the downloaded mbed-dev library I cant compile the project, but it is already not important for me.

So thanks for help.

Hi Kiraly

The above is mbed2 as is mbed-dev!
Neither are supported any more. Mbed-os versions 5 and 6 are both still supported and on GitHub.

Regards
Anna

The mbed-os tools were not found
I have tried many times over many days installing and uninstalling over and over again.
I installed the v0.4.10 Windows CLI
I installed developer tools

c:\Users\jimfr\source\ATB-PoC\apps\mbed\mbed-os-example-blinky>mbed detect
[mbed] Working path “c:\Users\jimfr\source\ATB-PoC\apps\mbed\mbed-os-example-blinky” (library)
[mbed] Program path “c:\Users\jimfr\source\ATB-PoC\apps\mbed\mbed-os-example-blinky”
[mbed] WARNING: The mbed-os tools were not found in “c:\Users\jimfr\source\ATB-PoC\apps\mbed\mbed-os-example-blinky”.

c:\Users\jimfr\source\ATB-PoC\apps\mbed>mbed deploy
[mbed] Working path “c:\Users\jimfr\source\ATB-PoC\apps\mbed” (library)
[mbed] Program path “c:\Users\jimfr\source\ATB-PoC\apps\mbed”
[mbed] Updating library “ABEncoder\mbed-os” to rev #e917282d6072
[mbed] Updating library “mbed-os-example-blinky\mbed-os” to rev #d6784c3ee6ad (tags: mbed-os-6.6.0, mbed-os-6.6.0-rc1)
[mbed] WARNING: Cannot find the mbed tools directory in “c:\Users\jimfr\source\ATB-PoC\apps\mbed”

Tried removing and adding mbed-os
c:\Users\jimfr\source\ATB-PoC\apps\mbed\mbed-os-example-blinky>mbed remove mbed-os
[mbed] Working path “c:\Users\jimfr\source\ATB-PoC\apps\mbed\mbed-os-example-blinky” (library)
[mbed] Program path “c:\Users\jimfr\source\ATB-PoC\apps\mbed\mbed-os-example-blinky”
[mbed] Removing library “mbed-os” in “c:\Users\jimfr\source\ATB-PoC\apps\mbed\mbed-os-example-blinky\mbed-os”

c:\Users\jimfr\source\ATB-PoC\apps\mbed\mbed-os-example-blinky>mbed add mbed-os
[mbed] Working path “c:\Users\jimfr\source\ATB-PoC\apps\mbed\mbed-os-example-blinky” (library)
[mbed] Program path “c:\Users\jimfr\source\ATB-PoC\apps\mbed\mbed-os-example-blinky”
[mbed] Adding library “mbed-os” from “GitHub - ARMmbed/mbed-os: Arm Mbed OS is a platform operating system designed for the internet of things” at latest revision in the current branch
[mbed] Updating reference “mbed-os” -> “GitHub - ARMmbed/mbed-os: Arm Mbed OS is a platform operating system designed for the internet of things
[mbed] WARNING: Cannot find the mbed tools directory in “c:\Users\jimfr\source\ATB-PoC\apps\mbed\mbed-os-example-blinky”

I’m so frustrated!
Please help.
Thank you.

Hi
did you run the windows installer found here : Install and set up - Build tools | Mbed OS 6 Documentation ? Did you also make sure you have the correct dependencies (such as Python version installed) ?

Regards
Anna

Hello Anna,

Thank you for your response.
Yes, I ran the Windows setup in the link below.
This is my Python version:

c:\Users\jimfr\source\ATB-PoC>py --version
Python 3.7.9

What else can I check?
I really appreciate your help.
I am very anxious to get mbed working.

Thank you,
Jim

Oh, and here is the mbed CLI version:

c:\Users\jimfr\source\ATB-PoC>mbed cli --version
1.8.3

Is that correct?

Thanks again,
Jim

I am unable to get mbed installed on my Windows 10. I can’t get past
WARNING: The mbed-os tools were not found

I describe below the steps I went through to install mbed.
I hope you can point out where I went wrong.
I would be very grateful for your help.

Thank you so much.

Jim Frandeen

I started here:

Installing Mbed CLI - Quick start | Mbed OS 6 Documentation

I downloaded and ran the Windows Installer for Mbed CLI :Mbed_installer_v0.4.10.exe

All options were checked(python, mbed, git-scm, mercurial, gcc) except mbed serial driver, which was greyed out.

Installation was successful.

C:\Users\jimfr>mbed --version

1.8.3

I tried the mbed detect command:

C:\Users\jimfr>mbed detect

[mbed] Working path “C:\Users\jimfr” (directory)

[mbed] Program path “C:\Users\jimfr”

[mbed] WARNING: The mbed-os tools were not found in “C:\Users\jimfr”.

Limited information will be shown about connected targets/boards

I went to the “Install and set up – Build tools | Mbed OS 6 Documentation”

I followed the instructions to download and install Python 3.7.x

I installed Python 3.8.7 (64-bit)

I checked Install Launcher and Add Python 3.8 to Path

I tried out the python commands in the Command window:

C:\Users\jimfr>python

Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] on win32

Type “help”, “copyright”, “credits” or “license” for more information.

quit

Use quit() or Ctrl-Z plus Return to exit

quit()

C:\Users\jimfr>python3

‘python3’ is not recognized as an internal or external command,

operable program or batch file.

C:\Users\jimfr>py

Python 3.8.7 (tags/v3.8.7:6503f05, Dec 21 2020, 17:59:51) [MSC v.1928 64 bit (AMD64)] on win32

Type “help”, “copyright”, “credits” or “license” for more information.

quit()

I followed the instructions to install one of the supported compilers.

Install a compiler

Windows 32-bit Installer (Signed for Windows 10 and later) (Formerly SHA2 signed binary)

MD5: 41e9514904a1ee43d4f7882b47bc0294

C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2020-q4-major>

I tried mbed detect again:

C:\WINDOWS\system32>mbed detect

[mbed] Working path “C:\WINDOWS\system32” (directory)

[mbed] Program path “C:\WINDOWS\system32”

[mbed] WARNING: The mbed-os tools were not found in “C:\WINDOWS\system32”.

Limited information will be shown about connected targets/boards

C:\WINDOWS\system32>mbed config -G ARM_PATH “C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2020-q4-major”

[mbed] Working path “C:\WINDOWS\system32” (directory)

[mbed] Program path “C:\WINDOWS\system32”

[mbed] C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2020-q4-major now set as global ARM_PATH

C:\WINDOWS\system32>mbed detect

[mbed] Working path “C:\WINDOWS\system32” (directory)

[mbed] Program path “C:\WINDOWS\system32”

[mbed] WARNING: The mbed-os tools were not found in “C:\WINDOWS\system32”.

Limited information will be shown about connected targets/boards

Maybe I should have installed Python 32-bit instead of 64-bit.

I uninstalled Python 64-bit and installed Python 3.8.7 (32-bit)

Setup was successful.

I tried mbed detect again:

c:>mbed detect

[mbed] Working path “c:” (directory)

[mbed] Program path “c:”

[mbed] WARNING: The mbed-os tools were not found in “c:”.

Limited information will be shown about connected targets/boards

Hi Jim

I think the commands you are trying to use are designed to be run from within an Mbed app or mbed-os itself. Try this:

mbed new test
cd test
mbed detect

Regards
Anna