Nucleo-F746ZG and SSD1963

338 views
asked Jul 3, 2019 in System Integration by quipu

Nucleo board and LCD are connected via FMC. LCD is ER-TFTM070-4V2.1 800x480

I first implemented the software to check initialization and correct operation of the display. Performance is a bit poor: I reach about 8 FPS.

Starting from environment for STM32F407 Discovery I modified environment for STM32F746 Discovery (STM32F407-Discovery\TargetSpecific\ew_bsp_xxxx.c and .h).
The compilation fails in the linking phase.
The errors are as follows:

Linking EmbeddedWizard-STM32F746-Nucleo
arm-none-eabi-gcc -mcpu=cortex-m7 -mlittle-endian -mthumb -mthumb-interwork -mfpu=fpv5-sp-d16 -mfloat-abi=hard -Wl,--gc-sections -Wl,-Map=./Bin/EmbeddedWizard-STM32F746-Nucleo.map ./startup_stm32f746xx.s              ./Obj/main.o              ./Obj/ewmain.o              ./Obj/DeviceDriver.o         ./Obj/Core.o         ./Obj/Effects.o         ./Obj/Graphics.o         ./Obj/Resources.o         ./Obj/Views.o         ./Obj/Application.o         ./Obj/ewextrte.o         ./Obj/ewextgfx.o     ./Obj/ew_bsp_system.o     ./Obj/ew_bsp_clock.o     ./Obj/ew_bsp_event.o     ./Obj/ew_bsp_display.o     ./Obj/ew_bsp_touch.o     ./Obj/ew_bsp_serial.o     ./Obj/ew_bsp_inout.o     ./Obj/ssd1963_16bit_fsmc.o     ./Obj/stm32f7xx_it.o     ./Obj/system_stm32f7xx.o              ./Obj/stm32f7xx_hal.o              ./Obj/stm32f7xx_hal_rcc.o              ./Obj/stm32f7xx_hal_rcc_ex.o              ./Obj/stm32f7xx_hal_cortex.o              ./Obj/stm32f7xx_hal_gpio.o              ./Obj/stm32f7xx_hal_sram.o              ./Obj/stm32f7xx_hal_dma.o              ./Obj/stm32f7xx_hal_i2c.o              ./Obj/stm32f7xx_ll_fmc.o              ./Obj/stm32f7xx_hal_nand.o              ./Obj/stm32f7xx_hal_uart.o              ./Obj/stm32f7xx_hal_spi.o              ./Obj/stm32f7xx_hal_pwr.o              ./Obj/stm32f7xx_hal_pwr_ex.o              ./Obj/stm32f7xx_hal_tim.o              ./Obj/stm32f7xx_hal_tim_ex.o              ./Obj/stm32f7xx_hal_rtc.o              ./Obj/stm32f7xx_hal_rtc_ex.o              ./Obj/stm32746g_discovery.o             ./Obj/tlsf.o  -L../../../PlatformPackage/RTE -L../../../PlatformPackage/RGB565 -lc -lnosys -lm -lewrte-m7-gcc -lewgfx-m7-gcc -T ./stm32f7_flash.ld -o ./Bin/EmbeddedWizard-STM32F746-Nucleo.elf
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x3c): undefined reference to `STM32FillDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x40): undefined reference to `STM32FillDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x54): undefined reference to `STM32FillDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x58): undefined reference to `STM32FillDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x68): undefined reference to `STM32CopyDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x6c): undefined reference to `STM32BlendDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x70): undefined reference to `STM32CopyDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x74): undefined reference to `STM32BlendDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x88): undefined reference to `STM32CopyDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x8c): undefined reference to `STM32BlendDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x90): undefined reference to `STM32CopyDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x94): undefined reference to `STM32BlendDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0xb0): undefined reference to `STM32CopyDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0xb4): undefined reference to `STM32BlendDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0xc8): undefined reference to `STM32CopyDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0xcc): undefined reference to `STM32CopyDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0xd0): undefined reference to `STM32CopyDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0xd4): undefined reference to `STM32BlendDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0xe0): undefined reference to `STM32CopyDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0xe4): undefined reference to `STM32BlendDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0xe8): undefined reference to `STM32CopyDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0xec): undefined reference to `STM32BlendDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x100): undefined reference to `STM32CopyDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x104): undefined reference to `STM32BlendDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x108): undefined reference to `STM32CopyDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x10c): undefined reference to `STM32BlendDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x128): undefined reference to `STM32CopyDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x12c): undefined reference to `STM32BlendDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x140): undefined reference to `STM32CopyDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x144): undefined reference to `STM32CopyDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x148): undefined reference to `STM32CopyDriver'
../../../PlatformPackage/RGB565\libewgfx-m7-gcc.a(ewgfxtasks.o):(.rodata+0x14c): undefined reference to `STM32BlendDriver'
collect2.exe: error: ld returned 1 exit status
make: *** [EmbeddedWizard-STM32F746-Nucleo] Error 1

I disabled the 2D hardware accelerator (-DEW_USE_DMA2D_GRAPHICS_ACCELERATOR=0 in Makefile).
Can I fix it ?

 

Best Regards

Antonello

1 Answer

0 votes
answered Jul 3, 2019 by Manfred Schweyer
Hello Antonello,

it seems that you are using the libraries compiled for STM32F746 (which are using the DMA2D) and combine that with source code created for STM32F407 (which does not support DMA2D).

Thus you get the linker errors. Try to enable DMA2D and add the file ew_bsp_graphics.c to your project.

Does it work?

Best regards,

Manfred.
commented Jul 3, 2019 by quipu

Hello Manfred,

I don't think I can use DMA2D in my scenario (correct me if I'm wrong).
if I enable the DMA2D and add the ew_bsp_graphics.c file to my project I have other errors.

Compiling ../../../PlatformPackage/RGB565/ewextgfx.c
../../../PlatformPackage/RGB565/ewextgfx.c: In function 'STM32InitViewport':
../../../PlatformPackage/RGB565/ewextgfx.c:310:30: error: 'DMA2D_OUTPUT_RGB565' undeclared (first use in this function); did you mean 'DMA2D_RGB565'?
     if ( !EwBspGraphicsInit( DMA2D_OUTPUT_RGB565 ))
                              ^~~~~~~~~~~~~~~~~~~
                              DMA2D_RGB565
../../../PlatformPackage/RGB565/ewextgfx.c:310:30: note: each undeclared identifier is reported only once for each function it appears in
../../../PlatformPackage/RGB565/ewextgfx.c: In function 'STM32FillDriver':
../../../PlatformPackage/RGB565/ewextgfx.c:962:31: error: 'DMA2D_OUTPUT_ARGB8888' undeclared (first use in this function); did you mean 'DMA2D_ARGB8888'?
     uint32_t dstColorFormat = DMA2D_OUTPUT_ARGB8888;
                               ^~~~~~~~~~~~~~~~~~~~~
                               DMA2D_ARGB8888
../../../PlatformPackage/RGB565/ewextgfx.c:977:24: error: 'DMA2D_OUTPUT_RGB565' undeclared (first use in this function); did you mean 'DMA2D_OUTPUT_ARGB8888'?
       dstColorFormat = DMA2D_OUTPUT_RGB565;
                        ^~~~~~~~~~~~~~~~~~~
                        DMA2D_OUTPUT_ARGB8888
../../../PlatformPackage/RGB565/ewextgfx.c: In function 'STM32CopyDriver':
../../../PlatformPackage/RGB565/ewextgfx.c:1098:31: error: 'DMA2D_OUTPUT_ARGB8888' undeclared (first use in this function); did you mean 'DMA2D_ARGB8888'?
     uint32_t dstColorFormat = DMA2D_OUTPUT_ARGB8888;
                               ^~~~~~~~~~~~~~~~~~~~~
                               DMA2D_ARGB8888
../../../PlatformPackage/RGB565/ewextgfx.c:1099:31: error: 'DMA2D_INPUT_ARGB8888' undeclared (first use in this function); did you mean 'DMA2D_OUTPUT_ARGB8888'?
     uint32_t srcColorFormat = DMA2D_INPUT_ARGB8888;
                               ^~~~~~~~~~~~~~~~~~~~
                               DMA2D_OUTPUT_ARGB8888
../../../PlatformPackage/RGB565/ewextgfx.c:1117:24: error: 'DMA2D_OUTPUT_RGB565' undeclared (first use in this function); did you mean 'DMA2D_OUTPUT_ARGB8888'?
       dstColorFormat = DMA2D_OUTPUT_RGB565;
                        ^~~~~~~~~~~~~~~~~~~
                        DMA2D_OUTPUT_ARGB8888
../../../PlatformPackage/RGB565/ewextgfx.c:1121:24: error: 'DMA2D_INPUT_A8' undeclared (first use in this function); did you mean 'DMA2D_INPUT_ARGB8888'?
       srcColorFormat = DMA2D_INPUT_A8;
                        ^~~~~~~~~~~~~~
                        DMA2D_INPUT_ARGB8888
../../../PlatformPackage/RGB565/ewextgfx.c:1123:24: error: 'DMA2D_INPUT_RGB565' undeclared (first use in this function); did you mean 'DMA2D_OUTPUT_RGB565'?
       srcColorFormat = DMA2D_INPUT_RGB565;
                        ^~~~~~~~~~~~~~~~~~
                        DMA2D_OUTPUT_RGB565
../../../PlatformPackage/RGB565/ewextgfx.c:1126:24: error: 'DMA2D_INPUT_L8' undeclared (first use in this function); did you mean 'DMA2D_INPUT_A8'?
       srcColorFormat = DMA2D_INPUT_L8;
                        ^~~~~~~~~~~~~~
                        DMA2D_INPUT_A8
../../../PlatformPackage/RGB565/ewextgfx.c: In function 'STM32BlendDriver':
../../../PlatformPackage/RGB565/ewextgfx.c:1249:31: error: 'DMA2D_OUTPUT_ARGB8888' undeclared (first use in this function); did you mean 'DMA2D_ARGB8888'?
     uint32_t dstColorFormat = DMA2D_OUTPUT_ARGB8888;
                               ^~~~~~~~~~~~~~~~~~~~~
                               DMA2D_ARGB8888
../../../PlatformPackage/RGB565/ewextgfx.c:1250:31: error: 'DMA2D_INPUT_ARGB8888' undeclared (first use in this function); did you mean 'DMA2D_OUTPUT_ARGB8888'?
     uint32_t srcColorFormat = DMA2D_INPUT_ARGB8888;
                               ^~~~~~~~~~~~~~~~~~~~
                               DMA2D_OUTPUT_ARGB8888
../../../PlatformPackage/RGB565/ewextgfx.c:1268:24: error: 'DMA2D_OUTPUT_RGB565' undeclared (first use in this function); did you mean 'DMA2D_OUTPUT_ARGB8888'?
       dstColorFormat = DMA2D_OUTPUT_RGB565;
                        ^~~~~~~~~~~~~~~~~~~
                        DMA2D_OUTPUT_ARGB8888
../../../PlatformPackage/RGB565/ewextgfx.c:1272:24: error: 'DMA2D_INPUT_A8' undeclared (first use in this function); did you mean 'DMA2D_INPUT_ARGB8888'?
       srcColorFormat = DMA2D_INPUT_A8;
                        ^~~~~~~~~~~~~~
                        DMA2D_INPUT_ARGB8888
../../../PlatformPackage/RGB565/ewextgfx.c:1274:24: error: 'DMA2D_INPUT_RGB565' undeclared (first use in this function); did you mean 'DMA2D_OUTPUT_RGB565'?
       srcColorFormat = DMA2D_INPUT_RGB565;
                        ^~~~~~~~~~~~~~~~~~
                        DMA2D_OUTPUT_RGB565
../../../PlatformPackage/RGB565/ewextgfx.c:1277:24: error: 'DMA2D_INPUT_L8' undeclared (first use in this function); did you mean 'DMA2D_INPUT_A8'?
       srcColorFormat = DMA2D_INPUT_L8;
                        ^~~~~~~~~~~~~~
                        DMA2D_INPUT_A8
make: *** [Obj/ewextgfx.o] Error 1

C:\Users\alombardinilo\Documents\projects\EmbeddedWizard\download\STM32F746-Nucleo-SSD1963\Application\Project\GCC>

This because I removed the DMA2D from the STM32_HAL (as for the STM32F407)

From what I understand I can't use the libraries for STM32F746 without the support of DMA2D. I can therefore "adapt" the STM32FillDriver, STM32CopyDriver and STM32BlendDriver functions ?

commented Jul 3, 2019 by Manfred Schweyer
Hmmm, if you have removed the DMA2D from the HAL, you will get the errors when you try to use it...

Why have you removed DMA2D from STM32 HAL?
commented Jul 3, 2019 by quipu
Probably I did not understand the operation of the DMA2D :-(
Can I still use it in my HW scenario ?
If yes, how would it be used?
commented Jul 3, 2019 by quipu
With the DMA2D in STM32 HAL the compilation is successful!
commented Jul 3, 2019 by Manfred Schweyer
Great! Maybe you can share an image when you have everthing up and running on your hardware... Interesting project!

Best regards,

Manfred.
commented Jul 4, 2019 by quipu

A few steps forward.
I'm working with TrueStudio now so I can debug.
The serial port works, even if it works at 38400 bps although I have configured to 115200 !
The LCD is initialized and turns on.
This is what I see on the console

Initialize Realtime Clock...                 [OK]
Initialize Display...                        [OK]
Initialize Touch Driver...                   [OK]
Initialize Memory Manager...                 [OK]
Initialize Graphics Engine...                [OK]
Create Embedded Wizard Root Object...        EMWI ERROR: code: 236, info: "ApplicationLogo"
For details please visit https://doc.embedded-wizard.de/errors

PANIC: System halted

 

commented Jul 4, 2019 by quipu

Solved.

Undefine USE_CCMRAM in ewmain.c.

This is the console ouput

Initialize Realtime Clock...                 [OK]
Initialize Display...                        [OK]
Initialize Touch Driver...                   [OK]
Initialize Memory Manager...                 [OK]
Initialize Graphics Engine...                [OK]
Create Embedded Wizard Root Object...        [OK]
Create Embedded Wizard Viewport...           [OK]
---------------------------------------------
Target system                                STM32F407-Discovery
Color format                                 RGB565
MemoryPool address                           0x20000814
MemoryPool size                              81920 bytes
Scratch-pad buffer address                   0x20014814
Scratch-pad buffer size                      32000 bytes
Framebuffer size                             800 x 480
EwScreeenSize                                800 x 480
Graphics accelerator                         DMA2D
Vector graphics support                      enabled
Warp function support                        enabled
Index8 bitmap resource format                enabled
RGB565 bitmap resource format                enabled
Bidirectional text support                   enabled
Operating system                             none
External flash device                        none
Linker section for bitmap pixel data         .SectionEwResource
Linker section for font pixel data           .SectionEwResource
Toolchain                                    GCC
C-Compiler version                           6.3.1
Build date and time                          Jul  4 2019, 11:03:51
Runtime Environment (RTE) version            9.20
Graphics Engine (GFX) version                9.20
Max surface cache size                       0 bytes
Glyph cache size                             128 x 128
Max issue tasks                              100
Surface rotation                             0
---------------------------------------------

and what I see on LCD

HelloWorld Nucleo-F746ZG SSD1963 800x480 16bit

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...