Hi again.
Thanks Simon for pointing me to the right direction

. But the problem is not solved.
I have made some (insignificant) changes, and the result has been the same. Then, I have followed the copy of each byte from ROM to RAM, and realized that some bytes are not copied (the ones wich cause the errors), but the others are.
I show you a part of memory where this happens (at 0x193de, the underlined part):
Code:
Source (ROM):000193ce: 66 a0 22 2e fe e8 20 2e fe f0 b2 80 65 00 fe 94 |f."... .....e...000193de: 10 3c 00 80 13 c0 40 11 00 00 60 fe 4e 71 |.<....@...`.NqDestination (RAM):20000ade: 66 a0 22 2e fe e8 20 2e fe f0 b2 80 65 00 fe 94 |f."... .....e...20000aee: 00 04 00 80 13 c0 40 11 00 00 60 fe 4e 71 |......@...`.Nq
And this is the function used to copy them:
Code:
void boot_copy(void){ extern char __START_COPY_TO_RAM[]; extern char __END_COPY_TO_RAM[]; extern char __START_COPY_ROM[]; uint32 n; uint8 *dp, *sp; dp = (uint8 *)__START_COPY_TO_RAM; sp = (uint8 *)__START_COPY_ROM; n = __END_COPY_TO_RAM - __START_COPY_TO_RAM; while (n--) { *dp = *sp; dp++; sp++; }}About the question of being modified after copy them, I have all interrupts disabled. After calling that function, I execute the next orders:
Code:
asm {move.w #0x7700,sr}MCF_INTC0_IMRL |= MCF_INTC_IMRL_MASKALL;What is happening has no sense... I don't know why almost all the bytes are copied OK, but there are some bytes that aren't... and not always are the same, now they are at 0x200 0AEE, and in the previous post, they where at 0x2000 0528...
Thanks in advance,
Rubén
Edit: I have tried to write directly my own values and the result is that they have not been copied. I used the easiest way to do this:
Code:
uint8 *x;x=(uint8 *)0x20000AEE;*x=10;*x=20;*x=30;
The result is that the value 0x00 is never replaced. Can the RAM memory be damaged anyway? Just in a few bytes? Or I'm addressing some reserved bytes?
This does NOT happen with the address of the first message... What is happening?
I'm completely missed...
I'm going to try with another board (and other project) to check it...
Message Edited by RubenV on
2008-12-19 09:43 AM