refactor: 将子模块 Module/LaserTracing_Debug 转换为普通目录纳入主仓库管理

This commit is contained in:
2026-07-13 14:30:13 +08:00
parent d64379caf7
commit 73eccc6762
6 changed files with 1204 additions and 4 deletions
+130
View File
@@ -0,0 +1,130 @@
# ---> IAR
# Compiled binaries
*.o
*.bin
*.elf
*.hex
*.map
*.out
*.obj
# Trash
*.bak
thumbs.db
*.~*
# IAR Settings
**/settings/*.crun
**/settings/*.dbgdt
**/settings/*.cspy
**/settings/*.cspy.*
**/settings/*.xcl
**/settings/*.dni
**/settings/*.wsdt
**/settings/*.wspos
# IAR Debug Exe
**/Exe/*.sim
# IAR Debug Obj
**/Obj/*.pbd
**/Obj/*.pbd.*
**/Obj/*.pbi
**/Obj/*.pbi.*
# IAR project "Debug" directory
Debug/
# IAR project "Release" directory
Release/
# IAR project settings directory
settings/
# IAR backup files
Backup*
# IAR .dep files
*.dep
# ---> IAR_EWARM
# gitignore template for the IAR EWARM
# website: https://www.iar.com/knowledge/support/technical-notes/ide/which-files-should-be-version-controlled/
# Some tools will put the EWARM files
# under a subdirectory with the same name
# as the configuration.
# Example
# EWARM/Config1/Obj /List /Exe
# EWARM/Config2/Obj /List /Exe
EWARM/**/Obj
EWARM/**/List
EWARM/**/Exe
# Autogenerated project files
*.dep
*.ewt
# Autogenerated folder for debugger
EWARM/settings
# ---> uVision
# git ignore file for Keil µVision Project
# µVision 5 and µVision 4 Project screen layout file
*.uvguix.*
*.uvgui.*
# Listing Files
*.i
*.lst
*.m51
*.m66
*.map
# Object Files
*.axf
*.b[0-2][0-9]
*.b3[0-1]
*.bak
*.build_log.htm
*.crf
*.d
*.dep
*.elf
*.htm
*.iex
*.lnp
*.o
*.obj
*.sbr
# Firmware Files
*.bin
*.h86
*.hex
# Build Files
.bat
# Debugger Files
.ini
# JLink Files
JLinkLog.txt
# Other Files
# ---> VisualStudioCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
+4
View File
@@ -0,0 +1,4 @@
# LaserTracing_Debug
# 适用于LaserTracing项目
# 单片机HC32L170
# 转换为模块仓库 2026-05-15
File diff suppressed because it is too large Load Diff
+59
View File
@@ -0,0 +1,59 @@
#ifndef __DEBUG_H
#define __DEBUG_H
#include "bsp.h"
#if (USE_DEBUG != 0)
#define DEBUG_BUFSIZE 200
#define DEBUG_BUFF_SIZE_MAX 512
#define DebugUartSend(X) LPUartSend(X)
void vcom_Send( char *format, ... );
void vcom_Send2(uint8_t *sData, uint16_t len);
#define DBG_LOG2(x, y) vcom_Send2(x, y) //打印长度超过缓存DEBUG_BUFF_SIZE_MAX的信息
#define DBG_LOG(...) vcom_Send(__VA_ARGS__)
#define DBG_LOG_F(fmt,arg...) LOG("[%s] "fmt,__FUNCTION__,##arg)
#define DBG_ARRAY(ARRAY,SIZE) { \
if(ARRAY != NULL) { \
for(int i = 0; i < SIZE; i++) { \
DBG_LOG("%02x ",ARRAY[i]); \
} \
DBG_LOG("\r\n"); \
} \
}
typedef enum {
DBG_CH_UART0 = 0, //默认串口调试方式 Uart0Init
DBG_CH_RS485_1, //RS485_1 (LPUART0)
}DebugChannel_e;
extern volatile DebugChannel_e gDebugChannel;
typedef void (*DebugExec)(int argc, char *argv[]);
typedef struct{
char *DBGCmd;
DebugExec DBGExec;
}DBGFunType;
void DebugUartIRQ(uint8_t Data);
void DebugLoopHandler(void);
void Debug1mSRoutine(void);
//void ReadBootPara(BootPara rData);
//void WriteBootPara(BootPara wData);
//extern BootPara_t BLPara;
#else
#define DBG_LOG2(x, y)
#define DBG_LOG(...)
#define DBG_LOG_F(fmt,arg...)
#define DBG_ARRAY(ARRAY,SIZE)
#endif
#endif