2024-01-16 03:08 AM - edited 2024-01-16 05:46 AM
VSCode is gaining in popularity at work and so I had a requirement to use it as the development platform for an ST mcu based project. I have very little experience with vscode and as I was unable to find an answer to my problem I thought that I would share what worked for me.
My application uses both internal and external flash for code (qspi). I created an external loader (MT25Q128A_STM32F746_KAL_AB.stldr) and was able to program this in STM32CubeIDE by configuring the external loader details in the debugger tab. VSCode requires certain extensions - cortex-debug; MemoryView; Peripheral Viewer and RTOS Views. Sorry if I've missed any.
The way to debug the application is to create a launch.json file. Below is mine. Hope it helps
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "<myapp Debug>",
"cwd": "${workspaceFolder}",
"executable": "./debug/<myapp>.elf",
"request": "launch",
"type": "cortex-debug",
"runToEntryPoint": "main",
"servertype": "stlink",
"serverArgs":
[
"-s",
"-m", "0",
"-k",
"--frequency", "21000",
"-el C:\\Program Files\\STMicroelectronics\\STM32Cube\\STM32CubeProgrammer\\bin\\ExternalLoader\\MT25Q128A_STM32F746_KAL_AB.stldr"
],
"armToolchainPath": "C:/ST/STM32CubeIDE_1.6.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin",
"device":"STM32F746IGK7" ,
"svdFile": "C:/ST/STM32CubeIDE_1.6.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.productdb.debug_2.1.100.202311191741/resources/cmsis/STMicroelectronics_CMSIS_SVD/STM32F746.svd"
}
]
}
Solved! Go to Solution.
2024-01-23 10:47 PM
This is just to mark the solution as accepted
2024-01-16 08:57 AM
Hello @DRega.1
If you would like to learn more about how to implement and use your external loader, please check this article How to implement and use your own external flash l... - STMicroelectronics Community
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-01-16 10:58 AM
The post suggests the @DRega.1 has already done that successfully..
2024-01-17 01:57 AM - edited 2024-01-17 08:19 AM
Thank you @Tesla DeLorean . I didn't catch it. Thanks @DRega.1 for sharing your implementation
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-01-23 10:47 PM
This is just to mark the solution as accepted