
We are using tool chain gnuarm 3.4.3 to compile U-Boot 1.1.6 for SMDK2400 board (ARM 9). The commands were as follows.
make distclean make smdk2400_config make
We are able to successfully generate u-boot.The tool chain have build in insight with version GNU gdb 6.1.
While debugging the u-boot.elf in insight with sim target, we encounter error with memset() funtion,which was called in the start_armboot() function. The mixed code for memset() function is as follows
427 char *xs = (char *) s; 0xcf8e0f4 <memset1+12> : mov r3, r0
428 int l_count = count/4; 0xcf8e0e8 <memset1> : mov r2, r2, lsr #2
429 430 while (l_count--) 431 *xs++ = c;
0xcf8e0ec <memset1+4> : sub r2, r2, #1 ; 0x1 0xcf8e0f0 <memset1+8> : cmn r2, #1 ; 0x1 0xcf8e0f8 <memset1+16> : moveq pc, lr 0xcf8e0fc <memset1+20> : sub r2, r2, #1 ; 0x1 0xcf8e100 <memset1+24> : cmn r2, #1 ; 0x1 0xcf8e104 <memset1+28> : strb r1, [r3], #1 0xcf8e108 <memset1+32> : bne 0xcf8e0fc <memset1+20>
432 433 return s; 434 }
0xcf8e10c <memset1+36> : mov pc, lr
The "strb r1, [r3], #1" code tries to store 0x00 to locations starting from 0x0cf1ffdc to 0x0cf20000 (36 bytes) byte by byte.The code successfully writes 0x00 to first byte location (0x0cf1ffdc), but when it tries to write the second byte location (0x0cf1ffdd), it throws an exception and the program hangs.
The makefile in the Top directory (./U-Boot) and config.mk file of './U-Boot/cpu/arm920t' are attached for your ready reference.
Please help us to sort the above issue. http://old.nabble.com/file/p29725451/Makefile.txt Makefile.txt http://old.nabble.com/file/p29725451/config.mk config.mk