Simulator error after including header files in Model.cpp
Adding the following includes in Model.cpp prevents the touchgfx simulator from successfully compiling:
#include <gui/model/Model.hpp>
#include <gui/model/ModelListener.hpp>
extern "C"
{
#include "main.h"
#include "FreeRTOS.h"
#include "queue.h"
#include "task.h"
}I tried adding to the makefile include path as follows, but I think I'm going down a rabbit hole.
#keep framework include and source out of this $(build_root_path)../Core/Inc
include_paths := $(library_includes) $(foreach comp, $(all_components), $(comp)/include) $(framework_includes) \
C:/Users/webst/STM32CubeIDE/workspace_1.0.1/stm32F769I_disco_cubeide/Core/Inc \
C:/Users/webst/STM32CubeIDE/workspace_1.0.1/stm32F769I_disco_cubeide/Drivers/STM32F7xx_HAL_Driver/Inc \
C:/Users/webst/STM32CubeIDE/workspace_1.0.1/stm32F769I_disco_cubeide/Drivers/CMSIS/Device/ST/STM32F7xx/Include
source_paths = $(foreach comp, $(all_components), $(comp)/src) $(framework_source) simulatorThe simulator errors:
Compile
make -f simulator/gcc/Makefile -j10
Converting images
Compiling gui/src/model/Model.cpp
In file included from C:/Users/webst/STM32CubeIDE/workspace_1.0.1/stm32F769I_disco_cubeide/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_def.h:30:0,
from C:/Users/webst/STM32CubeIDE/workspace_1.0.1/stm32F769I_disco_cubeide/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_rcc.h:29,
from C:/Users/webst/STM32CubeIDE/workspace_1.0.1/stm32F769I_disco_cubeide/Core/Inc/stm32f7xx_hal_conf.h:231,
from C:/Users/webst/STM32CubeIDE/workspace_1.0.1/stm32F769I_disco_cubeide/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal.h:30,
from C:/Users/webst/STM32CubeIDE/workspace_1.0.1/stm32F769I_disco_cubeide/Core/Inc/main.h:31,
from gui/src/model/Model.cpp:8:
C:/Users/webst/STM32CubeIDE/workspace_1.0.1/stm32F769I_disco_cubeide/Drivers/CMSIS/Device/ST/STM32F7xx/Include/stm32f7xx.h:162:3: error: #error "Please select first the target STM32F7xx device used in your application (in stm32f7xx.h file)"
#error "Please select first the target STM32F7xx device used in your application (in stm32f7xx.h file)"
^~~~~
In file included from gui/src/model/Model.cpp:8:0:
C:/Users/webst/STM32CubeIDE/workspace_1.0.1/stm32F769I_disco_cubeide/Core/Inc/main.h:33:22: fatal error: otm8009a.h: No such file or directory
#include "otm8009a.h"
^
compilation terminated.
Any suggestions? My project in cubeide compiles fine, but I'd like to maintain the ability to use the simulator.