The video looked good. There are questions. Why is the timer interrupt not executed when it is set to address 0x90000000? If I don't set the timer interrupt, it works fine.
For the Project2 that you made it for the JumpFuntion, There is an exception for H7 series and its the clock of QSPI unit that must be set to PER_CK. Other things are great in the video and thank to you for the shared information.
@@blcouz select the per_CK clock from the ioc file when choosing the clock of quad spi of the program in the internal flash that will jump to external flash .
What i don't understand, what is the function/purpose of the external loader when you debug the code you showed us? Does it read or write something? What does it do?
The most difficult part here is creating your own STLDR file. How do you think - is it possible instead of this to build the target project as a bin file and write it to memory as is (transfer it via some interface or SD card from a PC and write it to external memory by second project), and then configure XIP execution in a third project ?
Hello @ControllersTech, I follow the same steps and wrote code for stm32l476 disc board code is running fine, but I am not able debug code, target is not halting in the main() of application code even if I am using breakpoints. I am getting "Error: illegal address for breakpoint type". Can you please tell me how to solve this issue?? MPU configuration are not available in stm32l476 disc board.
Yes I have selected correct external loader still same issue. And when I tried to debug using OpenOCD I got "Error: Cortex-M Flash Patch Breakpoint rev 1 cannot handle HW breakpoint above address 0x1FFFFFFE; Error. can't add breakpoint: Unknown reason"
If you have the project from where you created the loader, you can debug that project itself. Look into the loader_src file. There should be different functions like init, write, verify etc. You can place your custom code inside those functions (like LEd blink or UART output). When you run the loader next time (in some other project), you should get the output whenever the loader execute either of those functions (init, write, verify, etc.)
thanks for this really useful video. My question is that is it possible to use both internal and external flash for application program at the same time?
@@ControllersTech Hi, I tried to execute a peace of code on a stm32h750 MCU and managed to program code on QSPI successfully and it verified. but when I press the reset in debug window the debugger does not goes to QSPI address in 0x90000000. should I do anything different from this video while editing system file? regards.
Hi, I tried to execute a peace of code on a stm32h747i MCU and managed to program code on QSPI successfully and it verified. but when I press the reset in debug window the debugger does not goes to QSPI address in 0x90000000. should I do anything different from this video while editing system file? regards
You need to select the external loader in the debug configuration. Watch the video properly after i pressed the debug button. If i didn't select it in this video, i must have done it in the previous one..
Hi, Thanks for the video. Why did you config 2 region in MPU? One is 1MB, executable and the other is 16 MB, unexecutable, is the latter defined just for the const?
Excellent video, congratulations! I'm trying to do as you teach with a board with STM32H750VBT6 and MT25QL512 memory. I can do the first part without problems, but I can't run the program like the second part. It does the normal compilation and loading but the user program still doesn't run.
for those who can't debug like the program in the external flash there is a trick that works for me try to debug another project like the one that is located in the internal flash which is used to jump to the external flash program then terminate it and then debug the program in the external flash again and do as video and it should work and don't forget the program in the internal flash that jumps to the external flash program have to be uploaded first and jump successfully to the start of the program in the external flash so you can debug the way descried in the video otherwise it won't work and the debugger will shut down when you try to halt it .
Any practical example where it's implemented? IMO, it's complicated to the point where you'd be better off just choosing a Linux board and complete your tasks on it. Video is really nice though!
Excellent collection of videos, thanks for the collaboration
The video looked good.
There are questions.
Why is the timer interrupt not executed when it is set to address 0x90000000?
If I don't set the timer interrupt, it works fine.
For the Project2 that you made it for the JumpFuntion, There is an exception for H7 series and its the clock of QSPI unit that must be set to PER_CK. Other things are great in the video and thank to you for the shared information.
Do you have sample code you can share?
@@blcouz select the per_CK clock from the ioc file when choosing the clock of quad spi of the program in the internal flash that will jump to external flash .
@@AhmedElsayed-y7q Thank you, but I have already resolved these issues in the past 8 months.
Thanks!
What i don't understand, what is the function/purpose of the external loader when you debug the code you showed us? Does it read or write something? What does it do?
It helps you debug the external memories on cubeIDE.
Also it is used to push code/data into the external memory.
The most difficult part here is creating your own STLDR file. How do you think - is it possible instead of this to build the target project as a bin file and write it to memory as is (transfer it via some interface or SD card from a PC and write it to external memory by second project), and then configure XIP execution in a third project ?
If you use a JLink, believe it or not they natively support flashing images into QSPI attached memory, no STLDR file required!
in respond to your reply in the video, could you do a seperate video on H750 Discovery QSPI XIP external memory ?
Hello @ControllersTech,
I follow the same steps and wrote code for stm32l476 disc board code is running fine, but I am not able debug code, target is not halting in the main() of application code even if I am using breakpoints. I am getting "Error: illegal address for breakpoint type". Can you please tell me how to solve this issue?? MPU configuration are not available in stm32l476 disc board.
Make sure you select the correct external loader in the debug configuration.
Yes I have selected correct external loader still same issue. And when I tried to debug using OpenOCD I got "Error: Cortex-M Flash Patch Breakpoint rev 1 cannot handle HW breakpoint above address 0x1FFFFFFE; Error. can't add breakpoint: Unknown reason"
@@ControllersTech Sir, please suggest some solution...
Launch the debugger, once it has loaded completely and the error shows, reset the debugger.
i am not able to read more than 256 bytes in externnal spi
I am reading 4 bytes of structure after 256 bytes data is rollover
Is it also possible to debug a custom external loader? My custom external loader isn't working, that's why.
If you have the project from where you created the loader, you can debug that project itself.
Look into the loader_src file. There should be different functions like init, write, verify etc. You can place your custom code inside those functions (like LEd blink or UART output). When you run the loader next time (in some other project), you should get the output whenever the loader execute either of those functions (init, write, verify, etc.)
For l552 Micro for mx25lm51245g flash memory how i do?
thanks for this really useful video. My question is that is it possible to use both internal and external flash for application program at the same time?
Yes i guess it's possible. But you have to make a lot of changes in the flash descriptor file.
@@ControllersTech Hi, I tried to execute a peace of code on a stm32h750 MCU and managed to program code on QSPI successfully and it verified. but when I press the reset in debug window the debugger does not goes to QSPI address in 0x90000000. should I do anything different from this video while editing system file? regards.
Hi, I tried to execute a peace of code on a stm32h747i MCU and managed to program code on QSPI successfully and it verified. but when I press the reset in debug window the debugger does not goes to QSPI address in 0x90000000. should I do anything different from this video while editing system file? regards
You need to select the external loader in the debug configuration. Watch the video properly after i pressed the debug button. If i didn't select it in this video, i must have done it in the previous one..
Is it possible to write data to ext flash in memory mapped mode? - by dereferencing the address 0x90000000 and write some data to that address ?
No, thats not how flash works. gotta erase a large section then write.
Hi, how do we know the address to be used(like you have used 0×90000000 here) to access the external flash memory?
Check the datasheet of your controller
@@ControllersTech Thank you so much, i will check it out.
Hi, Thanks for the video. Why did you config 2 region in MPU? One is 1MB, executable and the other is 16 MB, unexecutable, is the latter defined just for the const?
Check out the MPU playlist in the cortex M7. Everything related to MPU is explained there.
Excellent video, congratulations! I'm trying to do as you teach with a board with STM32H750VBT6 and MT25QL512 memory.
I can do the first part without problems, but I can't run the program like the second part. It does the normal compilation and loading but the user program still doesn't run.
Make sure you are selecting external memory in the debugger configuration..
did you succeed?
Great video, will try it on a w25qxx even if it is not on debugging list... any suggestions? thanks
Check out other comments. Someone did it for w25q
Hello friend and you can also use W25Q flash?
Read the comments, someone did it and posted the link also
How to run code from DRAM
Where do you initially store code? Internal Flash or External Flash?
for those who can't debug like the program in the external flash there is a trick that works for me try to debug another project like the one that is located in the internal flash which is used to jump to the external flash program then terminate it and then debug the program in the external flash again and do as video and it should work and don't forget the program in the internal flash that jumps to the external flash program have to be uploaded first and jump successfully to the start of the program in the external flash so you can debug the way descried in the video otherwise it won't work and the debugger will shut down when you try to halt it .
Nice video, thanks :)
wiil try on my new board
Any practical example where it's implemented? IMO, it's complicated to the point where you'd be better off just choosing a Linux board and complete your tasks on it.
Video is really nice though!
Excellent.👌
Very useful