Arduino is both a framework and an IDE. SimpleFOC depends on the framework, but not the IDE.
Many people use VSCode with PlatformIO. I’ve used it for compiling the Marlin 3D printer firmware, but I don’t like it. I prefer Arduino IDE for small motor control projects. And CodeBlocks for larger projects, though I’ve never done any large ones using the Arduino framework. But from a quick search it looks like other people have set up CodeBlocks to use it.
STM32Cube is their official IDE, but I don’t think you can use the Arduino framework with it.
You can do low-level programming in Arduino IDE. On my computer, the file with all the hardware register definitions is C:\Arduino\portable\packages\STMicroelectronics\hardware\stm32\2.3.0\system\Drivers\CMSIS\Device\ST\STM32G4xx\Include\stm32g431xx.h
It took some wrestling to get Arduino IDE to put the main program, packages, libraries, and the build folder all in that C:\Arduino folder rather than scattering all over the hard drive. I don’t remember all the steps involved, but know that it can be done ![]()
For STM32G4, look up reference manual rm0440 and programming manual pm0214 on the STM web site. There’s a lot to learn, but if you’ve done low-level programming with hardware registers before, you should be able to understand it pretty easily. ARM processors are really nice.
You can write assembly code in .s files. A general function looks like
.global Return1
.text
.thumb
.align 2
.thumb_func
Return1:
mov r0, #1
bx lr
And from C++ code, forward-declare it with extern "C" int Return1(); and then call it like normal.
I like the knockoff Stlink v2 mini you can buy on ebay. I have an official v3minie, but it’s less convenient because it doesn’t supply 3.3V power. Use STM32CubeProgrammer to operate it.