add gcc demo
This commit is contained in:
@@ -97,7 +97,7 @@
|
||||
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform.1473950114" 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.1645829934" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.builder"/>
|
||||
<builder buildPath="${workspace_loc:/demo}/Debug" id="ilg.gnumcueclipse.managedbuild.cross.riscv.builder.1645829934" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.builder"/>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.1747128168" name="GNU RISC-V Cross Assembler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler">
|
||||
|
||||
@@ -107,9 +107,9 @@
|
||||
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.include.paths.460479417" 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/TencentOS_tiny/arch/risc-v/common}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/demo/TencentOS_tiny/arch/risc-v/common/include}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/arch/risc-v/rv32i/gcc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/demo/TencentOS_tiny/arch/risc-v/rv32i/gcc}""/>
|
||||
|
||||
</option>
|
||||
|
||||
@@ -125,17 +125,17 @@
|
||||
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.include.paths.293419375" name="Include paths (-I)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/kernel/core/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/demo/TencentOS_tiny/kernel/core/include}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/kernel/pm/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/demo/TencentOS_tiny/kernel/pm/include}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/arch/risc-v/common}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/demo/TencentOS_tiny/arch/risc-v/common/include}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/arch/risc-v/rv32i/gcc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/demo/TencentOS_tiny/arch/risc-v/rv32i/gcc}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/Inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/demo/Inc}""/>
|
||||
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TOS-CONFIG}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/demo/TOS-CONFIG}""/>
|
||||
|
||||
</option>
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform.833637785" 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.1077218023" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.builder"/>
|
||||
<builder buildPath="${workspace_loc:/demo}/Release" id="ilg.gnumcueclipse.managedbuild.cross.riscv.builder.1077218023" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.builder"/>
|
||||
|
||||
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.1163339278" name="GNU RISC-V Cross Assembler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler">
|
||||
|
||||
@@ -385,7 +385,7 @@
|
||||
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
|
||||
<project id="hello_world.ilg.gnumcueclipse.managedbuild.cross.riscv.target.elf.955814930" name="Executable" projectType="ilg.gnumcueclipse.managedbuild.cross.riscv.target.elf"/>
|
||||
<project id="demo.ilg.gnumcueclipse.managedbuild.cross.riscv.target.elf.955814930" name="Executable" projectType="ilg.gnumcueclipse.managedbuild.cross.riscv.target.elf"/>
|
||||
|
||||
</storageModule>
|
||||
|
||||
@@ -417,13 +417,13 @@
|
||||
|
||||
<configuration configurationName="Debug">
|
||||
|
||||
<resource resourceType="PROJECT" workspacePath="/hello_world"/>
|
||||
<resource resourceType="PROJECT" workspacePath="/demo"/>
|
||||
|
||||
</configuration>
|
||||
|
||||
<configuration configurationName="Release">
|
||||
|
||||
<resource resourceType="PROJECT" workspacePath="/hello_world"/>
|
||||
<resource resourceType="PROJECT" workspacePath="/demo"/>
|
||||
|
||||
</configuration>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>hello_world</name>
|
||||
<name>demo</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
@@ -11,7 +11,7 @@
|
||||
|
||||
<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="1332077899269146722" 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">
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1359335743052093289" 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"/>
|
||||
|
41
board/QEMU_Spike/eclipse/demo/start.S
Normal file
41
board/QEMU_Spike/eclipse/demo/start.S
Normal file
@@ -0,0 +1,41 @@
|
||||
// See LICENSE for license details.
|
||||
|
||||
#include "riscv_encoding.h"
|
||||
|
||||
.section .text.entry
|
||||
.globl _start
|
||||
.type _start,@function
|
||||
_start:
|
||||
csrc mstatus, MSTATUS_MIE
|
||||
csrw mie, 0
|
||||
|
||||
la t0, machine_trap_entry
|
||||
csrw mtvec, t0
|
||||
|
||||
la sp, _stack_top
|
||||
|
||||
/* Load data section */
|
||||
la a0, _load_data
|
||||
la a1, _data
|
||||
la a2, _edata
|
||||
bgeu a1, a2, begin_clear_bss
|
||||
clear_data:
|
||||
lw t0, (a0)
|
||||
sw t0, (a1)
|
||||
addi a0, a0, 4
|
||||
addi a1, a1, 4
|
||||
bltu a1, a2, clear_data
|
||||
|
||||
begin_clear_bss:
|
||||
// clear bss section
|
||||
la a0, _bss
|
||||
la a1, _ebss
|
||||
bgeu a0, a1, init_finish
|
||||
clear_bss:
|
||||
sw zero, (a0)
|
||||
addi a0, a0, 4
|
||||
bltu a0, a1, clear_bss
|
||||
init_finish:
|
||||
call main
|
||||
__die:
|
||||
j __die
|
Reference in New Issue
Block a user