Skip to main content
Ciuffoly
Senior
November 29, 2019
Question

[SOLVED] TouchGFX with STM32F746G-DISCO can include EEPROM functions

  • November 29, 2019
  • 1 reply
  • 504 views

To integrate in the application the EEPROM read and write functions is necessary integrate in the compile and link phase the code of stm32746g_discovery_eeprom.c and stm32746g_discovery_eeprom.h.

    This topic has been closed for replies.

    1 reply

    Ciuffoly
    CiuffolyAuthor
    Senior
    November 29, 2019

    In the file Screen1View.cpp or in your main screen source in \TouchGFX\gui\src\screen1_screen add the include:

    #ifdef SIMULATOR

    #else

        #include "stm32746g_discovery.h"

        #include "stm32746g_discovery_eeprom.h"

    #endif

    .....

    void Screen1View::setupScreen()

    {

       #ifdef SIMULATOR

            printf("LED on\n");

       #else

            BSP_LED_Init(LED_GREEN);

            BSP_EEPROM_Init();

       #endif

       Screen1ViewBase::setupScreen();

    }

    in the Makefile in the path gcc add the line relative to the new source to compile and link

    board_c_files := \

       $(Drivers_path)/BSP/STM32746G-Discovery/stm32746g_discovery.c \

       $(Drivers_path)/BSP/STM32746G-Discovery/stm32746g_discovery_sdram.c \

       $(Drivers_path)/BSP/STM32746G-Discovery/stm32746g_discovery_ts.c \

       $(Drivers_path)/BSP/STM32746G-Discovery/stm32746g_discovery_qspi.c \

        $(Drivers_path)/BSP/STM32746G-Discovery/stm32746g_discovery_eeprom.c \

       $(Drivers_path)/BSP/Components/ft5336/ft5336.c