Can't compile ArduCopter 3.0.1 using Arduino 1.0.5

I had no problems compiling previous versions, like ArduCopter 2.9.1, but with this version I get the message “CONFIG_HAL_BOARD must be defined to build ArduCopter”. I noticed in the APM_Config.h file it says:

“If you used to define your CONFIG_APM_HARDWARE setting here, it is no longer valid! You should switch to using a HAL_BOARD flag in your local config.mk.”

But I can’t find any config.mk file. Do I have to create this file myself?

@Jimnik,
I believe that you have to use a special version of the Arduino IDE to compile the Ardupilot code: ardupilot.com/downloads/?did=45 that works with the Hardware Abstraction Layer (HAL).
Don’t forget to select the correct board from the Ardupilot tab in the IDE header and then restart the IDE for the change to take affect.
Regards,
TCIII ArduRover2 Developer

Thanks, I’ll try it.

Problem is it looks like only Windows and Mac versions are available and we’re using Ubuntu but we’ll try using an emulator.

I just tried it on a Windows machine. Got exactly the same error.

To make sure I was doing it correctly, I also downloaded ArduCopter 2.9.1 on the Windows machine. It compiled without a problem. So this is definitely is an issue with the new ArduCopter 3.0.1 code.

There’s got to be a simple way to set this CONFIG_APM_HARDWARE pre-processor constant. I tried to define it in APM_Config.h but that got me a new error message.

@jimnik,
Did you select the correct board (APM1.x. APM2.x, PX4) from the Ardupilot tab in the IDE header and then restart the IDE for the change to take affect before trying to compile?
Regards,
TCIII Admin