Arm Mbed OS support forum

IDE defines for board specific features

Hey all, just a shot in the dark question to see if any one has a solution for this.

I am using mbed CLI in tandem with VS Code, and would like to get syntax highlighting to work a little better. My issue is that board specific features do not get defined until compile time, so those objects being used in the source code are highlighted red.

A pwm example:

where PwmOut is not yet defined:

This is also very annoying for PinNames, as none of them are defined yet either.

Is there some way my board/profile details could be used to fix this issue? I figured exporting could do the trick, but I have yet to get it to work.

Any help would be appreciated!