Jump to content

jurc192

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. SOLVED: in your file (main.c, for example) you have to include stm32f7xx_hal.h FIRST and then gfx.h -> it then works okay. It would be nice to put this into the documentation, since the example (on BareBones guide) has includes the wrong way around and it doesn't work (in my case at least)
  2. 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...
  3. EDIT: I noticed that if I include the "stm32f7xx_hal.h" to "main.c", for example - the problem with color macro expansion comes back, despite having the undefs in the board file. I think I will need this hal header file in the future - what should I do?
  4. Hello World! I am trying to integrate uGFX to PlatformIO IDE and after experience all the "newbie-getting-into-embedded-systems-with-stm32" pain and giving up a few times, I believe I am very close to success. I work on STM32F746 discovery board and am trying to make a simple hello world test of the display (barebones, no RTOS). Upon compiling, I get the following error from the linker: 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 Now I am not sure whether it's my configuration problem (trying to somehow hack the uGFX to PIO) or something else... This is my project structure: . ├── inc │ ├── board_STM32LTDC.h │ └── gfxconf.h ├── lib │ └── readme.txt ├── pio_builds │ ├── disco_f746ng │ ├── do-not-modify-files-here.url │ └── structure.hash ├── src │ ├── gdisp_lld_STM32LTDC.c │ ├── gfx_mk.c │ └── main.c └── platformio.ini And this is the main.c file: #include "gfx.h" int main(void) { gfxInit(); gdispDrawPixel(10, 10, GFX_BLUE); while(1) {} } Any ideas where to start debugging?
  5. I am working on STM32F746 discovery board and had exactly the same problem! (single file inclusion) Looking at the STM32F746 board file, I noticed there were no #undefs , so I copied and pasted the #undef part from another (STM32F469i) board file - no it looks like this: STM32F746 edited board file: /* * This file is subject to the terms of the GFX License. If a copy of * the license was not distributed with this file, you can obtain one at: * * http://ugfx.org/license.html */ #ifndef _GDISP_LLD_BOARD_H #define _GDISP_LLD_BOARD_H /* Avoid naming collisions with CubeHAL. */ #if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS #undef Red #undef Green #undef Blue #endif #include "stm32746g_discovery_sdram.h" [....and so on....] There was another problem with inclusion of the _discovery_sdram.h in the same file. I didn't want to use the BSP files included with uGFX, but rather point to the downloaded version of stm32cubeF7 - to have everything in one place. I noticed that the official STM32 cube package has misspelled the folder and file names of the BSP drivers for STM32F746 (missing the "F") - so I renamed the include in the board file to ommit the "f". With this it compiles well! I would never figured this out without this Forum thread, so thanks!
  6. Hello World! I am learning about embedded programing on my STM32F746 discovery kit, trying to make my display work. As an open source enthusiast, this library was an obvious choice. Another choice I made is using the "Platform IO" IDE - because it's based on my favourite, opensource, hackable text editor Atom. After diving into your makefile system and their library manager for a little, I somehow gave up and started using your Demo folder as a skeleton and compiling with your Makefiles. But in the long term, I believe that a library like this should be integrated into the (imho!) the best "hackable" and open source editor The nice thing about PlatformIO is actually it's "heart": PlatformIO Core which is a CLI tool written in Python (front-end independent). I believe that this architecture makes it easier to integrate your Makefile based library into the platform. Right? What do you think about integration to their system? Could you do it? I am ready to provide feedback and test things, or anything I can do with my current knowledge. Link to the PlatformIO website: https://platformio.org Link to the "request" I filled to their site: https://community.platformio.org/t/request-ugfx-library/3620 Cheers, Jure
×
×
  • Create New...