This is the Easy way, to modify and compile yourself the firmware, click here
1-Download GRBL 32 bit board firmware file already compiled and unzip it
2-Download ST-link utility , unzip it, install it, and open the
3-Remove the STM32 from its socket on the GRBL 32-bit board and connect the ST-link dongle to the STM32 bluepill, respectively connect 3.3v, Gnd, SWCLCK, SWIO.
Connect ST-Link dongle to your computer, driver should install automatically because present in the ST-link Utility installation.
4- In ST-link Utility, go to Target> Connect
Note: If you receive an “impossible connection” message , check your connections between STm32 and ST-link, and if your connections are OK, check by removing ST-link cover, that the connections correspond to the diagram! It happened to a forum member, see the photo
5- Go to Target > Program & Verify
6- Look for the firmware file you downloaded (stm32grbl11.hex) and click Open
7- Validate, the flash starts
8- We check that everything is ok, we close ST-Link Utility and we can take the STM32 Bluepill and put it on the GRBL 32bits board, it’s ready!