2019-04-01 08:15 AM
Hello,
I am using the XIP functionalities over QSPI on the EvalBoard STM32F7308-DK. I got the launcher working without problems (jump to 0x90000000U, which is the QSPI base address). I also got a basic demo (toggle led) working from the external QSPI.
Now I am trying to do write my own program. I configured the linker file (STM32F730I8Kx_FLASH.ld) like this:
_Min_Heap_Size = 0x400;
_Min_Stack_Size = 0x800;
MEMORY
{
FLASH (rx) : ORIGIN = 0x90000000, LENGTH = 65536K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 256K
}
I also added APPLICATION_ADDRESS=0x90000000U to the preprocessor settings, and modified system_stm32f7xx.c with this:
SCB->VTOR = APPLICATION_ADDRESS | VECT_TAB_OFFSET;
The compilations finished successfully and the .hex file is generated, pointing to 0x90000000. If I flash the .hex file using STM32CubeProgrammer the program runs well. But the problem that I am encountering is that I cannot run it directly from SW4STM32. I compared my project with the toggle led example (which I can launch directly from SW4STM32) and the are, a priori, no differences.
It may come from the OpenODC configuration, but I am not sure. Do you have an idea?
Thank you in advance.
Luis
2019-04-01 11:07 AM
I presume "OpenODC" means "OpenOCD"? If yes: The required driver isn't included in stock OpenOCD. You might use either one of these patches:
2019-04-01 11:31 AM
Your tools actually needs to have loader code to support external flash as wired and configured on a specific board design.
Keil for example has code supporting the QSPI devices on the STM32F746G-DISCO and STM32F7308-DK equivalent.
C:\Keil5xx\ARM\PACK\Keil\STM32F7xx_DFP\2.11.0\Flash\STM32F7xx_QSPI_Disco.FLM
STM32F746G-DISCO_N25Q128A