编译成功
This commit is contained in:
+70
-3
@@ -7,6 +7,64 @@ srcDirs: []
|
|||||||
virtualFolder:
|
virtualFolder:
|
||||||
name: <virtual_root>
|
name: <virtual_root>
|
||||||
files: []
|
files: []
|
||||||
|
folders:
|
||||||
|
- name: System
|
||||||
|
files:
|
||||||
|
- path: VoiletBspStm32F10x/System/system_stm32f10x.c
|
||||||
|
- path: VoiletBspStm32F10x/System/LinkScripts/Gcc/stm32_flash_ze.ld
|
||||||
|
- path: VoiletBspStm32F10x/System/Cmsis/Src/core_cm3.c
|
||||||
|
folders: []
|
||||||
|
- name: Startup
|
||||||
|
files:
|
||||||
|
- path: VoiletBspStm32F10x/System/Startup/Gcc/startup_stm32f10x_hd.s
|
||||||
|
folders: []
|
||||||
|
- name: App
|
||||||
|
files:
|
||||||
|
- path: App/Src/LetterShell.c
|
||||||
|
- path: App/Src/main.c
|
||||||
|
folders: []
|
||||||
|
- name: Shell
|
||||||
|
files:
|
||||||
|
- path: VoiletBspStm32F10x/ThirdParty/LetterShellV3/Src/shell.c
|
||||||
|
- path: VoiletBspStm32F10x/ThirdParty/LetterShellV3/Src/shell_cmd_list.c
|
||||||
|
- path: VoiletBspStm32F10x/ThirdParty/LetterShellV3/Src/shell_companion.c
|
||||||
|
- path: VoiletBspStm32F10x/ThirdParty/LetterShellV3/Src/shell_ext.c
|
||||||
|
folders: []
|
||||||
|
- name: Bsp
|
||||||
|
files:
|
||||||
|
- path: VoiletBspStm32F10x/Bsp/Src/Bsp.c
|
||||||
|
- path: VoiletBspStm32F10x/Bsp/Src/Delay.c
|
||||||
|
- path: VoiletBspStm32F10x/Bsp/Src/Gpio.c
|
||||||
|
- path: VoiletBspStm32F10x/Bsp/Src/Interrupt.c
|
||||||
|
- path: VoiletBspStm32F10x/Bsp/Src/SeggerCall.c
|
||||||
|
- path: VoiletBspStm32F10x/Bsp/Src/SysCall.c
|
||||||
|
- path: VoiletBspStm32F10x/Bsp/Src/Uart.c
|
||||||
|
folders: []
|
||||||
|
- name: StdLib
|
||||||
|
files:
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/misc.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_adc.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_bkp.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_can.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_cec.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_crc.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_dac.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_dbgmcu.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_dma.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_exti.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_flash.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_fsmc.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_gpio.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_i2c.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_iwdg.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_pwr.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_rcc.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_rtc.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_sdio.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_spi.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_tim.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_usart.c
|
||||||
|
- path: VoiletBspStm32F10x/StdLib/Src/stm32f10x_wwdg.c
|
||||||
folders: []
|
folders: []
|
||||||
dependenceList: []
|
dependenceList: []
|
||||||
outDir: Output
|
outDir: Output
|
||||||
@@ -15,8 +73,17 @@ miscInfo:
|
|||||||
targets:
|
targets:
|
||||||
Debug:
|
Debug:
|
||||||
cppPreprocessAttrs:
|
cppPreprocessAttrs:
|
||||||
defineList: []
|
defineList:
|
||||||
incList: []
|
- USE_STDPERIPH_DRIVER
|
||||||
|
- STM32F10X_HD
|
||||||
|
incList:
|
||||||
|
- App/Inc
|
||||||
|
- Board
|
||||||
|
- VoiletBspStm32F10x/Bsp/Inc
|
||||||
|
- VoiletBspStm32F10x/StdLib/Inc
|
||||||
|
- VoiletBspStm32F10x/System/Cmsis/Inc
|
||||||
|
- VoiletBspStm32F10x/System
|
||||||
|
- VoiletBspStm32F10x/ThirdParty/LetterShellV3/Inc
|
||||||
libList: []
|
libList: []
|
||||||
excludeList: []
|
excludeList: []
|
||||||
settings:
|
settings:
|
||||||
@@ -55,7 +122,7 @@ targets:
|
|||||||
LIB_FLAGS: -lm
|
LIB_FLAGS: -lm
|
||||||
output-format: elf
|
output-format: elf
|
||||||
remove-unused-input-sections: true
|
remove-unused-input-sections: true
|
||||||
scatterFilePath: <YOUR_LINKER_SCRIPT>.lds
|
scatterFilePath: VoiletBspStm32F10x/System/LinkScripts/Gcc/stm32_flash_ze.ld
|
||||||
storageLayout:
|
storageLayout:
|
||||||
RAM: []
|
RAM: []
|
||||||
ROM: []
|
ROM: []
|
||||||
|
|||||||
Vendored
+9
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"[c]": {
|
||||||
|
"editor.defaultFormatter": "xaver.clang-format"
|
||||||
|
},
|
||||||
|
"[cpp]": {
|
||||||
|
"editor.defaultFormatter": "xaver.clang-format"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,7 +16,8 @@ const COM_MAP_T *HostCom = TTY_COM;
|
|||||||
* @note void
|
* @note void
|
||||||
* @example void
|
* @example void
|
||||||
*/
|
*/
|
||||||
signed short ShellWrite(char *ch, unsigned short Len) {
|
signed short ShellWrite(char *ch, unsigned short Len)
|
||||||
|
{
|
||||||
ComSendStr(HostCom, (uint8_t *)ch, Len);
|
ComSendStr(HostCom, (uint8_t *)ch, Len);
|
||||||
return Len;
|
return Len;
|
||||||
}
|
}
|
||||||
@@ -28,20 +29,21 @@ signed short ShellWrite(char *ch, unsigned short Len) {
|
|||||||
* @note void
|
* @note void
|
||||||
* @example void
|
* @example void
|
||||||
*/
|
*/
|
||||||
void LetterShellIrqFunc(void *Param) {
|
void LetterShellIrqFunc(void *Param)
|
||||||
|
{
|
||||||
uint8_t ch = 0x00;
|
uint8_t ch = 0x00;
|
||||||
ch = ComReceiveChar(Param);
|
ch = ComReceiveChar(Param);
|
||||||
shellHandler(&Host, ch);
|
shellHandler(&Host, ch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 初始化Shell
|
* @brief 初始化Shell
|
||||||
* @note void
|
* @note void
|
||||||
* @param ComX 串口号,baud 波特率
|
* @param ComX 串口号,baud 波特率
|
||||||
* @retval void
|
* @retval void
|
||||||
*/
|
*/
|
||||||
void LetterShellInit(const COM_MAP_T *ComX, uint32_t Baud) {
|
void LetterShellInit(const COM_MAP_T *ComX, uint32_t Baud)
|
||||||
|
{
|
||||||
// 初始化串口
|
// 初始化串口
|
||||||
ComStdConfig(ComX, Baud);
|
ComStdConfig(ComX, Baud);
|
||||||
// 设置串口回调函数
|
// 设置串口回调函数
|
||||||
@@ -2,17 +2,19 @@
|
|||||||
// Created by anonymous on 2026/5/24.
|
// Created by anonymous on 2026/5/24.
|
||||||
//
|
//
|
||||||
/* C标准库头文件 */
|
/* C标准库头文件 */
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
/* BSP文件 */
|
/* BSP文件 */
|
||||||
#include "main.h"
|
|
||||||
#include "Bsp.h"
|
#include "Bsp.h"
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
int main(void) {
|
int main(void)
|
||||||
|
{
|
||||||
|
|
||||||
BspInit();
|
BspInit();
|
||||||
|
|
||||||
while (1) {
|
while (1)
|
||||||
|
{
|
||||||
LedToggle(LED0);
|
LedToggle(LED0);
|
||||||
DelayMs(100);
|
DelayMs(100);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user