Trying to make Lora-E5 work with mbed os

I’m trying to build for a Lora-E5 board from seeed.
This is what I have tried so far:
I’ve cloned platform-ststm32/examples/mbed-rtos-custom-target at develop · platformio/platform-ststm32 · GitHub
and used the examples/mbed-rtos-custom as a base for my project.

Then I have added custom_targets.json to the root of bed-rtos-custom-target, and tried building.
But the build errors with

Detected custom target file
mbed build API internal error
target LORA_E5 has an incomplete target definition

This is my custom_targets.json

{
    "CUSTOM_NUCLEO_L452RE_MBED": {
        "inherits": [
            "MCU_STM32"
        ],
        "core": "Cortex-M4F",
        "extra_labels_add": [
            "STM32L4"
        ],
        "config": {
            "clock_source": {
                "help": "Mask value : USE_PLL_HSE_EXTC (need HW patch) | USE_PLL_HSE_XTAL (need HW patch) | USE_PLL_HSI | USE_PLL_MSI",
                "value": "USE_PLL_MSI",
                "macro_name": "CLOCK_SOURCE"
            },
            "lpticker_lptim": {
                "help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
                "value": 1
            }
        },
        "macros_add": [
            "STM32L452xx",
            "MBED_TICKLESS",
            "EXTRA_IDLE_STACK_REQUIRED",
            "MBED_SPLIT_HEAP"
        ],
        "overrides": {
            "lpticker_delay_ticks": 0
        },
        "detect_code": [
            "1234"
        ],
        "device_has_add": [
            "ANALOGOUT",
            "CRC",
            "SERIAL_ASYNCH",
            "CAN",
            "TRNG",
            "FLASH",
            "MPU"
        ],
        "device_name": "STM32L452RETx",
        "bootloader_supported": true
    },
    "LORA_E5": {
        "inherits": [
            "MCU_STM32WLE5xC"
        ],
        "device_name": "STM32WLE5JCIx"
    },
    "LORA_E5_BREAKOUT": {
        "inherits": [
            "LORA_E5"
        ],
        "macros_add": [
            "LED1=PB_5", 
            "LED2=PB_10",
            "BUTTON1=PB_13"
        ]
    },
    "LORA_E5_MINI": {
        "inherits": [
            "LORA_E5"
        ],
        "macros_add": [
            "LED1=PB_5", 
            "BUTTON1=PB_13"
        ]
    },
    "LORA_E5_DEV_BOARD": {
        "inherits": [
            "LORA_E5"
        ],
        "macros_add": [
            "LED1=PB_5", 
            "EN_3V3=PA_9", 
            "EN_5V=PB_10", 
            "BUTTON1=PB_13",
            "BUTTON2=PA_0",
            "RS485_REDE=PB_4"
        ]
    }
}

And my platform.ini

[env:lora_e5]
platform = ststm32
framework = mbed
board = lora_e5_dev_board
build_flags =
    -I$PROJECT_SRC_DIR/TARGET_STM32WL
    -I$PROJECT_SRC_DIR/TARGET_STM32WL/device
    -I$PROJECT_SRC_DIR/TARGET_STM32WL/TARGET_LORA_E5

and under boards/lora_e5_dev_board.json

{
    "build": {
      "core": "stm32",
      "cpu": "cortex-m4",
      "extra_flags": "-DSTM32WLxx -DSTM32WLE5xx",
      "f_cpu": "48000000L",
      "framework_extra_flags": {
        "arduino": "-DUSE_CM4_STARTUP_FILE"
      },
      "mcu": "stm32wl55jc",
      "product_line": "STM32WL55xx",
      "variant": "STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I"
    },
    "debug": {
      "default_tools": [
        "stlink"
      ],
      "jlink_device": "STM32WL55JC",
      "onboard_tools": [
        "stlink"
      ],
      "openocd_target": "stm32wlx",
      "svd_path": "STM32WL5x_CM4.svd"
    },
    "frameworks": [
      "arduino",
      "zephyr",
      "mbed"
    ],
    "name": "LORA E5",
    "upload": {
      "maximum_ram_size": 65536,
      "maximum_size": 262144,
      "protocol": "stlink",
      "protocols": [
        "jlink",
        "cmsis-dap",
        "stlink",
        "mbed"
      ]
    },
    "url": "https://www.seeedstudio.com/LoRa-E5-Wireless-Module-p-4745.html",
    "vendor": "seeed"
  }