Skip to content

Commit b8cb3c8

Browse files
authored
[BSP][novosns]更新ns800的keil模板适配
1 parent 5b5bd39 commit b8cb3c8

16 files changed

Lines changed: 53 additions & 4572 deletions

File tree

bsp/novosns/ns800/libraries/HAL_Drivers/SConscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ src = ['drv_common.c']
88
path = [cwd]
99

1010
group = SConscript(os.path.join(cwd, 'drivers', 'SConscript'))
11-
group = group + DefineGroup('HAL_Driver', src, depend = [''], CPPPATH = path)
11+
group = group + DefineGroup('HAL_Drivers', src, depend = [''], CPPPATH = path)
1212

1313
Return('group')

bsp/novosns/ns800/libraries/HAL_Drivers/drivers/SConscript

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ cwd = GetCurrentDir()
77
src = []
88
path = [cwd, cwd + '/config']
99

10-
if GetDepend(['BSP_USING_GPIO', 'RT_USING_PIN']):
10+
if GetDepend('BSP_USING_GPIO'):
1111
src += ['drv_gpio.c']
1212

13-
if GetDepend(['BSP_USING_UART', 'RT_USING_SERIAL']):
13+
if GetDepend('BSP_USING_UART'):
1414
src += ['drv_uart.c']
1515

16-
if GetDepend(['BSP_USING_CAN', 'RT_USING_CAN']):
16+
if GetDepend('BSP_USING_CAN'):
1717
src += ['drv_can.c']
1818

19-
if GetDepend(['BSP_USING_ECAP']):
19+
if GetDepend('BSP_USING_ECAP'):
2020
src += ['drv_ecap.c']
2121

2222
group = DefineGroup('HAL_Drivers', src, depend = [''], CPPPATH = path)

bsp/novosns/ns800/ns800rt7p65-nssinepad/.config

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,10 +1442,6 @@ CONFIG_PKG_NOVOSNS_SERIES_DRIVER_VER="latest"
14421442
#
14431443
# On-chip Peripheral Drivers
14441444
#
1445-
CONFIG_BOARD_CLK_CONF=y
1446-
CONFIG_SYSCLK_USE_PLL=y
1447-
CONFIG_SYSCLK_SOURCE_USE_HXTL=y
1448-
CONFIG_PLLCLK_SOURCE_USE_HXTL=y
14491445
CONFIG_BSP_USING_GPIO=y
14501446
# CONFIG_BSP_GPIO_PIN_IRQ is not set
14511447
CONFIG_BSP_USING_UART=y

bsp/novosns/ns800/ns800rt7p65-nssinepad/SConscript

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# for module compiling
22
import os
3-
Import('env')
43
from building import *
54

65
cwd = GetCurrentDir()

bsp/novosns/ns800/ns800rt7p65-nssinepad/SConstruct

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def bsp_pkg_check():
3434

3535
RegisterPreBuildingAction(bsp_pkg_check)
3636

37-
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
37+
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
3838

3939
DefaultEnvironment(tools=[])
4040
env = Environment(tools = ['mingw'],
@@ -48,7 +48,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
4848
if rtconfig.PLATFORM in ['iccarm']:
4949
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
5050
env.Replace(ARFLAGS = [''])
51-
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
51+
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
5252

5353
Export('env')
5454
Export('RTT_ROOT')

bsp/novosns/ns800/ns800rt7p65-nssinepad/board/Kconfig

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,5 @@
11
menu "On-chip Peripheral Drivers"
2-
menuconfig BOARD_CLK_CONF
3-
bool "Clock Configuration"
4-
default y
5-
if BOARD_CLK_CONF
6-
config SYSCLK_USE_PLL
7-
bool "Use PLL as system clock source"
8-
default y
9-
10-
config SYSCLK_SOURCE_USE_HXTL
11-
bool "Use High-Speed Crystal Oscillator (HXTL) as system clock source"
12-
default y
13-
depends on SYSCLK_USE_PLL
142

15-
config PLLCLK_SOURCE_USE_HXTL
16-
bool "Use High-Speed Crystal Oscillator (HXTL) as PLL clock source"
17-
default y
18-
depends on SYSCLK_USE_PLL
19-
endif
20-
213
menuconfig BSP_USING_GPIO
224
bool "Enable GPIO"
235
select RT_USING_PIN

bsp/novosns/ns800/ns800rt7p65-nssinepad/board/SConscript

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,11 @@ import os
22
from building import *
33

44
cwd = GetCurrentDir()
5+
src = ['board.c']
6+
path = [cwd]
57

6-
# add the general drivers.
7-
src = Glob('board.c')
8-
pkg_root = os.path.join(cwd, '..', 'packages', 'novosns-series', 'NS800RT7XXX')
9-
path = [
10-
cwd,
11-
os.path.join(pkg_root, 'Device', 'Inc'),
12-
os.path.join(pkg_root, 'StdDriver', 'Inc'),
13-
os.path.join(pkg_root, 'StdDriver', 'Inc', 'ti'),
14-
os.path.join(cwd, '..', 'libraries', 'HAL_Drivers'),
15-
os.path.join(cwd, '..', 'libraries', 'HAL_Drivers', 'drivers'),
16-
]
17-
18-
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
19-
list = os.listdir(cwd)
20-
for item in list:
21-
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
22-
group = group + SConscript(os.path.join(item, 'SConscript'))
8+
cppdefines = ['NS800RT7P65X', 'USE_HAL_DRIVER', 'DUAL_CORE_ENABLE=0',
9+
'SYSCLK_USE_PLL', 'SYSCLK_SOURCE_USE_HXTL', 'PLLCLK_SOURCE_USE_HXTL']
2310

11+
group = DefineGroup('Board', src, depend = [''], CPPPATH = path, CPPDEFINES = cppdefines)
2412
Return('group')

bsp/novosns/ns800/ns800rt7p65-nssinepad/board/board.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ void Switch_init (void)
138138
void Device_init(void)
139139
{
140140
System_setClock();
141-
#ifndef RT_USING_SMP
141+
#if (DUAL_CORE_ENABLE == 0)
142142
Device_enableAllPeripheralsInCpu1();
143143
#endif
144144
Device_enableAllPeripherals();

0 commit comments

Comments
 (0)