Merge pull request #37 from acevest/add_sipeed_longan_nano
add risc-v board Sipeed Longan Nano support
This commit is contained in:
18
board/SipeedLonganNano/BSP/Inc/mcu_init.h
Normal file
18
board/SipeedLonganNano/BSP/Inc/mcu_init.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef __MCU_INIT_H
|
||||
#define __MCU_INIT_H
|
||||
|
||||
#include "gd32vf103.h"
|
||||
#include "usart.h"
|
||||
|
||||
|
||||
#define LEDR_GPIO_PORT GPIOC
|
||||
#define LEDG_GPIO_PORT GPIOA
|
||||
#define LEDB_GPIO_PORT GPIOA
|
||||
|
||||
#define LEDR_PIN GPIO_PIN_13
|
||||
#define LEDG_PIN GPIO_PIN_1
|
||||
#define LEDB_PIN GPIO_PIN_2
|
||||
|
||||
void board_init();
|
||||
|
||||
#endif //__MCU_INIT_H
|
10
board/SipeedLonganNano/BSP/Inc/usart.h
Normal file
10
board/SipeedLonganNano/BSP/Inc/usart.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef __USART_H
|
||||
#define __USART_H
|
||||
|
||||
#define USART0_GPIO_TX_PIN GPIO_PIN_9
|
||||
#define USART0_GPIO_RX_PIN GPIO_PIN_10
|
||||
#define USART0_GPIO_PORT GPIOA
|
||||
|
||||
void usart0_init(int baud);
|
||||
|
||||
#endif // __USART_H
|
17
board/SipeedLonganNano/BSP/Src/mcu_init.c
Normal file
17
board/SipeedLonganNano/BSP/Src/mcu_init.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "mcu_init.h"
|
||||
|
||||
void board_init() {
|
||||
|
||||
SystemInit();
|
||||
|
||||
rcu_periph_clock_enable(RCU_GPIOA);
|
||||
rcu_periph_clock_enable(RCU_GPIOC);
|
||||
|
||||
gpio_init(LEDR_GPIO_PORT, GPIO_MODE_OUT_PP, GPIO_OSPEED_50MHZ, LEDR_PIN);
|
||||
gpio_init(LEDG_GPIO_PORT, GPIO_MODE_OUT_PP, GPIO_OSPEED_50MHZ, LEDG_PIN);
|
||||
gpio_init(LEDB_GPIO_PORT, GPIO_MODE_OUT_PP, GPIO_OSPEED_50MHZ, LEDB_PIN);
|
||||
|
||||
gpio_bit_set(LEDR_GPIO_PORT, LEDR_PIN);
|
||||
gpio_bit_set(LEDG_GPIO_PORT, LEDG_PIN);
|
||||
gpio_bit_set(LEDB_GPIO_PORT, LEDB_PIN);
|
||||
}
|
28
board/SipeedLonganNano/BSP/Src/usart.c
Normal file
28
board/SipeedLonganNano/BSP/Src/usart.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "gd32vf103.h"
|
||||
#include "usart.h"
|
||||
void usart0_init(int baud)
|
||||
{
|
||||
/* enable GPIO clock */
|
||||
rcu_periph_clock_enable(RCU_GPIOA);
|
||||
|
||||
/* enable USART0 clock */
|
||||
rcu_periph_clock_enable(RCU_USART0);
|
||||
|
||||
/* connect port to USART0_Tx */
|
||||
gpio_init(USART0_GPIO_PORT, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, USART0_GPIO_TX_PIN);
|
||||
|
||||
/* connect port to USART0_Rx */
|
||||
gpio_init(USART0_GPIO_PORT, GPIO_MODE_IN_FLOATING, GPIO_OSPEED_50MHZ, USART0_GPIO_RX_PIN);
|
||||
|
||||
/* USART0 configure */
|
||||
usart_deinit(USART0);
|
||||
usart_baudrate_set(USART0, baud);
|
||||
usart_word_length_set(USART0, USART_WL_8BIT);
|
||||
usart_stop_bit_set(USART0, USART_STB_1BIT);
|
||||
usart_parity_config(USART0, USART_PM_NONE);
|
||||
usart_hardware_flow_rts_config(USART0, USART_RTS_DISABLE);
|
||||
usart_hardware_flow_cts_config(USART0, USART_CTS_DISABLE);
|
||||
usart_receive_config(USART0, USART_RECEIVE_ENABLE);
|
||||
usart_transmit_config(USART0, USART_TRANSMIT_ENABLE);
|
||||
usart_enable(USART0);
|
||||
}
|
12
board/SipeedLonganNano/README.md
Normal file
12
board/SipeedLonganNano/README.md
Normal file
@@ -0,0 +1,12 @@
|
||||
#使用openocd调试
|
||||
|
||||
需要编译特定的openocd
|
||||
|
||||
|
||||
```git clone https://github.com/riscv-mcu/riscv-openocd.git```
|
||||
|
||||
如果用的是Sipeed USB-JTAG/TTL RISC-V Debugger,需要在编译的时候enable ftdi
|
||||
|
||||
```
|
||||
./configure --enable-cmsis-dap --enable-ftdi
|
||||
```
|
70
board/SipeedLonganNano/TOS_CONFIG/tos_config.h
Normal file
70
board/SipeedLonganNano/TOS_CONFIG/tos_config.h
Normal file
@@ -0,0 +1,70 @@
|
||||
#ifndef INC_TOS_CONFIG_H_
|
||||
#define INC_TOS_CONFIG_H_
|
||||
|
||||
#include "gd32vf103.h"
|
||||
#include "stddef.h"
|
||||
|
||||
// 配置TencentOS tiny默认支持的最大优先级数量
|
||||
#define TOS_CFG_TASK_PRIO_MAX 10u
|
||||
|
||||
// 配置TencentOS tiny的内核是否开启时间片轮转
|
||||
#define TOS_CFG_ROUND_ROBIN_EN 0u
|
||||
|
||||
// 配置TencentOS tiny是否校验指针合法
|
||||
#define TOS_CFG_OBJECT_VERIFY 0u
|
||||
|
||||
// TencentOS tiny 事件模块功能宏
|
||||
#define TOS_CFG_EVENT_EN 1u
|
||||
|
||||
// 配置TencentOS tiny是否开启动态内存模块
|
||||
#define TOS_CFG_MMHEAP_EN 1u
|
||||
|
||||
// 配置TencentOS tiny动态内存池大小
|
||||
#define TOS_CFG_MMHEAP_POOL_SIZE 8192
|
||||
|
||||
// 配置TencentOS tiny是否开启互斥锁模块
|
||||
#define TOS_CFG_MUTEX_EN 1u
|
||||
|
||||
// 配置TencentOS tiny是否开启队列模块
|
||||
#define TOS_CFG_QUEUE_EN 1u
|
||||
|
||||
// 配置TencentOS tiny是否开启软件定时器模块
|
||||
#define TOS_CFG_TIMER_EN 0u
|
||||
|
||||
// 配置TencentOS tiny是否开启信号量模块
|
||||
#define TOS_CFG_SEM_EN 1u
|
||||
|
||||
#define TOS_CFG_CPU_SYSTICK_PRIO 0xF
|
||||
|
||||
#if (TOS_CFG_QUEUE_EN > 0u)
|
||||
#define TOS_CFG_MSG_EN 1u
|
||||
#else
|
||||
#define TOS_CFG_MSG_EN 0u
|
||||
#endif
|
||||
|
||||
// 配置TencentOS tiny消息队列大小
|
||||
#define TOS_CFG_MSG_POOL_SIZE 10u
|
||||
|
||||
// 配置TencentOS tiny空闲任务栈大小
|
||||
#define TOS_CFG_IDLE_TASK_STK_SIZE 512u
|
||||
|
||||
// 配置TencentOS tiny中断栈大小
|
||||
#define TOS_CFG_IRQ_STK_SIZE 128u
|
||||
|
||||
// 配置TencentOS tiny的tick频率
|
||||
#define TOS_CFG_CPU_TICK_PER_SECOND 1000u
|
||||
|
||||
// 配置TencentOS tiny CPU频率
|
||||
// 除4的原因是,Bumblebee内核通过core_clk_aon四分频来更新mtime寄存器
|
||||
// 具体信息参见《Bumblebee内核简明数据手册》
|
||||
#define TOS_CFG_CPU_CLOCK (SystemCoreClock/4)
|
||||
|
||||
// 配置是否将TIMER配置成函数模式
|
||||
#define TOS_CFG_TIMER_AS_PROC 1u
|
||||
|
||||
#define TOS_CFG_VFS_EN 1u
|
||||
|
||||
#define TOS_CFG_MMBLK_EN 1u
|
||||
|
||||
|
||||
#endif /* INC_TOS_CONFIG_H_ */
|
438
board/SipeedLonganNano/eclipse/hello_world/.cproject
Normal file
438
board/SipeedLonganNano/eclipse/hello_world/.cproject
Normal file
@@ -0,0 +1,438 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
|
||||
<cconfiguration id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1626121275">
|
||||
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1626121275" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
|
||||
<externalSettings/>
|
||||
|
||||
<extensions>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
</extensions>
|
||||
|
||||
</storageModule>
|
||||
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1626121275" name="Debug" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=" parent="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug">
|
||||
|
||||
<folderInfo id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1626121275." name="/" resourcePath="">
|
||||
|
||||
<toolChain id="ilg.gnumcueclipse.managedbuild.cross.riscv.toolchain.elf.debug.8330431" name="RISC-V Cross GCC" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.toolchain.elf.debug">
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createflash.1202731164" name="Create flash image" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createflash" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createlisting.1939916912" name="Create extended listing" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createlisting" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.printsize.662073656" name="Print size" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.printsize" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level.1313552818" name="Optimization Level" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level.debug" valueType="enumerated"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.messagelength.1404627735" name="Message length (-fmessage-length=0)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.messagelength" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.signedchar.1267661089" name="'char' is signed (-fsigned-char)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.signedchar" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.functionsections.1426360736" name="Function sections (-ffunction-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.functionsections" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.datasections.759847876" name="Data sections (-fdata-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.datasections" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level.668391469" name="Debug level" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level.max" valueType="enumerated"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.format.1164967264" name="Debug format" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.format"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.name.1072740689" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.name" value="GNU MCU RISC-V GCC" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.prefix.1957750909" name="Prefix" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.prefix" value="riscv-none-embed-" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.c.1974277961" name="C compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.c" value="gcc" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.cpp.1904763105" name="C++ compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.cpp" value="g++" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.ar.1687279771" name="Archiver" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.ar" value="ar" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objcopy.990721007" name="Hex/Bin converter" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objcopy" value="objcopy" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objdump.1007157873" name="Listing generator" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objdump" value="objdump" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.size.2005273946" name="Size command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.size" value="size" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.make.817675941" name="Build command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.make" value="make" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.rm.1016789776" name="Remove command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.rm" value="rm" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.id.631765752" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.id" value="512258282" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.base.1350567922" name="Architecture" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.base" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.arch.rv32i" valueType="enumerated"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.multiply.1880868567" name="Multiply extension (RVM)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.multiply" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.atomic.456415389" name="Atomic extension (RVA)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.atomic" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.compressed.2087083466" name="Compressed extension (RVC)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.compressed" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.abi.integer.520770065" name="Integer ABI" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.abi.integer" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.abi.integer.ilp32" valueType="enumerated"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.codemodel.1599179399" name="Code model" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.codemodel" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.codemodel.default" valueType="enumerated"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.smalldatalimit.1215554700" name="Small data limit" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.smalldatalimit" value="4" valueType="string"/>
|
||||
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform.1085168581" isAbstract="false" osList="all" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform"/>
|
||||
|
||||
<builder buildPath="${workspace_loc:/hello_world}/Debug" id="ilg.gnumcueclipse.managedbuild.cross.riscv.builder.1312339984" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.builder"/>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.933880407" name="GNU RISC-V Cross Assembler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler">
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.usepreprocessor.525634082" name="Use preprocessor" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
||||
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.include.paths.334418871" name="Include paths (-I)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/Application}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/GD32VF103_Firmware_Library/RISCV/drivers}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/arch/risc-v/bumblebee}""/>
|
||||
|
||||
</option>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.asmlisting.842125273" name="Generate assembler listing (-Wa,-adhlns="$@.lst")" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.asmlisting" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
|
||||
<inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.input.1565468565" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.input"/>
|
||||
|
||||
</tool>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.578468153" name="GNU RISC-V Cross C Compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler">
|
||||
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.include.paths.1686562117" name="Include paths (-I)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
||||
|
||||
<listOptionValue builtIn="false" value="../../../TOS_CONFIG"/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/kernel/pm/include}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/kernel/hal/include}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/kernel/core/include}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/arch/risc-v/common/include}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/GD32VF103_Firmware_Library/RISCV/drivers}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/GD32VF103_Firmware_Library/GD32VF103_standard_peripheral/Include}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/GD32VF103_Firmware_Library/RISCV/stubs}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/GD32VF103_Firmware_Library/GD32VF103_standard_peripheral}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=".././"/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/arch/kernel/core/include}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/arch/risc-v/rv32i}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/arch/risc-v/bumblebee}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/kernel/evtdrv/include}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/Application/Inc}""/>
|
||||
|
||||
</option>
|
||||
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.defs.1188292994" name="Defined symbols (-D)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
||||
|
||||
<listOptionValue builtIn="false" value="USE_STDPERIPH_DRIVER"/>
|
||||
|
||||
<listOptionValue builtIn="false" value="HXTAL_VALUE=8000000"/>
|
||||
|
||||
</option>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.asmlisting.2053887505" name="Generate assembler listing (-Wa,-adhlns="$@.lst")" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.asmlisting" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
|
||||
<inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input.750717644" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input"/>
|
||||
|
||||
</tool>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.compiler.1930629688" name="GNU RISC-V Cross C++ Compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.compiler"/>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.1064763742" name="GNU RISC-V Cross C Linker" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker">
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.gcsections.153022752" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.gcsections" useByScannerDiscovery="false" value="false" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.usenewlibnano.769188653" name="Use newlib-nano (--specs=nano.specs)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.usenewlibnano" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.nostart.1138121561" name="Do not use standard start files (-nostartfiles)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.nostart" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.scriptfile.134450266" name="Script files (-T)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.scriptfile" useByScannerDiscovery="false" valueType="stringList">
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/link.lds}""/>
|
||||
|
||||
</option>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.usenewlibnosys.584568698" name="Do not use syscalls (--specs=nosys.specs)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.usenewlibnosys" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.other.328577347" name="Other linker flags" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.other" useByScannerDiscovery="false" value="" valueType="string"/>
|
||||
|
||||
<inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.input.316705344" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.input">
|
||||
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
|
||||
</inputType>
|
||||
|
||||
</tool>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.linker.42331133" name="GNU RISC-V Cross C++ Linker" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.linker">
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.cpp.linker.gcsections.399385481" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
|
||||
|
||||
</tool>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.archiver.107126240" name="GNU RISC-V Cross Archiver" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.archiver"/>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createflash.950120165" name="GNU RISC-V Cross Create Flash Image" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createflash"/>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createlisting.125062338" name="GNU RISC-V Cross Create Listing" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createlisting">
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.source.1032156266" name="Display source (--source|-S)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.source" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.allheaders.130399435" name="Display all headers (--all-headers|-x)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.allheaders" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.demangle.1410206102" name="Demangle names (--demangle|-C)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.demangle" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.linenumbers.80630986" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.linenumbers" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.wide.1257944666" name="Wide lines (--wide|-w)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.wide" value="true" valueType="boolean"/>
|
||||
|
||||
</tool>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.printsize.855604372" name="GNU RISC-V Cross Print Size" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.printsize">
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.printsize.format.545311739" name="Size format" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.printsize.format"/>
|
||||
|
||||
</tool>
|
||||
|
||||
</toolChain>
|
||||
|
||||
</folderInfo>
|
||||
|
||||
</configuration>
|
||||
|
||||
</storageModule>
|
||||
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
|
||||
<storageModule moduleId="ilg.gnumcueclipse.managedbuild.packs"/>
|
||||
|
||||
</cconfiguration>
|
||||
|
||||
<cconfiguration id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.991040509">
|
||||
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.991040509" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
|
||||
<externalSettings/>
|
||||
|
||||
<extensions>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
</extensions>
|
||||
|
||||
</storageModule>
|
||||
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.991040509" name="Release" optionalBuildProperties="" parent="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release">
|
||||
|
||||
<folderInfo id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.991040509." name="/" resourcePath="">
|
||||
|
||||
<toolChain id="ilg.gnumcueclipse.managedbuild.cross.riscv.toolchain.elf.release.475921123" name="RISC-V Cross GCC" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.toolchain.elf.release">
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createflash.2095790256" name="Create flash image" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createflash" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createlisting.496100242" name="Create extended listing" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createlisting" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.printsize.527839441" name="Print size" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.printsize" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level.1036215044" name="Optimization Level" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level.size" valueType="enumerated"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.messagelength.1566858053" name="Message length (-fmessage-length=0)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.messagelength" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.signedchar.313791122" name="'char' is signed (-fsigned-char)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.signedchar" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.functionsections.794704205" name="Function sections (-ffunction-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.functionsections" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.datasections.1897750591" name="Data sections (-fdata-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.datasections" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level.1176085190" name="Debug level" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.format.1337198600" name="Debug format" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.format"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.name.2061911006" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.name" value="GNU MCU RISC-V GCC" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.prefix.1210955802" name="Prefix" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.prefix" value="riscv-none-embed-" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.c.847078392" name="C compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.c" value="gcc" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.cpp.1611409518" name="C++ compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.cpp" value="g++" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.ar.537190966" name="Archiver" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.ar" value="ar" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objcopy.2075663864" name="Hex/Bin converter" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objcopy" value="objcopy" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objdump.718077138" name="Listing generator" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objdump" value="objdump" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.size.893508518" name="Size command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.size" value="size" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.make.374071512" name="Build command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.make" value="make" valueType="string"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.rm.1639653064" name="Remove command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.rm" value="rm" valueType="string"/>
|
||||
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform.1803353979" isAbstract="false" osList="all" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform"/>
|
||||
|
||||
<builder buildPath="${workspace_loc:/hello_world}/Release" id="ilg.gnumcueclipse.managedbuild.cross.riscv.builder.230771356" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.builder"/>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.1428729449" name="GNU RISC-V Cross Assembler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler">
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.usepreprocessor.52580663" name="Use preprocessor" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
||||
|
||||
<inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.input.1643948477" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.input"/>
|
||||
|
||||
</tool>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.552753469" name="GNU RISC-V Cross C Compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler">
|
||||
|
||||
<inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input.2138673318" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input"/>
|
||||
|
||||
</tool>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.compiler.718172304" name="GNU RISC-V Cross C++ Compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.compiler"/>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.1287109288" name="GNU RISC-V Cross C Linker" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker">
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.gcsections.1718779452" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.gcsections" value="true" valueType="boolean"/>
|
||||
|
||||
<inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.input.1022093215" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.input">
|
||||
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
|
||||
</inputType>
|
||||
|
||||
</tool>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.linker.240769017" name="GNU RISC-V Cross C++ Linker" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.linker">
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.cpp.linker.gcsections.1440099990" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
|
||||
|
||||
</tool>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.archiver.1053336007" name="GNU RISC-V Cross Archiver" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.archiver"/>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createflash.1841998771" name="GNU RISC-V Cross Create Flash Image" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createflash"/>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createlisting.544284869" name="GNU RISC-V Cross Create Listing" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createlisting">
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.source.1246759690" name="Display source (--source|-S)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.source" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.allheaders.776860234" name="Display all headers (--all-headers|-x)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.allheaders" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.demangle.573544221" name="Demangle names (--demangle|-C)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.demangle" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.linenumbers.112752514" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.linenumbers" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.wide.619039696" name="Wide lines (--wide|-w)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.wide" value="true" valueType="boolean"/>
|
||||
|
||||
</tool>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.printsize.384827639" name="GNU RISC-V Cross Print Size" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.printsize">
|
||||
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.printsize.format.1267897822" name="Size format" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.printsize.format"/>
|
||||
|
||||
</tool>
|
||||
|
||||
</toolChain>
|
||||
|
||||
</folderInfo>
|
||||
|
||||
</configuration>
|
||||
|
||||
</storageModule>
|
||||
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
|
||||
</cconfiguration>
|
||||
|
||||
</storageModule>
|
||||
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
|
||||
<project id="hello_world.ilg.gnumcueclipse.managedbuild.cross.riscv.target.elf.976385475" name="Executable" projectType="ilg.gnumcueclipse.managedbuild.cross.riscv.target.elf"/>
|
||||
|
||||
</storageModule>
|
||||
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
|
||||
<scannerConfigBuildInfo instanceId="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1626121275;ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1626121275.;ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.578468153;ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input.750717644">
|
||||
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
|
||||
</scannerConfigBuildInfo>
|
||||
|
||||
<scannerConfigBuildInfo instanceId="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.991040509;ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.991040509.;ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.552753469;ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input.2138673318">
|
||||
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
|
||||
</scannerConfigBuildInfo>
|
||||
|
||||
</storageModule>
|
||||
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
|
||||
<configuration configurationName="Debug">
|
||||
|
||||
<resource resourceType="PROJECT" workspacePath="/hello_world"/>
|
||||
|
||||
</configuration>
|
||||
|
||||
<configuration configurationName="Release">
|
||||
|
||||
<resource resourceType="PROJECT" workspacePath="/hello_world"/>
|
||||
|
||||
</configuration>
|
||||
|
||||
</storageModule>
|
||||
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
|
||||
</cproject>
|
1
board/SipeedLonganNano/eclipse/hello_world/.gitignore
vendored
Normal file
1
board/SipeedLonganNano/eclipse/hello_world/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/Debug/
|
94
board/SipeedLonganNano/eclipse/hello_world/.project
Normal file
94
board/SipeedLonganNano/eclipse/hello_world/.project
Normal file
@@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>hello_world</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>Application</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>GD32VF103_Firmware_Library</name>
|
||||
<type>2</type>
|
||||
<locationURI>$%7BPARENT-4-PROJECT_LOC%7D/platform/vendor_bsp/gd/GD32VF103_Firmware_Library</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TencentOS_tiny</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Application/Inc</name>
|
||||
<type>2</type>
|
||||
<locationURI>TOP_DIR/board/SipeedLonganNano/BSP/Inc</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Application/Src</name>
|
||||
<type>2</type>
|
||||
<locationURI>TOP_DIR/board/SipeedLonganNano/BSP/Src</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Application/tos_config.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/TOS_CONFIG/tos_config.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TencentOS_tiny/arch</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TencentOS_tiny/kernel</name>
|
||||
<type>2</type>
|
||||
<locationURI>$%7BPARENT-4-PROJECT_LOC%7D/kernel</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TencentOS_tiny/arch/risc-v</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TencentOS_tiny/arch/risc-v/bumblebee</name>
|
||||
<type>2</type>
|
||||
<locationURI>TOP_DIR/arch/risc-v/bumblebee/gcc</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TencentOS_tiny/arch/risc-v/common</name>
|
||||
<type>2</type>
|
||||
<locationURI>$%7BPARENT-4-PROJECT_LOC%7D/arch/risc-v/common</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TencentOS_tiny/arch/risc-v/rv32i</name>
|
||||
<type>2</type>
|
||||
<locationURI>TOP_DIR/arch/risc-v/rv32i/gcc</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
<variableList>
|
||||
<variable>
|
||||
<name>TOP_DIR</name>
|
||||
<value>$%7BPARENT-4-PROJECT_LOC%7D</value>
|
||||
</variable>
|
||||
</variableList>
|
||||
</projectDescription>
|
@@ -0,0 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
executable.name=openocd
|
||||
install.folder=/Users/ace/sys/gnu-mcu-eclipse/openocd/self/bin
|
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
toolchain.path.512258282=/Users/ace/sys/gnu-mcu-eclipse/riscv-none-gcc/8.2.0-2.2-20190521-0004/bin
|
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<project>
|
||||
|
||||
<configuration id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1626121275" name="Debug">
|
||||
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1331743227127997179" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
|
||||
</provider>
|
||||
|
||||
</extension>
|
||||
|
||||
</configuration>
|
||||
|
||||
<configuration id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.991040509" name="Release">
|
||||
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1317474887408019048" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
|
||||
</provider>
|
||||
|
||||
</extension>
|
||||
|
||||
</configuration>
|
||||
|
||||
</project>
|
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
|
@@ -0,0 +1,61 @@
|
||||
/*!
|
||||
\file gd32vf103_libopt.h
|
||||
\brief library optional for gd32vf103
|
||||
|
||||
\version 2019-6-5, V1.0.0, demo for GD32VF103
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright (c) 2019, GigaDevice Semiconductor Inc.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef GD32VF103_LIBOPT_H
|
||||
#define GD32VF103_LIBOPT_H
|
||||
|
||||
#include "gd32vf103_adc.h"
|
||||
#include "gd32vf103_bkp.h"
|
||||
#include "gd32vf103_can.h"
|
||||
#include "gd32vf103_crc.h"
|
||||
#include "gd32vf103_dac.h"
|
||||
#include "gd32vf103_dma.h"
|
||||
#include "gd32vf103_eclic.h"
|
||||
#include "gd32vf103_exmc.h"
|
||||
#include "gd32vf103_exti.h"
|
||||
#include "gd32vf103_fmc.h"
|
||||
#include "gd32vf103_gpio.h"
|
||||
#include "gd32vf103_i2c.h"
|
||||
#include "gd32vf103_fwdgt.h"
|
||||
#include "gd32vf103_dbg.h"
|
||||
#include "gd32vf103_pmu.h"
|
||||
#include "gd32vf103_rcu.h"
|
||||
#include "gd32vf103_rtc.h"
|
||||
#include "gd32vf103_spi.h"
|
||||
#include "gd32vf103_timer.h"
|
||||
#include "gd32vf103_usart.h"
|
||||
#include "gd32vf103_wwdgt.h"
|
||||
#include "n200_func.h"
|
||||
|
||||
#endif /* GD32VF103_LIBOPT_H */
|
175
board/SipeedLonganNano/eclipse/hello_world/link.lds
Normal file
175
board/SipeedLonganNano/eclipse/hello_world/link.lds
Normal file
@@ -0,0 +1,175 @@
|
||||
OUTPUT_ARCH( "riscv" )
|
||||
|
||||
ENTRY( _start )
|
||||
|
||||
MEMORY
|
||||
{
|
||||
/* Run in FLASH */
|
||||
flash (rxai!w) : ORIGIN = 0x08000000, LENGTH = 128k
|
||||
ram (wxa!ri) : ORIGIN = 0x20000000, LENGTH = 32K
|
||||
|
||||
/* Run in RAM */
|
||||
/* flash (rxai!w) : ORIGIN = 0x20000000, LENGTH = 24k
|
||||
ram (wxa!ri) : ORIGIN = 0x20006000, LENGTH = 8K
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
__stack_size = DEFINED(__stack_size) ? __stack_size : 2K;
|
||||
|
||||
|
||||
.init :
|
||||
{
|
||||
KEEP (*(SORT_NONE(.init)))
|
||||
} >flash AT>flash
|
||||
|
||||
.ilalign :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE( _ilm_lma = . );
|
||||
} >flash AT>flash
|
||||
|
||||
.ialign :
|
||||
{
|
||||
PROVIDE( _ilm = . );
|
||||
} >flash AT>flash
|
||||
|
||||
.text :
|
||||
{
|
||||
*(.rodata .rodata.*)
|
||||
*(.text.unlikely .text.unlikely.*)
|
||||
*(.text.startup .text.startup.*)
|
||||
*(.text .text.*)
|
||||
*(.gnu.linkonce.t.*)
|
||||
} >flash AT>flash
|
||||
|
||||
.fini :
|
||||
{
|
||||
KEEP (*(SORT_NONE(.fini)))
|
||||
} >flash AT>flash
|
||||
|
||||
. = ALIGN(4);
|
||||
|
||||
PROVIDE (__etext = .);
|
||||
PROVIDE (_etext = .);/*0x80022c8*/
|
||||
PROVIDE (etext = .);/*0x80022c8*/
|
||||
PROVIDE( _eilm = . );
|
||||
|
||||
.preinit_array :
|
||||
{
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
KEEP (*(.preinit_array))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
} >flash AT>flash
|
||||
|
||||
.init_array :
|
||||
{
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
|
||||
KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
} >flash AT>flash
|
||||
|
||||
.fini_array :
|
||||
{
|
||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||
KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
|
||||
KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
} >flash AT>flash
|
||||
|
||||
.ctors :
|
||||
{
|
||||
/* gcc uses crtbegin.o to find the start of
|
||||
the constructors, so we make sure it is
|
||||
first. Because this is a wildcard, it
|
||||
doesn't matter if the user does not
|
||||
actually link against crtbegin.o; the
|
||||
linker won't look for a file to match a
|
||||
wildcard. The wildcard also means that it
|
||||
doesn't matter which directory crtbegin.o
|
||||
is in. */
|
||||
KEEP (*crtbegin.o(.ctors))
|
||||
KEEP (*crtbegin?.o(.ctors))
|
||||
/* We don't want to include the .ctor section from
|
||||
the crtend.o file until after the sorted ctors.
|
||||
The .ctor section from the crtend file contains the
|
||||
end of ctors marker and it must be last */
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
|
||||
KEEP (*(SORT(.ctors.*)))
|
||||
KEEP (*(.ctors))
|
||||
} >flash AT>flash
|
||||
|
||||
.dtors :
|
||||
{
|
||||
KEEP (*crtbegin.o(.dtors))
|
||||
KEEP (*crtbegin?.o(.dtors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
|
||||
KEEP (*(SORT(.dtors.*)))
|
||||
KEEP (*(.dtors))
|
||||
} >flash AT>flash
|
||||
|
||||
. = ALIGN(4);
|
||||
PROVIDE( _eilm = . );
|
||||
|
||||
.lalign :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE( _data_lma = . );
|
||||
} >flash AT>flash
|
||||
|
||||
.dalign :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE( _data = . );
|
||||
} >ram AT>flash
|
||||
|
||||
|
||||
.data :
|
||||
{
|
||||
*(.rdata)
|
||||
|
||||
*(.gnu.linkonce.r.*)
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
. = ALIGN(8);
|
||||
PROVIDE( __global_pointer$ = . + 0x800);
|
||||
*(.sdata .sdata.*)
|
||||
*(.gnu.linkonce.s.*)
|
||||
. = ALIGN(8);
|
||||
*(.srodata.cst16)
|
||||
*(.srodata.cst8)
|
||||
*(.srodata.cst4)
|
||||
*(.srodata.cst2)
|
||||
*(.srodata .srodata.*)
|
||||
} >ram AT>flash
|
||||
|
||||
. = ALIGN(4);
|
||||
PROVIDE( _edata = . );
|
||||
PROVIDE( edata = . );
|
||||
|
||||
PROVIDE( _fbss = . ); /*0X200052A0 0X200002A0*/
|
||||
PROVIDE( __bss_start = . );
|
||||
.bss :
|
||||
{
|
||||
*(.sbss*)
|
||||
*(.gnu.linkonce.sb.*)
|
||||
*(.bss .bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
} >ram AT>ram
|
||||
|
||||
. = ALIGN(8);
|
||||
PROVIDE( _end = . ); /*0X2000,0340*/
|
||||
PROVIDE( end = . );
|
||||
|
||||
.stack ORIGIN(ram) + LENGTH(ram) - __stack_size :
|
||||
{
|
||||
PROVIDE( _heap_end = . );
|
||||
. = __stack_size;
|
||||
PROVIDE( _sp = . );
|
||||
} >ram AT>ram
|
||||
}
|
83
board/SipeedLonganNano/eclipse/hello_world/main.c
Normal file
83
board/SipeedLonganNano/eclipse/hello_world/main.c
Normal file
@@ -0,0 +1,83 @@
|
||||
#include "mcu_init.h"
|
||||
#include "tos.h"
|
||||
|
||||
#define TASK_SIZE 1024
|
||||
k_task_t k_task_task1;
|
||||
k_task_t k_task_task2;
|
||||
uint8_t k_task1_stk[TASK_SIZE];
|
||||
uint8_t k_task2_stk[TASK_SIZE];
|
||||
|
||||
int share = 0xCBA7F9;
|
||||
k_sem_t sem;
|
||||
|
||||
typedef struct {
|
||||
int port;
|
||||
int pin;
|
||||
} Led_t;
|
||||
|
||||
Led_t leds[] = {
|
||||
{ LEDR_GPIO_PORT, LEDR_PIN },
|
||||
{ LEDG_GPIO_PORT, LEDG_PIN },
|
||||
{ LEDB_GPIO_PORT, LEDB_PIN }
|
||||
};
|
||||
|
||||
void task1(void *pdata)
|
||||
{
|
||||
int task_cnt1 = 0;
|
||||
while (1) {
|
||||
printf("hello world from %s cnt: %d\n", __func__, task_cnt1++);
|
||||
tos_sem_pend(&sem, ~0U);
|
||||
|
||||
for(int i=0; i<sizeof(leds)/sizeof(Led_t); i++) {
|
||||
int on = !(task_cnt1 & (1 << i));
|
||||
gpio_bit_write(leds[i].port, leds[i].pin, on);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void task2(void *pdata)
|
||||
{
|
||||
int task_cnt2 = 0;
|
||||
while (1) {
|
||||
share++;
|
||||
for(int i=0; i<5; i++) {
|
||||
printf("hello world from %s cnt: %08x\n", __func__, task_cnt2--);
|
||||
tos_task_delay(200);
|
||||
}
|
||||
tos_sem_post(&sem);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void main(void) {
|
||||
board_init();
|
||||
|
||||
usart0_init(115200);
|
||||
|
||||
tos_knl_init();
|
||||
|
||||
tos_task_create(&k_task_task1, "task1", task1, NULL, 3, k_task1_stk, TASK_SIZE, 0);
|
||||
tos_task_create(&k_task_task2, "task2", task2, NULL, 3, k_task2_stk, TASK_SIZE, 0);
|
||||
|
||||
k_err_t err = tos_sem_create(&sem, 1);
|
||||
if (err != K_ERR_NONE) {
|
||||
goto die;
|
||||
}
|
||||
|
||||
tos_knl_start();
|
||||
|
||||
die:
|
||||
while (1) {
|
||||
asm("wfi;");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int _put_char(int ch)
|
||||
{
|
||||
usart_data_transmit(USART0, (uint8_t) ch );
|
||||
while (usart_flag_get(USART0, USART_FLAG_TBE)== RESET){
|
||||
}
|
||||
|
||||
return ch;
|
||||
}
|
39
board/SipeedLonganNano/openocd_sipeed_rv_debugger.cfg
Normal file
39
board/SipeedLonganNano/openocd_sipeed_rv_debugger.cfg
Normal file
@@ -0,0 +1,39 @@
|
||||
adapter_khz 1000
|
||||
|
||||
interface ftdi
|
||||
ftdi_device_desc "Dual RS232"
|
||||
ftdi_vid_pid 0x0403 0x6010
|
||||
|
||||
#autoexit true
|
||||
|
||||
#interface cmsis-dap
|
||||
transport select jtag
|
||||
ftdi_layout_init 0x0008 0x001b
|
||||
ftdi_layout_signal nSRST -oe 0x0020 -data 0x0020
|
||||
|
||||
#Reset Stretcher logic on FE310 is ~1 second long
|
||||
#This doesn't apply if you use
|
||||
# ftdi_set_signal, but still good to document
|
||||
#adapter_nsrst_delay 1500
|
||||
|
||||
set _CHIPNAME riscv
|
||||
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x1e200a6d
|
||||
|
||||
set _TARGETNAME $_CHIPNAME.cpu
|
||||
target create $_TARGETNAME riscv -chain-position $_TARGETNAME
|
||||
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 10000 -work-area-backup 1
|
||||
|
||||
set _FLASHNAME $_CHIPNAME.flash
|
||||
flash bank $_FLASHNAME gd32vf103 0x08000000 0 0 0 $_TARGETNAME
|
||||
|
||||
riscv expose_csrs 3040-3071
|
||||
|
||||
init
|
||||
#reset
|
||||
#if {[ info exists pulse_srst]} {
|
||||
# ftdi_set_signal nSRST 0
|
||||
# ftdi_set_signal nSRST z
|
||||
#}
|
||||
halt
|
||||
# We must turn on this because otherwise the IDE version debug cannot download the program into flash
|
||||
#flash protect 0 0 last off
|
Reference in New Issue
Block a user