Imported TouchGFX Project into Visual Studio 2017 & 2019 --> Build failed.
Board: STM32F746NGH6
Display: ETEM043005XDH6
I tried creating an Embedded Project (after installing VisualGDB) with following settings:
- import a project built with command-line tools (since I want to import the existing TouchGFX Project)
- Generate a new MSBuild project
- Select my Device: STM32F746NG (leave all settings)
- Import my Project Folder (TouchGFXProjects/ProjectName)
- Debug using: USB Input: "ST-Link v2" --> Test sucessful
When trying to build the project I run into several missing included directories as well as View.cpp / Mainbase.cpp and other files
After including those using Visual Studio help I receive a several Error:
"SDL_stdinc.h" Line 261:
- narrowing conversion of '-1' from 'int' to 'unsigned int' [-Wnarrowing}
- size '-1' of array 'SDL_dummy_enum' is negative
--> Checking the code I see a comment written by the developers (of TouchGFX) on Line 284
- /* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */
But there is no fix or workaround mentioned.
Flashing the application via TouchGFX Designer takes way too much time. Since I am editing the source files in VS I would also like to flash the application via the integrated ST-Link v2 also receiving a more detailed error log and being able to debug.
Looking forward to any reply or links for further help.
EDIT:
This code fails as stated above:
#define SDL_COMPILE_TIME_ASSERT(name, x) \
typedef int SDL_dummy_ ## name[(x) * 2 - 1]
//This is the comment from Devs I was taking about
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
#if !defined(__ANDROID__)
/* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */
typedef enum
{
DUMMY_ENUM_VALUE
} SDL_DUMMY_ENUM;
SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
#endif
#endif /* DOXYGEN_SHOULD_IGNORE_THIS */Best Regards
Rafael
