Skip to content

Commit

Permalink
[BSP] Add fh8620 bsp from Shanghai Fullhan Microelectronics Co., Ltd.
Browse files Browse the repository at this point in the history
FH8620 BSP
Copyright (c) 2016 Shanghai Fullhan Microelectronics Co., Ltd.
All rights reserved
  • Loading branch information
BernardXiong committed Apr 18, 2016
1 parent 6d03ce9 commit 43f6813
Show file tree
Hide file tree
Showing 101 changed files with 23,485 additions and 0 deletions.
14 changes: 14 additions & 0 deletions bsp/fh8620/SConscript
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')
33 changes: 33 additions & 0 deletions bsp/fh8620/SConstruct
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)
11 changes: 11 additions & 0 deletions bsp/fh8620/applications/SConscript
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')
45 changes: 45 additions & 0 deletions bsp/fh8620/applications/main.c
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;
}
9 changes: 9 additions & 0 deletions bsp/fh8620/drivers/SConscript
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')
Loading

0 comments on commit 43f6813

Please sign in to comment.