TREV FlashingAn extension to compile, debug, and flash TREV STM32 projects over USB or CAN. It works with STM32CubeMX projects and can install the required build toolchain automatically. This extension also supports using cpp files; however, NOTE: Your CubeMX project needs to be generated as a makefile project under "Project Manager -> Project -> Toolchain/IDE".
PrerequisitesThere are a few command line tools that need to be installed for this extension to work. You can either add them manually or let the extension automatically install them for you. This option will be shown on start-up. Automatic installation
Configuring CubeMXThis extension assumes the project is initialized with CubeMX and the option to create a Makefile project under "Project Manager -> Project -> Toolchain/IDE". Also, please leave the default on "Copy all used libraries into the project folder" when creating the new project. How to UseClick on the ST icon and select the command you want to run. Once this is done for the first time, you can also use the shortcut USB and CAN flashingThe existing Flash STM32 commands flash over a USB-connected programmer using OpenOCD. The Flash STM32 over CAN command builds the project, automatically downloads a pinned version of STM32-CAN-Flasher, installs it in an isolated Python environment, and launches its interactive CLI in a VS Code terminal. Later CAN flashes reuse the cached installation. The CLI automatically uses The flasher is pinned by commit and SHA-256 in CAN flashing follows the upstream flasher's firmware convention: the selected build directory must contain Features
Build ProcessThe build process uses the information in the CubeMX makefile and ConfigurationThe recommended way to configure the build—such as adding flags, files, or directories—is through ImportingSTM32CubeIDE and ST provided example projects can now be imported by using the: "import CubeIDEProject" command. Do note that the project folder should be open in the workspace. AttributionTREV Flashing is a fork of STM32 for VSCode by Bureau Moeilijke Dingen, distributed under the MIT License. TREV-specific CAN flashing is powered by STM32-CAN-Flasher. |

