cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4-discovery LCD linking question

baev_al
Associate II
Posted on August 31, 2014 at 08:15

Dear friends.

Please help with the following error:

Error[Li005]: no definition for ''LTDC_LayerInit''

Here is the part of the program:

/* Initialize the LCD */

LCD_Init();

/* LCD Configuration */

LCD_LayerInit();

Both functions are located in the same stm32f429i_discovery_lcd.c file. Why LCD_Init() is ok and LCD_LayerInit() is not?

I use EWARM 7.2.

Thanks

6 REPLIES 6
Posted on August 31, 2014 at 11:12

LTDC not LCD

The missing function is actually in one of the library files, which needs to be part of your project.

STM32F429I-Discovery_FW_V1.0.1\Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_ltdc.c

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
baev_al
Associate II
Posted on August 31, 2014 at 14:41

Thanks, Clive1.

Several others errors appeared and I added all required header and source files. But I still did not see anything on the screen. Bellow is the code. How can I learn to use LCD libraries? How can I find my mistake inside below code using debugger?

/* Includes ------------------------------------------------------------------*/

#include ''main.h''

#include ''stm32f429i_discovery_lcd.h''

#include ''stm32f4xx.h''

#include ''stm32f4xx_ltdc.h''

#include ''stm32f4xx_fsmc.h''

/** @addtogroup Template

  * @{

  */

int main(void)

{

/* Initialize the LCD */

LCD_Init();  

/* LCD Configuration */

LCD_LayerInit();

/* Enable LCD display */

LCD_DisplayOn();

/* Set foreground layer */

LCD_SetLayer(LCD_FOREGROUND_LAYER);

/* Clear the LCD */

LCD_Clear(LCD_COLOR_WHITE);

/* Set the LCD Back Color */

LCD_SetBackColor(LCD_COLOR_WHITE);

/* Set the LCD Text Color */

LCD_SetTextColor(LCD_COLOR_BLUE);

LCD_DisplayStringLine(LCD_LINE_0, (uint8_t *)'' STM324x9I-EVAL '');

LCD_DisplayStringLine(LCD_LINE_1, (uint8_t *)'' Example on how to '');

LCD_DisplayStringLine(LCD_LINE_2, (uint8_t *)'' use the IO Expander '');

    

  /* Infinite loop */

  while (1)

  {

  }

}

#ifdef  USE_FULL_ASSERT

/**

  * @brief  Reports the name of the source file and the source line number

  *         where the assert_param error has occurred.

  * @param  file: pointer to the source file name

  * @param  line: assert_param error line source number

  * @retval None

  */

void assert_failed(uint8_t* file, uint32_t line)

{

  /* User can add his own implementation to report the file name and line number,

     ex: printf(''Wrong parameters value: file %s on line %d\r\n'', file, line) */

  /* Infinite loop */

  while (1)

  {

  }

}

#endif
Posted on August 31, 2014 at 19:51

I'd probably start by testing/review the examples for the specific board I'm using rather than a different board.

STM32F429I-Discovery_FW_V1.0.1\Projects\Peripheral_Examples\LTDC_Display_2Layers\readme.txt

Then I'd evaluate what is being done differently between the two. Like configuration of pins, and external memory banks.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
baev_al
Associate II
Posted on September 01, 2014 at 16:26

Studding the example LTDC_Display_2Layers. How can I obtain the hex array of the picture (such as st_logo1.h)?

Posted on September 01, 2014 at 17:05

Generating data as an include file is a pretty simple, I've coded quick applications to do such. There are other apps that do more specific BMP conversion, colour level stuff.

http://www.segger.com/emwin-bitmap-converter.html

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
baev_al
Associate II
Posted on September 02, 2014 at 07:24

Thanks, Clive1.

The program solved the question. However I changed

const uint32_t ST_LOGO_1[19200] =

{ 0xFFFFFFFF, ...

to

const uint16_t ST_LOGO_1[38400] =

{ 0x3161,...