On Wed, Nov 6, 2019 at 1:37 PM Matthias Stadler <
matthias.stad...@medineering.de> wrote:

> I tried hbreak instead of break, and it worked. I'm using the
> configuration file "xmc4800-relax.cfg" which refers to "xmc4xxx.cfg",
> both from OpenOCD.
> How can I define the flash range correctly?
>
> I found in "xmc4xxx.cfg" line 54:
> flash bank $_FLASHNAME xmc4xxx 0x0C000000 0 0 0 $_TARGETNAME
>
> But I don't have a clue how to fix it.
>
> Thanks a lot!
> Matthias
>
>
It seems the XMC4800 mirrors the flash bank into a cached region at
0x08000000 and an uncached region at 0x0c000000. OpenOCD apparently defines
the uncached region only, for some reason. I'm not sure if that is a
requirement for proper operation of the flash driver but I don't think
you're using OpenOCD to flash anyway, since it wouldn't work with an ELF
file linked to execute from 0x08000000.

So what you can do is to either

1. Link and execute your program starting from 0x0c000000, with the
performance hit that may bring.
2. Change the start address of the flash bank to 0x08000000 and hope that
the xmc4xxx flash driver can handle it correctly.
3. Add a separate virtual flash bank covering 0x08000000 and forward which
will act as a proxy for the other flash bank:

flash bank $_FLASHNAME.cacheable virtual 0x08000000 0 0 0 $_TARGETNAME
$_FLASHNAME

3 is the best solution, if it works.

/Andreas
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to