Skip to content
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

GDB Load Failed Due to Invalid memory.x Flash Layout #102

Open
martinomburajr opened this issue Dec 5, 2020 · 0 comments · May be fixed by #103
Open

GDB Load Failed Due to Invalid memory.x Flash Layout #102

martinomburajr opened this issue Dec 5, 2020 · 0 comments · May be fixed by #103

Comments

@martinomburajr
Copy link

Description

In the Hardware > Configuring section of the Rust Embedded Book, the FLASH : ORIGIN value is set to 0x08000000. However in the memory.x file, the value is set to 0x00000000.

FLASH : ORIGIN = 0x00000000, LENGTH = 256K

This is a very subtle difference but leads to the following error:

$ arm-none-eabi-gdb -q target/thumbv7em-none-eabihf/debug/examples/hello        
Reading symbols from target/thumbv7em-none-eabihf/debug/examples/hello...
(gdb) target remote :3333
Remote debugging using :3333
cortex_m_semihosting::export::hstdout_fmt (args=...) at /Users/martinomburajr/.cargo/registry/src/github.com-1ecc6299db9ec823/cortex-m-semihosting-0.3.7/src/export.rs:44
44	    interrupt::free(|_| unsafe {
(gdb) load
Loading section .vector_table, size 0x400 lma 0x0
Loading section .text, size 0x1134 lma 0x400
Load failed

After changing the value to FLASH : ORIGIN = 0x08000000, LENGTH = 256 the program works as expected.

This was pointed out in a Reddit Post last year.

@martinomburajr martinomburajr linked a pull request Dec 5, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant