提交 bc133b83 编写于 作者: Thomas_Fly's avatar Thomas_Fly

[bsp/max32660] add the gcc and vscode environment

上级 b19e71e1
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"cwd": "${workspaceRoot}",
"executable": "rt-thread.elf",
"name": "Debug MAX",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
"interface": "swd",
"svdFile": "max32660.svd",
"configFiles": [
"interface/cmsis-dap.cfg",
"target/max32660.cfg"
],
"runToMain": true,
//"preLaunchTask": "build"
},
]
}
\ No newline at end of file
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "scons",
"problemMatcher": [
"$gcc"
],
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": true
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "clean",
"type": "shell",
"command": "scons -c",
"problemMatcher": [],
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": true
}
},
]
}
\ No newline at end of file
......@@ -92,11 +92,39 @@ MAX32660-EVSYS开发板常用 **板载资源** 如下:
2. 输入`menuconfig`命令配置工程,配置好之后保存退出。
4. 输入`scons --target=mdk4/mdk5/iar` 命令重新生成工程。
4. 输入`scons --target=mdk5/vsc命令重新生成工程。
## 注意事项
目前仅支持keil5环境
目前支持keil和GCC环境
## FAQ
### GCC环境如何调试使用
第一步,需要配置arm-none-eabi-gcc路径到系統环境变量中去或者在rtconfig.py中EXEC_PATH 修改路径
第二步,添加openocd的路径,如果你安装了eclipse,添加以下路径到系统环境变量中
`C:\Maxim\Toolchain\bin`
完成这两部就可以用vscode打开bsp目录了。
快捷键ctrl+shift+b可以执行scons编译命令
快捷键F5可以进入调试命令
如果需要调试之前执行build命令,在luanch.json里面打开注释
```
//"preLaunchTask": "build"
```
## 联系人信息
......
......@@ -40,7 +40,7 @@ void rt_hw_systick_init(void)
if (error != E_NO_ERROR)
{
printf("ERROR: Ticks is not valid");
rt_kprintf("ERROR: Ticks is not valid");
}
}
......
......@@ -19,6 +19,33 @@ SECTIONS {
/* C++ Exception handling */
KEEP(*(.eh_frame*))
/* section information for finsh shell */
. = ALIGN(4);
__fsymtab_start = .;
KEEP(*(FSymTab))
__fsymtab_end = .;
. = ALIGN(4);
__vsymtab_start = .;
KEEP(*(VSymTab))
__vsymtab_end = .;
/* section information for initial. */
. = ALIGN(4);
__rt_init_start = .;
KEEP(*(SORT(.rti_fn*)))
__rt_init_end = .;
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
} > FLASH
......
此差异已折叠。
......@@ -13,7 +13,7 @@ if os.getenv('RTT_CC'):
if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc'
EXEC_PATH = r'C:\Users\XXYYZZ'
EXEC_PATH = r'.'
elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc'
EXEC_PATH = 'C:/Keil_v5'
......@@ -34,13 +34,14 @@ if PLATFORM == 'gcc':
CC = PREFIX + 'gcc'
AS = PREFIX + 'gcc'
AR = PREFIX + 'ar'
CXX = PREFIX + 'g++'
LINK = PREFIX + 'gcc'
TARGET_EXT = 'elf'
SIZE = PREFIX + 'size'
OBJDUMP = PREFIX + 'objdump'
OBJCPY = PREFIX + 'objcopy'
DEVICE = ' -mcpu=cortex-m4 -mthumb -ffunction-sections -fdata-sections'
DEVICE = ' -mcpu=cortex-m4 -mthumb'
CFLAGS = DEVICE
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
......
......@@ -223,7 +223,7 @@ Reset_Handler:
blx r0
/* Transfer control to users main program */
ldr r0, =main
ldr r0, =entry
blx r0
.SPIN:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册