PreArm: check firmware or FRAME_CLASS from build

So I was looking to try and build my own flight mode in ArduCopter. I have gone through the process of setting up the build environment in WSL with Ubuntu. I am able to successfully compile and build the code to create the .apj file. This also uploads to the Pixhawk 2.1 Cube successfully. However, when I try to arm the motors, I receive the message “PreArm: check firmware or FRAME_CLASS”.

Yes, I have checked the FRAME_CLASS, it is set to heli like it should be. After digging around and trying several things, I decided to narrow down the problem and try to build a stable release of ArduCopter 3.6.6. Once again, it compiles, builds and uploads fine. But once again, the stable version gives me the firmware error as well. Here is a picture of the message in Mission Planner.
https://drive.google.com/file/d/12FBfCTQSe915WHq3Jgztc0BCb4JH9cVN/view?usp=sharing

As I have tried to upload this version of the firmware, I have switched back to the version downloadable directly through Mission Planner and that version works fine immediately every time.

While the documentation on how to set up the build environment on the ArduPilot website gave issues, I was able to follow this youtube video to get as far as I did. It appears others have had success with this video as well. I have set the board type to fmuv3 for the Pixhawk Cube, as specified on its website.

Could anyone point me in the right direction for my next move? Am I missing something here? Any help would be greatly appreciated. If I forgot to mention any relevant information, please ask away. Thanks in advance!

Does it work if you set FRAME_CLASS to QUAD?

1 Like

I suspect the issue is that the multicopter firmware is being built but then the FRAME_CLASS is being set to Heli. In fact to use on a traditional helicopter (if that’s the aim) then the helicopter firmware must be built.

By the way, we have this wiki page on the developer wiki that discusses how to write a new flight mode for copter. We have been making some structural changes to Copter so it’s possible it’s slightly out of date but I think it’s close…

1 Like

Thanks for the quick responses! So if I set the FRAME_TYPE to QUAD, it does arm. What exactly do you mean by build the helicopter specific firmware? When building I have found no options for that. I set the board type, and build using ./waf copter. Where do I need to change something to make it traditional heli specific? Thanks again!

I think it would be ./waf copter -f heli, or it might just be ./waf heli. Gitter is a good place for developer questions.

1 Like

Thank you! Did not see that in the documentation for the builds, but you can see it with ./waf -h which shows all available commands and options. Thanks again everyone.