Modyfying linker script and makefile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-09 07:00 AM
Hello,
I have started using Touch GFX a few days ago. It works preety nice, running the first program on the F746-Disco board is a pleasure.
But.. I can't use this system as it is delivered by TouchGFX. In general I would like to keep the logic and whole API, but I need to change the RTOS, add a lot of hardware and make it easy to use from the STM32CubeIDE level.
First problem appeared when I have started compiling Cube generated project. It works ok until I add something to the resources (images) and the .text section for the flash memory exceeds 1024kB. So basic problem is, that it doesn't split the data onto internal flash and external NOR memory.
I have started modyfying the linker script and oryginal makefile to allow the program to compile properly. I have never worked on makefiles/linker before so I am noob at this. I have started to learn about this and read your original files from TouchGFX.
I don't get this thing:
_extflash_:
@$(st_link_executable) -c -P $(binary_output_path)/target.hex 0x90000000 -Rst -EL $(st_link_external_loader)
_intflash_:
@$(st_link_executable) -c -P $(binary_output_path)/intflash.hex 0x08000000 -Rst
Why you download whole program file (target.hex) to the external memory instead of using only "extflash.bin" for example?
I am able now to compile whole program, split it into parts and download sources to the both momories respectively. As far as the internal memory looks ok - program starts, I can debug it for a while until it want's to get data from the external memory, than vPortExitCritical() is called. I don't know what should I write there, I have tried with all of the filest (from your example) and it still doesn't work (there is something in the memory).
I don't know what do I expect from you... maybe some tips which can help me to port your work with Touch GFX into my projects? And what should I put into external memory, I am confused?
Thanks,
Arek
- Labels:
-
STM32F7 Series
-
TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-09 11:13 AM
Hi there and welcome in the TouchGFX club!
If you want to integrate the whole TouchGFX design with CubeIDE I have made a few videos on how to get the procedure right. There are a few pitfalls when starting a new project so if you need some guidance looke here - https://www.youtube.com/watch?v=43qQhrXc3n4
for the QSPI external memory I have made this video - https://www.youtube.com/watch?v=237lPdMsDZs
It's more than just changing the linker script. The CubeMX doesn't change the QSPI settings the right way so I copied the HW timing settings from a TouchGFX example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-10 02:33 AM
Yes!! Thanks a lot for your response.
I was close, I didn't notice that the qspi configuration is wrong. It confused me that the program was loaded into external memory through the external loader script properly. But this is a different algorithm, not the same qspi configuration as in cube project.
I didn't know that there is option of external loader in "Debug Configuration" tab. That also helped me, because I have wrote it by hand in makefile, now it's more comfortable to use.
Thanks again!
Have you ever tried to build your own external loader script for another memory chip?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-10 02:45 AM
I'm in the middle of that process!
It's not very well documented but I have found a project for the L4 series that I am reworking to work with the F7 series. Hopefully this should solve the only remaining problem I have on my custom board.