Skip to content

Mbed tools are not present when creating a new Mbed OS 2 program with --mbedlib #698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yennster opened this issue Jun 12, 2018 · 8 comments

Comments

@yennster
Copy link
Contributor

yennster commented Jun 12, 2018

mbed-cli version: 1.7.3

I follow the instructions in the Mbed CLI README documentation for creating a new Mbed OS 2 program (https://github.com/ARMmbed/mbed-cli#creating-a-new-program-for-mbed-os-2) and I receive the following output:

~/Repos $ mbed new mbed-classic-program --mbedlib
[mbed] Creating new program "mbed-classic-program" (git)
[mbed] Adding library "builds" from "https://mbed.org/users/mbed_official/code/mbed/builds" at branch/tag "tip"
[mbed] Downloading library build "5aab5a7997ee" (might take a while)
[mbed] Unpacking library build "5aab5a7997ee" in "/Users/jenplu01/Repos/mbed-classic-program/builds"
[mbed] Unpacking library build "5aab5a7997ee" in "/Users/jenplu01/Repos/mbed-classic-program/builds"
[mbed] Updating reference "builds" -> "https://mbed.org/users/mbed_official/code/mbed/builds/5aab5a7997ee"
[mbed] WARNING: Cannot find the mbed tools directory in "/Users/jenplu01/Repos/mbed-classic-program"
---

Unlike in the README, the Mbed 2.0 build tools are not downloaded. So, when I try to use commands like mbed export, mbed compile etc. I get the following output:

~/Repos/mbed-classic-program $ mbed compile
[mbed] ERROR: The mbed tools were not found in "/Users/jenplu01/Repos/mbed-classic-program".
[mbed] ERROR: Run `mbed deploy` to install dependencies and tools.
---
~/Repos/mbed-classic-program $ mbed export
[mbed] ERROR: The mbed tools were not found in "/Users/jenplu01/Repos/mbed-classic-program".
[mbed] ERROR: Run `mbed deploy` to install dependencies and tools.
---

So then I try to run mbed deploy...

~/Repos/mbed-classic-program $ mbed deploy
[mbed] Updating library "builds" to rev #5aab5a7997ee
[mbed] WARNING: Cannot find the mbed tools directory in "/Users/jenplu01/Repos/mbed-classic-program"
---

And now I'm stuck in a loop of being unable to do anything with this new Mbed OS 2 directory.

@Tony-YI
Copy link

Tony-YI commented Sep 8, 2018

same for 1.8.0
[Mirrored to Jira]

@theotherjimmy
Copy link
Contributor

theotherjimmy commented Sep 10, 2018

Thanks for verifying that this bug is still present.
[Mirrored to Jira]

@ARMmbed ARMmbed deleted a comment from ciarmcom Oct 2, 2018
@JojoS62
Copy link

JojoS62 commented Nov 13, 2018

Is this problem still existent? I've tried it now with actual mbed-cli 1.8.3 and the mbed libname is correct and also the tools are downloaded.
But I prefer to create an empty project and use 'mbed add https://os.mbed.com/users/mbed_official/code/mbed-dev/' for the source version which is much leaner than the mbedlib version.
There I have no tools and 'mbed deploy' does not load them. Mbed deploy detects a mbed classic by checking if file mbed.bld exists. Creating an empty mbed.bld is tweaking the deploy command and it will download the tools. But it would be cleaner if this could be done by a '--force-mbed2-tools' or similar switch. Would this make sense or is there already another trick to achive this?

@fluidblue
Copy link

@JojoS62 Thanks for the hint for creating an empty mbed.bld!

@PhanLeSon03
Copy link

I am having the same errors, does someone know the solution?

@yennster
Copy link
Contributor Author

yennster commented Feb 22, 2019

@PhanLeSon03 Make sure your Mbed CLI is updated: pip install -U mbed-cli

If you encounter the fatal error: mbed.h: No such file or directory after running mbed compile follow the instructions on this thread: #805

@adbridge
Copy link
Contributor

adbridge commented Nov 1, 2019

Apologies, this was closed in error by the automated bot - re-opening.

@ciarmcom
Copy link
Member

Internal Jira reference: https://jira.arm.com/browse/IOTBTOOL-479

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants