Closed tasosxak closed 5 years ago
Solved. This is the correct memory.x file:
/* Linker script for the STM32L475VG*/
MEMORY
{
/* NOTE 1 K = 1 KiBi = 1024 bytes */
FLASH : ORIGIN = 0x08000000, LENGTH = 1000K
RAM : ORIGIN = 0x20000000, LENGTH = 96K
}
Hi @tasosxak . Really curious why your length for the flash is 1000K and not 1024K. Also, how did you work out the origin was at 0x8000000 ? I have been pulling out my hair for hours until I cam across this post. Thank you for sharing!
Hi everyone,
I am following this tutotial: https://rust-embedded.github.io/book/start/hardware.html but for stm32l475.
First of all, I changed the memory.x for stm32l475:
The source code of the program which I want to run on stm32 chip is: hello.rs
Then, I run these commands: For compilation:
cargo run --example hello
For openocd:openocd -f interface/stlink-v2-1.cfg -f target/stm32l4x.cfg
In another terminal, I run the gdb program and commands for flush etc.:
^ the program stucks at this point.
Afterwards, I terminated the program, and Ι reopened a new gdb process. Ι gave the same commands until the command "monitor arm semihosting enable". At this point, I set breakpoint to the main function.
Again, the program stucks at this point. I pressed Ctrl-C and it printed out the command that the program execution is blocked:
OS : Ubuntu 18.04.1 LTS rustc version : rustc 1.34.0-nightly (146aa60f3 2019-02-18)
cargo .config file: