[Kernel] Fix main() issue in Keil MDK

This commit is contained in:
Bernard Xiong 2015-04-16 16:47:48 +08:00
parent ff8332d9dc
commit 21fdff8fbf
1 changed files with 4 additions and 1 deletions

View File

@ -149,13 +149,14 @@ struct rt_thread main_thread;
void main_thread_entry(void *parameter) void main_thread_entry(void *parameter)
{ {
extern int main(void); extern int main(void);
extern int $Super$$main(void);
/* RT-Thread components initialization */ /* RT-Thread components initialization */
rt_components_init(); rt_components_init();
/* invoke system main function */ /* invoke system main function */
#ifdef __CC_ARM #ifdef __CC_ARM
$Sub$$main(); $Super$$main(); /* for ARMCC. */
#else #else
main(); main();
#endif #endif
@ -183,6 +184,8 @@ void rt_application_init(void)
int rtthread_startup(void) int rtthread_startup(void)
{ {
rt_hw_interrupt_disable();
/* board level initalization /* board level initalization
* NOTE: please initialize heap inside board initialization. * NOTE: please initialize heap inside board initialization.
*/ */