Atmega8A - Internal 8MHZ oscillator minicore bootloader Error not in sync

I have an ATMega8A with Minicore bootloader installed. it is 8MHZ internal. i can program the chip using UNO board and Arduino 2.2.1 IDE.
i am trying with VSCode / platformIO with below ini file:
platform = atmelavr
framework = arduino
board = ATmega8
board_build.f_cpu = 8000000L
upload_protocol = arduino
board_upload.speed = 38400

but getting error as programmer not in sync.
Following is my verbose output. tried upload speed 9600, 19200, 57600 etc

Executing task in folder test: C:\Users\Toshiba.platformio\penv\Scripts\platformio.exe run --verbose --target upload --environment atmega8minicore8mhzinternal

Processing atmega8minicore8mhzinternal (platform: atmelavr; framework: arduino; board: ATmega8; board_build.f_cpu: 8000000L; upload_protocol: arduino; board_upload.speed: 38400; upload_flags: -e)
------------------------------------------------------------------------------------------------------------------------------------------------------------CONFIGURATION: …
PLATFORM: Atmel AVR (4.1.0) > ATmega8/A
DEBUG: Current (simavr) External (simavr)

  • framework-arduino-avr-minicore @ 2.2.1
  • tool-avrdude @ 1.70100.0 (7.1.0)
  • toolchain-atmelavr @ 1.70300.191015 (7.3.0)
    LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 8 compatible libraries
    Scanning dependencies…
    No dependencies
    Building in release mode

MethodWrapper([“checkprogsize”], [“.pio\build\atmega8minicore8mhzinternal\firmware.elf”])
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [ ] 0.9% (used 9 bytes from 1024 bytes)
Flash: [ ] 3.7% (used 284 bytes from 7680 bytes)
.pio\build\atmega8minicore8mhzinternal\firmware.elf :

section size addr
.text 284 0
.data 0 8388704
.bss 9 8388704
.comment 17 0
.note.gnu.avr.deviceinfo 60 0
.debug_aranges 64 0
.debug_info 1538 0
.debug_abbrev 1142 0
.debug_line 258 0
.debug_str 378 0
Total 3750
avr-objcopy -O ihex -R .eeprom .pio\build\atmega8minicore8mhzinternal\firmware.elf .pio\build\atmega8minicore8mhzinternal\firmware.hex
([“upload”], [“.pio\build\atmega8minicore8mhzinternal\firmware.hex”])
AVAILABLE: arduino
CURRENT: upload_protocol = arduino
BeforeUpload([“upload”], [“.pio\build\atmega8minicore8mhzinternal\firmware.hex”])
Auto-detected: COM6
avrdude -e -v -p atmega8 -C C:\Users\Toshiba.platformio\packages\tool-avrdude\avrdude.conf -c arduino -b 38400 -D -P COM6 -U flash:w:.pio\build\atmega8minicore8mhzinternal\firmware.hex:i

avrdude: Version 7.1-arduino.1
Copyright the AVRDUDE authors;

     System wide configuration file is {link not allowed}

     Using Port                    : COM6
     Using Programmer              : arduino
     Overriding Baud Rate          : 38400

avrdude stk500_recv() error: programmer is not responding
avrdude stk500_getsync() warning: attempt 1 of 10: not in sync: resp=0x00

Since i can program the same chip using Arduino IDE, looks loke some ini is missing in PlatformIO. pl help…

No one can help? i tried every possible ini values, getting no where!! issue is on PlatformIO only as Arduino IDE works like a charm.