Hello, I don’t understand how to compile the library in platformIO, with Arduino framework with an STM32F103CBT6 bluepill. I have set genericSTM32F103CB in platformio.ini. I succeeded to test my LCD with an Arduino UNO and everything works fine. When I compile (GLUE_Demo_320x240) for the stm32 I have more than 1000 errors.
Have you been able to test the standard blink sketch with your blue pill? If not, that’s usually a good place to start to make sure that your toolchain is working fine. That sketch doesn’t use any specific libraries so obviously won’t test those.
Next up, are you using a library that is specific to the STM port of the Arduino framework? I assume this to be the case, but it’s possible you’ve installed an STM specific library rather than one for the Arduino framework, perhaps MBED?
I have a couple of Blue Pills (which I must get around to doing something with) and I use the MBED framework at the moment, but in my platformio.ini I have this:
In this case using board = genericSTM32F103CB will not work because the library tries to detect the used variant with the inherent target macros
The genericSTM32F103CB defines none of these macros, but bluepill_f103c8_128kdoes. You can open the mcufriend_shield.h file in VSCode and it will highlight you the actived or non-actived sections and the macros they depend on, then you’ll see what I mean.
Thank you for your enthusiastic reply, I used this code: https://github.com/prenticedavid/MCUFRIEND_kbv
The LCD_ID_readreg.ino give me 0x4747 (for my LCD Screen seem to be an HX8347 driver) with both Arduino UNO and STM32F103CBT6 with both Arduino IDE and PlatformIO.
In PlatformIO there are not .ino file but only .cpp / .c / .h file.