Skip to content

Commit 15cbf66

Browse files
authored
Merge pull request #3621 from JojoS62/fix-lpcxpresso-clock
Fix for #2884, LPC824: export to LPCXpresso, target running with wron…
2 parents 844b94c + 9b8ac9b commit 15cbf66

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

targets/TARGET_NXP/TARGET_LPC82X/TARGET_LPC824/device/TOOLCHAIN_GCC_CR/startup_LPC824_CR.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030
//*****************************************************************************
3131

3232
#if defined (__cplusplus)
33-
#ifdef __REDLIB__
34-
#error Redlib does not support C++
35-
#else
3633
//*****************************************************************************
3734
//
3835
// The entry point for the C++ library startup
@@ -42,7 +39,6 @@ extern "C" {
4239
extern void __libc_init_array(void);
4340
}
4441
#endif
45-
#endif
4642

4743
#define WEAK __attribute__ ((weak))
4844
#define ALIAS(f) __attribute__ ((weak, alias (#f)))
@@ -53,10 +49,8 @@ extern "C" {
5349
#endif
5450

5551
//*****************************************************************************
56-
#if defined (__USE_CMSIS) || defined (__USE_LPCOPEN)
5752
// Declaration of external SystemInit function
5853
extern void SystemInit(void);
59-
#endif
6054

6155
// Patch the AEABI integer divide functions to use MCU's romdivide library
6256
#ifdef __USE_ROMDIVIDE
@@ -122,15 +116,10 @@ void PIN_INT7_IRQHandler(void) ALIAS(IntDefaultHandler);
122116
//*****************************************************************************
123117
//
124118
// The entry point for the application.
125-
// __main() is the entry point for Redlib based applications
126119
// main() is the entry point for Newlib based applications
127120
//
128121
//*****************************************************************************
129-
#if defined (__REDLIB__)
130-
extern void __main(void);
131-
#else
132122
extern int main(void);
133-
#endif
134123
//*****************************************************************************
135124
//
136125
// External declaration for the pointer to the stack top from the Linker Script
@@ -283,9 +272,7 @@ ResetISR(void) {
283272
pDivRom_uidiv = (unsigned int *)div_ptr[1];
284273
#endif
285274

286-
#if defined (__USE_CMSIS) || defined (__USE_LPCOPEN)
287275
SystemInit();
288-
#endif
289276

290277
#if defined (__cplusplus)
291278
//
@@ -294,12 +281,7 @@ ResetISR(void) {
294281
__libc_init_array();
295282
#endif
296283

297-
#if defined (__REDLIB__)
298-
// Call the Redlib library, which in turn calls main()
299-
__main() ;
300-
#else
301284
main();
302-
#endif
303285

304286
//
305287
// main() shouldn't return, but if it does, we'll just enter an infinite loop

0 commit comments

Comments
 (0)