‎2018-11-29 06:03 AM
Hello,
i tried to generate for STM32f429i disco a project with graphic = touchgfx.
1) i generate cubemx (for STM32f429i disco) project for SW4STM32 toolchain
2) i generate a simple touchgfx project for SW4STM32 toolchain
But compilation under eclipse gives the following errors :
HALSDL2.hpp:22:10: fatal error: SDL2/SDL_video.h: No such file or directory
HALSDL2.hpp:22:10: fatal error:SDL2/SDL_render.h: No such file or directory
main.cpp:30:10: fatal error: shellapi.h: No such file or directory
I can i solve these compilation errors ?
thanks
best regards
‎2018-12-18 05:03 AM
Hi. If you are able to use IAR...
here is the first draft document of the full procedure to support the STM32F429i-DISC1 target that we followed:
https://s3.amazonaws.com/axxonshare/my_combo_tutorial.zip
Welcome your feedback on the document and if it works for you. Good luck! :grinning_face:
‎2018-12-18 08:11 AM
Thank you. I will go through it and report back here.
‎2018-12-18 08:15 PM
Thanks again for the suggestion. In hoping I could follow your instructions I found myself limited by the evaluation license of IAR, I don't have a full license at the time. The instructions I found to be very straightforward and precise. I suspect anyone following them for IAR, will be successful in getting this to work. Thanks again.
‎2018-12-18 09:55 PM
I tried your instructions but for the systemworkbench IDE. I am able to get my GUI onto the screen of the STM32F429 Discovery board but the touch screen does not work. Also, to get it to compile, I had to open the GUI from the workbench project folder and regenerate the code. Some of those folders were empty even after running Touchgfx from CubeMX. The GUI displays fine and very solid but the touchscreen does not work. I tried to follow your instructions and make them apply to systemworkbench. I found that in your instructions, page 24:
TS_StateTypeDef state = { 0 };
BSP_TS_GetState(&state); I
f (state.touchDetected) {
// x = state.touchX[0]; // Comment out
// y = state.touchY[0]; // Comment out
x = state.X;
y = state.Y;
return true; }
return false;
I did not have to comment out the first two lines. The following x and y are supposed to be upper case :)
My only problem now is that the IDE does not see the STM32F429i_Discovery_ts.h file regardless of where I put it. I add it to the includes list in the preprocessor or copy it and paste it directly into the project, the file is not seen.
Anyways, it seems that if this is corrected, these instructions will also work with the systemworkbench IDE.
Any help in getting the compiler to see that header file will be appreciated.
thanks again.
‎2018-12-19 02:37 AM
Hi @FSTKMARO​, that is very positive feedback. Thanks. Have zero knowledge at this time about the SW4STM32 toolchain but can install to see if we see anything on our side. In the meantime, if possible, consider to post your project using a shared box like WeTransfer or similar.
Also noting that the use of the MOSI pin is not required for the LCD display operation on the STM32F429i-DISC1 kit. Will revise the document as soon as time permits. Respectively, posted the source document file inside the download for others to tweak the process by other readers as they see fit.
‎2018-12-19 07:22 AM
I'm using SW4STM32 and I have the same problem as @FSTKMARO​. No matter how I import the file into the workspace and no matter how I try to include it, the compiler cannot find it. To me that seems really bizarre.
It doesn't help that the folder structure that CubeMX creates for SW4STM32 is kinda strange. Almost all the files are linked in and the project folder structure does not match the file structure on the disk. Plus all of the .h and .hpp files are hidden. Why do this sort of thing?
I will attach my project in case anyone with more experience will be able to see what is wrong.
Thanks for all the help in this thread.
‎2018-12-19 03:12 PM
Well, I was finally successful in compiling and programming my board with a functioning GUI in SW4STM32. I am not exactly sure of what I did but hope to describe it. Also, how would I attach my project to this post? I have tried but makes the browser window freeze. Anyways. I followed the instructions that @Mon2​ published. Pretty much everything in MX is as is described in the document that was provided. After the CubeMX project is created, without opening the project, the TouchGFX software is run and the GUI created. I did run the simulator prior to saving and then running the code generator. Once that was done, I opened the project in SystemWorkbench and found many errors. While investigating them, I noticed that the touchgfx files that the code referenced were missing. I then started touchgfx again but by clicking on the file in the project folder. Ran simulator again, saved and then generated the code. All files were then populated and after a refresh and re-indexing, SystemWorkbench compiled the project fine and I was able to load it onto the board. The touch screen does not work at this time. As mentioned by @Mon2​ in the document that was provided, CUBEMX does not, for whatever reason, provide a good link to the BSP drivers, nor does the TouchGfx software provide good links in those files. In the list of include files, I edited the reference to the BSP files and replaced it with a reference to the complete BSP/STM32F429i-Discover folder in the firmware repository. I compiled again with no issues. When I added the include for the ts.h file that is when the errors about not finding that file started to come up. I then saw a message in System Workbench about an available update which I performed and the missing file was now found by System Workbench after rebuilding the index. I then changed the files indicated in the document from @Mon2​ , un-commented some lines, added the ts.c files to the target folder and to my surprise, it compiled and loaded and the touchscreen is working. Don't forget to change the x and y references to upper case in one of the touchgfx files. If I figure how to attach my zipped project, I will post it. I hope this helps someone. It is obvious that this integration between TGFX and CubeMX needs work. Cheers.​
‎2018-12-19 03:21 PM
Excellent @FSTKMARO​. That is really good news!! Killed the day trying the same and found this to be a mess. At this time, cannot afford to devote any more time to this buggy toolchain so will revert back to the IAR & TouchGFX combo. We need to get our product out asap..
Was about to call in preacher to perform an exorcism on the SW4STM32 generated code till you chimed in with your post :grinning_face:
It will be excellent for you to share the code using a public sharing driver like Wetransfer or similar:
(use the free service)
Thanks.
‎2018-12-19 08:24 PM
LOL, I have been at this for a while. I think what helped was the update to sw4stm32 that I installed. The touch screen does not work off the bat still but your instructions are good to get going. The zipped project that I got working is here. I am not sure if I exported it correctly. I can fix it if need be.
‎2018-12-19 09:29 PM
one more thing. If modifications to the GUI are made after the project is working on the board, the touch screen files that were added manually are deleted by TGFX. This needs a bit more time to get all polished it seems to me. LOL