Closed leshow closed 5 years ago
I started messing around with the f3 project trying to get the examples running, I was able to get the hello.rs
in the examples and blinky.rs
running with gdb on my board.
I noticed the memory.x
files are different, so it's contents into my cortex-m-quickstart clone and voila. I was able to debug / run.
MEMORY
{
CCRAM : ORIGIN = 0x10000000, LENGTH = 8K
FLASH : ORIGIN = 0x08000000, LENGTH = 256K
RAM : ORIGIN = 0x20000000, LENGTH = 40K
}
_stack_start = ORIGIN(CCRAM) + LENGTH(CCRAM)
These were the values that fixed it for me, I'll submit an issue to the quickstart
edit: I suppose quickstart is for cortex-m boards in general. Perhaps the book should be changed to have the right memory.x
for the STM32F3DISCOVERY?
This just helped get me out of a rut. Thanks for this. Since the book states that its meant to be used with an STM32F3DISCOVERY, it really should assume you're using an STM32F3DISCOVERY.
I have been following the guide up to hardware.
When following through, I'm not able to get "Hello, world!" printed out using
hprintln!
. This is my output:from openocd:
It just continues on that instruction over and over.
and from gdb:
Also, my
memory.x
file hadFLASH : ORIGIN = 0x00000000, LENGTH = 256K
in it, but the book said0x08000000
so I've changed it to that. I'm not sure if that's the correct value.I have the stmf32f303 exactly the same board as described in the book. When I plugged it in before the board used to light up and I could press the 'user' button to cycle through the accelerometer and gyroscope. Now the board just has a red power indicator and the COM set to red all the time. I'm not sure if this is normal or because I actually ran something on the board the initial program it was loaded with is gone.