Merge pull request #3621 from JojoS62/fix-lpcxpresso-clock

Fix for #2884, LPC824: export to LPCXpresso, target running with wron…
pull/3734/head
Sam Grove 2017-02-09 09:30:05 -06:00 committed by GitHub
commit 15cbf6628e
1 changed files with 0 additions and 18 deletions

View File

@ -30,9 +30,6 @@
//***************************************************************************** //*****************************************************************************
#if defined (__cplusplus) #if defined (__cplusplus)
#ifdef __REDLIB__
#error Redlib does not support C++
#else
//***************************************************************************** //*****************************************************************************
// //
// The entry point for the C++ library startup // The entry point for the C++ library startup
@ -42,7 +39,6 @@ extern "C" {
extern void __libc_init_array(void); extern void __libc_init_array(void);
} }
#endif #endif
#endif
#define WEAK __attribute__ ((weak)) #define WEAK __attribute__ ((weak))
#define ALIAS(f) __attribute__ ((weak, alias (#f))) #define ALIAS(f) __attribute__ ((weak, alias (#f)))
@ -53,10 +49,8 @@ extern "C" {
#endif #endif
//***************************************************************************** //*****************************************************************************
#if defined (__USE_CMSIS) || defined (__USE_LPCOPEN)
// Declaration of external SystemInit function // Declaration of external SystemInit function
extern void SystemInit(void); extern void SystemInit(void);
#endif
// Patch the AEABI integer divide functions to use MCU's romdivide library // Patch the AEABI integer divide functions to use MCU's romdivide library
#ifdef __USE_ROMDIVIDE #ifdef __USE_ROMDIVIDE
@ -122,15 +116,10 @@ void PIN_INT7_IRQHandler(void) ALIAS(IntDefaultHandler);
//***************************************************************************** //*****************************************************************************
// //
// The entry point for the application. // The entry point for the application.
// __main() is the entry point for Redlib based applications
// main() is the entry point for Newlib based applications // main() is the entry point for Newlib based applications
// //
//***************************************************************************** //*****************************************************************************
#if defined (__REDLIB__)
extern void __main(void);
#else
extern int main(void); extern int main(void);
#endif
//***************************************************************************** //*****************************************************************************
// //
// External declaration for the pointer to the stack top from the Linker Script // External declaration for the pointer to the stack top from the Linker Script
@ -283,9 +272,7 @@ ResetISR(void) {
pDivRom_uidiv = (unsigned int *)div_ptr[1]; pDivRom_uidiv = (unsigned int *)div_ptr[1];
#endif #endif
#if defined (__USE_CMSIS) || defined (__USE_LPCOPEN)
SystemInit(); SystemInit();
#endif
#if defined (__cplusplus) #if defined (__cplusplus)
// //
@ -294,12 +281,7 @@ ResetISR(void) {
__libc_init_array(); __libc_init_array();
#endif #endif
#if defined (__REDLIB__)
// Call the Redlib library, which in turn calls main()
__main() ;
#else
main(); main();
#endif
// //
// main() shouldn't return, but if it does, we'll just enter an infinite loop // main() shouldn't return, but if it does, we'll just enter an infinite loop