I guess CubeIDE 1.13.0 uses a newer GCC compiler. It'll be fine, I guess.
Use code tags for your logs!
[c0de]
Paste your code between these tags (write "code" instead "c0de")
[/c0de]
Paste your code between these tags (write "code" instead "c0de")
Better skip the i2c mod, it doesn't worth it, anyways if you insist, by default your Core/Inc/board.h will look like this:
#define HWSTRING "HW: KSGER v2.x"
/********************************
* Display Settings *
********************************/
//#define DISPLAY_SPI // SPI display
#define DISPLAY_I2C // I2C display
//#define I2C_TRY_HW // Try I2C HW first, use I2C SW if not detected
#define DISPLAY_ADDRESS (0x3c<<1) // Only used for I2C
//#define DISPLAY_DEVICE hi2c2 // SPI / I2C handler if used. Enables HW mode, otherwise SW mode is used
#define FILL_DMA hdma_memtomem_dma1_channel2 // DMA mem2mem for filling
//#define USE_RST // Reset pin is used
//#define USE_DC // DC pin is used
//#define USE_CS // CS pin is used
#define DISPLAY_OFFSET 2 // Display offset
If you enable i2c in CubeIDE, then you must specify the interface used. It will be hi2c1, hi2c2...
You'll find it at the beginning of Core/Src/main.c it after CubeMX generates the code.
So if your i2c interface was i2c2, the handler will be hi2c2. You only need to specify the handler, changing this line:
//#define DISPLAY_DEVICE hi2c2 // SPI / I2C handler if used. Enables HW mode, otherwise SW mode is
To this:
#define DISPLAY_DEVICE hi2c2 // SPI / I2C handler if used. Enables HW mode, otherwise SW mode is