2023-06-30 11:06 AM
Hi all,
I upgraded to TouchGFX 4.22 from 4.21 and now the simulator doesn't work. It was fine with the projects before and I haven't change much. The log (below) shows that it can't find cmsis_os.h in model.cpp. It seems to be the same error in the other projects. The file is not missing. I can "go to declaration" of cmsis_os.h inside model.cpp and it opens up cmsis_os.h. I need that header because I'm checking a freeRTOS queue inside Model::tick()
What's the problem? Thanks
Run Simulator
Generate
Done
Generate Assets
make -f simulator/gcc/Makefile assets -j8
Reading ./application.config
Reading ./target.config
Done
Post Generate
touchgfx update_project --project-file=simulator/msvs/Application.vcxproj
Done
Post Generate Target
touchgfx update_project
.cproject file: ../STM32CubeIDE/.cproject
Writing STM32CubeIDE project file: ../STM32CubeIDE/.project
Writing STM32CubeIDE project file: ../STM32CubeIDE/.cproject
Done
Compile
make -f simulator/gcc/Makefile -j8
Reading ./application.config
Reading ./target.config
Compiling gui/src/settingscreen_screen/settingScreenPresenter.cpp
Compiling gui/src/settingscreen_screen/settingScreenView.cpp
Compiling gui/src/principalscreen_screen/principalScreenView.cpp
Compiling gui/src/principalscreen_screen/principalScreenPresenter.cpp
Compiling gui/src/model/Model.cpp
Compiling gui/src/common/FrontendApplication.cpp
Compiling generated/gui_generated/src/settingscreen_screen/settingScreenViewBase.cpp
Compiling generated/gui_generated/src/principalscreen_screen/principalScreenViewBase.cpp
In file included from gui/src/model/Model.cpp:1:0:
gui/include/gui/model/Model.hpp:5:10: fatal error: cmsis_os.h: No such file or directory
#include <cmsis_os.h> // for RTOS queues
^~~~~~~~~~~~
compilation terminated.
generated/simulator/gcc/Makefile:196: recipe for target 'build/MINGW32_NT-6.2/gui/src/model/Model.o' failed
make[2]: *** [build/MINGW32_NT-6.2/gui/src/model/Model.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from generated/gui_generated/include/gui_generated/common/FrontendApplicationBase.hpp:8:0,
from gui/include/gui/common/FrontendApplication.hpp:4,
from generated/gui_generated/include/gui_generated/settingscreen_screen/settingScreenViewBase.hpp:7,
from gui/include/gui/settingscreen_screen/settingScreenView.hpp:4,
from gui/src/settingscreen_screen/settingScreenView.cpp:1:
gui/include/gui/model/Model.hpp:5:10: fatal error: cmsis_os.h: No such file or directory
#include <cmsis_os.h> // for RTOS queues
^~~~~~~~~~~~
In file included from generated/gui_generated/include/gui_generated/common/FrontendApplicationBase.hpp:8:0,
from gui/include/gui/common/FrontendApplication.hpp:4,
from generated/gui_generated/include/gui_generated/settingscreen_screen/settingScreenViewBase.hpp:7,
from gui/include/gui/settingscreen_screen/settingScreenView.hpp:4,
from gui/src/settingscreen_screen/settingScreenPresenter.cpp:1:
gui/include/gui/model/Model.hpp:5:10: fatal error: cmsis_os.h: No such file or directory
#include <cmsis_os.h> // for RTOS queues
^~~~~~~~~~~~
compilation terminated.
compilation terminated.
In file included from generated/gui_generated/include/gui_generated/common/FrontendApplicationBase.hpp:8:0,
from gui/include/gui/common/FrontendApplication.hpp:4,
from generated/gui_generated/include/gui_generated/principalscreen_screen/principalScreenViewBase.hpp:7,
from gui/include/gui/principalscreen_screen/principalScreenView.hpp:4,
from gui/src/principalscreen_screen/principalScreenView.cpp:1:
gui/include/gui/model/Model.hpp:5:10: fatal error: cmsis_os.h: No such file or directory
#include <cmsis_os.h> // for RTOS queues
^~~~~~~~~~~~
compilation terminated.
generated/simulator/gcc/Makefile:196: recipe for target 'build/MINGW32_NT-6.2/gui/src/principalscreen_screen/principalScreenView.o' failed
make[2]: *** [build/MINGW32_NT-6.2/gui/src/principalscreen_screen/principalScreenView.o] Error 1
generated/simulator/gcc/Makefile:196: recipe for target 'build/MINGW32_NT-6.2/gui/src/settingscreen_screen/settingScreenView.o' failed
make[2]: *** [build/MINGW32_NT-6.2/gui/src/settingscreen_screen/settingScreenView.o] Error 1
generated/simulator/gcc/Makefile:196: recipe for target 'build/MINGW32_NT-6.2/gui/src/settingscreen_screen/settingScreenPresenter.o' failed
make[2]: *** [build/MINGW32_NT-6.2/gui/src/settingscreen_screen/settingScreenPresenter.o] Error 1
In file included from generated/gui_generated/include/gui_generated/common/FrontendApplicationBase.hpp:8:0,
from gui/include/gui/common/FrontendApplication.hpp:4,
from generated/gui_generated/include/gui_generated/principalscreen_screen/principalScreenViewBase.hpp:7,
from gui/include/gui/principalscreen_screen/principalScreenView.hpp:4,
from gui/src/principalscreen_screen/principalScreenPresenter.cpp:1:
gui/include/gui/model/Model.hpp:5:10: fatal error: cmsis_os.h: No such file or directory
#include <cmsis_os.h> // for RTOS queues
^~~~~~~~~~~~
compilation terminated.
generated/simulator/gcc/Makefile:196: recipe for target 'build/MINGW32_NT-6.2/gui/src/principalscreen_screen/principalScreenPresenter.o' failed
make[2]: *** [build/MINGW32_NT-6.2/gui/src/principalscreen_screen/principalScreenPresenter.o] Error 1
In file included from generated/gui_generated/include/gui_generated/common/FrontendApplicationBase.hpp:8:0,
from gui/include/gui/common/FrontendApplication.hpp:4,
from generated/gui_generated/include/gui_generated/principalscreen_screen/principalScreenViewBase.hpp:7,
from generated/gui_generated/src/principalscreen_screen/principalScreenViewBase.cpp:4:
gui/include/gui/model/Model.hpp:5:10: fatal error: cmsis_os.h: No such file or directory
#include <cmsis_os.h> // for RTOS queues
^~~~~~~~~~~~
compilation terminated.
In file included from generated/gui_generated/include/gui_generated/common/FrontendApplicationBase.hpp:8:0,
from gui/include/gui/common/FrontendApplication.hpp:4,
from gui/src/common/FrontendApplication.cpp:1:
gui/include/gui/model/Model.hpp:5:10: fatal error: cmsis_os.h: No such file or directory
#include <cmsis_os.h> // for RTOS queues
^~~~~~~~~~~~
compilation terminated.
generated/simulator/gcc/Makefile:196: recipe for target 'build/MINGW32_NT-6.2/generated/gui_generated/src/principalscreen_screen/principalScreenViewBase.o' failed
make[2]: *** [build/MINGW32_NT-6.2/generated/gui_generated/src/principalscreen_screen/principalScreenViewBase.o] Error 1
In file included from generated/gui_generated/include/gui_generated/common/FrontendApplicationBase.hpp:8:0,
from gui/include/gui/common/FrontendApplication.hpp:4,
from generated/gui_generated/include/gui_generated/settingscreen_screen/settingScreenViewBase.hpp:7,
from generated/gui_generated/src/settingscreen_screen/settingScreenViewBase.cpp:4:
gui/include/gui/model/Model.hpp:5:10: fatal error: cmsis_os.h: No such file or directory
#include <cmsis_os.h> // for RTOS queues
^~~~~~~~~~~~
compilation terminated.
generated/simulator/gcc/Makefile:196: recipe for target 'build/MINGW32_NT-6.2/gui/src/common/FrontendApplication.o' failed
make[2]: *** [build/MINGW32_NT-6.2/gui/src/common/FrontendApplication.o] Error 1
generated/simulator/gcc/Makefile:196: recipe for target 'build/MINGW32_NT-6.2/generated/gui_generated/src/settingscreen_screen/settingScreenViewBase.o' failed
make[2]: *** [build/MINGW32_NT-6.2/generated/gui_generated/src/settingscreen_screen/settingScreenViewBase.o] Error 1
generated/simulator/gcc/Makefile:155: recipe for target 'generate_assets' failed
make[1]: *** [generate_assets] Error 2
simulator/gcc/Makefile:32: recipe for target 'all' failed
make: *** [all] Error 2
Failed
Failed
2023-08-09 03:29 AM
Hi,
When building the simulator no hardware and embedded stuff such as freeRTOS are needed.
Try change the code like this in places where you have references to the platform :
#ifndef SIMULATOR
#include <cmsis_os.h> // for RTOS queues
#endif