Finally I bit the bullet and bought 25 chips for $7.48, ST/Microchip parts would've been not less than 3x that, so I'm fine with the adventure even if I don't get it working at the end.
It seems these chips actually have
4KB SRAM, which is also reflected in the Linker script!
Tested, yes, 4KB!This device seems to be a lower-clocked HK32F0301M ?
Well, the CMSIS-Pack plugin was pretty useless. Also, installing it into CubeIDE will break everything.
But there was hope of making it work using the
hk32f030m template.
Which was suprisingly easy!
It's great to have all the good stuff from the IDE like Syntax highlighting, Stack analyzer, Code completion/Declaration dialogs...
So I made a basic project, the included libs are very similar to ST's LL lib.
The selected MCU was set to STM32F030F4Px so it selects the correct architecture (-mcpu=cortex-m0), but uses no ST code at all.
Takes the included toolchain "GNU Tools for STM32 compiler" which is gcc-arm-none-eabi with some ST's tweaks.
The MCU target is easily changed by declaring HK32F030MJ4M6 / HK32F030MD4P6 / HK32F030MF4P6 / HK32F030MF4U6 in the preprocessor tags (Currently set to HK32F030MF4P6).
So, it only takes installing the IDE and importing the project. I love simple setups!
Yet to see if it debugs nicely with a DIY Bluepill J-Link OB.
Edit: It seems it will, current J-Link software included in CubeIDE already supports this devices:
It only requires to properly set the Device field when creating a launch profile:
Edit: Create Google Drive folder:
- Google-translated RM, English datasheet.
- HK32F030M project for STM32 CubeIDE.
- Original library.
Download.
Trying to import this project in a non-patched IDE will cause all sort of errors, it's asking for a non-existing MCU, so it goes completely nuts !