Forums › Reference, Evaluation, and Development Boards › How can I program Cortex M4 processor?
Hi,
I have the OSD32MP1-RED board, and I want to program the Cortex M4 processor. Is possible to do this via STM32CubeIDE? Which are the steps to do this task? Is detailed in any location?
Thanks in advance.
amolina,
Please take a look at the Getting Started page for DK2 M4 development here: https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Develop_on_Arm%C2%AE_Cortex%C2%AE-M4. You can follow the same procedure if you get an STLink debugger. For the hardware setup(posted for BRK, works for RED as well), please see https://octavosystems.com/forums/topic/getting-started-with-osd32mp1-brk-st-link-jtag-interface/.
Best,
Neeraj
Thanks for the reply. Currently I don’t have a STLink debugger, is not possible do the connection to the Cortex M4 without the STLink debugger?
amolina,
You can also start a debug session via Ethernet. Please see Section 7 of https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Develop_on_Arm%C2%AE_Cortex%C2%AE-M4/Modify,_rebuild_and_reload_a_firmware for the Cube IDE settings you will need. Note that the board needs to be connected to the same network as the host computer.
Best,
Neeraj
Is it possible with a JTAG for example of Texas Instruments? I don’t find availability of the ST JTAGS. I think that is not possible with other JTAG but to be confirmed.
Thanks in advance.
amolina,
We have not tried to use TI debuggers with ST device, initial thought is that it would not work.
I found ST Link V2 available here: https://www.amazon.com/Programmer-Debugger-Microcontroller-Interface-Simulation/dp/B09KV87CH3/ if you are in the US.
Best,
Neeraj
Finally I have obtained the the ST Link V2 and I have been able to load the program OpenAMP_TTY_echo that is mentioned in the tutorial. Now I want to write from the A7 to the Cortex M4 and generate a PWM signal, but my doubt is about the hardware configuration in the cortex M4. In the examples provided by ST to the board DK2 they define the pins related for example to the leds and the buttons. My doubt is the next, do I must define in the STM32CubeIDE project (in my case) the hardware that the Cortex M4 will use? Is there some information about this for the Octavo Boards? I have doubts about this, because by one side the hardware is defined yet in the device tree of my Linux image, so I don’t know how procede. Could you indicate me?
Thanks in advance.
amolina,
If you use Engineering boot mode,(100b: See Sheet 1 of OSD32MP1-RED schematics) you will not need to do anything to develop on M4 in terms of hardware configuration. The clock tree and pinmuxing can be setup in the M4 firmware code via ST-Link. This is the recommended way of developing code for the M4. This way, you can develop without the interference from the A7 core.
Once you are done developing code, you can setup the A7 device tree to give M4 access to the right pins and setup the clock tree. You can find more information on setting up the pinmuxing through the A7 core here:https://wiki.st.com/stm32mpu/wiki/How_to_assign_an_internal_peripheral_to_a_runtime_context
Best,
Neeraj
Octavo Systems LLC all rights reserved
OCTAVO is registered in the U.S. Patent and Trademark Office. OSD, C-SiP, and the Octavo Logo are trademarks of Octavo Systems LLC.
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields