forked from RT-Thread/rt-thread
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BSP] Add fh8620 bsp from Shanghai Fullhan Microelectronics Co., Ltd.
FH8620 BSP Copyright (c) 2016 Shanghai Fullhan Microelectronics Co., Ltd. All rights reserved
- Loading branch information
1 parent
6d03ce9
commit 43f6813
Showing
101 changed files
with
23,485 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# for module compiling | ||
import os | ||
Import('RTT_ROOT') | ||
|
||
cwd = str(Dir('#')) | ||
objs = [] | ||
list = os.listdir(cwd) | ||
|
||
for d in list: | ||
path = os.path.join(cwd, d) | ||
if os.path.isfile(os.path.join(path, 'SConscript')): | ||
objs = objs + SConscript(os.path.join(d, 'SConscript')) | ||
|
||
Return('objs') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import os | ||
import sys | ||
import rtconfig | ||
|
||
if os.getenv('RTT_ROOT'): | ||
RTT_ROOT = os.getenv('RTT_ROOT') | ||
else: | ||
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') | ||
|
||
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] | ||
from building import * | ||
|
||
TARGET = rtconfig.OUTPUT_NAME + rtconfig.TARGET_EXT | ||
|
||
# add rtconfig.h path to the assembler | ||
rtconfig.AFLAGS += ' -I' + str(Dir('#')) +' -I' + RTT_ROOT + '/libcpu/arm/armv6' | ||
|
||
env = Environment(tools = ['mingw'], | ||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, | ||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS, | ||
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS, | ||
AR = rtconfig.AR, ARFLAGS = '-rc', | ||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) | ||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) | ||
|
||
Export('RTT_ROOT') | ||
Export('rtconfig') | ||
|
||
# prepare building environment | ||
objs = PrepareBuilding(env, RTT_ROOT) | ||
|
||
# make a building | ||
DoBuilding(TARGET, objs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import rtconfig | ||
Import('RTT_ROOT') | ||
from building import * | ||
|
||
cwd = GetCurrentDir() | ||
src = Glob('*.c') | ||
|
||
CPPPATH = [cwd, str(Dir('#'))] | ||
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) | ||
|
||
Return('group') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* This file is part of FH8620 BSP for RT-Thread distribution. | ||
* | ||
* Copyright (c) 2016 Shanghai Fullhan Microelectronics Co., Ltd. | ||
* All rights reserved | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along | ||
* with this program; if not, write to the Free Software Foundation, Inc., | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
* | ||
* Visit http://www.fullhan.com to get contact with Fullhan. | ||
* | ||
* Change Logs: | ||
* Date Author Notes | ||
*/ | ||
#include <rtthread.h> | ||
#include <components.h> | ||
|
||
void init_thread(void *parameter) | ||
{ | ||
rt_components_init(); | ||
|
||
return ; | ||
} | ||
|
||
int rt_application_init(void) | ||
{ | ||
rt_thread_t tid; | ||
|
||
tid = rt_thread_create("init", init_thread, RT_NULL, | ||
4096, RT_THREAD_PRIORITY_MAX/3, 20); | ||
if (tid) rt_thread_startup(tid); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from building import * | ||
|
||
cwd = GetCurrentDir() | ||
src = Glob('*.c') | ||
CPPPATH = [cwd] | ||
|
||
group = DefineGroup('drivers', src, depend = [''], CPPPATH = CPPPATH) | ||
|
||
Return('group') |
Oops, something went wrong.