5 years, 10 months ago.

Error while compiling.

I am using STM32l072 Microcontroller. I updated new version of mbed and while I compile, it shows as Error: Library name 'platform' is not unique (defined in '/tmp/chroots/ch-34444dd0-28a7-4267-aa5e-ca4c367c859f/extras/mbed/TARGET_DISCO_L072CZ_LRWAN1/mbed_lib.json' and '/tmp/chroots/ch-34444dd0-28a7-4267-aa5e-ca4c367c859f/src/mbed-os/platform/mbed_lib.json'). So anyone knows what to do with this ? very urgent.

(If I don't use the new version of mbed, it shows some different error as "My device is not recognized".)

Thank you in Advance !

1 Answer

5 years, 10 months ago.

Hi Harish,

I was able to compile mbed-os-example-blinky successfully for the DISCO_L072CZ_LRWAN1 board using the online compiler and Mbed OS version 5.9.1

Which version of Mbed OS is present within your program? You can check this information by right-clicking on mbed-os in your program and selecting "Revisions...". The bolded revision in the list is the current version present in your program.

- Jenny, team Mbed

Hi Jenny, yeah I checked my version,it's the latest Mbed OS version 5.9.1 . Yeah even I can compile blinky program, but when i try to compile my program, it shows some error. I can give you the link,could you just try in your device ? https://os.mbed.com/users/feabhas/code/DS18B20/ Once you checked, give me the procedures what you did. It will be very helpful.

posted by Harish Kumar Bringi Ramakannu 19 Jun 2018

Hi again Harish,

I took a look at your program and you are using Mbed OS 2 (not Mbed OS 5). If you would like to use Mbed OS 5, you will need to delete the "mbed" library from your program and import the following Mbed OS library from URL by right clicking on your program name and selecting "Import Library..." > "From URL..." and pasting the following URL: https://github.com/armmbed/mbed-os

Once I changed the Mbed library in your program from "mbed" to "mbed-os" i no longer received the "device not recognized" error. However, you still have a few errors present within your DS18B20.h and DS18B20.cpp files that you will need to fix before your program will successfully compile.

Please let me know if you have any questions!

- Jenny, team Mbed

posted by Jenny Plunkett 19 Jun 2018