I'm trying to apply the Workaround 2 for the address speculation mechanism Errata but I can't get my program to work. Here's what my .lcf file was:
# Memory ranges
MEMORY {
vectorrom (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400
cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000020
code (RX) : ORIGIN = 0x00000500, LENGTH = 0x0003FB00
vectorram (RWX) : ORIGIN = 0x20000000, LENGTH = 0x00000400
userram (RWX) : ORIGIN = 0x20000400, LENGTH = 0x00007C00
}
Here are the change:
# Memory ranges
MEMORY {
vectorrom (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400
cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000020
code (RX) : ORIGIN = 0x00000500, LENGTH = 0x00037B00
vectorram (RWX) : ORIGIN = 0x20038000, LENGTH = 0x00000400
userram (RWX) : ORIGIN = 0x20038400, LENGTH = 0x00007C00
}
The program doesn't work and I have a "Bus Error" when in debug. I guess it's because I have no RAM at 0x20038000. Where am I suppose to change the RAM base address. I have also tried to change only the RAMBAR address, but still the same result.
# 32 Kbytes Internal SRAM
# ___RAMBAR = 0x20000000;
___RAMBAR = 0x20038000;
___RAMBAR_SIZE = 0x00008000;
# 256 KByte Internal Flash Memory
___FLASHBAR = 0x00000000;
# ___FLASHBAR_SIZE = 0x00040000;
___FLASHBAR_SIZE = 0x00038000;
Thank for the help.
Fred