Marus / cortex-debug

Visual Studio Code extension for enhancing debug capabilities for Cortex-M Microcontrollers
MIT License
1.02k stars 240 forks source link

loadFiles not working as expected with PE Micro servertype #1019

Closed tsweaver321 closed 5 months ago

tsweaver321 commented 6 months ago

With servertype set to "pe" and 2 elf files (bootloader and application) listed in loadFiles, each file is being programmed to my target's flash, but, unfortunately, a complete flash erase is done before each elf is programmed. The result is that only the 2nd elf file remains loaded at the end. When multiple files are programmed using the loadFiles setting, a complete flash erase should only happen before the first elf file is programmed.

Currently, we're working around this issue by using another tool to reprogram the bootloader after we've used VS Code to program a changed application (vni). At that point, debugging of the application in Cortex-Debug is working as expected. I'm loading symbols from application elf only.

bootloader is from 0x00000000 to 0x00003FFF application is from 0x00004000 to 0x0017FFFF

launch.json terminal_pe_launch debug_console_pe_launch.txt

Windows 10 Enterprise VS Code Version 1.88.1 Cortex-Debug v1.12.1 P&E GDB Server for Arm(R) devices, Version 9.34.00.00 GNU gdb (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 8.3.0.20190709-git Arm GNU Toolchain 13.2.rel1 (Build arm-13.7) 13.2.1 20231009 Device: NXP S32K148 FreeRTOS: 10.5.1

tsweaver321 commented 6 months ago

Full Debug Console dump: debug_console_pe_launch.txt

tsweaver321 commented 5 months ago

I see there's already a PR for this. Closing. https://github.com/Marus/cortex-debug/pull/989

tsweaver321 commented 5 months ago

Existing PR