5 years, 5 months ago.

unable to compile this project using CLI

I am not able to compile this project using the command line:

Import programHobbyking_Cheetah_Compact_DRV8323

DRV8323RS Version

Here is a log: $ mbed import http://os.mbed.com/users/benkatz/code/Hobbyking_Cheetah_Compact_DRV8323/

[mbed] Working path "/Users/owhite" (program) [mbed] Importing program "Hobbyking_Cheetah_Compact_DRV8323" from "https://os.mbed.com/users/benkatz/code/Hobbyking_Cheetah_Compact_DRV8323" at latest revision in the current branch [mbed] Adding library "mbed-dev" from "https://os.mbed.com/users/benkatz/code/mbed-dev-f303" at rev #902f8c6731d6 [mbed] Adding library "FastPWM" from "https://developer.mbed.org/users/benkatz/code/FastPWM3" at rev #51c979bca21e [mbed] WARNING: Cannot find the mbed tools directory in "/Users/owhite/Hobbyking_Cheetah_Compact_DRV8323"

$ rm -rf .mbed

$ cd Hobbyking_Cheetah_Compact_DRV8323/

$ mbed add mbed-os

[mbed] Working path "/Users/owhite/Hobbyking_Cheetah_Compact_DRV8323" (library) [mbed] Program path "/Users/owhite/Hobbyking_Cheetah_Compact_DRV8323" [mbed] Adding library "mbed-os" from "https://github.com/ARMmbed/mbed-os" at latest revision in the current branch [mbed] Updating reference "mbed-os" -> "https://github.com/ARMmbed/mbed-os/#201a264051205888434e89077318f7d729703a02" [mbed] Auto-installing missing Python modules (pywin32)...

$ mbed compile -t GCC_ARM -m NUCLEO_F446RE

[mbed] Working path "/Users/owhite/Hobbyking_Cheetah_Compact_DRV8323" (library) [mbed] Program path "/Users/owhite/Hobbyking_Cheetah_Compact_DRV8323" [mbed] WARNING: Missing Python modules were not auto-installed. The Mbed OS tools in this program require the following Python modules: pywin32 You can install all missing modules by running "pip install -r requirements.txt" in "/Users/owhite/Hobbyking_Cheetah_Compact_DRV8323/mbed-os" On Mac you might have to install packages as your user by adding the "user" flag

[Warning] @,: Compiler version mismatch: Have 8.2.1; expected version >= 6.0.0 and < 7.0.0 Building project Hobbyking_Cheetah_Compact_DRV8323 (NUCLEO_F446RE, GCC_ARM) Scan: Hobbyking_Cheetah_Compact_DRV8323 [ERROR] Library name 'platform' is not unique (defined in '/Users/owhite/Hobbyking_Cheetah_Compact_DRV8323/mbed-dev/platform/mbed_lib.json' and '/Users/owhite/Hobbyking_Cheetah_Compact_DRV8323/mbed-os/platform/mbed_lib.json') [mbed] ERROR: "/usr/local/opt/python@2/bin/python2.7" returned error. Code: 1 Path: "/Users/owhite/Hobbyking_Cheetah_Compact_DRV8323" Command: "/usr/local/opt/python@2/bin/python2.7 -u /Users/owhite/Hobbyking_Cheetah_Compact_DRV8323/mbed-os/tools/make.py -t GCC_ARM -m NUCLEO_F446RE source . build ./BUILD/NUCLEO_F446RE/GCC_ARM" Tip: You could retry the last command with "-v" flag for verbose output -

suggestions are welcome

1 Answer

5 years, 5 months ago.

Hello Owen,

The Hobbyking_Cheetah_Compact_DRV8323 was built with Mbed OS 2 (aka Mbed Classic). In addition, Ben Katz did not use directly the official Mbed OS 2 mbed-dev library but rather a modified version - https://os.mbed.com/users/benkatz/code/mbed-dev-f303/#902f8c6731d6. So you have two options:

  • Either compile the project as it is right after the import (without adding mbed-os to it).
  • Or add the mbed-os library to the project (as you did above), but then delete the mbed-dev library. However, because mbed-os differs from mbed-dev you most likely will have to make some modifications to the project's source code before being able to reach a successful compilation.