X-NUCLEO-IKS01A1 + NUCLEO-L053R8 + STM32CubeMX development hell
Hi,
I'm trying to get working system using NUCLEO-L053R8 and X-NUCLEO-IKS01A1.
I need to print sensor data on UART and later on I want to use FreeRTOS on that system.
I'm using STM32CubeMX v5.0 to generate initialization code and Atollic TrueSTudio v9.1.0. for development.
Firstly, I've tried to generate code _just for device_ STM32L053R8T6 but then whole integration process looked cumbersome because BSP calls in all examples.
To stay on safe side I've decided to generate code fo NUCLEO-L053R8 board.
I've set pins as in example project "DataLogger" for NUCLEO-L401RE.
For additional software I've selected:
- X-CUBE-MEMS1 v5.2.1 - Board extension: IKS01A2,
- X-CUBE-MEMS1 - Application: IKS01A2_DataLogTerminal
I'm using I2C1 and UART2 which are selected as interfaces for BSP software.
I'm using BSP for IKS01A2 because there is no IKS01A1 with idea that I will manually change files with those from X-CUBE-XT1.
For start, project builds successfully.
I want to use printf() and there are _write() and __io_putchar() retargted. So for next step under main(), between /* USER CODE BEGIN 2 */ I'm using `printf("Hello world!");`
But, nothing happens. There is no output on UART2.
I've noticed that function `int32_t BSP_COM_SelectLogPort(COM_TypeDef COM)` is never called. If I add this call before printf() also nothing happens.
This BSP integration is nightmare. I just don't understand this system enough to tailor it to my needs. I've lost much of time trying to tailor various combinations of example projects and CubeMX generated files, but without working project.
Please, help me how to proceed.
