ESP32S3 custom bootloader

I have a project using esp-idf, and i would like to implement a UF2 bootloader.
I am looking at this repo, and it looks like I can build one. It should produce a .bin file.
It looks like a bootloader can be selected when using Arduino platform, but I don’t see how to do it using esp-idf. Is there a way?
thank you.

I see the Adafruit Matrix S3 has the uf2 bootloader. They add the factory uf2 app in thier .json file

  "build": {
      "ldscript": "esp32s3_out.ld",
      "partitions": "partitions-8MB-tinyuf2.csv"
    "core": "esp32",
    "extra_flags": [
    "f_cpu": "240000000L",
    "f_flash": "80000000L",
    "flash_mode": "qio",
    "hwids": [
    "mcu": "esp32s3",
    "variant": "adafruit_matrixportal_esp32s3"
  "connectivity": [
  "debug": {
    "openocd_target": "esp32s3.cfg"
  "frameworks": [
  "name": "Adafruit MatrixPortal ESP32-S3",
  "upload": {
    "arduino": {
      "flash_extra_images": [
    "flash_size": "8MB",
    "maximum_ram_size": 327680,
    "maximum_size": 8388608,
    "use_1200bps_touch": true,
    "wait_for_upload_port": true,
    "require_upload_port": true,
    "speed": 460800
  "url": "",
  "vendor": "Adafruit"

However this does not indicate how they use a custom bootloader, and it only seems to apply to Arduno.