Arm Mbed OS support forum

Mbed studio 1.2 not displaying compile errors in problems view

I have a workspace in which I’ve added several libraries.
When there is a compilation error in one of the libraries I don’t see it in the Problems view, and I can’t click on the error in the Output view to navigate to the source line in question.
Should this work?

Here’s what I get in the Output view:

Building project device (NUCLEO_F446ZE, ARMC6)
Scan: device
Compile [  3.8%]: PID_v1.cpp
[Error] PID_v1.cpp@30,16: use of undeclared identifier 'millis'
[Error] PID_v1.cpp@55,24: use of undeclared identifier 'millis'
[ERROR] ./arduino-pid-library/PID_v1.cpp:30:16: error: use of undeclared identifier 'millis'
lastTime = millis()-SampleTime;
^
./arduino-pid-library/PID_v1.cpp:55:24: error: use of undeclared identifier 'millis'
unsigned long now = millis();
^
2 errors generated.

and also:

Compile [  3.2%]: DS28E15_22_25.cpp
Compile [  3.3%]: Sleep.cpp
[Fatal Error] Sleep.cpp@33,10: 'mbed-os/platform/mbed_wait_api.h' file not found
[ERROR] ./MaximInterface/MaximInterfaceMbed/Sleep.cpp:33:10: fatal error: 'mbed-os/platform/mbed_wait_api.h' file not found
#include <mbed-os/platform/mbed_wait_api.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

I’m running mbed studio 1.2 on Mac OS 10.14.6. I did remove Mbed Studio before installing this version.

I’m using the GCC_ARM toolchain (rather, I am trying to; despite having configured the toolchain in my .mbed file, Mbed Studio is apparently running the ARM compiler. But that’s a different problem.

Hi @bikeNomad,

When there is a compilation error in one of the libraries I don’t see it in the Problems view

Unfortunately this is expected behaviour at the moment. Intellisense (including the problems view) is only available in files that have been opened. We’re planning to improve this in the near future by upgrading clangd, the C++ language server that Mbed Studio uses under the hood.

I can’t click on the error in the Output view to navigate to the source line in question.

This is another feature we’d like to add in the near future.

I am trying to; despite having configured the toolchain in my .mbed file, Mbed Studio is apparently running the ARM compiler

Please see https://os.mbed.com/docs/mbed-studio/current/installing/switching-to-gcc.html.

Thanks for trying Studio!