I'm using a custom board that is based off of the LPC4330-Xplorer board.
I took the usbd_rom_libusb, lpc_board_ngx_xplorer_4330, and lpc_chip_43xx projects out of the lpcopen_3_02_lpcxpresso_xplorer4330.zip file. Using those projects I tweaked the example code just a little (swapping the cr_startup_lpc18xx.c for cr_startup_lpc43xx.c, and changed the USB read/write usage to match a PC side test application). All other aspects of the example were left as provided by NXP, and it worked relatively well.
Now I want to start using C++ for some code, so I have done the following:
1 - renamed cr_startup_lpc43xx.c to cr_startup_lpc43xx.cpp
2 - renamed libusbdev_main.c to libusbdev_main.cpp
3 - modified .project file to include the ccnature
4 - modified project settings via the UI to have the same includes, libraries, etc now that it is using the C++ compiler and linker as it did when it was only using the C compiler and linker. BTW, it is linking with Newlib (nohost).
Making JUST those changes, the application will appear to hang on startup. The debugger will not make it to main. If I comment out this line:
__asm volatile ("cpsie i");
in ResetISR that is in cr_startup_lpc43xx.cpp, I will get to main, but as soon as I re-enable interrupts, the application will appear hung again. Pausing execution in the debugger, I find that execution is looping in the default SysTick_Handler infinite loop.
I know that I can add my own SysTick handler that doesn't have a loop and execution is be fine. But what is the C++ compiler/linker doing to drastically change that behavior? Are there any other steps I've missed?
Thanks,
Torin