Got my first taste of the STM32 ecosystem at IoT workshop thing last night... (I'm more used to PIC and AVR)...
Anyway...
The configurator seems to be STM32CubeMX along with the family specific STM32Cube_FW_L4_V1.11.0 which I imported and then seems to have mysteriously extracted to
C:\Users\Nivag\STM32Cube\Repository\STM32Cube_FW_L4_V1.11.0 never to be seen again.
Using STM32CubeMX I can click on a few pins, configure some clocks etc and generate a bare bones project... got that to work
But... Can you round trip in STM32CubeMX? i.e. go back add some more bits and pieces and then get back to your project without wiping out your user code?
Is there a trick to surviving the round trip?
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */I think the USER CODE comments are the magic... how does the parser work... is the name of the USER CODE section significant?
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */It seems a bit weird... since the code generator seems to have actually created some code in the USER code section. The "while (1) {" text wasn't created by me.