STM32F105RB - When the program is flashed to 0x800000 the debug loses memory access.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-19 11:45 AM
Hello,
I am using uVision to code a project, and I picked up this project after another engeneer left the company. We have a DFU bootloader implementation that flashes the program at 0x8005000, and the bootloader at 0x8000000. But when I try to flash the code at 0x8000000 for development porpouses the debugger loses control. I use a STLink
- Labels:
-
Bootloader
-
STM32F1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-19 11:56 AM
Did you change the memory map/linker settings to build a program to be flashed at 0x8000000? If not, it will not work, since it's linked to be located at the app address.
Also, frequently the app sets the VTOR register explicitly to its intended base address - check the SystemInit routine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-19 12:08 PM
Yes, both are OK!
When I flash in the 0x8000000 only part of the program that does not work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-19 12:28 PM
Then look for other hardcoded addresses, like config data stored in Flash below the app address.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-19 12:52 PM
Check what SystemInit() is doing when it sets SCB->VTOR
Watch that the code builds for the addresses expected. Look at the .MAP file, and perhaps the .AXF with Keils' FROMELF tool.
This will automatically track the basis you define for the Target (or in the scatter file)
extern uint32_t * __Vectors; // symbol from startup.s in Keil builds
void SystemInit(void)
{
/* Configure the Vector Table location -------------------------------------*/
SCB->VTOR = (uint32_t)(&__Vectors); // Smart Base Location
...
Up vote any posts that you find helpful, it shows what's working..
