Please help porting Ardupilot to JHEMCU GF16 - Bring up of sensors failing

Hi guys,

I got the JHEMCU GF16 and would like to port Ardupilot onto it.!EUR!17%2C68€!17%2C68€!!!!!%40211b615316869536294763591ea052!12000029408386508!btf&_t=pvid%3A55d1c4fb-fd8f-4eac-9954-8dbd8182c960&afTraceInfo=1005004507896862__pc__pcBridgePPC__xxxxxx__1686953629&spm=a2g0o.ppclist.product.mainProduct&gatewayAdapt=glo2deu

I have the tool chain running and am using the hwdef file from here:

JHEMCU GSF405A - a 3.3g 1-2S F405 AIO FC w/5A ESCs, BMP280, BB, and 2.4G ELRS! - Hardware / Other Hardware - ArduPilot Discourse

For some reason the sensors are not coming up. First I got baro: unable to initialize driver
When I modified the code with lines for BMP280 from the Matek405 file to allow to skip baro, I get the same error for INS. Could you please help me find the issue?

Thanks a lot in advance!

Chris (2.1 KB)

with the FlywooF405S_AIO hwdef file I at least get the baro to run it seems. Is that correct?

ok, still stuck with “INS: unable to initialize driver”.

Other than suggested by the vendor and manufacturer and betaflight config file, it doesn’t seem to have an MPU6000. Could it be BMI270? I am trying out but the label on the package doesn’t tell

This is not an MPU6000

Label says
SN 335
Dímensions 2.5 mm x 3 mm
What is it then? BMI270 or ICM-42668 have both this size. Thanks

P.S.: also I see a 27MHz osc there. The hwdef file is set to 8MHz. Is it about this osc? I can try, but I need to find out which gyro this is

crystal frequency


On some boards you will need to also set the various PLL values. See

the defaults in common/mcuconf.h, and use the define mechanism

explained later in this file to override values suitable for your

board. Refer to your MCU datasheet or examples from supported boards

in ChibiOS for the right values.

seems like I have to confure for the 27MHz oscillator? I can’t just set this value. It is not compiling that way. So I need to configure PLL settings?

ok found that the OSD is using the 27MHz and is also right next to it. So that was misleading. Think the 8MHz should be correct (also according to betaflight config: set system_hse_mhz = 8)

But HSE means still external. Confusing.

Come on guys, somebody jump on. I am answering all my questions myself :smiley:

working now :slight_smile:


Hello, I got this compiled using the latest code but w/o the BL, when i issue the configure bootloader i get ValueError: invalid literal for int() with base 10: ‘Y’

Thoughts? i guess i should try switching to the 4.4 branch instead of HEAD…

yeah not much better. i can do it w/o --bootloader to get an apj. but at least the initial flash i guess i need --bootloader (flashing from inav)

i figured out the compile error, driver error not understanding the configs. but i still can’t get any drivers to initialize even using @Chris_T settings… hmmm… well, i got it working using the flywoo board chris_t used above. It’s the only way i managed to get any sensors up, started with the one that already worked, and then changed the hwdef.txt file one by one to get that boardprofile working on the jhemcu. i can’t figure out why i can’t the original working, but mission accomplised.

Hi @Chris_T , do you have any success with building FW for the board?