I inherited a firmware project that is supposed to be mostly complete with some cleanup required (debounce switches, etc.). It uses an NXP LPC1756, the IDE is IAR Embedded Workbench (8.11) for ARM, and the debugger is a J-Link . It compiles and links without error and downloads to the target with any problem. It has one interrupt handler and that's where I'm having a problem. Stepping through the code in the initialization stage, it comes to the point where it sets the interrupt enable in the NVIC for the SSP1 peripheral and immediately hangs up in the B Default_Handler.
Here is the cstartup_M.s file that was provided with the project:
However, looking at vector table in the disassembly starting at 0x0, it looks like this:
0x0: 0x28 DC8 40 ; '('
__vector_table:
0x1: 0x36 DC8 54 ; '6'
0x2: 0x1000 DC16 4096 ; '..'
0x4: 0x00029b21 DC32 __iar_program_start
0x8: 0x00026497 DC32 ADC_IRQHandler
0xc: 0x00026497 DC32 ADC_IRQHandler
0x10: 0x00026497 DC32 ADC_IRQHandler
0x14: 0x00026497 DC32 ADC_IRQHandler
0x18: 0x00026497 DC32 ADC_IRQHandler
__vector_table_0x1c:
0x1c: 0xeff137c4 DC32 __vector_table_value
0x20: 0x00000000 DC32 0x0 (0)
0x24: 0x00000000 DC32 0x0 (0)
0x28: 0x00000000 DC32 0x0 (0)
0x2c: 0x00026497 DC32 ADC_IRQHandler
0x30: 0x00026497 DC32 ADC_IRQHandler
0x34: 0x00000000 DC32 0x0 (0)
0x38: 0x00026497 DC32 ADC_IRQHandler
0x3c: 0x00026497 DC32 ADC_IRQHandler
0x40: 0x00026497 DC32 ADC_IRQHandler
0x44: 0x00026497 DC32 ADC_IRQHandler
0x48: 0x00026497 DC32 ADC_IRQHandler
0x4c: 0x00026497 DC32 ADC_IRQHandler
0x50: 0x00026497 DC32 ADC_IRQHandler
0x54: 0x00026497 DC32 ADC_IRQHandler
0x58: 0x00026497 DC32 ADC_IRQHandler
0x5c: 0x00026497 DC32 ADC_IRQHandler
0x60: 0x00026497 DC32 ADC_IRQHandler
0x64: 0x00026497 DC32 ADC_IRQHandler
0x68: 0x00026497 DC32 ADC_IRQHandler
0x6c: 0x00026497 DC32 ADC_IRQHandler
0x70: 0x00026497 DC32 ADC_IRQHandler
0x74: 0x00026497 DC32 ADC_IRQHandler
0x78: 0x00026497 DC32 ADC_IRQHandler
0x7c: 0x00026497 DC32 ADC_IRQHandler
0x80: 0x00026497 DC32 ADC_IRQHandler
0x84: 0x00026497 DC32 ADC_IRQHandler
0x88: 0x00026497 DC32 ADC_IRQHandler
0x8c: 0x00026497 DC32 ADC_IRQHandler
0x90: 0x00026497 DC32 ADC_IRQHandler
0x94: 0x00026497 DC32 ADC_IRQHandler
0x98: 0x00026497 DC32 ADC_IRQHandler
0x9c: 0x00026497 DC32 ADC_IRQHandler
0xa0: 0x00026497 DC32 ADC_IRQHandler
0xa4: 0x00026497 DC32 ADC_IRQHandler
0xa8: 0x00026497 DC32 ADC_IRQHandler
0xac: 0x00026497 DC32 ADC_IRQHandler
0xb0: 0x00026497 DC32 ADC_IRQHandler
0xb4: 0x00026497 DC32 ADC_IRQHandler
0xb8: 0x00026497 DC32 ADC_IRQHandler
0xbc: 0x00026497 DC32 ADC_IRQHandler
0xc0: 0x00026497 DC32 ADC_IRQHandler
__iar_SB:
0xc4: 0x000291c4 DC32 numerals_tens_minute
The other thing is that I can set breakpoints in the code anywhere except in the interrupt handler. Looking in the .map file, I can't find any reference to the handler. The interrupt handler is in a file that initializes an ADC and all the other functions in that file show up in the .map. I suspect something is not right in setup in the project options, but I've experimented with everything I can think of without resolving the problem.
Has anyone seen anything like this?