I’ve switched to using gcc, and mbed studio is flagging my types like uint8_t
as unknown.
It also thinks that classes I declare are in the mbed::
namespace.
My header is something like:
#include <mbed.h>
#include <cstdint>
class MyClass {
public:
uint8_t something;
uint16_t somethingElse;
PinName somePin;
};
This results in errors like this:
Unknown type name 'uint16_t'
Unknown type name 'PinName'; did you mean 'mbed::PinName'?
mbed-os/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/TARGET_NUCLEO_F446ZE/PinNames.h:332:3:
note: 'mbed::PinName' declared here
And when I include that header in another file I get errors like this:
Use of undeclared identifier 'MyClass'; did you mean 'mbed::MyClass'?
When I compile this using gcc I don’t see these errors.
If I add a using-declaration for mbed::PinName
I don’t see the PinName
message in the Problems view but gcc complains that it doesn’t know anything about mbed::PinName
I’m using version 1.2.1 of mbed studio.