Hi,
thank you for your answer. I use LPCXpresso v8.2.0_647 and I am a little bit shocked with your sentence "LPCXpresso does not support STLinkV2/OpenOCD". If it's intentional maybe I shouldn't say it out loud that my config seems to work :smileywink:
I have only removed call of Board_Init(); in main() to avoid wrong GPIO configuration like setting output on pin that should be an input with state forced by some external component. But everething seems to crash even before reaching that point. Or maybe I was misleaded by place of BusFault_Handler(void) definition and it gets back to cr_startup_lpc175x_6x.c file after some problems in main?
But if I recall correctly, I was stepping through code from startup (I will have to wait till Monday to confirm that):
// Copy the data sections from flash to SRAM.
while (SectionTableAddr < &__data_section_table_end) {
LoadAddr = *SectionTableAddr++;
ExeAddr = *SectionTableAddr++;
SectionLen = *SectionTableAddr++;
data_init(LoadAddr, ExeAddr, SectionLen);
}
// At this point, SectionTableAddr = &__bss_section_table;
// Zero fill the bss segment
while (SectionTableAddr < &__bss_section_table_end) {
ExeAddr = *SectionTableAddr++;
SectionLen = *SectionTableAddr++;
bss_init(ExeAddr, SectionLen);
}
and then it looked like jumping over 3 handlers (that's a little bit weird) and stopping on last while loop:
__attribute__ ((section(".after_vectors")))
void HardFault_Handler(void)
{ while(1) {}
}
__attribute__ ((section(".after_vectors")))
void MemManage_Handler(void)
{ while(1) {}
}
__attribute__ ((section(".after_vectors")))
void BusFault_Handler(void)
{ while(1) {}
}
Examples that came with that board are for Keil and IAR so I wanted start with another IDE and after successful "blinky" example try to port/tweak some of them. I didn't think that startup code will do anything board specific :-/