The previous answer is good, but here's one specific for Bigtreetech.
- Install platform.io. I use the command-line interface (CLI)
- Modify your marlin files. You can clone existiing firmware for your board from the BigtreeTech Github for your board.
- Remove microUSB card from your Bigtree tech board
- Plug microUSB card into microUSB reader, and the microusb reader into the computer. You should be able to read your microUSB card
- Enter the command in the root directory of your Marlin files:
platformio run -e STM32F103RC_bigtree_USB. At least, this is the one for my board. You should have to run this in one folder before the Marlin folder.
- It creates a file called
firmware.bin in the directory .pio/build/STM32F103RC_bigtree_USB/firmware.bin. Copy it to your microUSB card, replacing and deleting any existing .bin. You can use the name firmware.bin.
- Remove microSD card from computer and plug into board.
In your Marlin Configuration.h file, there should be a variable called something like MACHINE_NAME. If you make that name custom, then it will appear in the Octoprint terminal when connecting to your board, letting you know that you have updated the firmware.