2018-11-22 08:14 PM
I upgraded my CubeMX to 5.0.0 and installed F4 1.22.0 firmware recently.
So, I tried to use CubeMX build a TouchGFX Project that use TrueSTUDIO as IDE.Since I was successful run a STemWin Project as my custom F429IGx board graphic solution.
In order to enable TouchGFX middleware in CubeMX, I activated and configured FreeRTOS, CRC, LTDC, DMA2D, TIM7 and FMC-SDRAM1.All setting were the same with my previous STemWin project, excepted in GRAPHICS I used TouchGFX as Graphics Framework. And then I generated code.
1. When opened the project, there were *.c , *.cpp , *.h and *.hpp files. But in C/C++ Build - Tool Setting , neither C++ Compiler and C++ Linker existed. So if I build the project under this settings, I will get a link error say something like main function undefined. Because main function is in main.cpp file and wound't be compile by GCC like other cpp files.
2. So I converted the project to C++ project, by using File - New - Convert to a C/C++ Project (Adds C/C++ nature) method. Now the C++ Compiler showed up and C++ Linker replaced C Linker.I built the project again, but a ton of error message like head files couldn't find show up. I fixed by copied and changed include path from C compiler directories to C++ compiler.But things not go well,some directories in Project Resources Manager's Includes still in grey which implicate those directories did not exist in that location.
3. Then I use TouchGFX Designer to generated a simple project which is only contains a single screen of a text and a background image.After code generation, I put the entire folder in TrueSTUDIO project's root. Now the "Includes" didn't has grey directories any more.I dragged all the cpp files which is generated by TouchGFX Designer into TrueSTUDIO project path [Application-User-TouchGFX-generated|gui].Things going in here is a bit out of my ability, since I am new in TouchGFX and new in mixin C(GCC) and C++(G++) code together.
4. I tried out lots of combination of Assembler, C Complier, C++ Complier, C++ Linker settings which mention in TouchGFX website.I can't describe all of them.The best result I can get is all c files compile into *.o successfully by GCC and all C++ files compile into *.o successfully by G++, but when executed
arm-atollic-eabi-g++ -o LC-MC001.elf *.o ...
command,which as we know is linking, tons of error show up.
d:/program files (x86)/atollic/truestudio for stm32 9.0.0/armtools/bin/../lib/gcc/arm-atollic-eabi/6.3.1/../../../../arm-atollic-eabi/bin/ld.exe: error: LC-MC001.elf uses VFP register arguments, Application\User\Core\main.o does not
d:/program files (x86)/atollic/truestudio for stm32 9.0.0/armtools/bin/../lib/gcc/arm-atollic-eabi/6.3.1/../../../../arm-atollic-eabi/bin/ld.exe: failed to merge target specific data of file Application\User\Core\main.o
d:/program files (x86)/atollic/truestudio for stm32 9.0.0/armtools/bin/../lib/gcc/arm-atollic-eabi/6.3.1/../../../../arm-atollic-eabi/bin/ld.exe: error: LC-MC001.elf uses VFP register arguments, Application\User\TouchGFX\generated\ApplicationFontProvider.o does not
d:/program files (x86)/atollic/truestudio for stm32 9.0.0/armtools/bin/../lib/gcc/arm-atollic-eabi/6.3.1/../../../../arm-atollic-eabi/bin/ld.exe: failed to merge target specific data of file Application\User\TouchGFX\generated\ApplicationFontProvider.o
...
5. The last information about this I can find is related to floating point implementation? I already tried to switch all implementation to HW or SW the same time.But no luck.
UPDATE
6. I switch Assembler, C compiler, C++ compiler, C++ Linker floating point option to Hardware implementation.And remove -mfloat-abi=softfp parameter which is recommend by this article:
https://touchgfx.zendesk.com/hc/en-us/articles/206116381-Using-other-IDEs-with-TouchGFX
So, after that, all of the processor will have a united floating point setting. Then put SysTick_Handler function back into stm32f4xx_it.c file. Finally, my project build without any error for the first time.
7. I download the program in my board. Sadly, I got this.
And my original design is below.
I will keep you update if any further information.
Thanks for your reading, I know it's a very long problem description.:face_with_tears_of_joy:
Solved! Go to Solution.
2019-01-02 09:11 AM
@PPiar, our fellow developer brother - we feel your pain - are you up and running? If not, what is your target kit?
(correcting my spelling mistake - was laughing too hard after reading some of your posts - sorry. Been there, done the same)
Are you ok to use IAR or SW4STM32 as the compilers? At this time, you may not have a choice if you wish to use all of these tools together.
@Clark Sann has posted a complete process on using TouchGFX + CubeMX for the STM32F746G Discovery toolchain integration.
We will all go to therapy together before this is all over =)
< permanent link on our server >
2019-01-02 09:16 AM
@KMunj - what do you wish to do? What is your target kit?
Please do review the following in the meantime:
< permanent link on our server >
https://axxonshare.s3.amazonaws.com/my_combo_tutorial.zip
NB: Martin will know more of course - he is a developer of the TouchGFX toolchain (Draupner) but the above are confirmed work arounds we developed after weeks of the same efforts.
Clark Sann has written a similar document for the STM32F746G Discovery target & SW4STM32 compiler.
Hope it helps.
Kumar
2019-01-03 11:12 AM
Hi Kumar,
As per your instruction, I did everything.
There were few differences between F429 and F746 discovery boards, like I had to use SPI2 instead of SPI5.
But MX created the code without any warning. But when do clean and a build, I get following build error and it gets terminated.
C:/TouchGFXProjects/my_SW4STM32_STM32F746_DISC-project2/Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.cpp:1:10: fatal error: touchgfx/hal/OSWrappers.hpp: No such file or directory
#include <touchgfx/hal/OSWrappers.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Middlewares/TouchGFX/OSWrappers.o] Error 1
Middlewares/TouchGFX/subdir.mk:18: recipe for target 'Middlewares/TouchGFX/OSWrappers.o' failed
10:57:47 Build Finished (took 5s.982ms)
Following is the build screen. Please let me know how to fix this issue.
Thanks
Kiran
2019-01-03 11:32 AM
Hi Kiran (@KMunj ). Please review the article from Clark Sann (@Clark Sann :
Hope this helps. Post back if it does not.
Kumar
2019-01-03 03:17 PM
Hi Kumar,
Thank you very much for the link. That was good. I managed to do the 1st two labs from the ST seminar, I attended using EWARM. Everything worked as explained by Clark Sann in the document.
Hi Clark Sann,
Thank you very much for the article.
I will try other two labs tomorrow. They should work.
Thanks,
Kiran
2019-01-03 05:02 PM
Hi @KMunj ,
Please have a look at [yourproject property]-[C/C++ Build]-[Settings]-[Tool Settings]-[C++ Compiler]-[Directories].
Compare it with [C Compiler]-[Directories].Try to find out if any of these [Include Path] is miss.
2021-01-18 12:54 PM
UM1718 Rev 33 (11/2020) I got didn't have Tutorial 10. Is there a download link for UM with TouchGFX tutorial?
2021-01-18 11:22 PM
Hi,
This post is outdated. The latest versions of the tools are STM32CubeMX 6.1.1 and TouchGFX 4.16.
The TouchGFX tutorials and documentation have been improved and moved to a new website.
If you have more questions could you create a new post with the relevant information and topic tags ?
/Romain
2021-11-26 12:42 PM
Hello! Any chance you remember how you fixed the multiple definitions issue?