They seem to be continually working on their development environment
Because they had to! In the last decade they had a tour through all the available IDEs: EWARM, Keil, IAR, TrueStudio, SW4STM32...
Each having their their own specific things, making porting hard and painful, sometimes requiring lengthy steps to enable advanced functionalities.
Also they replaced their libraries, so all the old code was no longer supported.
Now we have a stable platform getting better everyday.
After 2 years of DIY learning all ARM from 0, all the register bits (Not easy at first!), the HK32 is a breeze to develop for.
Also, I remember some terrible ST code when I got my F429-DISCO circa 2013, tried the most simple thing, toggling a LED, opened some sample code and the GPIO init alone was using 2 screens!
Used to "TRISB=0xA1", felt like I was developing some stage-4 cancer and ran away
.
Same as when I "really" tried to use Arduino in the ESP32-S3!
It's easy to run do.begin(), but if you want to go deeper, now you must have a PhD in C++!
Who thought it was a good idea? That's why I I hate Arduino so much!!
Things can be really tidy even at low level, for example, this is current GPIO init running on the HK32.
The "for" loops are a bit convoluted, but provides really compact initialization
typedef struct {
GPIO_TypeDef *port;
GPIO_InitTypeDef init;
} GPIO_Init_t;
typedef struct {
GPIO_TypeDef *port;
uint8_t pin;
uint8_t af;
} GPIO_AFInit_t;
const GPIO_AFInit_t GPIOAF_cfg[] = {
{ GPIOC, GPIO_PinSource5, GPIO_AF_2 }, // SPI SCK
{ GPIOC, GPIO_PinSource6, GPIO_AF_2 }, // SPI MOSI
{ GPIOD, GPIO_PinSource7, GPIO_AF_4 }, // TIM2 CH1 CCP INPUT
};
const GPIO_Init_t GPIO_cfg[] = {
{ GPIOA, { GPIO_Pin_3, GPIO_Mode_OUT, GPIO_Speed_10MHz, GPIO_OType_PP }}, // LED
{ GPIOB, { GPIO_Pin_4, GPIO_Mode_OUT, GPIO_Speed_10MHz, GPIO_OType_PP }}, // OLED CS
{ GPIOC, { GPIO_Pin_5, GPIO_Mode_AF, GPIO_Speed_10MHz, GPIO_OType_PP }}, // OLED SCK
{ GPIOC, { GPIO_Pin_6, GPIO_Mode_AF, GPIO_Speed_10MHz, GPIO_OType_PP }}, // OLED MOSI
{ GPIOC, { GPIO_Pin_3, GPIO_Mode_OUT, GPIO_Speed_10MHz, GPIO_OType_PP }}, // OLED DC
{ GPIOC, { GPIO_Pin_4, GPIO_Mode_OUT, GPIO_Speed_10MHz, GPIO_OType_PP }}, // OLED RST
{ GPIOD, { GPIO_Pin_4, GPIO_Mode_OUT, GPIO_Speed_10MHz, GPIO_OType_PP }}, // DEBUG SIGNAL
{ GPIOD, { GPIO_Pin_7, GPIO_Mode_AF, GPIO_Speed_10MHz, GPIO_OType_PP, GPIO_PuPd_UP, GPIO_Schmit_Enable }}, // TIM2 CH1 CCP INPUT
};
for(uint8_t i=0; i < sizeof(GPIO_cfg) / sizeof(GPIO_Init_t); i++) // GPIO init
GPIO_Init(GPIO_cfg[i].port, (GPIO_InitTypeDef*) &GPIO_cfg[i].init);
for(uint8_t i=0; i < sizeof(GPIOAF_cfg) / sizeof(GPIO_AFInit_t); i++) // GPIO AF init
GPIO_PinAFConfig(GPIOAF_cfg[i].port, GPIOAF_cfg[i].pin, GPIOAF_cfg[i].af);