Merge pull request #1793 from liruncong/am335x

修正bsp\beaglebone重新menuconfig未增加任何配置项时编译失败问题. 并增加C++编译支持
This commit is contained in:
Bernard Xiong authored and GitHub committed 2018-09-12 15:02:59 +08:00
commit e0c003deb5
7 files changed
+461 -250

No files matched your search

File diff suppressed because it is too large. Load diff
+32
View File
@@ -0,0 +1,32 @@
mainmenu "RT-Thread Configuration"
config $BSP_DIR
string
option env="BSP_ROOT"
default "."
config $RTT_DIR
string
option env="RTT_ROOT"
default "../.."
# you can change the RTT_ROOT default "../.." to your rtthread_root,
# example: default "F:/git_repositories/rt-thread"
config $PKGS_DIR
string
option env="PKGS_ROOT"
default "packages"
config $ENV_DIR
string
option env="ENV_ROOT"
default "/"
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
config RT_USING_UART1
bool "Using RT_USING_UART1"
default y
+1
View File
@@ -15,6 +15,7 @@ TARGET = 'rtthread-beaglebone.' + rtconfig.TARGET_EXT
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
CXX= rtconfig.CXX, CXXFLAGS = rtconfig.CFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
-33
View File
@@ -1,33 +0,0 @@
/*
* File : application.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2012, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
*
* Change Logs:
* Date Author Notes
* 2012-11-20 Bernard the first version
*/
#include <stdlib.h>
#include <rtthread.h>
#ifdef RT_USING_GDB
#include <gdb_stub.h>
#endif
int rt_application_init()
{
/* do component initialization */
rt_components_init();
#ifdef RT_USING_GDB
gdb_set_device("uart4");
gdb_start();
#endif
return 0;
}
+10
View File
@@ -0,0 +1,10 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
printf("hello rt-thread\n");
return 0;
}
-78
View File
@@ -1,78 +0,0 @@
/*
* File : startup.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006, RT-Thread Develop Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
*
* Change Logs:
* Date Author Notes
* 2012-12-05 Bernard the first version
* 2015-11-11 zchong support iar compiler
*/
#include <rthw.h>
#include <rtthread.h>
#include <board.h>
extern int rt_application_init(void);
#ifdef __ICCARM__
#pragma section="HEAP"
#endif
/**
* This function will startup RT-Thread RTOS.
*/
void rtthread_startup(void)
{
/* initialzie hardware interrupt */
rt_hw_interrupt_init();
/* initialize board */
rt_hw_board_init();
/* show RT-Thread version */
rt_show_version();
/* initialize memory system */
#ifdef RT_USING_HEAP
#ifdef __ICCARM__
rt_system_heap_init(__segment_end("HEAP"), (void*)0x8FFFFFFF);
#else
rt_system_heap_init(HEAP_BEGIN, HEAP_END);
#endif
#endif
/* initialize scheduler system */
rt_system_scheduler_init();
/* initialize timer */
rt_system_timer_init();
/* initialize soft timer thread */
rt_system_timer_thread_init();
/* initialize application */
rt_application_init();
/* initialize idle thread */
rt_thread_idle_init();
/* start scheduler */
rt_system_scheduler_start();
/* never reach here */
return ;
}
int main(void)
{
/* disable interrupt first */
rt_hw_interrupt_disable();
/* invoke rtthread_startup */
rtthread_startup();
return 0;
}
+125 -139
View File
File diff suppressed because it is too large. Load diff