summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bsp/xuantie/smartl/e906/board/SConscript17
-rw-r--r--bsp/xuantie/smartl/e906/template.cdkproj250
-rw-r--r--bsp/xuantie/smartl/e906/template.cdkws11
-rw-r--r--bsp/xuantie/smartl/e906/utilities/gdb.init6
-rw-r--r--tools/targets/cdk.py5
5 files changed, 287 insertions, 2 deletions
diff --git a/bsp/xuantie/smartl/e906/board/SConscript b/bsp/xuantie/smartl/e906/board/SConscript
index d9603bd08e..7e7b944703 100644
--- a/bsp/xuantie/smartl/e906/board/SConscript
+++ b/bsp/xuantie/smartl/e906/board/SConscript
@@ -11,5 +11,20 @@ src = ['board.c']
path = [cwd]
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
+# CPPDEFINES = ['CONFIG_KERNEL_RTTHREAD=1', 'RT_USING_LIBC']
+CPPDEFINES = [
+ 'CONFIG_KERNEL_RTTHREAD=1'
+ ,'__RT_KERNEL_SOURCE__=1'
+ ,'CONFIG_CSI_V2=1 '
+ ,'CONFIG_CSI="csi2" '
+ ,'CONFIG_SUPPORT_TSPEND=0 '
+ ,'CONFIG_SUPPORT_IRQ_NESTED=0 '
+ ,'CONFIG_XIP=1 '
+ ,'CONFIG_ARCH_MAINSTACK=4096 '
+ ,'CONFIG_ARCH_INTERRUPTSTACK=4096 '
+ ,'CONFIG_BOARD_SMARTL_EVB=1 '
+ ,'CLI_CONFIG_STACK_SIZE=4096 '
+ ,'CONFIG_CPU_XUANTIE_E906FD=1 '
+]
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')
diff --git a/bsp/xuantie/smartl/e906/template.cdkproj b/bsp/xuantie/smartl/e906/template.cdkproj
new file mode 100644
index 0000000000..b03a7efe44
--- /dev/null
+++ b/bsp/xuantie/smartl/e906/template.cdkproj
@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Project Name="xuantie_rtthread" Version="1" Language="C">
+ <Description/>
+ <Dependencies Name="Debug"/>
+ <VendorInfo>
+ <VendorName>new_psf_project_SmartL_E906FD-R2S2(V1.7.9)</VendorName>
+ </VendorInfo>
+ <ToolsConfig>
+ <Compiler>
+ <Name>XTGccElfNewlib</Name>
+ <Version>latest</Version>
+ </Compiler>
+ </ToolsConfig>
+ <DebugSessions>
+ <watchExpressions/>
+ <memoryExpressions>;;;</memoryExpressions>
+ <statistics>;;MHZ</statistics>
+ <peripheralTabs/>
+ <WatchDisplayFormat/>
+ <LocalDisplayFormat/>
+ <debugLayout/>
+ <memoryTabColSizeExpressions/>
+ <QuickWatchDisplayFormat/>
+ </DebugSessions>
+ <BuildConfigs>
+ <BuildConfig Name="BuildSet">
+ <Target>
+ <ROMBank Selected="1">
+ <ROM1>
+ <InUse>no</InUse>
+ <Start/>
+ <Size/>
+ </ROM1>
+ <ROM2>
+ <InUse>no</InUse>
+ <Start/>
+ <Size/>
+ </ROM2>
+ <ROM3>
+ <InUse>no</InUse>
+ <Start/>
+ <Size/>
+ </ROM3>
+ <ROM4>
+ <InUse>no</InUse>
+ <Start/>
+ <Size/>
+ </ROM4>
+ <ROM5>
+ <InUse>no</InUse>
+ <Start/>
+ <Size/>
+ </ROM5>
+ </ROMBank>
+ <RAMBank>
+ <RAM1>
+ <InUse>no</InUse>
+ <Start/>
+ <Size/>
+ <Init>yes</Init>
+ </RAM1>
+ <RAM2>
+ <InUse>no</InUse>
+ <Start/>
+ <Size/>
+ <Init>yes</Init>
+ </RAM2>
+ <RAM3>
+ <InUse>no</InUse>
+ <Start/>
+ <Size/>
+ <Init>yes</Init>
+ </RAM3>
+ <RAM4>
+ <InUse>no</InUse>
+ <Start/>
+ <Size/>
+ <Init>yes</Init>
+ </RAM4>
+ <RAM5>
+ <InUse>no</InUse>
+ <Start/>
+ <Size/>
+ <Init>yes</Init>
+ </RAM5>
+ </RAMBank>
+ <CPU>e906fd</CPU>
+ <UseMiniLib>yes</UseMiniLib>
+ <Endian>little</Endian>
+ <UseHardFloat>no</UseHardFloat>
+ <UseEnhancedLRW>no</UseEnhancedLRW>
+ <UseContinueBuild>no</UseContinueBuild>
+ <ToolchainID/>
+ <ToolchainVersion/>
+ <UseSemiHost>no</UseSemiHost>
+ </Target>
+ <Output>
+ <OutputName>$(ProjectName)</OutputName>
+ <Type>Executable</Type>
+ <CreateHexFile>no</CreateHexFile>
+ <CreateBinFile>no</CreateBinFile>
+ <Preprocessor>no</Preprocessor>
+ <Disassmeble>yes</Disassmeble>
+ <CallGraph>no</CallGraph>
+ <Map>no</Map>
+ </Output>
+ <User>
+ <BeforeCompile>
+ <RunUserProg>no</RunUserProg>
+ <UserProgName/>
+ <IsBatchScript>no</IsBatchScript>
+ </BeforeCompile>
+ <BeforeMake>
+ <RunUserProg>no</RunUserProg>
+ <UserProgName/>
+ <IsBatchScript>no</IsBatchScript>
+ </BeforeMake>
+ <AfterMake>
+ <RunUserProg>no</RunUserProg>
+ <UserProgName/>
+ <IsBatchScript>no</IsBatchScript>
+ </AfterMake>
+ <Tools/>
+ </User>
+ <Compiler>
+ <Define/>
+ <Undefine/>
+ <Optim>Optimize size (-Os)</Optim>
+ <DebugLevel>Maximum (-g3)</DebugLevel>
+ <IncludePath>$(ProjectPath);$(ProjectPath)/../../../../../csi_core/include;$(ProjectPath)/../../../../../csi_driver/include;$(ProjectPath)/../../../../../libs/include;$(ProjectPath)/../../../../../csi_driver/smartl_rv32/include;$(ProjectPath)/../../../../../csi_kernel/include;$(ProjectPath)/../../../../../csi_kernel/freertosv10.3.1/include/;$(ProjectPath)/../../../../../csi_kernel/freertosv10.3.1/FreeRTOS/Source/include;$(ProjectPath)/../../../../../csi_kernel/freertosv10.3.1/FreeRTOS/Source/portable/GCC/riscv;$(ProjectPath)/../../../../../csi_kernel/freertosv10.3.1/FreeRTOS/Source/portable/GCC/riscv/chip_specific_extensions/thead_rv32;$(ProjectPath)/../../../../../board/smartl_e906_evb/include;$(ProjectPath)/../../../../../projects/tests/dtest/include;$(ProjectPath)/../../../../../projects/tests/kernel/include;;;;;;;$(ProjectPath)/../../../../../projects/tests/kernel/freertos/configs</IncludePath>
+ <OtherFlags>-ffunction-sections -fdata-sections</OtherFlags>
+ <Verbose>no</Verbose>
+ <Ansi>no</Ansi>
+ <Syntax>no</Syntax>
+ <Pedantic>no</Pedantic>
+ <PedanticErr>no</PedanticErr>
+ <InhibitWarn>no</InhibitWarn>
+ <AllWarn>yes</AllWarn>
+ <WarnErr>no</WarnErr>
+ <OneElfS>yes</OneElfS>
+ <OneElfSPerData>no</OneElfSPerData>
+ <Fstrict>no</Fstrict>
+ </Compiler>
+ <Asm>
+ <Define/>
+ <Undefine/>
+ <IncludePath/>
+ <OtherFlags>-D"Default_IRQHandler=SW_handler"</OtherFlags>
+ <DebugLevel>gdwarf2</DebugLevel>
+ </Asm>
+ <Linker>
+ <Garbage>yes</Garbage>
+ <Garbage2>yes</Garbage2>
+ <LDFile>$(ProjectPath)/../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_smartl.ld</LDFile>
+ <LibName>m</LibName>
+ <LibPath/>
+ <OtherFlags>-Wl,-zmax-page-size=1024</OtherFlags>
+ <AutoLDFile>no</AutoLDFile>
+ <LinkType/>
+ <IncludeAllLibs>no</IncludeAllLibs>
+ <LinkSpecsType>none</LinkSpecsType>
+ <LinkUseNewlibNano>no</LinkUseNewlibNano>
+ <LinkUseMinilibc>no</LinkUseMinilibc>
+ </Linker>
+ <Debug>
+ <LoadApplicationAtStartup>yes</LoadApplicationAtStartup>
+ <Connector>SIM</Connector>
+ <StopAt>yes</StopAt>
+ <StopAtText>main</StopAtText>
+ <InitFile>$(ProjectPath)/utilities/gdb.init</InitFile>
+ <PreInit/>
+ <AfterLoadFile/>
+ <AutoRun>yes</AutoRun>
+ <ResetType>Hard Reset</ResetType>
+ <SoftResetVal>0</SoftResetVal>
+ <ResetAfterLoad>no</ResetAfterLoad>
+ <AfterResetFile/>
+ <Dumpcore>no</Dumpcore>
+ <DumpcoreText/>
+ <SVCFile/>
+ <ConfigICE>
+ <IP>localhost</IP>
+ <PORT>1025</PORT>
+ <CPUNumber>0</CPUNumber>
+ <Clock>12000</Clock>
+ <Delay>10</Delay>
+ <NResetDelay>100</NResetDelay>
+ <WaitReset>50</WaitReset>
+ <DDC>yes</DDC>
+ <TRST>no</TRST>
+ <PreReset>no</PreReset>
+ <DebugPrint>no</DebugPrint>
+ <Connect>Normal</Connect>
+ <ResetType>soft</ResetType>
+ <SoftResetVal>0</SoftResetVal>
+ <RTOSType>None</RTOSType>
+ <DownloadToFlash>no</DownloadToFlash>
+ <ResetAfterConnect>yes</ResetAfterConnect>
+ <GDBName/>
+ <GDBServerType>Local</GDBServerType>
+ <OtherFlags/>
+ <ICEEnablePCSampling>no</ICEEnablePCSampling>
+ <ICESamplingFreq>1000</ICESamplingFreq>
+ <RemoteICEEnablePCSampling>no</RemoteICEEnablePCSampling>
+ <RemoteICESamplingPort>1026</RemoteICESamplingPort>
+ <Version>latest</Version>
+ <SupportRemoteICEAsyncDebug>no</SupportRemoteICEAsyncDebug>
+ </ConfigICE>
+ <ConfigSIM>
+ <SIMTarget>soccfg/riscv32/smartl_e906_cfg.xml</SIMTarget>
+ <OtherFlags/>
+ <NoGraphic>yes</NoGraphic>
+ <Log>no</Log>
+ <SimTrace>no</SimTrace>
+ <Version>latest</Version>
+ </ConfigSIM>
+ <ConfigOpenOCD>
+ <OpenOCDExecutablePath/>
+ <OpenOCDLocally>yes</OpenOCDLocally>
+ <OpenOCDTelnetPortEnable>no</OpenOCDTelnetPortEnable>
+ <OpenOCDTelnetPort>4444</OpenOCDTelnetPort>
+ <OpenOCDTclPortEnable>no</OpenOCDTclPortEnable>
+ <OpenOCDTclPort>6666</OpenOCDTclPort>
+ <OpenOCDConfigOptions/>
+ <OpenOCDTimeout>5000</OpenOCDTimeout>
+ <OpenOCDRemoteIP>localhost</OpenOCDRemoteIP>
+ <OpenOCDRemotePort>3333</OpenOCDRemotePort>
+ <PluginID>openocd-sifive</PluginID>
+ <Version>latest</Version>
+ </ConfigOpenOCD>
+ </Debug>
+ <Flash>
+ <InitFile>$(ProjectPath)/../../../../../utilities//flash.init</InitFile>
+ <PreInit/>
+ <Erase>Erase Sectors</Erase>
+ <Algorithms Path=""/>
+ <Program>yes</Program>
+ <Verify>no</Verify>
+ <ResetAndRun>no</ResetAndRun>
+ <ResetType/>
+ <SoftResetVal/>
+ <FlashIndex>no</FlashIndex>
+ <FlashIndexVal>0</FlashIndexVal>
+ <External>no</External>
+ <Command/>
+ <Arguments/>
+ </Flash>
+ </BuildConfig>
+ </BuildConfigs>
+</Project>
diff --git a/bsp/xuantie/smartl/e906/template.cdkws b/bsp/xuantie/smartl/e906/template.cdkws
new file mode 100644
index 0000000000..a1c3cd0a73
--- /dev/null
+++ b/bsp/xuantie/smartl/e906/template.cdkws
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CDK_Workspace Name="template" Database="LanguageSever" DoubleClick="Yes">
+ <DefaultPackPath>$(CDKWS)\__workspace_pack__</DefaultPackPath>
+ <Project Name="xuantie_rtthread" Path="template.cdkproj" RootPath="" Active="Yes"/>
+ <BuildMatrix>
+ <WorkspaceConfiguration Name="Debug" Selected="yes">
+ <Environment/>
+ <Project Name="xuantie_rtthread" ConfigName="BuildSet"/>
+ </WorkspaceConfiguration>
+ </BuildMatrix>
+</CDK_Workspace>
diff --git a/bsp/xuantie/smartl/e906/utilities/gdb.init b/bsp/xuantie/smartl/e906/utilities/gdb.init
new file mode 100644
index 0000000000..7792c77445
--- /dev/null
+++ b/bsp/xuantie/smartl/e906/utilities/gdb.init
@@ -0,0 +1,6 @@
+set *(int *)0x0=0x6f
+si
+reset
+set *(int *)0x40011008=0x0
+set *(int *)0x4001101c=0x0
+
diff --git a/tools/targets/cdk.py b/tools/targets/cdk.py
index 8a473f7291..73fb06559c 100644
--- a/tools/targets/cdk.py
+++ b/tools/targets/cdk.py
@@ -114,6 +114,9 @@ def _CDKProject(tree, target, script):
Define = tree.find('BuildConfigs/BuildConfig/Compiler/Define')
Define.text = '; '.join(set(CPPDEFINES))
+
+ Define = tree.find('BuildConfigs/BuildConfig/Asm/Define')
+ Define.text = '; '.join(set(CPPDEFINES))
CC_Misc = tree.find('BuildConfigs/BuildConfig/Compiler/OtherFlags')
CC_Misc.text = CCFLAGS
@@ -128,7 +131,7 @@ def _CDKProject(tree, target, script):
LibName.text=';'.join(LIBS)
xml_indent(root)
- out.write(etree.tostring(root, encoding='utf-8'))
+ out.write(etree.tostring(root, encoding='utf-8').decode('utf-8'))
out.close()
def CDKProject(target, script):