Hello. I'm using a MCB2140 evaluation kit to program and debug the LPC2148, along with uVision4 and its RealView Compiler. I'm using the LPC2148 as a USB keypad controller.
When I load my program to the chip and start the debug session, I find that the code is stuck in an infinite loop in "__scatterload_rt2" before it reaches any of my code. Here is the assembly it's running, and the infinite loop occurs at the instructions at 0xC,0x10, and 0x14.
__main: 0x00000000 EB000000 BL __scatterload_rt2(0x00000008) 0x00000004 EB00003C BL __rt_entry_sh(0x000000FC) __scatterload_rt2: 0x00000008 E28F002C ADD R0,PC,#0x0000002C 0x0000000C E8900C00 LDMIA R0,{R10-R11} 0x00000010 E08AA000 ADD R10,R10,R0 0x00000014 BAB1E38C BLT 0xFEC78E4C 0x00000018 E24A7001 SUB R7,R10,#0x00000001 __scatterload_null: 0x0000001C E15A000B CMP R10,R11 0x00000020 1A000000 BNE 0x00000028 ......
I'm not specifying a scatterload file for the program. This is all happening before it even reaches my program code.
I realize that this is the area where the reset vectors are supposed to be. I have the correct startup.s file but for some reason the linker is putting the contents of main at 0x00 instead of startup. I have searched options menus everywhere and I don't understand why startup.s is not being placed at the beginning of the footprint.
I appreciate anyone's help. Thanks!
Nick