Open nvinuesa opened 6 years ago
The STM32F3DISCOVERY has a STM32F303VCT6 microcontroller while your board has a STM32F334C8. The 33x and 30x series are going to be similar in terms of peripherals, but not fully compatible. Differences such as a peripheral being at a different address, or simply because they have different amounts of RAM and/or Flash, can cause the HardFault
exception to be raised, as you have seen.
You'll need to look at forking the japaric/f3
repo and patching it to support the STM32F3x4 line instead of the STM32F30x line, or skipping the F3
crate entirely and using a lower-level crate like https://github.com/adamgreig/stm32-rs/blob/master/stm32f3/src/lib.rs.
Great, I'll do that!
Thanks
hi all,
any update on this? (I have rhe same problem)
do you have a memory.x for this MCU?
thanks, Mark
OK.. I'll answer my own question... by updating the memory.x for the f3 crate to the one below, I can now get it to work:
MEMORY { CCRAM : ORIGIN = 0x10000000, LENGTH = 8K FLASH : ORIGIN = 0x08000000, LENGTH = 64K RAM : ORIGIN = 0x20000000, LENGTH = 16K }
_stack_start = 0x20001000;
Hi Jorge, first of all thanks a lot for your great job on
rust-embedded
π .I am using the STM32F3348-DISCO board which is the replacement for the STM32F3DISCOVERY (no longer available in my country).
When I follow the instructions, everything builds, flashes and starts debugging correctly. The problem is that if I hit
continue
(in gdb) after setting the breakpoint, it blocks indefinitely; and if Istep
a few times, I arrive to this statement and it blocks:Now, I am aware that this problem may come from the fact that the board is not exactly the same as you used; and more specifically, when compiling I see
Compiling stm32f30x v0.7.0
and my board uses the STM32F334C8 MCU instead of an STM32F30x.Is there something I can change or would you have any idea how to solve this?
Thanks a lot