Fail to compile Marlin for SKR mini e3 v3

Hi! I have a custom firmware for frankstein 3d printer and the vscode shows this errors. can someone help me with this, please?

This was already discussed.

i got this now.

Zero clue with just that screenshot. Upload the code in full if you keep having problems.

i’m novice on Firmware development. i can’t share the code for safety reasons. when i compile, that’s what appears:

Warning! Ignore unknown configuration option `monitor_flags` in section [env]
Warning! `src_filter` configuration option in section [env:include_tree] is deprecated and will be removed in the next release! Please use `build_src_filter` instead
Warning! `src_filter` configuration option in section [env:DUE] is deprecated and will be removed in the next release! Please use `build_src_filter` instead
Warning! `src_filter` configuration option in section [env:esp32] is deprecated and will be removed in the next release! Please use `build_src_filter` instead
Warning! `src_build_flags` configuration option in section [env:linux_native] is deprecated and will be removed in the next release! Please use `build_src_flags` instead
Warning! `src_filter` configuration option in section [env:linux_native] is deprecated and will be removed in the next release! Please use `build_src_filter` instead
Warning! `src_build_flags` configuration option in section [env:simulator_windows] is deprecated and will be removed in the next release! Please use `build_src_flags` instead
Warning! `src_filter` configuration option in section [env:SAMD51_grandcentral_m4] is deprecated and will be removed in the next release! Please use `build_src_filter` instead
Warning! `src_filter` configuration option in section [env:malyan_M300] is deprecated and will be removed in the next release! Please use `build_src_filter` instead
Warning! `src_filter` configuration option in section [env:STM32F103CB_malyan] is deprecated and will be removed in the next release! Please use `build_src_filter` instead
Warning! `src_filter` configuration option in section [env:teensy31] is deprecated and will be removed in the next release! Please use `build_src_filter` instead
Warning! `src_filter` configuration option in section [env:teensy35] is deprecated and will be removed in the next release! Please use `build_src_filter` instead
Warning! `src_filter` configuration option in section [env:teensy36] is deprecated and will be removed in the next release! Please use `build_src_filter` instead
Warning! `src_filter` configuration option in section [env:teensy41] is deprecated and will be removed in the next release! Please use `build_src_filter` instead
Processing STM32G0B1RE_btt (platform: ststm32@~14.1.0; board: marlin_STM32G0B1RE; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/marlin_STM32G0B1RE.html
PLATFORM: ST STM32 (14.1.0) > STM32G0B1RE
HARDWARE: STM32G0B1RET6 64MHz, 144KB RAM, 512KB Flash
DEBUG: Current (stlink) On-board (stlink) External (blackmagic, cmsis-dap, jlink)
PACKAGES: 
 - framework-arduinoststm32 @ 0.0.0 
 - framework-cmsis @ 2.50700.210515 (5.7.0) 
 - toolchain-gccarmnoneeabi @ 1.90201.191206 (9.2.1)
Converting Marlin.ino
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 19 compatible libraries
Scanning dependencies...
Dependency Graph
|-- TMCStepper @ 0.7.3
|-- Adafruit NeoPixel @ 1.8.7
|-- U8glib-HAL @ 0.5.1
|-- SlowSoftI2CMaster @ 1.0.0
|-- SlowSoftWire @ 0.0.0+20220322190435
|-- SPI @ 1.1.0
|-- EEPROM @ 2.0.1
|-- SoftwareSerial @ 1.0.0
|-- IWatchdog @ 1.0.0
|-- Wire @ 1.0.0
|-- Servo @ 1.1.2
Building in release mode
Compiling .pio\build\STM32G0B1RE_btt\src\src\HAL\STM32\MarlinSPI.cpp.o
Compiling .pio\build\STM32G0B1RE_btt\src\src\core\serial.cpp.o
Compiling .pio\build\STM32G0B1RE_btt\src\src\core\utility.cpp.o
Compiling .pio\build\STM32G0B1RE_btt\src\src\feature\ammeter.cpp.o
Compiling .pio\build\STM32G0B1RE_btt\src\src\feature\babystep.cpp.o
Compiling .pio\build\STM32G0B1RE_btt\src\src\feature\bedlevel\bedlevel.cpp.o
Compiling .pio\build\STM32G0B1RE_btt\src\src\feature\bedlevel\mbl\mesh_bed_leveling.cpp.o
Compiling .pio\build\STM32G0B1RE_btt\src\src\feature\controllerfan.cpp.o
Compiling .pio\build\STM32G0B1RE_btt\src\src\feature\e_parser.cpp.o
Compiling .pio\build\STM32G0B1RE_btt\src\src\feature\host_actions.cpp.o
Compiling .pio\build\STM32G0B1RE_btt\src\src\feature\leds\leds.cpp.o
Compiling .pio\build\STM32G0B1RE_btt\src\src\feature\leds\neopixel.cpp.o
Compiling .pio\build\STM32G0B1RE_btt\src\src\feature\leds\printer_event_leds.cpp.o
Compiling .pio\build\STM32G0B1RE_btt\src\src\feature\pause.cpp.o
Compiling .pio\build\STM32G0B1RE_btt\src\src\feature\tmc_util.cpp.o
Compiling .pio\build\STM32G0B1RE_btt\src\src\gcode\bedlevel\G42.cpp.o
In file included from Marlin\src\HAL\STM32\MarlinSPI.cpp:27:
Marlin\src\HAL\STM32\MarlinSPI.h:99:3: error: 'spi_mode_e' does not name a type
   99 |   spi_mode_e _dataMode;
      |   ^~~~~~~~~~
Marlin\src\HAL\STM32\MarlinSPI.h: In constructor 'MarlinSPI::MarlinSPI(pin_t, pin_t, pin_t, pin_t)':
Marlin\src\HAL\STM32\MarlinSPI.h:64:5: error: '_dataMode' was not declared in this scope; did you mean '_dataSize'?
   64 |     _dataMode = SPI_MODE_0;
      |     ^~~~~~~~~
      |     _dataSize
Marlin\src\HAL\STM32\MarlinSPI.h:64:17: error: 'SPI_MODE_0' was not declared in this scope; did you mean 'SPI_MODE0'?
   64 |     _dataMode = SPI_MODE_0;
      |                 ^~~~~~~~~~
      |                 SPI_MODE0
Marlin\src\HAL\STM32\MarlinSPI.h: In member function 'void MarlinSPI::setDataMode(uint8_t)':
Marlin\src\HAL\STM32\MarlinSPI.h:83:23: error: '_dataMode' was not declared in this scope; did you mean '_dataSize'?
   83 |       case SPI_MODE0: _dataMode = SPI_MODE_0; break;
      |                       ^~~~~~~~~
      |                       _dataSize
Marlin\src\HAL\STM32\MarlinSPI.h:83:35: error: 'SPI_MODE_0' was not declared in this scope; did you mean 'SPI_MODE0'?
   83 |       case SPI_MODE0: _dataMode = SPI_MODE_0; break;
      |                                   ^~~~~~~~~~
      |                                   SPI_MODE0
compilation terminated due to -fmax-errors=5.
*** [.pio\build\STM32G0B1RE_btt\src\src\HAL\STM32\MarlinSPI.cpp.o] Error 1
============================================================================================= [FAILED] Took 13.32 seconds =============================================================================================

Environment      Status    Duration
---------------  --------  ------------
STM32G0B1RE_btt  FAILED    00:00:13.317
======================================================================================== 1 failed, 0 succeeded in 00:00:13.317 ========================================================================================

 *  The terminal process "C:\Users\marin\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it.

Good luck then. These errors are not trivial to just judge them from the error message.

First of all you should fix the platformio.ini (and all configurations it includes) with regards to the outdated src_filter and src_build_flags as indicated in the output. Maybe the failing src\HAL\STM32\MarlinSPI.cpp was never meant to be compiled for that board and the currently wrong source filters made PlatformIO attempt to compile it. If it should be compiled, you gotta figure out where the spi_mode_e type is supposed to come from and why it’s not found inside MarlinSPI.cpp (or .h). Your first search should be inside the package folder for framework-arduinoststm32, somewhere ein C:\Users\<user>\.platformio\packages.