Thank you both for answering
Aah right, the BSP drivers! But afaik the BSP drivers should be included already:
- I added the BSP include path to gcc : -I/<path_to_stm32cube>/STM32Cube_FW_F7_V1.11.0/Drivers/BSP/STM32746G-Discovery
- I changed the include line in the board_STM32LTDC.h file (the original STM32F7 cube BSP drivers are misspelled!) - I wanted to use original BSP files, to avoid duplication (using the original BSP stuff anyway):
#include "stm32f746g_discovery_sdram.h" /* BEFORE */
#include "stm32746g_discovery_sdram.h" /* AFTER */
And the error stays the same:
arm-none-eabi-gcc -o pio_builds/disco_f746ng/firmware.elf -Os -Wl,--gc-sections,--relax -mthumb -mcpu=cortex-m7 --specs=nano.specs --specs=nosys.specs -Wl,-T"/home/jure/.platformio/packages/framework-stm32cube/platformio/ldscripts/STM32F746NG_DEFAULT.ld" pio_builds/disco_f746ng/src/gdisp_lld_STM32LTDC.o pio_builds/disco_f746ng/src/gfx_mk.o pio_builds/disco_f746ng/src/main.o -L/home/jure/.platformio/platforms/ststm32/ldscripts -Lpio_builds/disco_f746ng -L/home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/CMSIS/Lib/GCC -L/home/jure/.platformio/packages/framework-stm32cube/platformio/ldscripts -Wl,--start-group -lc -lgcc -lm -lstdc++ -lnosys pio_builds/disco_f746ng/libFrameworkHALDriver.a pio_builds/disco_f746ng/libFrameworkCMSISDevice.a -Wl,--end-group
pio_builds/disco_f746ng/src/gdisp_lld_STM32LTDC.o: In function `gdisp_lld_init':
gdisp_lld_STM32LTDC.c:(.text.gdisp_lld_init+0x1a2): undefined reference to `BSP_SDRAM_Init'
collect2: error: ld returned 1 exit status
*** [pio_builds/disco_f746ng/firmware.elf] Error 1
@Joel Bodenmann I then tried to use the BSP files provided in uGFX board directory, by adding the include path to gcc and leaving the board file as it was originally.
I get billions of this kind of error messages (for every HAL driver file I guess):
In file included from /home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_conf.h:259:0,
from /home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal.h:46,
from /home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/CMSIS/Device/ST/STM32F7xx/Include/stm32f7xx.h:211,
from /home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_def.h:46,
from /home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_rcc.h:45,
from /home/jure/Projects/ARMdev_stuff/uGFX/boards/base/STM32F746-Discovery/board_STM32LTDC.h:29,
from src/gdisp_lld_STM32LTDC.c:94:
/home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_gpio.h:254:1: error: unknown type name 'HAL_StatusTypeDef'; did you mean 'SAI_Block_TypeDef'?
HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
^~~~~~~~~~~~~~~~~
SAI_Block_TypeDef
In file included from /home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_conf.h:263:0,
from /home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal.h:46,
from /home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/CMSIS/Device/ST/STM32F7xx/Include/stm32f7xx.h:211,
from /home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_def.h:46,
from /home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_rcc.h:45,
from /home/jure/Projects/ARMdev_stuff/uGFX/boards/base/STM32F746-Discovery/board_STM32LTDC.h:29,
from src/gdisp_lld_STM32LTDC.c:94:
/home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma.h:160:3: error: unknown type name 'HAL_LockTypeDef'
...
Compiling pio_builds/disco_f746ng/src/main.o
In file included from /home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma.h:630:0,
from /home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_conf.h:263,
from /home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal.h:46,
from /home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/CMSIS/Device/ST/STM32F7xx/Include/stm32f7xx.h:211,
from /home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_def.h:46,
from /home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_rcc.h:45,
from /home/jure/Projects/ARMdev_stuff/uGFX/boards/base/STM32F746-Discovery/board_STM32LTDC.h:29,
from src/gdisp_lld_STM32LTDC.c:94:
/home/jure/.platformio/packages/framework-stm32cube/f7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma_ex.h:129:1: error: unknown type name 'HAL_StatusTypeDef'; did you mean 'HAL_DMA_StateTypeDef'?
HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength);
^~~~~~~~~~~~~~~~~
HAL_DMA_StateTypeDef
...
Lastly, I copied the original BSP files (stm32746g_discovery_sdram.h / .c) to my projects /src and /inc folder -> and it compiles successfully. The pixels didn't show up on screen, but I guess I missed something in the GFX configuration/initialization....
@David Thomas I would love to see the BSP packages available as a PlatformIO library, but the one provided is only "mbed" compatible and I do NOT use mbed or any other RTOS (in future I plan to try FreeRTOS, but for learning purposes I want to stick to HAL+BSP). That's why I downloaded the stm32cube and included the BSP package path manually...