Open
Description
What kind of issue is this?
Configuration
Operating system:
Windows 11
PlatformIO Version (platformio --version
):
pio --version
PlatformIO Core, version 6.1.9
Description of problem
CLI debug uploads without complication.
Steps to Reproduce
- I am reproducing on a modified semihosting example, but other stm repos behave the same
- Run
pio debug --interface=gdb -x .pioinit
- Modify Hello world!
- Run
pio debug --interface=gdb -x .pioinit
again
Actual Results
(gdb) Source file is more recent than executable.
Hello world!
Hello world!
Hello world!
Expected Results
Hello Hello!
Hello Hello!
Hello Hello!
If problems with PlatformIO Build System:
The content of platformio.ini
:
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter, extra scripting
; Upload options: custom port, speed and extra flags
; Library options: dependencies, extra library storages
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html
[env:nucleo_l452re]
platform = ststm32
framework = stm32cube
board = nucleo_l452re
; Enable Semihosting
extra_scripts =
pre:enable_semihosting.py
; Debugging
debug_extra_cmds =
monitor arm semihosting enable
monitor arm semihosting_fileio enable
; Unit Testing
test_testing_command =
${platformio.packages_dir}/tool-openocd/bin/openocd
-s
${platformio.packages_dir}/tool-openocd
-f
scripts/board/st_nucleo_l4.cfg
-c
init
-c
arm semihosting enable
-c
reset run
Source file to reproduce issue:
#include <stdio.h>
#include <string.h>
#include "stm32l4xx_hal.h"
extern void initialise_monitor_handles(void);
int main(int argc, char* argv[]) {
initialise_monitor_handles();
HAL_Init();
while(1) {
printf("Hello worldsssss!\n");
HAL_Delay(1000);
}
}
void SysTick_Handler(void)
{
HAL_IncTick();
}
Additional info
If I clean the project, it rebuilds.
If I compile the release first (pio run
), it rebuilds.
VSCode GUI debug works fine.