GRBL32 started out on System Workbench SW4STM32 AC6, then moved to Atollic TrueSTUDIO, then back to AC6... I was going back and forth for a while and finally decided on TrueSTUDIO. TrueSTUDIO is being replaced by STM32CubeIDE, something for another post. The code base started out using the SPL (Standard Peripheral Library), then migrated to CubeMX generated HAL (Hardware Abstraction Layer), then finally a mixture of HAL and LL (Low Layer) drivers.
As with many other Arduino developers, I was experimenting with the STM32F103 "Bluepill" and discovered the startling speed difference over the venerable uno/nano. I quickly "graduated" to the STM32F4DISCOVERY board (STM32F407) and immediately hit a development speed bump. Soon afterwards I found my uno/nano/mega/due pile of boards were moving off the bench and replaced by STM32 NUCLEOs and clone development boards. Needless to say the development barrier was much steepper than Arduino. In the midst of fighting the development tools and the growing complexity of higher power MCUs, I found the CubeMX tool to be a great starting point, at least from the point of understanding the various peripherals under each pin. It was then that I decided GRBL32 would re-start with CubeMX. The main challenge was to keep everything (F13, F16, and F46 controllers) under once source tree.
The arrangement of the top-level source folders:
GRBL32 ˪ grbl ˪ stm32 ˪ Atollic ˪ F13 ˪ F16 ˪ F46
- /grbl : the familiar common /grbl code
- /stm32 : common code across all different MCU and IDE
- /Atollic : TrueSTUDIO IDE specific, workspace folder Atollic.
- The projects are under each controller's name (F13, F16, F46). A separate CubeMX file (.ioc) is maintained for each project.
- The projects include the /grbl and /stm32 folders via Folder Links.
Board design was done on Altium Designer. A self imposed limit of 100x100 mm size for the board to keep the prototype cost down as there are many deals available from Asia to fab a 100x100 mm board, complete with surface mount component stencil. Placement of surface mount components are done with a custom designed manual pick-and-place with camera. The boards were flowed with an Arduino controlled custom hot-plate with heaters and thermistor.
A custom CNC was designed and built with spare parts to test out all components. The next project is to build a F46 driven pick-and-place to build the boards. The idea of a F46 driving a PnP to build other F46 is strangely appealing.