-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load ELF erases flash sector to 0x00 instead of 0xFF #1013
Comments
The error could be in the gdb server. It fills flash blocks by 0x00 pattern when add. stlink/src/st-util/gdb-server.c Line 804 in 0a6fe3a
It may be fix by
|
I don't like to compare, but the STM32 ST-LINK Utility command-line interface (ST-LINK_CLI.exe) has a cool feature: ske (Skip Erase Flash), which doesn't modify the sectors it flashes to (except for flashing the ELF data, of course). |
If I got your ideas right, what you expect is that BTW, is your original issue solved with the information from Ant-ON? If not you may give some further feedback. This seems to be better situated in a new feature related issue. |
I'm sorry, but I'm mixing a feature request with a bug. I meant all data to be written to the flash: .text, .rodata, initialization data, etc. |
@chenguokai @Ant-ON Would one of you fancy to contribute here, having looked into this already? |
@Nightwalker-87 I fixed main problem in https://github.com/Ant-ON/stlink/tree/gdb_features |
Expected/description:
I'm debugging a simple application via arm-none-eabi-gdb, connecting to st-util.
I'm loading the ELF with the
load
command.The flash-sector, beyond the ELF is filled with 0x00 instead of 0xFF.
Same behavior on Windows.
Intel-HEX:
GDB memory output:
As you can see, the 2KB sector is filled with 0x00.
The text was updated successfully, but these errors were encountered: