Merge pull request #4394 from supperthomas/ci_test

[bsp/max32660] 添加GCC编译环境和去掉Keil的microlib选项
This commit is contained in:
Bernard Xiong 2021-02-28 20:24:59 +08:00 committed by GitHub
commit b087b2d9b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 10807 additions and 53 deletions

View File

@ -0,0 +1 @@
[]

View File

@ -0,0 +1 @@
[]

View File

@ -0,0 +1,24 @@
{
// 使 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"
},
]
}

View File

@ -0,0 +1,39 @@
{
// 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
}
},
]
}

View 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"
```
## 联系人信息

View File

@ -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");
}
}

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -117,26 +117,6 @@
<pMon>BIN\CMSIS_AGDI.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMRTXEVENTFLAGS</Key>
<Name>-L70 -Z18 -C0 -M0 -T1</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMDBGFLAGS</Key>
<Name></Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
<Name></Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>CMSIS_AGDI</Key>
@ -155,12 +135,12 @@
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<aLwin>1</aLwin>
<aLwin>0</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
<viewmode>0</viewmode>
<vrSel>0</vrSel>
<aSym>0</aSym>
<aTbox>0</aTbox>
@ -223,7 +203,7 @@
<Group>
<GroupName>CPU</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@ -291,7 +271,7 @@
<Group>
<GroupName>DeviceDrivers</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@ -407,7 +387,7 @@
<Group>
<GroupName>Drivers</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@ -463,7 +443,7 @@
<Group>
<GroupName>finsh</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@ -507,7 +487,7 @@
<Group>
<GroupName>Kernel</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>

View File

@ -188,7 +188,7 @@
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
<useUlib>1</useUlib>
<useUlib>0</useUlib>
<EndSel>0</EndSel>
<uLtcg>0</uLtcg>
<nSecure>0</nSecure>

View File

@ -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'

View File

@ -188,7 +188,7 @@
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
<useUlib>1</useUlib>
<useUlib>0</useUlib>
<EndSel>0</EndSel>
<uLtcg>0</uLtcg>
<nSecure>0</nSecure>

View File

@ -223,7 +223,7 @@ Reset_Handler:
blx r0
/* Transfer control to users main program */
ldr r0, =main
ldr r0, =entry
blx r0
.SPIN:

View File

@ -95,6 +95,9 @@ __weak void SystemCoreClockUpdate(void)
__weak int PreInit(void)
{
/* Do nothing */
#if defined ( __CC_ARM )
SystemInit();
#endif
return 0;
}
@ -145,23 +148,23 @@ __weak void SystemInit(void)
Board_Init();
}
#if defined ( __CC_ARM )
/* Global variable initialization does not occur until post scatterload in Keil tools.*/
//#if defined ( __CC_ARM )
///* Global variable initialization does not occur until post scatterload in Keil tools.*/
/* External function called after our post scatterload function implementation. */
extern void $Super$$__main_after_scatterload(void);
///* External function called after our post scatterload function implementation. */
//extern void $Super$$__main_after_scatterload(void);
/**
* @brief Initialization function for SystemCoreClock and Board_Init.
* @details $Sub$$__main_after_scatterload is called during system startup in the Keil
* toolset. Global variable and static variable space must be set up by the compiler
* prior to using these memory spaces. Setting up the SystemCoreClock and Board_Init
* require global memory for variable storage and are called from this function in
* the Keil tool chain.
*/
void $Sub$$__main_after_scatterload(void)
{
SystemInit();
$Super$$__main_after_scatterload();
}
#endif /* __CC_ARM */
///**
// * @brief Initialization function for SystemCoreClock and Board_Init.
// * @details $Sub$$__main_after_scatterload is called during system startup in the Keil
// * toolset. Global variable and static variable space must be set up by the compiler
// * prior to using these memory spaces. Setting up the SystemCoreClock and Board_Init
// * require global memory for variable storage and are called from this function in
// * the Keil tool chain.
// */
//void $Sub$$__main_after_scatterload(void)
//{
// SystemInit();
// $Super$$__main_after_scatterload();
//}
//#endif /* __CC_ARM */