Skip to content

Commit 98c996e

Browse files
committed
Add i.MX91 SDK, Fix compile errors
1 parent ac5ba18 commit 98c996e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+155327
-250
lines changed

bsp/nxp/imx/imx91/.config

Lines changed: 421 additions & 51 deletions
Large diffs are not rendered by default.

bsp/nxp/imx/imx91/Kconfig

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,23 @@ RTT_DIR := ../../../..
66

77
PKGS_DIR := packages
88

9+
source "$(RTT_DIR)/Kconfig"
10+
osource "$PKGS_DIR/Kconfig"
11+
912
config BOARD_IMX91
1013
bool
1114
select ARCH_ARM_CORTEX_A55
1215
select RT_USING_GIC_V2
1316
default y
1417

15-
source "$(RTT_DIR)/Kconfig"
16-
osource "$PKGS_DIR/Kconfig"
17-
18-
source "$(BSP_DIR)/drivers/Kconfig"
19-
2018
config SOC_MIMX91X1D
2119
bool
20+
select ARCH_ARMV8
21+
select ARCH_CPU_64BIT
22+
select RT_USING_CACHE
2223
select RT_USING_COMPONENTS_INIT
2324
select RT_USING_USER_MAIN
25+
select ARCH_ARM_BOOTWITH_FLUSH_CACHE
2426
default y
27+
28+
source "$(BSP_DIR)/drivers/Kconfig"

bsp/nxp/imx/imx91/SConscript

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# for module compiling
22
import os
3-
Import('RTT_ROOT')
3+
from building import *
44

5-
cwd = str(Dir('#'))
5+
cwd = GetCurrentDir()
66
objs = []
77
list = os.listdir(cwd)
88

bsp/nxp/imx/imx91/SConstruct

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,6 @@ else:
1010
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
1111
from building import *
1212

13-
def bsp_pkg_check():
14-
import subprocess
15-
16-
check_paths = [
17-
os.path.join("packages", "nxp-imx91-sdk-latest"),
18-
]
19-
20-
need_update = not all(os.path.exists(p) for p in check_paths)
21-
22-
if need_update:
23-
print("\n==============================================================")
24-
print("Dependency packages missing, please running 'pkgs --update'...")
25-
print("==============================================================")
26-
exit(1)
27-
28-
RegisterPreBuildingAction(bsp_pkg_check)
29-
3013
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
3114

3215
DefaultEnvironment(tools=[])
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
from building import *
2-
import os
32

4-
cwd = GetCurrentDir()
5-
src = Glob('*.c')
3+
cwd = GetCurrentDir()
4+
src = Glob('*.c') + Glob('*.cpp')
65
CPPPATH = [cwd]
76

87
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
98

10-
list = os.listdir(cwd)
11-
for item in list:
12-
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
13-
group = group + SConscript(os.path.join(item, 'SConscript'))
14-
159
Return('group')

bsp/nxp/imx/imx91/applications/application.c

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) 2006-2022, RT-Thread Development Team
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2017-5-30 Bernard the first version
9+
*/
10+
11+
#include <rtthread.h>
12+
13+
int main(int argc, char** argv)
14+
{
15+
rt_kprintf("Hi, this is RT-Thread!!\n");
16+
17+
return 0;
18+
}

bsp/nxp/imx/imx91/applications/startup.c

Lines changed: 0 additions & 70 deletions
This file was deleted.
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
from building import *
22

33
cwd = GetCurrentDir()
4-
src = Glob('*.c') + Glob('iomux/*.c')
4+
# src = Glob('*.c') + Glob('iomux/*.c')
5+
src = []
56

67
CPPPATH = [cwd, cwd + '/iomux']
78

8-
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
9+
objs = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
910

10-
Return('group')
11+
for item in os.listdir(cwd):
12+
sconsfile = os.path.join(cwd, item, 'SConscript')
13+
if os.path.isfile(sconsfile):
14+
objs = objs + SConscript(sconsfile)
15+
16+
Return('objs')

bsp/nxp/imx/imx91/drivers/board.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313

1414
#include <registers.h>
1515
#include <irq_numbers.h>
16-
#include "imx91.h"
1716

18-
#define CONFIG_MX6
19-
#define CONFIG_MX6UL
17+
#include "imx91.h"
18+
#include "rtconfig.h"
2019

2120
#if defined(__CC_ARM)
2221
extern int Image$$RW_IRAM1$$ZI$$Limit;

0 commit comments

Comments
 (0)