Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 5 months ago.
How to load and excecute a Cortex M4 from SWD without a loader?
How to load and excecute a Cortex M4 from SWD without a loader? I have a unique need to load a firmware image into SRAM via SWD interface, the boot it up from SWD interface without using a regular Firmware loader. What is the correct sequence to boot the Firmware image from SRAM? I am working with Cortex M4.
Thank you.
1 Answer
6 years, 5 months ago.
Hi Tien,
You will have to do some research on the specific Cortex-M4 device that you are using as each silicon manufacturer will offer different boot options. We're not familiar with any vendor that allows one to boot over SWD. SWD is used for debugging and in application/mission mode the SWD pins after booting are usually multiplexed to have other functionality. Vendors will most certainly have an option to boot from SRAM but naturally you will need to get that memory programmed before you start executing from there!
For example - if you consult a STM32 reference manual you'll find several pins (BOOT0, BOOT1 and potentially others) that set the boot mode. ST also have a detailed application note which describes how to use their internal bootloader to program flash through their supported peripherals. We think a document like this is what you are after:
Please check with your device manufacturer's website for similar literature. The device manufacturer will be best suited to answer any questions you have about the boot process and device programming.
-Ralph, Team Mbed
Ralph, Thank you for your respond.. I will examine the document that you shared to see if it contains the information that I need. Thank you
posted by 24 Jul 2018As a quick follow-up - we interpreted your question from a broad/system view. If you just have a custom board that you want to program for development/test purposes then you need a debugger. If you only have the Cortex-M4 without an interface chip for USB-based debugging/programming, then you also need a debug probe and the SWD pins brought out on the board for debugging.
posted by 24 Jul 2018