2019-11-29 03:23 AM
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.
2019-11-29 04:50 AM
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