0
\$\begingroup\$

recently I tried to flash my STM32F302CCT7 with a ST-link, openOCD, and gdb for arm. I am using the rust toolchain which requires that the ROM and RAM locations to be specified in a memory.x file when targeting ARM. Initially I specified the ROM location as 0x0000 0000 which did not work. I then used 0x0800 0000 which did work. I am wondering why 0x0000 0000 did not work. enter image description here

enter image description here The datasheet says that "the flash memory contents can be accessed starting from address 0x0000 0000 or 0x0800 0000". Is this only valid for reading from the memory and not writing to? Also I am booting from Main Flash memory.

\$\endgroup\$
2
  • \$\begingroup\$ What are your BOOT0 and BOOT1 bits? Did you read the complete description for range 0x00000000-0x0003FFFF? \$\endgroup\$ Commented Feb 2, 2024 at 6:38
  • \$\begingroup\$ The full text you quote from "the flash memory contents can be accessed starting from address 0x0000 0000 or 0x0800 0000" starts with "the Main Flash memory is aliased in the boot memory space (0x0000 0000)". So it's not really there - it just looks like it's there *when the core is running & executing code). When you want to access the Flash externally thru debugging tools you need to use the "real" address of the flash, not its aliased address. \$\endgroup\$ Commented Feb 2, 2024 at 14:39

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.