30
30
// *****************************************************************************
31
31
32
32
#if defined (__cplusplus)
33
- #ifdef __REDLIB__
34
- #error Redlib does not support C++
35
- #else
36
33
// *****************************************************************************
37
34
//
38
35
// The entry point for the C++ library startup
@@ -42,7 +39,6 @@ extern "C" {
42
39
extern void __libc_init_array (void );
43
40
}
44
41
#endif
45
- #endif
46
42
47
43
#define WEAK __attribute__ ((weak))
48
44
#define ALIAS (f ) __attribute__ ((weak, alias (#f)))
@@ -53,10 +49,8 @@ extern "C" {
53
49
#endif
54
50
55
51
// *****************************************************************************
56
- #if defined (__USE_CMSIS) || defined (__USE_LPCOPEN)
57
52
// Declaration of external SystemInit function
58
53
extern void SystemInit (void );
59
- #endif
60
54
61
55
// Patch the AEABI integer divide functions to use MCU's romdivide library
62
56
#ifdef __USE_ROMDIVIDE
@@ -122,15 +116,10 @@ void PIN_INT7_IRQHandler(void) ALIAS(IntDefaultHandler);
122
116
// *****************************************************************************
123
117
//
124
118
// The entry point for the application.
125
- // __main() is the entry point for Redlib based applications
126
119
// main() is the entry point for Newlib based applications
127
120
//
128
121
// *****************************************************************************
129
- #if defined (__REDLIB__)
130
- extern void __main (void );
131
- #else
132
122
extern int main (void );
133
- #endif
134
123
// *****************************************************************************
135
124
//
136
125
// External declaration for the pointer to the stack top from the Linker Script
@@ -283,9 +272,7 @@ ResetISR(void) {
283
272
pDivRom_uidiv = (unsigned int *)div_ptr[1 ];
284
273
#endif
285
274
286
- #if defined (__USE_CMSIS) || defined (__USE_LPCOPEN)
287
275
SystemInit ();
288
- #endif
289
276
290
277
#if defined (__cplusplus)
291
278
//
@@ -294,12 +281,7 @@ ResetISR(void) {
294
281
__libc_init_array ();
295
282
#endif
296
283
297
- #if defined (__REDLIB__)
298
- // Call the Redlib library, which in turn calls main()
299
- __main () ;
300
- #else
301
284
main ();
302
- #endif
303
285
304
286
//
305
287
// main() shouldn't return, but if it does, we'll just enter an infinite loop
0 commit comments