Mac plays a crucial role in the development of the LGDXRobot2. This tutorial describes how to install the necessary tools and compile any STM32 firmware on Mac. It assumes the Mac is running on Apple Silicon and that the ST-Link is connected to the Mac.
find ~ -type f -name "arm-none-eabi-gcc" 2>/dev/null
bin folder:/Users/<user>/Library/Application Support/stm32cube/bundles/gnu-tools-for-stm32/<version>/bin/arm-none-eabi-gcc
Ctrl+Cmd+P to open the command palette, and search for Preferences: Open Settings (JSON). Then, add the path to the bin folder to the cmake.environment.PATH variable:"cmake.environment": {
"PATH": "<path the bin folder>:${env.PATH}"
}

Switch to the Run and Debug tab, press Run and Debug. A dropdown menu will appear. Select the GDB Server for the corresponding debugger.
Visual Studio Code will automatically compile and flash the firmware to the MCU, then launch the debugger.