2018-11-27 02:06 AM
QUESTION\Trick - TouchGFX Community repost - JMAG999 - Oct 2018
This guide is an update to my previous guide to support the latest versions of TouchGFX and Atollic.
This post describes how you can get the touchgfx_demo2015_480x272_8MB project running in Atollic TrueSTUDIO 9.0.1 on an STM32F746 Discovery board.
Steps:
1) Download and install Atollic 9.0.1
https://atollic.com/resources/download/windows/
2) Download and install TouchGFX V4.9.3.
http://touchgfx.com/try-touchgfx/evaluation/
3) Download the project zip file.
4) Open TouchGFX Designer. Under Application Template, select STMicroelectronics\STM32F746G Discovery Kit. Under UI Template, select TouchGFX Demo 1. Generate the project code. Your project will be in C:\TouchGFXProjects\MyApplication if you leave the default name and path.
4) Copy the Atollic directory from the zip file to the target directory (ie. C:\TouchGFXProjects\MyApplication\target\Atollic )
5) Open Atollic, File->Import->General->Existing Projects into Workspace
6) Under "Select root directory", hit browse and navigate to the Atollic directory that you copied above.
7) Hit finish.
You should now see the project in the Project Explorer. It should look exactly like it would in IAR.
Hit build and it should build.
The project includes a post-script to automatically generate several useful images:
touchgfx_demo2015_480x272_8MB.elf ( this is the combined image which contains both internal and external flash data) - used for debugging
touchgfx_demo2015_480x272_8MB.hex ( in case you want to program the image with an external tool like ST-Link Utility or J-Flash
intflash.elf - useful for debugging when you haven't changed any of the external qspi image data. This will greatly speed up the debug effort.
intflash.bin and extflash.bin - useful for bootloading
Debug Prep:
I found that the on-board ST-Link was extremely slow (on the order of minutes to download the code to the board). I could not find a good solution so I decided to try converting the ST-Link to a J-Link:
Follow the directions at this link to convert it to a J-Link. This will give you much faster download speeds.
https://www.segger.com/products/debug-probes/j-link/models/other-j-links/st-link-on-board/
Once that is done, download the latest J-Link drivers (Version 6.18 at the time of this writing).
https://www.segger.com/downloads/jlink/
Once installed, open the directory where the J-Link software is installed. You will need to modify JLinkDevices.xml. Just add the following lines after the <database> tag:
<Database>
<Device>
<ChipInfo Vendor="ST" Name="STM32F746NG" Core="JLINK_CORE_CORTEX_M7" />
<FlashBankInfo Name="QSPI Flash" BaseAddr="0x90000000" MaxSize="0x01000000" Loader="ST_STM32F746G_Disco_QSPI.elf" LoaderType="FLASH_ALGO_TYPE_OPEN" />
</Device>
</Database>
Finally, copy the ST_STM32F746G_Disco_QSPI.elf file from the following link to the same directory.
https://wiki.segger.com/STM32F746_Discovery
Now you are ready to debug:
1) Click the 'Configure Debug' button.
2) Click on Embedded C/C++ Application in the left side pane. Then hit the + icon to add a Debug config.
3) Under the Main tab, select Search Project. Select Debug/touchgfx_demo2015_480x272_8MB.elf
4) Click on the Debugger tab. Be sure the SEGGER J-Link is selected as the probe.
5) Hit Debug - be patient as it can take up to 1m to download the external flash data for this project (over 3.5MB).
On subsequent debug sessions (as long as you don't change the image data), you can change the debug application to intflash.elf, which will not re-load the external flash data. This will be much faster.
ANSWER - TouchGFX Community repost - Fuzzies - Oct 2018
Thank you for your work.
Small question : Would it be complicated to adapt your project to the STM32F769-DICO board ? If no where should be the main modification ?
ANSWER - TouchGFX Community repost - JMG999 - Oct 2018
It should not take much to get the other demo working. The easiest way to do this is to look at the IAR project file in a text editor. Look at the pre-processor defines, include paths and source files. Just make sure those match, copy in the linker from the gcc project and you should be all set.
ANSWER - TouchGFX Community repost - Bryan Yu - Oct 2018
thanks a lot. it works for me. But for the STM32 customized board, are there any other modifications that I need to do?
ANSWER - TouchGFX Community repost - Bryan Yu - Oct 2018
@jmag999,
I found an issue on my side. I just added a text area on the "CustomControls" screen in the TouchGFX Demo 1. After I ran the simulator in the touchGFX, I can see the text changes that I did. But after I ran the debug in the trueStudio, there are no any changes? I double checked that I am using "Debug/touchgfx_demo2015_480x272_8MB.elf"
Please advise. thanks
ANSWER - TouchGFX Community repost - JMG999 - Oct 2018
what does the following error mean? I added a picture called "hatcoLogo" in the TouchGFX Demo 1, and it worked fine in the touchGFX simulator, but it has the compiling error as below. Please advise. thanks
Application\generated\images\BitmapDatabase.o:(.rodata._ZL15bitmap_database+0x654): undefined reference to `_hatcoLogo'
collect2.exe: error: ld returned 1 exit status
ANSWER - TouchGFX Community repost - Bryan Yu - Oct 2018
I tried the TouchGFX Demo 1 in the IAR IDE, it worked fine. Everything I changed in the touchGFX was applied to the discovery kit. I think this setup for the trueStudio and touchGFX is not correct. Please correct it. thank you!!!
ANSWER - TouchGFX Community repost - JMG999 - Oct 2018
Atollic is not a built-in supported IDE in the TouchGFX editor. So if you want to use Atollic, you have to manually include new files into the project (like any other embedded project). You just drag them in. The linker is telling you it can't find a generated c file that TouchGFX made for you.
ANSWER - TouchGFX Community repost - Bryan Yu - Oct 2018
@jmag999, thank you for quick reply. Because the post is called "how to TouchGFX 4.9.3 example for Atollic 9.0.1", I thought everything is like the IAR integrated with touchGFX, and after clicking "generate code", all the files will be generated into the IAR project. But thank you for the clarification.
Is STM32 or Atollic working on the integration of touchGFX and Atollic, instead of manually copying the files?
2020-02-09 09:48 AM
I just have added target files without any "dancing with a tambourine".
The order files in first screen is important!!!