Topic: A problem compiling the bootloader
hi, I tried to compile the bootloader by myself. Strange thing is when I look into the disassembly code, accessing the registers of the NAND Flash Controller(NFC) is bytewise (STRB, LDRB) not as disassembly code for the original bootloader halfword wise accessing the NFC (STRH, LDRH). Does anyone know why?
the source code for the bootloader is version 1.2. GNU Toolchain (gcc 4.1.2), chumby v1.2 kernel.
Another question is regarding some code in the "splstartup.S" file in the bootloader.
-----------------------------------
...
_start:
ldr r1,=StackInit
and r1,r1,#3
ldr sp,[r1]
...
-----------------------------------
Why there is the instruction "and r1,r1,#3". It does not make sense to me. Shouldn't be "and r1,r1,~3"?
Can someone help me for this? thanks!