Help flashing custom firmware for ESP32 S3 Mini

Hi there,

I am trying to create some mini meshtastic nodes with esp32 s3 mini and RF95 (aliexpress link: ESP32-S3 Mini but I can’t seem to get them to boot when I flash them with custom firmware. I keep getting an error on the serial port that says flash corrupted and the app doesen’t detect them. I have also tried the various different firmware versions for other devices that use the ESP32-S3 and none of those seem to work either. My platformio variant is as follows. Any help would be appreciated

Thanks

[env:ESP32-S3-Nano]
platform = espressif32
board_level = extra
extends = esp32s3_base
board = esp32-s3-devkitc-1
board_build.arduino.memory_type = dio_opi
board_build.mcu = esp32s3
board_build.f_cpu = 240000000L
upload_protocol = esptool
board_flags = -DARDUINO_USB_CDC_ON_BOOT=1
;upload_port = /dev/ttyACM0
upload_speed = 115200
platform_packages =
  tool-esptoolpy@^1.40500.0
lib_deps =
  ${esp32_base.lib_deps}
  adafruit/Adafruit NeoPixel@^1.10.7
build_unflags = -DARDUINO_USB_MODE=1
build_flags = 
  ;${esp32_base.build_flags} -D MY_ESP32S3_DIY -I variants/my_esp32s3_diy_oled
  ${esp32_base.build_flags} -D PRIVATE_HW -I variants/my_esp32s3_diy_oled
  -DBOARD_HAS_PSRAM
  -mfix-esp32-psram-cache-issue
  -DARDUINO_USB_MODE=0