Jump to content

nquantum

Members
  • Posts

    32
  • Joined

  • Last visited

Posts posted by nquantum

  1. After undef Red, Green, Blue after import gfx.h I also add some into board_STM32LTDC.h due to little error. 

    DSI_HandleTypeDef hdsi_eval;
    uint32_t lcd_x_size;
    uint32_t lcd_y_size;

    Then compile project without error , Module GWIN, GOS, GDISP, GINPUT now compile without error. ("Yesssss!!...") However... I feel that undef Red, Green, Blue may still cause some error when I try use demo module of ugfx....

    But here I try to load in to STM32F469i board... It almost work now. But I try to solve this not sure where to start. Please help me.

     

    I've read that before I call  gfxInit() I've to initial peripheral before right? But I call gfxInit() with demo code from gdisp module after 

    HAL_Init();
    SystemClock_Config();
    
    BSP_SDRAM_Init();

    Nothing on screen, black screen. But if I call call gfxInit() , demo code after 

    HAL_Init();
    SystemClock_Config();
    BSP_SDRAM_Init();
    
    lcd_status = LCD_Init();

    or
     

    HAL_Init();
    
    SystemClock_Config();
    BSP_SDRAM_Init();
    
    lcd_status = LCD_Init();
    BSP_LCD_LayerDefaultInit(0, LAYER0_ADDRESS);
    BSP_LCD_SelectLayer(0); 

    It seem to work like the picture I show you.

     

    I setup the project of STM32F469 from the example project come from ST , LCD_DSI_CmdMode_SingleBuffer once then compile without error then I add uGFX into it.

    I does because LCD initial not correctly? 

    Does the uGFX GDISP do initial LCD and LTDC/DMA2D automatic or do I need to initial myself with BSP function from ST before I call gfxInit()

     

    Sorry for confuse question. Because I don't know which one to begin 1st or what cause of this.

    IMG20170113151956.jpg

  2. As of question relate to LTDC driver of STM32, i would like to ask.

    How about QSPI? Since LTDC call for BSD file that point to hardware-signal in ST board LCD and SDRAM also in my board STM32F469 they also include QSPI too. But it apear that they include only no where to use incode.

    Do it use QSPI IN WORKING WITH LCD? Or just only SDRAM for working with LTDC. 

    Meaning it I want to use CubeMX from scratch I need setup for LTDC and SDRAM right? Do i need to include QSPI , also DMA2D also?

    Basicly i do not QSPI do in this LCD thing.

  3. It seem like I not yet in CubeMX enable LTDC... So I choose board STM32F469 Discovery and enable LTDC RGB888(24bit) DSI mode. leave other non touch. Then try again. Got this error about gdisp_colors.

    Can you please help me on this? Any hints?

    uilding file: ../src/main.c
    Invoking: Cross ARM C Compiler
    arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -Wall -Wextra  -g3 -DDEBUG -DSTM32F469xx -DTRACE -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f4xx" -I"C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx" -I"C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx\src" -I"C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\STM32LTDC" -I"C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\Myfiles" -std=gnu11 -MMD -MP -MF"src/main.d" -MT"src/main.o" -c -o "src/main.o" "../src/main.c"
    In file included from C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp.h:212:0,
                     from C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/gfx.h:208,
                     from ../src/main.c:37:
    ../src/main.c: In function 'MX_LTDC_Init':
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:329:25: error: expected identifier before '(' token
      #define HTML2COLOR(h)  ((COLOR_TYPE)(HTML2COLOR_R(h) | HTML2COLOR_G(h) | HTML2COLOR_B(h)))
                             ^
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:87:16: note: in expansion of macro 'HTML2COLOR'
     #define Blue   HTML2COLOR(0x0000FF)
                    ^
    ../src/main.c:184:24: note: in expansion of macro 'Blue'
       hltdc.Init.Backcolor.Blue = 0;
                            ^
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:329:25: error: expected identifier before '(' token
      #define HTML2COLOR(h)  ((COLOR_TYPE)(HTML2COLOR_R(h) | HTML2COLOR_G(h) | HTML2COLOR_B(h)))
                             ^
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:91:17: note: in expansion of macro 'HTML2COLOR'
     #define Green   HTML2COLOR(0x008000)
                     ^
    ../src/main.c:185:24: note: in expansion of macro 'Green'
       hltdc.Init.Backcolor.Green = 0;
                            ^
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:329:25: error: expected identifier before '(' token
      #define HTML2COLOR(h)  ((COLOR_TYPE)(HTML2COLOR_R(h) | HTML2COLOR_G(h) | HTML2COLOR_B(h)))
                             ^
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:88:16: note: in expansion of macro 'HTML2COLOR'
     #define Red    HTML2COLOR(0xFF0000)
                    ^
    ../src/main.c:186:24: note: in expansion of macro 'Red'
       hltdc.Init.Backcolor.Red = 0;
                            ^
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:329:25: error: expected identifier before '(' token
      #define HTML2COLOR(h)  ((COLOR_TYPE)(HTML2COLOR_R(h) | HTML2COLOR_G(h) | HTML2COLOR_B(h)))
                             ^
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:87:16: note: in expansion of macro 'HTML2COLOR'
     #define Blue   HTML2COLOR(0x0000FF)
                    ^
    ../src/main.c:204:23: note: in expansion of macro 'Blue'
       pLayerCfg.Backcolor.Blue = 0;
                           ^
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:329:25: error: expected identifier before '(' token
      #define HTML2COLOR(h)  ((COLOR_TYPE)(HTML2COLOR_R(h) | HTML2COLOR_G(h) | HTML2COLOR_B(h)))
                             ^
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:91:17: note: in expansion of macro 'HTML2COLOR'
     #define Green   HTML2COLOR(0x008000)
                     ^
    ../src/main.c:205:23: note: in expansion of macro 'Green'
       pLayerCfg.Backcolor.Green = 0;
                           ^
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:329:25: error: expected identifier before '(' token
      #define HTML2COLOR(h)  ((COLOR_TYPE)(HTML2COLOR_R(h) | HTML2COLOR_G(h) | HTML2COLOR_B(h)))
                             ^
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:88:16: note: in expansion of macro 'HTML2COLOR'
     #define Red    HTML2COLOR(0xFF0000)
                    ^
    ../src/main.c:206:23: note: in expansion of macro 'Red'
       pLayerCfg.Backcolor.Red = 0;
                           ^
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:329:25: error: expected identifier before '(' token
      #define HTML2COLOR(h)  ((COLOR_TYPE)(HTML2COLOR_R(h) | HTML2COLOR_G(h) | HTML2COLOR_B(h)))
                             ^
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:87:16: note: in expansion of macro 'HTML2COLOR'
     #define Blue   HTML2COLOR(0x0000FF)
                    ^
    ../src/main.c:224:24: note: in expansion of macro 'Blue'
       pLayerCfg1.Backcolor.Blue = 0;
                            ^
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:329:25: error: expected identifier before '(' token
      #define HTML2COLOR(h)  ((COLOR_TYPE)(HTML2COLOR_R(h) | HTML2COLOR_G(h) | HTML2COLOR_B(h)))
                             ^
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:91:17: note: in expansion of macro 'HTML2COLOR'
     #define Green   HTML2COLOR(0x008000)
                     ^
    ../src/main.c:225:24: note: in expansion of macro 'Green'
       pLayerCfg1.Backcolor.Green = 0;
                            ^
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:329:25: error: expected identifier before '(' token
      #define HTML2COLOR(h)  ((COLOR_TYPE)(HTML2COLOR_R(h) | HTML2COLOR_G(h) | HTML2COLOR_B(h)))
                             ^
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx/src/gdisp/gdisp_colors.h:88:16: note: in expansion of macro 'HTML2COLOR'
     #define Red    HTML2COLOR(0xFF0000)
                    ^
    ../src/main.c:226:24: note: in expansion of macro 'Red'
       pLayerCfg1.Backcolor.Red = 0;
                            ^
    src/subdir.mk:27: recipe for target 'src/main.o' failed
    make: *** [src/main.o] Error 1
    
    23:33:03 Build Finished (took 9s.820ms)

     

  4. Hi all.

    Since I've this board also STM32F469NIH I try to follow what you have done. But still not yet success, error. I use Eclipse and what I do is I follow step: 

    I also use files of Maytham for the board driver. But for gdisp_IId_config.h ,I copy from ugfx>drivers>gdisp>STM32LTDC. I'm not sure I do it right or not.

    This is what I do:

    Manual How to implement uGFX lib in existing Eclipse project with autotool makefile.  

    1. Copy ugfx lib folder to your Eclipse project tree and exclude it from build( click right button on folder and choose Resource Configurations).
    2. Copy gfx_mk.c to your src from ugfx/src. Now all necessary sources and headers of ugfx include to build.
    3. Copy gfxconf.h to your include dir and config it. 
    4. Choose or create necessary drivers and board files (BSP). You can choose them from ugfx/drivers  and ugfx/boards. > I make folder and copy all files Maytham +  gdisp_IId_config.h inside folder.
    5. Specify following include paths: 

    "../ugfx"

    "../ugfx/src"
    "STM32LTDC"

     

    >> gfx.conf.h   I uncommend this 

    #define GFX_USE_OS_RAW32                        TRUE

    #define GFX_USE_GDISP                                TRUE (if I commend this line out then no error)

    This is the error 

    ===================================================================================================================

    00:18:51 **** Incremental Build of configuration Debug for project Copy of Copy of free_eclipse_org ****
    make all 
    Building file: ../src/gfx_mk.c
    Invoking: Cross ARM C Compiler
    arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -Wall -Wextra  -g3 -DDEBUG -DSTM32F469xx -DTRACE -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f4xx" -I"C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx" -I"C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx\src" -I"C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\STM32LTDC" -std=gnu11 -MMD -MP -MF"src/gfx_mk.d" -MT"src/gfx_mk.o" -c -o "src/gfx_mk.o" "../src/gfx_mk.c"
    In file included from C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx\src/gos/gos_mk.c:14:0,
                     from ../src/gfx_mk.c:9:
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx\src/gos/gos_raw32.c: In function '_gosInit':
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx\src/gos/gos_raw32.c:29:4: warning: #warning "GOS: Raw32 - Make sure you initialize your hardware and the C runtime before calling gfxInit() in your application!" [-Wcpp]
       #warning "GOS: Raw32 - Make sure you initialize your hardware and the C runtime before calling gfxInit() in your application!"
        ^
    Finished building: ../src/gfx_mk.c
     
    Building file: ../src/main.c
    Invoking: Cross ARM C Compiler
    arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -Wall -Wextra  -g3 -DDEBUG -DSTM32F469xx -DTRACE -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f4xx" -I"C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx" -I"C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx\src" -I"C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\STM32LTDC" -std=gnu11 -MMD -MP -MF"src/main.d" -MT"src/main.o" -c -o "src/main.o" "../src/main.c"
    Finished building: ../src/main.c
     
    Building target: Copy of Copy of free_eclipse_org.elf
    Invoking: Cross ARM C++ Linker
    arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -Wall -Wextra  -g3 -T mem.ld -T libs.ld -T sections.ld -nostartfiles -Xlinker --gc-sections -L"../ldscripts" -Wl,-Map,"Copy of Copy of free_eclipse_org.map" --specs=nano.specs -o "Copy of Copy of free_eclipse_org.elf"  ./system/src/stm32f4xx/stm32f4xx_hal.o ./system/src/stm32f4xx/stm32f4xx_hal_cortex.o ./system/src/stm32f4xx/stm32f4xx_hal_dma.o ./system/src/stm32f4xx/stm32f4xx_hal_dma_ex.o ./system/src/stm32f4xx/stm32f4xx_hal_flash.o ./system/src/stm32f4xx/stm32f4xx_hal_flash_ex.o ./system/src/stm32f4xx/stm32f4xx_hal_flash_ramfunc.o ./system/src/stm32f4xx/stm32f4xx_hal_gpio.o ./system/src/stm32f4xx/stm32f4xx_hal_msp.o ./system/src/stm32f4xx/stm32f4xx_hal_pwr.o ./system/src/stm32f4xx/stm32f4xx_hal_pwr_ex.o ./system/src/stm32f4xx/stm32f4xx_hal_rcc.o ./system/src/stm32f4xx/stm32f4xx_hal_rcc_ex.o ./system/src/stm32f4xx/stm32f4xx_hal_tim.o ./system/src/stm32f4xx/stm32f4xx_hal_tim_ex.o  ./system/src/newlib/_cxx.o ./system/src/newlib/_exit.o ./system/src/newlib/_sbrk.o ./system/src/newlib/_startup.o ./system/src/newlib/_syscalls.o ./system/src/newlib/assert.o  ./system/src/diag/Trace.o ./system/src/diag/trace_impl.o  ./system/src/cortexm/_initialize_hardware.o ./system/src/cortexm/_reset_hardware.o ./system/src/cortexm/exception_handlers.o  ./system/src/cmsis/startup_stm32f469xx.o ./system/src/cmsis/system_stm32f4xx.o  ./src/_write.o ./src/gfx_mk.o ./src/main.o ./src/stm32f4xx_it.o   
    ./src/gfx_mk.o: In function `gdispGClear':
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx\src/gdisp/gdisp.c:1030: undefined reference to `gdisp_lld_fill_area'
    ./src/gfx_mk.o: In function `_gdispInit':
    C:\Users\nquan\Documents\3 Projects\Eclipse ARM\-tableARM-\Copy of Copy of free_eclipse_org\ugfx\src/gdisp/gdisp.c:606: undefined reference to `GDISPVMT_OnlyOne'
    collect2.exe: error: ld returned 1 exit status
    makefile:62: recipe for target 'Copy of Copy of free_eclipse_org.elf' failed
    make: *** [Copy of Copy of free_eclipse_org.elf] Error 1

    00:18:52 Build Finished (took 1s.486ms)

    ===================================================================================================================

    What I do wrong? I'm new in uGFX please advice. 

    Thank you

    1.jpg

×
×
  • Create New...