Troubleshooting

We have found some common errors that users face and have listed them here to help you get started with your application as quickly as possible.

Mbed CLI issues or Error: collect2: error: ld returned 1 exit status

Purge the cache with the following command:

mbed cache purge

You probably also have a stale BUILD folder. Clean up your directory and try again:

rm -rf BUILD

 

Error: Prompt wrapping around line

If your terminal is wrapping your text as show here:

Error prompt wrapping around line image

In your terminal type:

export PS1='\u@\h: '

For a more minimalist type:

export PS1='> '

 

Error: "Requires make version 3.82 or later (current is 3.81)"

If you encounter this error, install the brew and make by typing the following code:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install make

Note: On a Mac, you might have to use gmake instead of make, to run your commands.

 

Error: -bash: mbed: command not found

If you encounter this error, try the following fixes.

For Mac:

We recommend using the installer and running the downloaded Mbed CLI App. This app will automatically launch a shell with all the dependencies solved for you.

If installed manually, make sure to follow these instructions.

Mbed CLI chip image

For Windows:

Make sure that you add Mbed CLI to Windows system PATH

  1. Press Windows+X to open the Power Users menu, and then click System to launch System dialog.

    Error-command-not-found-step-1-image

    On Windows 8, select Advanced system settings.

    Error-command-not-found-step-2-image

    On Windows 10, type env in the search box, and select Edit the system environment variables option from the dropdown list.

    Error-command-not-found-step-3-image

  2. Click the Environment Variable button.

    Error-command-not-found-step-4-image

  3. Click the PATH variable and append mbed-cli to the PATH. By default, use C:\mbed-cli\mbed-cli\mbed-cli-1.8.3\mbed\.

    Error-command-not-found-step-5-image

    Now, if you type mbed from a command prompt, you should be able to see mbed help commands.

Previous Next