I am trying to veiw the memory of the stm32 bluepill debugged by a Blackmagic probe, I am entering the starting address of the flash memory of 0x08000000 and the boundary address of 0x08007FFF but I get the following error:
Failed to examine memory: Error: cannot open examinememory:/Memory%20%5B0x0800000%2B0x08007FFF%5D.dbgmem?address%3D0x0800000%26length%3D0x08007FFF%26timestamp%3D1616774964520. Detail: Error: Unable to read memory: Cannot execute this command while the target is running. Use the "interrupt" command to stop the target and then try again. (from data-read-memory-bytes 0x800000 1024)
This is the .ini file:
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; Redirecting...
[env:bluepill_f103c8]
platform = https://github.com/platformio/platform-ststm32.git ;Due to some issues
;platform = ststm32
board = bluepill_f103c8
framework = cmsis
; change microcontroller
board_build.mcu = stm32f103c8t6
; change MCU frequency
board_build.f_cpu = 72000000L
; All Debugging Configurations:
;debug_tool
;debug_build_flags
;debug_init_break
;debug_init_cmds
;debug_extra_cmds
;debug_load_cmds
;debug_load_mode
;debug_server
;debug_port
;debug_speed
;debug_svd_path
upload_protocol = blackmagic ;SWD interface
debug_tool = blackmagic
debug_port = /dev/tty.usbmodem7BBB54AD1
upload_port = /dev/tty.usbmodem7BBB54AD1
;monitor_port = /dev/tty.usbmodem7BBB54AD3
;monitor_speed = 115200 ;Baud-rate
debug_init_break = tbreak Reset_Handler
debug_build_flags = -O0 -ggdb3
;[env:myrelease]
;some_extra_options = ...
;[env:mydebug]
;build_type = debug
;some_extra_options = ...
This is the source file:
#include "stm32f1xx.h"
#include <stdio.h>
#include <stdbool.h> // Boolean library
#include <File1.h>
int main(void)
{
int x = 1000;
int y = 5000;
int z = x + y;
while(true)
{
//Todo
}
}