Has anyone successfully flashed ArduPlane on ESP32?

If possible use a terminal software for USB monitoring. The Arduino-IDE Monitor is a little limited. I recommend TeraTerm with good own experience. We need some logfiles from such terminal to analyze.
Is your ESP_NOW Software running on the same ESP as Ardupilot or on the separate ESP C3 supermini.
If it is running on the FC how you manage that the Ardupilot SW is not interrupted.
If it is running on separate ESP C3 why not using a real UART. To which Port Pins it is connected.
So far I know Mavlink2 is (only) a protocol. So it is not directly controlling transmission speed. All normal serial interface baudrates on Ardupilot are about 57600. So if ESP_NOW works good the 250kbs LR Mode is not the bottleneck.
But before going to deep to ESP_NOW first we have to setup your FC on the direct USB link without any telemetrie. As long as your FC is producing unexpected resets it is not able to control any aircraft.

@Anthony_Ampah I just compiled and installed ArduPlane on my ESP32 platform with your HWDEF and your defaults.param.
On a first check with Mission Planner connected to the FC via USB (Serial 0) the FC comes up but also shows repeatedly all the time

  • PreArm: Waiting for RC
  • PreArm: Compass 1 not healthy

My GPS module also has a compass. On my plattform this connected to the same I2C bus as the IMU. The IMU is detected by the FC but not the compass.
Has you GPS also a compass on board or do you have some other compass module or you don’t want to use compass?
Can you send all your PARAM as a file

@Juergen-Fahlbusch My gps is a neo 6m and it connects via uart.
Since yours is i2c i believe you should configure that in hwdef before flashing.I uploaded my files earlier.
My hwdef states my imu is on i2c 0x68 and my gps uart.
Actually im losing hope, ive already purchased and stm32f405 board and should be in by next month.
i tried reflashing the bare board without my espnow drivers and i faced the same looping issue, even with your drivers the boards do not connect.
And i dont know why but the espnow link somewhat drops and reconnects.
whilst i wait for my board i will try out madflight and plainflight to see of they are compatible

@Anthony_Ampah , no my GPS is also on the same UART as yours, but my GPS also have an embedded compass with seperate I2C wires. This is relative standard on the drone GPS. I think your neo 6m is a kind development board for arduino etc.
Using a 32f405 isn’t worse but just to learn I am interested to solve also your problem.
So again I ask you for you PARAM file and answering the question if you have a compass / SD or what ever installed that you don’t mentioned above. I only can setup my system in the same way if I have this knowledge. At the moment my system with your HWDEF an defaults.param is working with no resets and interruptions on the direct USB link. So I asked you also to use a terminal program to identify your resets.

@Juergen-Fahlbusch Thanks so much, you have been so helpful.I only have those 2 ; gps and mpu6050. this is my first drone prototype so i didnt want to use that many sensors. no magnetometer , no sd card. at a point i thought the logging was corrupting my packets, i disabled logging but still getting the same resets.

i tried terra term but the output still showed the same gibberish from missionplanner and arduino ide.

Btw have you tried your setup with motors and servos?

Unfortunately I am unable to share the PARAM file at this time
I removed the firmware from the board and did not save the parameters beforehand
maybe i need to reflash?

What you call the gibberish are moreless the mavlink packets. They are binary data so not human readable.
Therefore the logging function from TerraTerm is helpful to collect all this data from startup for a period of time and analyse later on.
And no I have at the moment no servos or ESC(Motors) connected but the PWM servo/ESC outputs are available and working

I see now, thank you.
I removed everything.
I probably need to try again
If you got time try to test the connection and send commands and also receive data

I run now the ArduPlane with some modification of your HWDEF for more than 20 minutes without any resets or disconnects:
Changes on the HWDEF:
I disabled compass and airspeed sensor
I disabled your serial4 access (ESP32 has only three HW-UARTS)
I enabled Serial1, this is per default the internal Wifi port
I enabled my ESPNOW solution on Wifi and connected Mission Planner via this feature
I enabled RC input for control
So I think most probably your ESPNOW approach on a SW UART Serial4 is not the best.

Interesting and strange,

I flashed a new board(esp32 buzz,esp32diy) , removed my wsl and reinstalled and was still getting the same resets.

My settings are almost similar,I disabled compass and airspeed sensor,I enabled RC input for control(waf will not compile without it, seems like a requirement),I disabled Serial1 because my comms are through usb,i chose sw uart because uart 2 was occupied by gps,i couldnt use uart 0 or uart 1

Please show a logfile created by TerraTerm or any other terminal SW showing the pure USB data from startup until the resets happen.
Did you change any file from original Ardupilot/libraries/AP_HAL_ESP32 directory.
Yes, the HAL_ESP32_RMT_RX_PIN_NUMBER must be defined and same as HAL_ESP32_RCIN GPIO_NUM_ but the FC is not reseting if no RC is connected.
On ESP32 Dev Board UART 0 is fixed rooted to USB but UART1 and UART2 can be user defined. So if UART2 ist used for GPS, what is your use of UART1. The Wifi module is not going via one of the HW UARTs. So you can use the UART1 for a external telemetrie module like your ESP C3 mini.

@Juergen-Fahlbusch I will do that this weekend, isn’t UART 1 internally connected to the SPI flash memory on most boards?
I didnt want any issue so i avoided it

SPI and UART are differerent peripherals on the ESP32. SPI0 and SPI1 are used for internal flash but not UART