Jump to content

STM32F446 + ILI9341 (by STM32F4 to ILI9341 using uGFX)


Bilymo

Recommended Posts

Hello Dear Friends. I encountered a similar problem. I use Keil uvision 5.06 + HAL by STM32F446 Nucleo on Extern TFT ILI9341 (SPI) and I did everything according to the instructions https://wiki.ugfx.io/index.php/Using_Keil_µVision_5_MDK-ARM. I copy \ugfx\drivers\gdisp\ILI9341 in directory \ugfx\src\gdisp
 
 
My config file

 

#ifndef _GFXCONF_H
#define _GFXCONF_H

/* The operating system to use. One of these must be defined - preferably in your Makefile */
//#define GFX_USE_OS_CHIBIOS        FALSE
//#define GFX_USE_OS_WIN32        TRUE
//#define GFX_USE_OS_LINUX        FALSE
//#define GFX_USE_OS_OSX        FALSE
#define GFX_USE_OS_RAW32 TRUE
#define GFX_COMPILER_KEIL TRUE

/* GFX sub-systems to turn on */
#define GFX_USE_GDISP            TRUE
#define GFX_USE_GEVENT            TRUE
#define GFX_USE_GTIMER            TRUE
#define GFX_USE_GINPUT            TRUE

/* Features for the GDISP sub-system. */
#define GDISP_USE_DMA            TRUE
#define GDISP_NEED_CONTROL        TRUE
#define GDISP_NEED_VALIDATION    TRUE
#define GDISP_NEED_CLIP            TRUE
#define GDISP_NEED_TEXT            TRUE
#define GDISP_NEED_CIRCLE        TRUE
#define GDISP_NEED_MULTITHREAD    TRUE

/* Comment these out if it conflicts with your hardware */
#define GDISP_NEED_CONTROL        TRUE
#define GDISP_DEFAULT_ORIENTATION    GDISP_ROTATE_PORTRAIT
#define GDISP_SCREEN_WIDTH      240
#define GDISP_SCREEN_HEIGHT     320

/* Builtin Fonts */
#define GDISP_INCLUDE_FONT_DEJAVUSANS12        TRUE
#define GDISP_INCLUDE_FONT_DEJAVUSANS16        TRUE
#define GDISP_NEED_ANTIALIAS                FALSE

/* Features for the GINPUT sub-system. */
#define GINPUT_NEED_MOUSE        TRUE

#endif /* _GFXCONF_H */

 

Quote

 

Project without uGFX works. I can draw, write etc. Pin definitions are located in defines.h. 

 


#define ILI9341_SPI                 SPI3 //OR something similar
#define ILI9341_SPI_PINS            TM_SPI_PinsPack_1

/* Change custom CS, DC and RESET pins */
/* CS pin */
#define ILI9341_CS_CLK                RCC_AHB1Periph_GPIOC
#define ILI9341_CS_PORT                GPIOC
#define ILI9341_CS_PIN                GPIO_Pin_2
/* WRX or DC pin */
#define ILI9341_WRX_CLK                RCC_AHB1Periph_GPIOD
#define ILI9341_WRX_PORT            GPIOD
#define ILI9341_WRX_PIN                GPIO_Pin_13
/* RST pin */
#define ILI9341_RST_CLK                RCC_AHB1Periph_GPIOD
#define ILI9341_RST_PORT            GPIOD
#define ILI9341_RST_PIN                GPIO_Pin_12

 

 

  • .\Build Log\SPI_LCD.axf: Error: L6218E: Undefined symbol GDISPVMT_OnlyOne (referred from gdisp.o).
    .\Build Log\SPI_LCD.axf: Error: L6218E: Undefined symbol gdisp_lld_init (referred from gdisp.o).
    .\Build Log\SPI_LCD.axf: Error: L6218E: Undefined symbol gdisp_lld_write_color (referred from gdisp.o).
    .\Build Log\SPI_LCD.axf: Error: L6218E: Undefined symbol gdisp_lld_write_start (referred from gdisp.o).
    .\Build Log\SPI_LCD.axf: Error: L6218E: Undefined symbol gdisp_lld_write_stop (referred from gdisp.o).
    .\Build Log\SPI_LCD.axf: Error: L6218E: Undefined symbol gdriverGetInstance (referred from gdisp.o).
    .\Build Log\SPI_LCD.axf: Error: L6218E: Undefined symbol gdriverGetNext (referred from gdisp.o).
    .\Build Log\SPI_LCD.axf: Error: L6218E: Undefined symbol gdriverInstanceCount (referred from gdisp.o).
    .\Build Log\SPI_LCD.axf: Error: L6218E: Undefined symbol gdriverRegister (referred from gdisp.o).
    .\Build Log\SPI_LCD.axf: Error: L6218E: Undefined symbol _setjmp (referred from gos_raw32.o).
    .\Build Log\SPI_LCD.axf: Error: L6218E: Undefined symbol gfxMillisecondsToTicks (referred from gos_raw32.o).
    .\Build Log\SPI_LCD.axf: Error: L6218E: Undefined symbol gfxSystemTicks (referred from gos_raw32.o).
    .\Build Log\SPI_LCD.axf: Error: L6218E: Undefined symbol _gdriverDeinit (referred from gfx.o).
    .\Build Log\SPI_LCD.axf: Error: L6218E: Undefined symbol _gdriverInit (referred from gfx.o).

 

The thing I want in the end is to be able to draw shapes, place text (and later use windows ets) using uGFX functions.

 

 

How to solve this problem?
 

 

Edited by Bilymo
Link to comment
Share on other sites

12 hours ago, inmarket said:

The way you have used the gdisp driver is incorrect. It cannot be copied to the src directory - that just won't work. Please reread the instructions again on how to do this properly.

 

I did everything according to the instructions and I have a mistake: ..\ugfx\src\../src/gdisp/gdisp.h(166): error:  #5: cannot open source input file "gdisp_lld_config.h": No such file or directory

Therefore, I copied the contents of the \ ugfx \ drivers \ gdisp \ ILI9341 directory and the gdisp_lld_config.h file to \ ugfx \ src \ gdisp and an error occurs
__PROJ \ __ PROJ.axf: Error: L6218E: Undefined symbol GDISPVMT_OnlyOne (referred from gfx_mk.o).
__PROJ \ __ PROJ.axf: Error: L6218E: Undefined symbol GMOUSEVMT_OnlyOne (referred from gfx_mk.o).
__PROJ \ __ PROJ.axf: Error: L6218E: Undefined symbol gdisp_lld_control (referred from gfx_mk.o).
__PROJ \ __ PROJ.axf: Error: L6218E: Undefined symbol gdisp_lld_init (referred from gfx_mk.o).
__PROJ \ __ PROJ.axf: Error: L6218E: Undefined symbol gdisp_lld_write_color (referred from gfx_mk.o).
__PROJ \ __ PROJ.axf: Error: L6218E: Undefined symbol gdisp_lld_write_start (referred from gfx_mk.o).
__PROJ \ __ PROJ.axf: Error: L6218E: Undefined symbol gdisp_lld_write_stop (referred from gfx_mk.o).
__PROJ \ __ PROJ.axf: Error: L6218E: Undefined symbol gfxMillisecondsToTicks (referred from gfx_mk.o).
__PROJ \ __ PROJ.axf: Error: L6218E: Undefined symbol gfxSystemTicks (referred from gfx_mk.o).

How to solve problem?

2_6_I2C_TFT_GUI_RTOS(Developed).rar

Link to comment
Share on other sites

On 06.03.2018 at 22:55, Joel Bodenmann said:

as @inmarket already told you: You must not copy the driver directory. Please just follow the guide exactly step-by-step. It's well tested and used frequently.

I did everything according to the instructions and I have a mistake: ..

..\ugfx\src\../src/gdisp/gdisp.h(166): error:  #5: cannot open source input file "gdisp_lld_config.h": No such file or directory

Please, tell me what was done wrong?

2_6_I2C_TFT_GUI_RTOS(Developed).zip

Edited by Bilymo
Link to comment
Share on other sites

I currently don't have access to a running Keil instance. Can you please show us screenshots of the relevant parts (file tree, compiler path settings, ...).

The error message you're getting indicates that you didn't properly add the path to the driver directory to the compiler include path list:

Using keil 07.png

Link to comment
Share on other sites

On 09.03.2018 at 12:22, Joel Bodenmann said:

I currently don't have access to a running Keil instance. Can you please show us screenshots of the relevant parts (file tree, compiler path settings, ...).

The error message you're getting indicates that you didn't properly add the path to the driver directory to the compiler include path list:

Using keil 07.png

Dear Administrator, forum Members, List, Of course, I want that your product be "universal" for models STM32 , etc, and not just for standard boards and all users understood this. Still, your official instructions, at least needs to be refined, because there you need to add files from the folder ugfx/DRIVERS/gdisp/ILIXXXX, otherwise the file  "gdisp_lld_config.h" does not see (Keil uvision).But I have not yet launched,  If I find the time, I'll try to adapt your gfx for my project ... if there is time .... 

Unfortunately, your "competitors" things are not better, I make a bet on your product ...

Edited by Bilymo
Link to comment
Share on other sites

Hello Bilymo,

I don't understand what you're trying to say. The µGFX library is by far the most portable and agnostic library out there. You can run µGFX on virtually any platform and with any driver. The Keil guide clearly states that the example uses the SSD1289 driver but that it's the same process for any other driver: 

Quote

The following is an example showing how to add the SSD1289 driver to the Keil project. However, adding any other uGFX drivers for displays, touchscreen, audio and so on is exactly the same.

We cannot provide a guide / tutorial for every possible configuration out there. If you need to use the ILI9341 driver just follow the SSD1289 example but pick the ILI9341 driver.

We're open to any kind of feedback regarding the documentation. If you feel that you have some improvements to share we're happy to hear them. But we surely aren't going to write guides for every possible combination.

Link to comment
Share on other sites

13 hours ago, Joel Bodenmann said:

Hello Bilymo,

I don't understand what you're trying to say. The µGFX library is by far the most portable and agnostic library out there. You can run µGFX on virtually any platform and with any driver. The Keil guide clearly states that the example uses the SSD1289 driver but that it's the same process for any other driver: 

We cannot provide a guide / tutorial for every possible configuration out there. If you need to use the ILI9341 driver just follow the SSD1289 example but pick the ILI9341 driver.

We're open to any kind of feedback regarding the documentation. If you feel that you have some improvements to share we're happy to hear them. But we surely aren't going to write guides for every possible combination.

I Understand,

I will take advantage of your advice, Thank you!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...