This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

HardFault when relocating vector table and code above 0x80010000

Hi there!

I have a strange problem after relocating a portion of software
to another part of the flash memory.

First of all a little description of my configuration.
I have got two separate programs installed in the same controller
(STM32F427ZGT6, i am using using Keil v5.20, Pro version).

First part is a kind of a bootloader which is positioned at 0x80000000,
and the second part starts at 0x80010000. Of course bootloader
after proper start relocates vector table to 0x80010000 and moves
the PC to 0x80010000. And that's really fine. Everything works perfect
in such a configuration.

But the problem appears when the address is not 0x80010000, but 0x80020000 and above.
When i relocate the main portion of software to 0x80020000 program hangs
and stops on HardFault.

As far as i see the program stops on rt_memcpy_w function. But sometimes
the "caller" of HardFault points to 0x0 adress, not to rt_memcpy_w.
I've tried other adresses - 0x80030000 and so on. But the situation is the same.

I have to move the second portion of the software because of additional functions
in the bootloader part, so now it's code is more than 0x10000 bytes.

I've checked the reference manual about the memory map, but i haven't
found any clue for such a behavior.

Thanks in advance for any help!