Skip to content

Commit b087b2d

Browse files
authored
Merge pull request #4394 from supperthomas/ci_test
[bsp/max32660] 添加GCC编译环境和去掉Keil的microlib选项
2 parents 307671e + db61c0d commit b087b2d

File tree

14 files changed

+10809
-55
lines changed

14 files changed

+10809
-55
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
// 使用 IntelliSense 了解相关属性。
3+
// 悬停以查看现有属性的描述。
4+
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"cwd": "${workspaceRoot}",
9+
"executable": "rt-thread.elf",
10+
"name": "Debug MAX",
11+
"request": "launch",
12+
"type": "cortex-debug",
13+
"servertype": "openocd",
14+
"interface": "swd",
15+
"svdFile": "max32660.svd",
16+
"configFiles": [
17+
"interface/cmsis-dap.cfg",
18+
"target/max32660.cfg"
19+
],
20+
"runToMain": true,
21+
//"preLaunchTask": "build"
22+
},
23+
]
24+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "build",
8+
"type": "shell",
9+
"command": "scons",
10+
"problemMatcher": [
11+
"$gcc"
12+
],
13+
"presentation": {
14+
"echo": true,
15+
"reveal": "always",
16+
"focus": true,
17+
"panel": "shared",
18+
"showReuseMessage": true
19+
},
20+
"group": {
21+
"kind": "build",
22+
"isDefault": true
23+
}
24+
},
25+
{
26+
"label": "clean",
27+
"type": "shell",
28+
"command": "scons -c",
29+
"problemMatcher": [],
30+
"presentation": {
31+
"echo": true,
32+
"reveal": "always",
33+
"focus": true,
34+
"panel": "shared",
35+
"showReuseMessage": true
36+
}
37+
},
38+
]
39+
}

bsp/maxim/MAX32660_EVSYS/README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,39 @@ MAX32660-EVSYS开发板常用 **板载资源** 如下:
9292

9393
2. 输入`menuconfig`命令配置工程,配置好之后保存退出。
9494

95-
4. 输入`scons --target=mdk4/mdk5/iar` 命令重新生成工程
95+
4. 输入`scons --target=mdk5/vsc命令重新生成工程
9696

9797
## 注意事项
9898

99-
目前仅支持keil5环境
99+
目前支持keil和GCC环境
100+
101+
102+
103+
## FAQ
104+
105+
### GCC环境如何调试使用
106+
107+
第一步,需要配置arm-none-eabi-gcc路径到系統环境变量中去或者在rtconfig.py中EXEC_PATH 修改路径
108+
109+
第二步,添加openocd的路径,如果你安装了eclipse,添加以下路径到系统环境变量中
110+
111+
`C:\Maxim\Toolchain\bin`
112+
113+
完成这两部就可以用vscode打开bsp目录了。
114+
115+
快捷键ctrl+shift+b可以执行scons编译命令
116+
117+
快捷键F5可以进入调试命令
118+
119+
如果需要调试之前执行build命令,在luanch.json里面打开注释
120+
121+
```
122+
//"preLaunchTask": "build"
123+
```
124+
125+
126+
127+
100128

101129
## 联系人信息
102130

bsp/maxim/MAX32660_EVSYS/board/board.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void rt_hw_systick_init(void)
4040

4141
if (error != E_NO_ERROR)
4242
{
43-
printf("ERROR: Ticks is not valid");
43+
rt_kprintf("ERROR: Ticks is not valid");
4444
}
4545
}
4646

bsp/maxim/MAX32660_EVSYS/board/linker_scripts/link.lds

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,33 @@ SECTIONS {
1919

2020
/* C++ Exception handling */
2121
KEEP(*(.eh_frame*))
22+
23+
/* section information for finsh shell */
24+
. = ALIGN(4);
25+
__fsymtab_start = .;
26+
KEEP(*(FSymTab))
27+
__fsymtab_end = .;
28+
29+
. = ALIGN(4);
30+
__vsymtab_start = .;
31+
KEEP(*(VSymTab))
32+
__vsymtab_end = .;
33+
34+
/* section information for initial. */
35+
. = ALIGN(4);
36+
__rt_init_start = .;
37+
KEEP(*(SORT(.rti_fn*)))
38+
__rt_init_end = .;
39+
40+
. = ALIGN(4);
41+
42+
PROVIDE(__ctors_start__ = .);
43+
KEEP (*(SORT(.init_array.*)))
44+
KEEP (*(.init_array))
45+
PROVIDE(__ctors_end__ = .);
46+
47+
. = ALIGN(4);
48+
2249
_etext = .;
2350
} > FLASH
2451

0 commit comments

Comments
 (0)