[bsp][tms320f28379d] Add finsh support

This commit is contained in:
xuzhuoyi 2019-04-07 18:19:16 +08:00
parent 75dc0dcbd9
commit 27d27cdb4b
8 changed files with 34 additions and 24 deletions

View File

@ -84,29 +84,30 @@ CONFIG_RT_USING_COMPONENTS_INIT=y
# #
# Command shell # Command shell
# #
# CONFIG_RT_USING_FINSH is not set CONFIG_RT_USING_FINSH=y
CONFIG_FINSH_THREAD_NAME="tshell"
CONFIG_FINSH_USING_HISTORY=y
CONFIG_FINSH_HISTORY_LINES=5
# CONFIG_FINSH_USING_SYMTAB is not set
# CONFIG_FINSH_USING_DESCRIPTION is not set
# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set
CONFIG_FINSH_THREAD_PRIORITY=6
CONFIG_FINSH_THREAD_STACK_SIZE=4096
CONFIG_FINSH_CMD_SIZE=80
# CONFIG_FINSH_USING_AUTH is not set
# CONFIG_FINSH_USING_MSH is not set
# #
# Device virtual file system # Device virtual file system
# #
CONFIG_RT_USING_DFS=y # CONFIG_RT_USING_DFS is not set
CONFIG_DFS_USING_WORKDIR=y
CONFIG_DFS_FILESYSTEMS_MAX=2
CONFIG_DFS_FILESYSTEM_TYPES_MAX=2
CONFIG_DFS_FD_MAX=16
# CONFIG_RT_USING_DFS_MNTTABLE is not set
# CONFIG_RT_USING_DFS_ELMFAT is not set
CONFIG_RT_USING_DFS_DEVFS=y
# CONFIG_RT_USING_DFS_ROMFS is not set
# CONFIG_RT_USING_DFS_RAMFS is not set
# CONFIG_RT_USING_DFS_UFFS is not set
# CONFIG_RT_USING_DFS_JFFS2 is not set
# #
# Device Drivers # Device Drivers
# #
CONFIG_RT_USING_DEVICE_IPC=y CONFIG_RT_USING_DEVICE_IPC=y
CONFIG_RT_PIPE_BUFSZ=512 CONFIG_RT_PIPE_BUFSZ=512
# CONFIG_RT_USING_SYSTEM_WORKQUEUE is not set
CONFIG_RT_USING_SERIAL=y CONFIG_RT_USING_SERIAL=y
CONFIG_RT_SERIAL_USING_DMA=y CONFIG_RT_SERIAL_USING_DMA=y
CONFIG_RT_SERIAL_RB_BUFSZ=64 CONFIG_RT_SERIAL_RB_BUFSZ=64

View File

@ -38,6 +38,7 @@
<option id="com.ti.ccstudio.buildDefinitions.C2000_18.1.compilerID.TMU_SUPPORT.1184307973" name="Specify TMU support (--tmu_support)" superClass="com.ti.ccstudio.buildDefinitions.C2000_18.1.compilerID.TMU_SUPPORT" value="com.ti.ccstudio.buildDefinitions.C2000_18.1.compilerID.TMU_SUPPORT.tmu0" valueType="enumerated"/> <option id="com.ti.ccstudio.buildDefinitions.C2000_18.1.compilerID.TMU_SUPPORT.1184307973" name="Specify TMU support (--tmu_support)" superClass="com.ti.ccstudio.buildDefinitions.C2000_18.1.compilerID.TMU_SUPPORT" value="com.ti.ccstudio.buildDefinitions.C2000_18.1.compilerID.TMU_SUPPORT.tmu0" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.C2000_18.1.compilerID.INCLUDE_PATH.559432837" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C2000_18.1.compilerID.INCLUDE_PATH" valueType="includePath"> <option id="com.ti.ccstudio.buildDefinitions.C2000_18.1.compilerID.INCLUDE_PATH.559432837" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C2000_18.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value="${PROJECT_ROOT}"/> <listOptionValue builtIn="false" value="${PROJECT_ROOT}"/>
<listOptionValue builtIn="false" value="${PROJECT_LOC}/../../components/finsh"/>
<listOptionValue builtIn="false" value="${PROJECT_LOC}/../../components/drivers/include"/> <listOptionValue builtIn="false" value="${PROJECT_LOC}/../../components/drivers/include"/>
<listOptionValue builtIn="false" value="${PROJECT_LOC}/libraries/headers/include"/> <listOptionValue builtIn="false" value="${PROJECT_LOC}/libraries/headers/include"/>
<listOptionValue builtIn="false" value="${PROJECT_LOC}/libraries/common/include"/> <listOptionValue builtIn="false" value="${PROJECT_LOC}/libraries/common/include"/>
@ -83,7 +84,7 @@
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries> <sourceEntries>
<entry excluding="libraries/common/source/F2837xD_SWPrioritizedPieVect.c|libraries/headers/cmd/F2837xD_Headers_nonBIOS_cpu2.cmd|libraries/headers/cmd/F2837xD_Headers_BIOS_cpu1.cmd|libraries/headers/cmd/F2837xD_Headers_BIOS_cpu2.cmd|libraries/common/source/device.c|libraries/common/source/usb.c|libraries/common/source/usb_hal.c|libraries/common/targetConfigs|libraries/common/deprecated|libraries/common/cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> <entry excluding="finsh/msh.c|finsh/msh_file.c|finsh/msh_cmd.c|libraries/common/source/F2837xD_SWPrioritizedPieVect.c|libraries/headers/cmd/F2837xD_Headers_nonBIOS_cpu2.cmd|libraries/headers/cmd/F2837xD_Headers_BIOS_cpu1.cmd|libraries/headers/cmd/F2837xD_Headers_BIOS_cpu2.cmd|libraries/common/source/device.c|libraries/common/source/usb.c|libraries/common/source/usb_hal.c|libraries/common/targetConfigs|libraries/common/deprecated|libraries/common/cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries> </sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>

View File

@ -40,6 +40,11 @@
<type>2</type> <type>2</type>
<locationURI>PARENT-2-PROJECT_LOC/libcpu/ti-dsp/c28x</locationURI> <locationURI>PARENT-2-PROJECT_LOC/libcpu/ti-dsp/c28x</locationURI>
</link> </link>
<link>
<name>finsh</name>
<type>2</type>
<locationURI>PARENT-2-PROJECT_LOC/components/finsh</locationURI>
</link>
<link> <link>
<name>DeviceDrivers/serial.c</name> <name>DeviceDrivers/serial.c</name>
<type>1</type> <type>1</type>

View File

@ -11,6 +11,8 @@ encoding//Debug/c28x/subdir_rules.mk=UTF-8
encoding//Debug/c28x/subdir_vars.mk=UTF-8 encoding//Debug/c28x/subdir_vars.mk=UTF-8
encoding//Debug/drivers/subdir_rules.mk=UTF-8 encoding//Debug/drivers/subdir_rules.mk=UTF-8
encoding//Debug/drivers/subdir_vars.mk=UTF-8 encoding//Debug/drivers/subdir_vars.mk=UTF-8
encoding//Debug/finsh/subdir_rules.mk=UTF-8
encoding//Debug/finsh/subdir_vars.mk=UTF-8
encoding//Debug/libraries/common/source/subdir_rules.mk=UTF-8 encoding//Debug/libraries/common/source/subdir_rules.mk=UTF-8
encoding//Debug/libraries/common/source/subdir_vars.mk=UTF-8 encoding//Debug/libraries/common/source/subdir_vars.mk=UTF-8
encoding//Debug/libraries/headers/cmd/subdir_rules.mk=UTF-8 encoding//Debug/libraries/headers/cmd/subdir_rules.mk=UTF-8

View File

@ -16,6 +16,7 @@ void rt_init_thread_entry(void* parameter)
{ {
/* initialization RT-Thread Components */ /* initialization RT-Thread Components */
rt_components_init(); rt_components_init();
finsh_system_init();
} }

View File

@ -21,7 +21,7 @@ extern interrupt void RTOSINT_Handler();
*/ */
interrupt void cpu_timer2_isr(void) interrupt void cpu_timer2_isr(void)
{ {
CpuTimer2Regs.TCR.all = 0x8000; CpuTimer2Regs.TCR.all = 0xC000;
/* enter interrupt */ /* enter interrupt */
rt_interrupt_enter(); rt_interrupt_enter();

View File

@ -69,6 +69,8 @@
typedef int int32_t; typedef int int32_t;
typedef unsigned int uint32_t; typedef unsigned int uint32_t;
#else #else
typedef char int8_t;
typedef unsigned char uint8_t;
typedef int int16_t; typedef int int16_t;
typedef unsigned int uint16_t; typedef unsigned int uint16_t;
typedef long int32_t; typedef long int32_t;
@ -187,9 +189,6 @@
/* sorry, [u]int_fast64_t not implemented for C54x, C55x */ /* sorry, [u]int_fast64_t not implemented for C54x, C55x */
#endif #endif
typedef uint_fast8_t uint8_t;
typedef int_fast8_t int8_t;
/* 7.18.1.4 Integer types capable of holding object pointers */ /* 7.18.1.4 Integer types capable of holding object pointers */
#if defined(_TMS320C5XX) || defined(__TMS320C55X__) || \ #if defined(_TMS320C5XX) || defined(__TMS320C55X__) || \
(defined(__MSP430__) && defined(__LARGE_CODE_MODEL__)) || \ (defined(__MSP430__) && defined(__LARGE_CODE_MODEL__)) || \

View File

@ -55,15 +55,16 @@
/* Command shell */ /* Command shell */
#define RT_USING_FINSH
#define FINSH_THREAD_NAME "tshell"
#define FINSH_USING_HISTORY
#define FINSH_HISTORY_LINES 5
#define FINSH_THREAD_PRIORITY 6
#define FINSH_THREAD_STACK_SIZE 4096
#define FINSH_CMD_SIZE 80
/* Device virtual file system */ /* Device virtual file system */
#define RT_USING_DFS
#define DFS_USING_WORKDIR
#define DFS_FILESYSTEMS_MAX 2
#define DFS_FILESYSTEM_TYPES_MAX 2
#define DFS_FD_MAX 16
#define RT_USING_DFS_DEVFS
/* Device Drivers */ /* Device Drivers */