Quick question: CONFIG_HAL_BOARD

Hi guys,

I have a quick question concerning the CONFIG_HAL_BOARD: I’m using a Pixhawk and have seen that all preprocessor defines (i.e #if CONFIG_HAL_BOARD == HAL_BOARD_PX4) are greyed out.

Shouldn’t they be true - as I’m using a Pixhawk? Or is this some error of my IDE (Eclipse Juno)?

Do I have to do some corrections to the CONFIG_HAL_BOARD - define?

Thanks a lot and regards,

Hi Armin,

It sounds like purely an IDE issue. I would suggest just switching off the particular IDE switch, if you can find it, but I am sure there will be a little box there somewhere ( not that I use Eclipse, I prefer Code::Blocks). The particular CONFIG_HAL_BOARD define is set on the compiler command line I believe. it may be that the IDE isnt smart enough to detect defines that arent defined in header or source files.

Hi thanks a lot for your response!

I also thought about the IDE issue, because when I build my code as it is (with the greyed out defines), the “Start Up OK” tone comes up when I connect it via USB. This part is greyed out in ToneAlarm_PX4.h but obviously works fine.
I haven’t found a switch like you mentioned. But I had a lot of troubles with Eclipse before (thousands of “could not be resolved” etc. errors) so maybe this also be some error like this.

But thanks for your input!