Error adding custom board (USBasp problem)

hi all,
i want to add my board to custom boards but I get some errors. my custom board json is below.

    "build": {
        "core": "MegaCore",
        "extra_flags": "-DARDUINO_AVR_ATmega2560 -D SERIAL_RX_BUFFER_SIZE=128",
        "f_cpu": "7372800L",
        "mcu": "atmega2560",
        "variant": "100-pin-arduino-mega",
        "unflags": "-flto",
        "board": "ATmega2560"
    "frameworks": ["arduino"],
    "name": "STF B107AA",
    "upload": {
        "protocol": "custom",
        "speed": 115200,
        "maximum_size": 262144,
        "maximum_ram_size": 8192,
        "upload_flags": "-C$PROJECT_PACKAGES_DIR/tool-avrdude/avrdude.conf -p$BOARD_MCU -PUSB -cusbasp",
        "command": "avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i"
    "platform": "atmelavr",
    "hardware": {
        "oscillator": "external",
        "uart": "no_bootloader",
        "bod": "disabled",
        "eesave": "no"
    "url": "",
    "vendor": "STF Labs"

this is the error (I use usbasp and define it in upload segment)

avrdude error: no programmer has been specified on the command line or in the
        config file(s); specify one using the -c option and try again

and my platformio.ini file is below (before creating custom board this ini is working)

; PlatformIO Project Configuration File
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
; Please visit documentation for the other options and examples

default_envs = B107AA

platform = atmelavr
framework = arduino
board = ATmega2560
board_build.f_cpu = 7372800L
build_unflags = -flto
build_flags = -D SERIAL_RX_BUFFER_SIZE=128
monitor_port = /dev/cu.usbserial-DM02L3WU
monitor_speed = 115200
board_hardware.oscillator = external
board_hardware.uart = no_bootloader
board_bootloader.speed = 115200
board_hardware.bod = disabled
board_hardware.eesave = no

upload_protocol = custom
upload_flags = 
upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i
lib_deps = 

how can I solve this problem.

The first step would be to check if all the flags you want are really showing up in the upload command.

Post the logs of project task → Advanced-> Verbose Upload.