2019-05-14 12:00 AM
Hello!
I repost my question here as I posted it in an answer yesterday and it didnt get effective.
Thank to hansd empty project I manage to begin my project and conceive my GUI:
It seems that using the integrated or standalone CubeMX doesn't mess up the project. Also, I succedeed in importing the project under AtollicTrueSTUDIO in order to see the difference between the IDEs.
I followed hands56's link in order to configure the QSPI:
https://touchgfx.zendesk.com/hc/en-us/articles/360019884752-Configuring-STM32F746G-DISCO
I followed as well this tuto to configure the linker under CubeIDE (I think that is it the same as AtollicTrueSTUDIO):
All is building perfectly and when I look at the Build Analyzer, I can see the ExtFlashSection and my assets under QUADSPI, all seems in order:
The problem is, when I launch the debug, it seems that the flash is not programmed and my screen print this instead of my beautiful picture :(
Of course, I tried to use internal flash, and everything works, my picture is well displayed.
Do you have any idea of the source of my problem?
Thank you,
Charles
Solved! Go to Solution.
2019-09-10 07:52 AM
Hi Charles,
Yes exactly, a reboot stops the images working..
Ben
2019-09-10 09:38 AM
Hey guys,
I don't know if you have read my endeavors in the other thread about getting QSPI flash to work but I think I got it working outside debug as well now :)
Maybe you can give it a go and see if it helps?
I'm running my application from cubeIDE so that's a prerequisite.
You will need to do the following:
#include <stm32746g_discovery_qspi.h>
hqspi.Instance = QUADSPI;
hqspi.Init.ClockPrescaler = 1;
hqspi.Init.FifoThreshold = 4;
hqspi.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_HALFCYCLE;
hqspi.Init.FlashSize = 24;
hqspi.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_6_CYCLE;
hqspi.Init.ClockMode = QSPI_CLOCK_MODE_0;
hqspi.Init.FlashID = QSPI_FLASH_ID_1;
hqspi.Init.DualFlash = QSPI_DUALFLASH_DISABLE;
if (HAL_QSPI_Init(&hqspi) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN QUADSPI_Init 2 */
BSP_QSPI_Init();
BSP_QSPI_MemoryMappedMode();
HAL_NVIC_DisableIRQ(QUADSPI_IRQn);
MPU_Region_InitTypeDef MPU_InitStruct;
MPU_InitStruct.Enable = MPU_REGION_ENABLE;
MPU_InitStruct.BaseAddress = 0x90000000;
MPU_InitStruct.Size = MPU_REGION_SIZE_256MB;
MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;
MPU_InitStruct.Number = MPU_REGION_NUMBER2;
MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
MPU_InitStruct.SubRegionDisable = 0x00;
MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
/* Configure the MPU attributes as WT for QSPI (used 16Mbytes) */
MPU_InitStruct.Enable = MPU_REGION_ENABLE;
MPU_InitStruct.BaseAddress = 0x90000000;
MPU_InitStruct.Size = MPU_REGION_SIZE_16MB; /* NOTE! Change this if you change QSPI flash size! */
MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
MPU_InitStruct.IsCacheable = MPU_ACCESS_CACHEABLE;
MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;
MPU_InitStruct.Number = MPU_REGION_NUMBER3;
MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
MPU_InitStruct.SubRegionDisable = 0x00;
MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
The code should be able to compile and debug. Try unplugging the board and plugging it back in. Does it work now?
2020-02-13 06:23 AM
Hi there! Is somebody have the issue with external memory programming? I nave not issue when i try to run code from TouchGFX designer, but the same code do not work from CubeIDE. And one more strange thing .bin file from CubeIDE have size more than 2GB!!! Debug have been failed every time in stage external flash programming with output:
(Read)Failed determine breakpoint type
Error! Failed to read target status
Debugger connection lost.
Shutting down...
I have found only one way to debug - to add files from GFX folder to debug settings. First add external flash file than internal. It works for me...
Do someone have any ideas?
2020-02-13 06:38 AM
I'm pretty sure that this could be related to the issue mentioned in the bottom of the post: https://community.st.com/s/question/0D50X0000C0y1AqSQI/fix-stm32f746gdisco-v30-touchgfx-application-template-cubeide
@Martin KJELDSEN Sorry for bringing this to you - have you heard any news from the Cube Team on this issue?
2020-02-13 07:03 AM
Many Thanks for that!!!!
Looks like this is the same issue.
I'll follow this topic.
Additionally i would up some extra topics.
I faced with number of issues that TouchGFX generate two files:
a)
1)intflash.elf
2)target.elf
But CubeIDE generate one *.elf that have size less then sum of those two, and one BIG *.bin file. (look at the picture above)
b)
I find a tri�?k to run it in debug, but it is annoying - very slow to upload with any types of ICD (J-Ling-mode and native STlink)
c)
Third thing is that if I add any code from CubeMX generator, f.ex. LWIP it stop to build simulator and target from TouchGFX designer.
It looks like they use different make files.
Will be great to post some HOW TO instructions when I could to add my makefile for add extra new source to build with TouchGFX designer?
Thanks for all!