From 84b128edb634b63a4a0150c3ebbba2cafcd5bf18 Mon Sep 17 00:00:00 2001 From: liyp Date: Tue, 25 Aug 2026 22:07:47 -0400 Subject: [PATCH] first commit --- .gitignore | 8 + App/Board/Board.h | 26 + App/Board/Flash.h | 20 + App/Board/Gpio.h | 62 + App/Board/Interrupt.h | 69 + App/Board/Usart.h | 112 + App/Inc/LedTest.h | 8 + App/Inc/LetterShell.h | 8 + App/Src/LedTest.c | 50 + App/Src/LetterShell.c | 77 + App/Src/Main.c | 42 + Eide/.clang-format | 38 + Eide/.clangd | 19 + Eide/.eide/debug.st.option.bytes.ini | 110 + Eide/.eide/eide.json | 163 + Eide/.eide/env.ini | 19 + Eide/.eide/files.options.yml | 20 + Eide/.gitignore | 15 + Eide/.vscode/settings.json | 1 + Eide/.vscode/tasks.json | 40 + Eide/Application.code-workspace | 45 + Eide/SysCall.c | 146 + MdkV5/Application.uvprojx | 3180 ++++++++ .../Debug_STM32F103ZE_1.0.0.dbgconf | 36 + .../Target_1_STM32F103ZE_1.0.0.dbgconf | 36 + Ses/Application.emProject | 160 + Ses/SEGGER_THUMB_Startup.s | 288 + Ses/STM32F103ZE_MemoryMap.xml | 5 + Ses/STM32F103xx_Registers.xml | 6596 +++++++++++++++++ Ses/STM32F1xx_Target.js | 44 + Ses/SysCall.c | 288 + 31 files changed, 11731 insertions(+) create mode 100644 .gitignore create mode 100644 App/Board/Board.h create mode 100644 App/Board/Flash.h create mode 100644 App/Board/Gpio.h create mode 100644 App/Board/Interrupt.h create mode 100644 App/Board/Usart.h create mode 100644 App/Inc/LedTest.h create mode 100644 App/Inc/LetterShell.h create mode 100644 App/Src/LedTest.c create mode 100644 App/Src/LetterShell.c create mode 100644 App/Src/Main.c create mode 100644 Eide/.clang-format create mode 100644 Eide/.clangd create mode 100644 Eide/.eide/debug.st.option.bytes.ini create mode 100644 Eide/.eide/eide.json create mode 100644 Eide/.eide/env.ini create mode 100644 Eide/.eide/files.options.yml create mode 100644 Eide/.gitignore create mode 100644 Eide/.vscode/settings.json create mode 100644 Eide/.vscode/tasks.json create mode 100644 Eide/Application.code-workspace create mode 100644 Eide/SysCall.c create mode 100644 MdkV5/Application.uvprojx create mode 100644 MdkV5/DebugConfig/Debug_STM32F103ZE_1.0.0.dbgconf create mode 100644 MdkV5/DebugConfig/Target_1_STM32F103ZE_1.0.0.dbgconf create mode 100644 Ses/Application.emProject create mode 100644 Ses/SEGGER_THUMB_Startup.s create mode 100644 Ses/STM32F103ZE_MemoryMap.xml create mode 100644 Ses/STM32F103xx_Registers.xml create mode 100644 Ses/STM32F1xx_Target.js create mode 100644 Ses/SysCall.c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1a8ec9c --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +Eide/build/* +MdkV5/Listings/* +MdkV5/Objects/* +MdkV5/*.uvoptx +MdkV5/EventRecorderStub.scvd +MdkV5/*\.uvguix* +Ses/Output/* +**.emSession \ No newline at end of file diff --git a/App/Board/Board.h b/App/Board/Board.h new file mode 100644 index 0000000..1fd89d5 --- /dev/null +++ b/App/Board/Board.h @@ -0,0 +1,26 @@ +#ifndef __BOARD_H__ +#define __BOARD_H__ + +/* MCU INCLUDE */ +#include + +/* PERIPH INCLUDE */ +#include "Gpio.h" +#include "Usart.h" +#include "Interrupt.h" +#include "Flash.h" + + +/* VERSION INFO */ +#define HARDWARE_VERSION "v1.0.0" +#define SOFTWARE_VERSION "v1.0.0" + +/* RTOS */ +#define USE_RTOS +#ifdef USE_RTOS + #undef USE_FREERTOS + #undef USE_UCOS + #define USE_THREADX +#endif + +#endif diff --git a/App/Board/Flash.h b/App/Board/Flash.h new file mode 100644 index 0000000..733d270 --- /dev/null +++ b/App/Board/Flash.h @@ -0,0 +1,20 @@ +#ifndef __FLASH_H__ +#define __FLASH_H__ + +///* 自定义Flash布局相关 */ +//#define BOOT_SIZE_16 /* 16Kb的Bootloader大小 不带网络*/ +////#define BOOT_SIZE_32 /* 32Kb的Bootloader大小 带网络*/ + +//#define FLASH_BASE_ADDR 0x08000000 //Flash基地址 +//#define BOOT_ADDR 0x08000000 //引导程序地址 +////BOOT程序大小 +//#ifdef BOOT_SIZE_16 +// #define BOOT_ROM 0x4000 +//#endif +//#ifdef BOOT_SIZE_32 +// #define BOOT_ROM 0x8000 +//#endif +//#define USER_PARAM_ADDR (FLASH_BASE_ADDR + BOOT_ROM) //用户参数分区 +//#define APPLICATION_ADDR 0x08010000 //从128K的位置开始是应用程序 + +#endif diff --git a/App/Board/Gpio.h b/App/Board/Gpio.h new file mode 100644 index 0000000..64cbc23 --- /dev/null +++ b/App/Board/Gpio.h @@ -0,0 +1,62 @@ +#ifndef __GPIO_H__ +#define __GPIO_H__ + +/* MCU_GPIO_INFO */ +#define GPIO_PORT_NUM 7 //鍏7缁凣PIO +#define GPIO_PIN_NUM 16 //姣忕粍16涓狿in + +//鏁扮粍淇″彿杈撳嚭寮鍏 +#define DO_ON 0 +#define DO_OFF 1 + +//LED鐏紑鍏 +#define LED_ON 0 +#define LED_OFF 1 + +//GPIO缁撴瀯浣 +typedef struct +{ + GPIO_TypeDef* GpioPort; + unsigned short GpioPin; + uint8_t DefaultStatus; +}GPIO_ST, *GPIO_ST_PTR; + +/* **********SystemClock鐩稿叧********** */ +// GPIO +#define GPIO_ENABLE +#ifdef GPIO_ENABLE + #define USE_GPIOA + #define USE_GPIOB + #define USE_GPIOC + #define USE_GPIOD + #define USE_GPIOE + #define USE_GPIOF + #define USE_GPIOG +#endif + +/* **********GPIO DO DI鐩稿叧********** */ +// 鏁板瓧杈撳嚭 +#undef USE_DIGITAL_OUTPUT +#ifdef USE_DIGITAL_OUTPUT + #define DO_NUM 2 + #define DO1 0 + #define DO2 1 +#endif + +// 鏁板瓧杈撳叆 +#undef USE_DIGITAL_INPUT +#ifdef USE_DIGITAL_INPUT + #define DI_NUM 2 + #define DI1 0 + #define DI2 1 +#endif + +// LED鐏 +#define USE_LED +#ifdef USE_LED + #define LED_NUM 2 + #define LED0 0 + #define LED1 1 +#endif + +#endif diff --git a/App/Board/Interrupt.h b/App/Board/Interrupt.h new file mode 100644 index 0000000..2806af9 --- /dev/null +++ b/App/Board/Interrupt.h @@ -0,0 +1,69 @@ +#ifndef __INTERRUPT_H__ +#define __INTERRUPT_H__ + +/* **********NVIC中断向量控制器组别********** */ +#define NVIC_GROUP_LEVEL NVIC_PriorityGroup_2 +/* **********END********** */ + +/* Control System Interrupt Sw */ +#define DISABLE_INTERRUPT __set_PRIMASK(1); +#define ENABLE_INTERRUPT __set_PRIMASK(0); + +#define INTERRUPT_NUM 300 //System Interrupt Num + +#ifdef INTERRUPT_NUM + /* INTERRUPT_DESC_ST STRUCT */ + typedef struct + { + void(*CallBack)(unsigned int); //回调函数 + unsigned int IntId; //触发中断的外设id + } INTERRUPT_DESC_ST; + + /* INTERRUPT_ST STRUCT */ + typedef struct + { + INTERRUPT_DESC_ST Adc_1_2; + INTERRUPT_DESC_ST Usb_Hp_Can1_Tx; + INTERRUPT_DESC_ST Usb_Hp_Can1_Rx0; + INTERRUPT_DESC_ST Can1_Rx1; + INTERRUPT_DESC_ST Can1_Sce; + INTERRUPT_DESC_ST Exti_9_5; + INTERRUPT_DESC_ST Tim_1_Brk; + INTERRUPT_DESC_ST Tim_1_Up; + INTERRUPT_DESC_ST Tim_1_Trg_Com; + INTERRUPT_DESC_ST Tim_1_Cc; + INTERRUPT_DESC_ST Tim_2; + INTERRUPT_DESC_ST Tim_3; + INTERRUPT_DESC_ST Tim_4; + INTERRUPT_DESC_ST I2c_1_Ev; + INTERRUPT_DESC_ST I2c_1_ER; + INTERRUPT_DESC_ST I2c_2_Ev; + INTERRUPT_DESC_ST I2c_2_ER; + INTERRUPT_DESC_ST Spi_1; + INTERRUPT_DESC_ST Spi_2; + INTERRUPT_DESC_ST Usart1; + INTERRUPT_DESC_ST Usart2; + INTERRUPT_DESC_ST Usart3; + INTERRUPT_DESC_ST Exti_15_10; + INTERRUPT_DESC_ST Rtc_Alarm; + INTERRUPT_DESC_ST Usb_WackUp; + INTERRUPT_DESC_ST Tim_8_Brk; + INTERRUPT_DESC_ST Tim_8_Up; + INTERRUPT_DESC_ST Tim_8_Trg_Com; + INTERRUPT_DESC_ST Tim_8_Cc; + INTERRUPT_DESC_ST Adc_3; + INTERRUPT_DESC_ST Fsmc; + INTERRUPT_DESC_ST Sdio; + INTERRUPT_DESC_ST Tim_5; + INTERRUPT_DESC_ST Spi_3; + INTERRUPT_DESC_ST Uart4; + INTERRUPT_DESC_ST Uart5; + INTERRUPT_DESC_ST Tim_6; + INTERRUPT_DESC_ST Tim_7; + INTERRUPT_DESC_ST Dma_2_Chnl_1; + INTERRUPT_DESC_ST Dma_2_Chnl_2; + INTERRUPT_DESC_ST Dma_2_Chnl_3; + INTERRUPT_DESC_ST Dma_2_Chnl_4; + } INTERRUPT_ST, *INTERRUPT_ST_PTR; +#endif +#endif diff --git a/App/Board/Usart.h b/App/Board/Usart.h new file mode 100644 index 0000000..53d4f9e --- /dev/null +++ b/App/Board/Usart.h @@ -0,0 +1,112 @@ +#ifndef __USART_H__ +#define __USART_H__ + +//数据位 +#define USART_DATA_BIT_8 USART_WordLength_8b //数据位8 +#define USART_DATA_BIT_9 USART_WordLength_9b //数据位9 + +//停止位 +#define USART_STOP_BIT_1 USART_StopBits_1 //停止位1 +#define USART_STOP_BIT_0_5 USART_StopBits_0_5 //停止位0.5 +#define USART_STOP_BIT_2 USART_StopBits_2 //停止位2 +#define USART_STOP_BIT_1_5 USART_StopBits_1_5 //停止位1.5 + +//校验位 +#define USART_PARITY_NO USART_Parity_No //无校验 +#define USART_PRAITY_EVEN USART_Parity_Even //偶校验 +#define USART_PRAITY_ODD USART_Parity_Odd //奇校验 + +//USART +#define USART_ENABLE +#ifdef USART_ENABLE + #define USE_USART1 + #undef USE_USART2 + #undef USE_USART3 + #undef USE_USART4 + #undef USE_USART5 + #undef USE_USART6 +#endif + +/* **********串口相关********** */ +#ifdef USE_USART1 + #define COM0 USART1_BASE + #define COM0_IRQN USART1_IRQn + #define COM0_TX_PORT GPIOA + #define COM0_RX_PORT GPIOA + #define COM0_TX_PIN GPIO_Pin_9 + #define COM0_RX_PIN GPIO_Pin_10 +#endif +#ifdef USE_USART2 + #define COM1 USART2_BASE + #define COM1_IRQN USART2_IRQn + #define COM1_TX_PORT GPIOA + #define COM1_RX_PORT GPIOA + #define COM1_TX_PIN GPIO_Pin_2 + #define COM1_RX_PIN GPIO_Pin_3 +#endif +#ifdef USE_USART3 + #define COM2 USART3_BASE + #define COM2_IRQN USART3_IRQn + #define COM2_TX_PORT GPIOB + #define COM2_RX_PORT GPIOB + #define COM2_TX_PIN GPIO_Pin_10 + #define COM2_RX_PIN GPIO_Pin_11 +#endif +#ifdef USE_USART4 + #define COM3 UART4_BASE + #define COM3_IRQN UART4_IRQn + #define COM3_TX_PORT GPIOC + #define COM3_RX_PORT GPIOC + #define COM3_TX_PIN GPIO_Pin_10 + #define COM3_RX_PIN GPIO_Pin_11 +#endif +#ifdef USE_USART5 + #define COM4 UART5_BASE + #define COM4_IRQN UART5_IRQn + #define COM4_TX_PORT GPIOB + #define COM4_RX_PORT GPIOD + #define COM4_TX_PIN GPIO_Pin_12 + #define COM4_RX_PIN GPIO_Pin_2 +#endif + +/* LetterShell */ +#define USE_SHELL +#ifdef USE_SHELL + #define TTY_COM COM0 + #define TTY_COM_IRQN COM0_IRQN +#endif + +/* 此BSP规定最多4路RS485 */ +#undef USE_RS4851 +#ifdef USE_RS4851 + #define RS4851_TRANS_PORT GPIOx + #define RS4851_TRANS_PIN GPIO_Pin_x + #define RS4851_TRANS_TX RESET + #define RS4851_TRANS_RX SET +#endif + +#undef USE_RS4852 +#ifdef USE_RS4852 + #define RS4852_TRANS_PORT GPIOx + #define RS4852_TRANS_PIN GPIO_Pin_x + #define RS4852_TRANS_TX RESET + #define RS4852_TRANS_RX SET +#endif + +#undef USE_RS4853 +#ifdef USE_RS4853 + #define RS4853_TRANS_PORT GPIOx + #define RS4853_TRANS_PIN GPIO_Pin_x + #define RS4853_TRANS_TX RESET + #define RS4853_TRANS_RX SET +#endif + +#undef USE_RS4854 +#ifdef USE_RS4854 + #define RS4854_TRANS_PORT GPIOx + #define RS4854_TRANS_PIN GPIO_Pin_x + #define RS4854_TRANS_TX RESET + #define RS4854_TRANS_RX SET +#endif + +#endif diff --git a/App/Inc/LedTest.h b/App/Inc/LedTest.h new file mode 100644 index 0000000..ddb24c1 --- /dev/null +++ b/App/Inc/LedTest.h @@ -0,0 +1,8 @@ +#ifndef __LEDTEST_H__ +#define __LEDTEST_H__ + +#include "bsp.h" + +void LedCtlTaskInit(uint8_t Level,uint8_t Preemption); + +#endif diff --git a/App/Inc/LetterShell.h b/App/Inc/LetterShell.h new file mode 100644 index 0000000..39ff64a --- /dev/null +++ b/App/Inc/LetterShell.h @@ -0,0 +1,8 @@ +#ifndef __LETTER_SHELL_H__ +#define __LETTER_SHELL_H__ + +#include "Bsp.h" + +void LetterShellInit(uint32_t ComId, uint32_t baud); + +#endif diff --git a/App/Src/LedTest.c b/App/Src/LedTest.c new file mode 100644 index 0000000..397520e --- /dev/null +++ b/App/Src/LedTest.c @@ -0,0 +1,50 @@ +#include "LedTest.h" + +/* OS相关 */ +#define TASK_STACK_SIZE 128 //任务栈大小 + +/* OS相关 */ +TX_THREAD LedCtlTaskTCB; //LED控制任务句柄 +static uint8_t TaskStack[TASK_STACK_SIZE]; //任务栈空间 + +void LedCtlTask(ULONG thread_input); + +/** + * @brief LED控制任务初始化 + * @param Level任务优先级 Preemption抢占阈值 + * @retval void + * @note void + * @example void + */ +void LedCtlTaskInit(uint8_t Level,uint8_t Preemption) +{ + tx_thread_create(&LedCtlTaskTCB, /* 任务句柄 */ + "LedCtlTask", /* 任务名称 */ + LedCtlTask, /* 任务入口函数 */ + 0, /* 任务参数 */ + TaskStack, /* 任务栈起始地址 */ + TASK_STACK_SIZE, /* 任务堆栈大小 */ + Level, /* 优先级 */ + Preemption, /* 抢占阈值 */ + TX_NO_TIME_SLICE, /* 不使用时间片轮转 */ + TX_AUTO_START); /* 自动启动线程 */ +} +/** + * @brief LED控制任务 + * @param ThreadXInput 任务参数 + * @retval void + * @note void + * @example void + */ +void LedCtlTask(ULONG ThreadXInput) +{ + (void)ThreadXInput; + + while (true) + { + LedToggle(LED0); + LedToggle(LED1); + tx_thread_sleep(100); + } +} + diff --git a/App/Src/LetterShell.c b/App/Src/LetterShell.c new file mode 100644 index 0000000..c100c95 --- /dev/null +++ b/App/Src/LetterShell.c @@ -0,0 +1,77 @@ +#include "LetterShell.h" +#include "shell.h" + +#define WR_BUFFER_SIZE 512 + +/* 1. 鍒涘缓shell瀵硅薄锛屽紑杈焥hell缂撳啿鍖 */ +Shell Host; //Shell瀹炰緥鍖 +char HostBuffer[WR_BUFFER_SIZE]; //璇诲啓缂撳啿鍖 +uint32_t TtyComId; //涓插彛鍙 + +/** + * @brief Shell鍐欏嚱鏁 + * @param ComId 涓插彛鍙凤紝ch 鏁版嵁 + * @retval void + * @note void + * @example void + */ +signed short ShellWrite(char* ch, unsigned short Len) +{ + UsartSendStr(TtyComId, (uint8_t* )ch,Len); + return Len; +} +/** + * @brief Shell璇诲嚱鏁 - 涓柇鍥炶皟瀹炵幇 + * @param Vector 涓柇鍚戦噺鍙 + * @retval void + * @note void + * @example void + */ +void LetterShellIrqFunc(uint32_t Vector) +{ + uint8_t ch = 0x00; + ch = UsartReceiveChar(Vector); + + shellHandler(&Host, ch); +} + + +/** + * @brief 鍒濆鍖朣hell + * @param ComId 涓插彛鍙凤紝baud 娉㈢壒鐜 + * @retval void + * @note void + * @example void + */ +void LetterShellInit(uint32_t ComId, uint32_t baud) +{ + TtyComId = ComId; + + //鍒濆鍖栦覆鍙 + UsartStdConfig(ComId, baud); + //璁剧疆涓插彛鍥炶皟鍑芥暟 + InterruptRegist(TTY_COM_IRQN, LetterShellIrqFunc); + //璁剧疆涓柇绛夌骇 + InterruptSetLevel(TTY_COM_IRQN,3,3); + //娉ㄥ唽鍐欏嚱鏁 + Host.write = ShellWrite; + + shellInit(&Host, HostBuffer, WR_BUFFER_SIZE); +} + +/** + * @brief 鎵撳嵃鐗堟湰鍙 + * @param void + * @retval void + * @note void + * @example void + */ +int version(void) +{ + printf("纭欢鐗堟湰锛%s\r\n",HARDWARE_VERSION); + printf("杞欢鐗堟湰锛%s\r\n",SOFTWARE_VERSION); + return 0; +} + +//鎵撳嵃鐗堟湰鍙 +SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC), version, version, version); diff --git a/App/Src/Main.c b/App/Src/Main.c new file mode 100644 index 0000000..5cb201b --- /dev/null +++ b/App/Src/Main.c @@ -0,0 +1,42 @@ +/* MCU INCLUDE */ +#include "stm32f10x.h" +/* BSP INCLUDE */ +#include "Bsp.h" +/* APP INLCUDE */ +#include "LedTest.h" + +/** + * @brief ThreadX鎿嶄綔绯荤粺鍏ュ彛鍑芥暟 + * @param FirstUnusedMemory OS鐩稿叧 + * @retval void + * @note 姝ゅ嚱鏁板簲璇ュ皢鎵鏈塐S鐩稿叧鐨勫垵濮嬪寲鏀惧埌杩欓噷 + * @example void + */ +void ThreadXTaskInit(void* FirstUnusedMemory) +{ + /* 浼樺厛绾31锛屾姠鍗10 */ + LedCtlTaskInit(31,10); +} + +/** + * @brief C绋嬪簭涓诲嚱鏁 + * @param void + * @retval void + * @note void + * @example void + */ +int main(void) +{ + //bsp鍒濆鍖 + BspConfigInit(); + + /* Start ThreadX */ + tx_kernel_enter(); + + while (true) + { + //绋嬪簭杩愯鍒拌繖閲岃鏄嶰S璋冨害杩愯澶辫触 + printf("OS Start Error !\n"); + DelayMs(1000); + } +} diff --git a/Eide/.clang-format b/Eide/.clang-format new file mode 100644 index 0000000..ecc57c4 --- /dev/null +++ b/Eide/.clang-format @@ -0,0 +1,38 @@ +--- +BasedOnStyle: Microsoft +Language: Cpp + +################################### +# indent conf +################################### + +UseTab: Never +IndentWidth: 4 +TabWidth: 4 +ColumnLimit: 0 +AccessModifierOffset: -4 +NamespaceIndentation: All +FixNamespaceComments: false +BreakBeforeBraces: Linux + +################################### +# other styles +################################### + +# +# for more conf, you can ref: https://clang.llvm.org/docs/ClangFormatStyleOptions.html +# + +AllowShortIfStatementsOnASingleLine: true + +AllowShortLoopsOnASingleLine: true + +AllowShortBlocksOnASingleLine: true + +IndentCaseLabels: true + +SortIncludes: false + +AlignConsecutiveMacros: AcrossEmptyLines + +AlignConsecutiveAssignments: Consecutive diff --git a/Eide/.clangd b/Eide/.clangd new file mode 100644 index 0000000..29c8a87 --- /dev/null +++ b/Eide/.clangd @@ -0,0 +1,19 @@ +CompileFlags: + Add: + - -IC:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\14.2 rel1\arm-none-eabi\include\newlib-nano + - -IC:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\14.2 rel1\arm-none-eabi\include\c++\14.2.1 + - -IC:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\14.2 rel1\arm-none-eabi\include\c++\14.2.1\arm-none-eabi\thumb\v7-m\nofp + - -IC:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\14.2 rel1\arm-none-eabi\include\c++\14.2.1\backward + - -IC:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\14.2 rel1\lib\gcc\arm-none-eabi\14.2.1\include + - -IC:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\14.2 rel1\lib\gcc\arm-none-eabi\14.2.1\include-fixed + - -IC:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\14.2 rel1\arm-none-eabi\include + - -Ic:\program files (x86)\gnu arm embedded toolchain\10 2021.10\arm-none-eabi\include\newlib-nano + - -Ic:\program files (x86)\gnu arm embedded toolchain\10 2021.10\arm-none-eabi\include\c++\10.3.1 + - -Ic:\program files (x86)\gnu arm embedded toolchain\10 2021.10\arm-none-eabi\include\c++\10.3.1\arm-none-eabi\thumb\v7-m\nofp + - -Ic:\program files (x86)\gnu arm embedded toolchain\10 2021.10\arm-none-eabi\include\c++\10.3.1\backward + - -Ic:\program files (x86)\gnu arm embedded toolchain\10 2021.10\lib\gcc\arm-none-eabi\10.3.1\include + - -Ic:\program files (x86)\gnu arm embedded toolchain\10 2021.10\lib\gcc\arm-none-eabi\10.3.1\include-fixed + - -Ic:\program files (x86)\gnu arm embedded toolchain\10 2021.10\arm-none-eabi\include + CompilationDatabase: ./build/Debug + Compiler: c:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021.10\bin\arm-none-eabi-g++.exe + Remove: [] diff --git a/Eide/.eide/debug.st.option.bytes.ini b/Eide/.eide/debug.st.option.bytes.ini new file mode 100644 index 0000000..68844c7 --- /dev/null +++ b/Eide/.eide/debug.st.option.bytes.ini @@ -0,0 +1,110 @@ +锘############################################## +# +# STM32 Option Bytes +# +# Usage: Uncomment to enable options +# +############################################## + +# RDP = +# BOR_LEV = + +# WWDG_SW = +# IWDG_SW = +# IWDG_STOP = +# IWDG_STDBY = +# IWDG_ULP = + +# FZ_IWDG_STOP = +# FZ_IWDG_STDBY = + +# nRST_STOP = +# nRST_STDBY = + +# nBOOT_SEL = +# nRST_SHDW = +# PCROP_RDP = + +# nBFB2 = +# BFB2 = + +# nBoot1 = +# Boot1 = +# nBoot0 = +# nBoot0_SW_Cfg = + +# VDDA = +# SDADC12_VDD = + +# DB1M = +# DUALBANK = +# nDBANK = + +# BOOT0_nSW_Config = +# Data0 = +# Data1 = + +# nSRAM_Parity = +# SRAM2_RST = +# SRAM2_PE = + +# DDS = +# FSD = +# SFSA = +# C2OPT = +# NBRSD = +# SNBRSA = +# SBRSA = +# BRSD = +# SBRV = + +# DMEPB = +# DMESB = + +# Security = +# CM7_BOOT_ADD0 = +# CM7_BOOT_ADD1 = + +# IWDG1 = +# IWDG2 = + +# nRST_STDBY_D2 = +# BOOT_CM4 = + +# nRST_STDBY_D1 = +# BOOT_CM7 = + +# CM7_BOOT_ADD0 = +# CM7_BOOT_ADD1 = + +# DMEPA = +# DMESA = + +# SECA_strt = +# SECA_end = +# SECB_strt = +# SECB_end = + +# DTCM_RAM = +# SPRMOD = +# WPRMOD = + +# PCROPA_STRT = +# PCROPA_END = +# PCROPB_STRT = +# PCROPB_END = + +# WRP = +# WRP2 = +# WRP3 = +# WRP4 = +# WRP1A_STRT = +# WRP1A_END = +# WRP1B_STRT = +# WRP1B_END = +# WRP2A_STRT = +# WRP2A_END = +# WRP2B_STRT = +# WRP2B_END = + +# IPCCDBA = \ No newline at end of file diff --git a/Eide/.eide/eide.json b/Eide/.eide/eide.json new file mode 100644 index 0000000..ee85b65 --- /dev/null +++ b/Eide/.eide/eide.json @@ -0,0 +1,163 @@ +{ + "name": "Application", + "type": "ARM", + "dependenceList": [], + "srcDirs": [ + "../../../Bsp/Src", + "../../../StdLib/Src", + "../../../System/CMSIS", + "../../../ThirdLib/LetterShell/Src", + "../App/Src", + "../../../ThirdLib/ThreadX/common/src", + "../../../ThirdLib/ThreadX/ports/cortex_m3/gnu/src" + ], + "virtualFolder": { + "name": "", + "files": [ + { + "path": "../../../System/Startup/TrueStudio/startup_stm32f10x_hd.s" + }, + { + "path": "../../../System/system_stm32f10x.c" + }, + { + "path": "../../../System/stm32f10x_it_os.c" + } + ], + "folders": [] + }, + "outDir": "build", + "deviceName": "STM32F103ZE", + "packDir": ".pack/Keil/STM32F1xx_DFP.2.3.0", + "miscInfo": { + "uid": "ecbbdd2006397faa870eccaf00bbaa03" + }, + "targets": { + "Debug": { + "excludeList": [ + "../../../../System/LinkScripts", + "../../../../System/Startup", + "/stm32f10x_it.c" + ], + "toolchain": "GCC", + "compileConfig": { + "cpuType": "Cortex-M3", + "floatingPointHardware": "none", + "scatterFilePath": "../../../System/LinkScripts/TrueStudio/stm32_flash_ze.ld", + "useCustomScatterFile": true, + "storageLayout": { + "RAM": [], + "ROM": [] + }, + "options": "null", + "archExtensions": "" + }, + "uploader": "OpenOCD", + "uploadConfig": { + "bin": "", + "target": "stm32f1x", + "interface": "stlink-v2-1", + "baseAddr": "0x08000000" + }, + "uploadConfigMap": { + "JLink": { + "bin": "", + "baseAddr": "", + "cpuInfo": { + "vendor": "null", + "cpuName": "null" + }, + "proType": 1, + "speed": 8000, + "otherCmds": "" + }, + "STLink": { + "bin": "", + "proType": "SWD", + "resetMode": "default", + "runAfterProgram": true, + "speed": 4000, + "address": "0x08000000", + "elFile": "None", + "optionBytes": ".eide/debug.st.option.bytes.ini", + "otherCmds": "" + }, + "OpenOCD": { + "bin": "", + "target": "stm32f1x", + "interface": "stlink", + "baseAddr": "0x08000000" + } + }, + "custom_dep": { + "name": "default", + "incList": [ + ".", + "../App/Inc", + "../../../Bsp/Inc", + "../../../System", + "../../../StdLib/Inc", + "../../../ThirdLib/LetterShell/Inc", + "../../../System/CMSIS", + "../App/Board", + "../../../ThirdLib/ThreadX/common/inc", + "../../../ThirdLib/ThreadX/ports/cortex_m3/gnu/inc" + ], + "libList": [], + "defineList": [ + "DEBUG", + "USE_STDPERIPH_DRIVER", + "STM32F10X_HD" + ] + }, + "builderOptions": { + "GCC": { + "version": 5, + "beforeBuildTasks": [], + "afterBuildTasks": [], + "global": { + "$float-abi-type": "softfp", + "output-debug-info": "enable", + "misc-control": "--specs=nosys.specs --specs=nano.specs" + }, + "c/cpp-compiler": { + "language-c": "c99", + "language-cpp": "c++11", + "optimization": "level-debug", + "warnings": "all-warnings", + "one-elf-section-per-function": true, + "one-elf-section-per-data": true + }, + "asm-compiler": {}, + "linker": { + "output-format": "elf", + "remove-unused-input-sections": true, + "LIB_FLAGS": "-lm", + "$toolName": "auto" + } + }, + "AC5": { + "version": 4, + "beforeBuildTasks": [], + "afterBuildTasks": [], + "global": { + "use-microLIB": false, + "output-debug-info": "enable" + }, + "c/cpp-compiler": { + "optimization": "level-0", + "one-elf-section-per-function": true, + "c99-mode": true, + "C_FLAGS": "--diag_suppress=1 --diag_suppress=1295", + "CXX_FLAGS": "--diag_suppress=1 --diag_suppress=1295" + }, + "asm-compiler": {}, + "linker": { + "output-format": "elf" + } + } + } + } + }, + "version": "3.6" +} \ No newline at end of file diff --git a/Eide/.eide/env.ini b/Eide/.eide/env.ini new file mode 100644 index 0000000..0b722d2 --- /dev/null +++ b/Eide/.eide/env.ini @@ -0,0 +1,19 @@ +########################################################### +# project environment variables +########################################################### + +# append command prefix for toolchain +#COMPILER_CMD_PREFIX= + +# mcu ram size (used to print memory usage) +#MCU_RAM_SIZE=0x00 + +# mcu rom size (used to print memory usage) +#MCU_ROM_SIZE=0x00 + +# put your global variables ... +#GLOBAL_VAR= + +[debug] +# put your variables for 'debug' target ... +#VAR= \ No newline at end of file diff --git a/Eide/.eide/files.options.yml b/Eide/.eide/files.options.yml new file mode 100644 index 0000000..2cb8ed8 --- /dev/null +++ b/Eide/.eide/files.options.yml @@ -0,0 +1,20 @@ +########################################################################################## +# Append Compiler Options For Source Files +########################################################################################## + +# syntax: +# : +# For get pattern syntax, please refer to: https://www.npmjs.com/package/micromatch +# +# examples: +# 'main.cpp': --cpp11 -Og ... +# 'src/*.c': -gnu -O2 ... +# 'src/lib/**/*.cpp': --cpp11 -Os ... +# '!Application/*.c': -O0 +# '**/*.c': -O2 -gnu ... + +version: "2.0" +options: + Debug: + files: {} + virtualPathFiles: {} diff --git a/Eide/.gitignore b/Eide/.gitignore new file mode 100644 index 0000000..1306610 --- /dev/null +++ b/Eide/.gitignore @@ -0,0 +1,15 @@ +# dot files +/.vscode/launch.json +/.settings +/.eide/log +/.eide.usr.ctx.json + +# project out +/build +/bin +/obj +/out + +# eide template +*.ept +*.eide-template diff --git a/Eide/.vscode/settings.json b/Eide/.vscode/settings.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/Eide/.vscode/settings.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/Eide/.vscode/tasks.json b/Eide/.vscode/tasks.json new file mode 100644 index 0000000..3e192b9 --- /dev/null +++ b/Eide/.vscode/tasks.json @@ -0,0 +1,40 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "type": "shell", + "command": "${command:eide.project.build}", + "group": "build", + "problemMatcher": [] + }, + { + "label": "flash", + "type": "shell", + "command": "${command:eide.project.uploadToDevice}", + "group": "build", + "problemMatcher": [] + }, + { + "label": "build and flash", + "type": "shell", + "command": "${command:eide.project.buildAndFlash}", + "group": "build", + "problemMatcher": [] + }, + { + "label": "rebuild", + "type": "shell", + "command": "${command:eide.project.rebuild}", + "group": "build", + "problemMatcher": [] + }, + { + "label": "clean", + "type": "shell", + "command": "${command:eide.project.clean}", + "group": "build", + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/Eide/Application.code-workspace b/Eide/Application.code-workspace new file mode 100644 index 0000000..2c63d25 --- /dev/null +++ b/Eide/Application.code-workspace @@ -0,0 +1,45 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": { + "files.autoGuessEncoding": true, + "C_Cpp.default.configurationProvider": "cl.eide", + "C_Cpp.errorSquiggles": "disabled", + "files.associations": { + ".eideignore": "ignore", + "*.a51": "a51", + "*.h": "c", + "*.c": "c", + "*.hxx": "cpp", + "*.hpp": "cpp", + "*.c++": "cpp", + "*.cpp": "cpp", + "*.cxx": "cpp", + "*.cc": "cpp" + }, + "[yaml]": { + "editor.insertSpaces": true, + "editor.tabSize": 4, + "editor.autoIndent": "advanced" + } + }, + "extensions": { + "recommendations": [ + "cl.eide", + "keroc.hex-fmt", + "xiaoyongdong.srecord", + "hars.cppsnippets", + "zixuanwang.linkerscript", + "redhat.vscode-yaml", + "IBM.output-colorizer", + "cschlosser.doxdocgen", + "ms-vscode.vscode-serial-monitor", + "alefragnani.project-manager", + "dan-c-underwood.arm", + "marus25.cortex-debug" + ] + } +} \ No newline at end of file diff --git a/Eide/SysCall.c b/Eide/SysCall.c new file mode 100644 index 0000000..b8aacaf --- /dev/null +++ b/Eide/SysCall.c @@ -0,0 +1,146 @@ +/** + ****************************************************************************** + * @file syscalls.c + * @author Suroy Wrote with Auto-generated by STM32CubeIDE + * @url https://suroy.cn + * @brief STM32CubeIDE Minimal System calls file + * + * For more information about which c-functions + * need which of these lowlevel functions + * please consult the Newlib libc-manual + ****************************************************************************** + * @attention + * + * Copyright (c) 2020-2022 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Includes */ +#include +#include +#include +#include +#include +#include +#include "Bsp.h" + + +/* Variables */ +extern int __io_putchar(int ch) __attribute__((weak)); +extern int __io_getchar(void) __attribute__((weak)); + + + +/* Functions */ + +__attribute__((weak)) int _read(int file, char *ptr, int len) +{ + (void)file; + int DataIdx; + + for (DataIdx = 0; DataIdx < len; DataIdx++) + { + *ptr++ = __io_getchar(); + } + + return len; +} + +__attribute__((weak)) int _write(int file, char *ptr, int len) +{ + (void)file; + int DataIdx; + + for (DataIdx = 0; DataIdx < len; DataIdx++) + { + __io_putchar(*ptr++); + } + return len; +} + + + +// 鏉′欢缂栬瘧 +#ifdef __GNUC__ +#define PUTCHAR_PROTOTYPE int __io_putchar(int ch) +#define GETCHAR_PROTOTYPE int __io_getchar(void) +#else +#define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) +#define GETCHAR_PROTOTYPE int fgetc(FILE *f) +#endif /* __GNUC__ */ + + +/** + * 鍑芥暟鍔熻兘: 閲嶅畾鍚 c搴撳嚱鏁 printf鍒 DEBUG_USARTx + * 杈撳叆鍙傛暟: 鏃 + * 杩 鍥 鍊: 鏃 + * 璇 鏄庯細鏃 + */ +PUTCHAR_PROTOTYPE +{ + UsartSendChar(TTY_COM, ch); //闃诲寮忔棤闄愮瓑寰 + return ch; +} + + +/** + * 鍑芥暟鍔熻兘: 閲嶅畾鍚 c搴撳嚱鏁 getchar,scanf鍒 DEBUG_USARTx + * 杈撳叆鍙傛暟: 鏃 + * 杩 鍥 鍊: 鏃 + * 璇 鏄庯細鏃 + */ +GETCHAR_PROTOTYPE +{ + uint8_t ch = 0; + ch = UsartReceiveChar(TTY_COM); + + return ch; +} + + + +/* 闈濭CC妯″紡鎵嶅厑璁哥紪璇戜娇鐢ㄥ嵆 Keil銆両AR 绛 */ +#ifndef __GNUC__ + +/** + * @brief 閲嶅畾鍚 C 鏍囧噯搴 printf 鍑芥暟鍒颁覆鍙 huart1 + * 閫傜敤浜 Keil銆両AR 绛塈DE锛涗笉閫傜敤 GCC + * @author Suroy + * @param ch + * @param f + * @return int + * + * @usage printf("USART1_Target:\r\n"); + */ +int fputc(int ch, FILE *f) +{ + //閲囩敤杞鏂瑰紡鍙戦1瀛楄妭鏁版嵁锛岃秴鏃舵椂闂翠负鏃犻檺绛夊緟 + HAL_UART_Transmit(&huart1,(uint8_t *)&ch,1,HAL_MAX_DELAY); //huart1鏄覆鍙g殑鍙ユ焺 + return ch; +} + +/** + * @brief fgets 閲嶅畾鍚 + * 閲嶅畾鍚 C 鏍囧噯搴 scanf 鍑芥暟鍒颁覆鍙 huart1 + * 娉ㄦ剰浠 绌烘牸 涓虹粨鏉 + * @param f + * @return int + * + * @usage scanf("%c", &RecData); + */ +int fgetc(FILE *f) +{ + uint8_t ch; + HAL_UART_Receive(&huart1, (uint8_t *)&ch, 1, HAL_MAX_DELAY); //huart1鏄覆鍙g殑鍙ユ焺 + return ch; +} + +#endif /* __GNUC__ */ + + diff --git a/MdkV5/Application.uvprojx b/MdkV5/Application.uvprojx new file mode 100644 index 0000000..cb25cf1 --- /dev/null +++ b/MdkV5/Application.uvprojx @@ -0,0 +1,3180 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + Debug + 0x4 + ARM-ADS + 5060960::V5.06 update 7 (build 960)::.\ARMCC + 5060960::V5.06 update 7 (build 960)::.\ARMCC + 0 + + + STM32F103ZE + STMicroelectronics + Keil.STM32F1xx_DFP.2.4.1 + https://www.keil.com/pack/ + IRAM(0x20000000,0x00010000) IROM(0x08000000,0x00080000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_512 -FS08000000 -FL080000 -FP0($$Device:STM32F103ZE$Flash\STM32F10x_512.FLM)) + 0 + $$Device:STM32F103ZE$Device\Include\stm32f10x.h + + + + + + + + + + $$Device:STM32F103ZE$SVD\STM32F103xx.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\Objects\ + Application_Debug + 1 + 0 + 0 + 1 + 1 + .\Listings\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + SARMCM3.DLL + -REMAP + DCM.DLL + -pCM3 + SARMCM3.DLL + + TCM.DLL + -pCM3 + + + + 1 + 0 + 0 + 0 + 16 + + + + + 1 + 0 + 0 + 1 + 1 + -1 + + 1 + BIN\UL2CM3.DLL + + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M3" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 8 + 1 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x10000 + + + 1 + 0x8000000 + 0x80000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x80000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x10000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 2 + 0 + 0 + 1 + 0 + 0 + 1 + 5 + 1 + 1 + 0 + 0 + 0 + + --no-multibyte-chars + USE_STDPERIPH_DRIVER,STM32F10X_HD,DEBUG, + + ..\..\..\Bsp\Inc;..\..\..\System;..\..\..\System\CMSIS;..\..\..\ThirdLib\LetterShell\Inc;..\..\..\StdLib\Inc;..\App\Inc;..\..\..\ThirdLib\ThreadX\common\inc;..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\inc;..\App\Board + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + + + + + + + + + 0 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + + + + + + + + + App + + + Main.c + 1 + ..\App\Src\Main.c + + + LedTest.c + 1 + ..\App\Src\LedTest.c + + + LetterShell.c + 1 + ..\App\Src\LetterShell.c + + + + + Bsp + + + Bsp.c + 1 + ..\..\..\Bsp\Src\Bsp.c + + + Delay.c + 1 + ..\..\..\Bsp\Src\Delay.c + + + Gpio.c + 1 + ..\..\..\Bsp\Src\Gpio.c + + + Interrupt.c + 1 + ..\..\..\Bsp\Src\Interrupt.c + + + Usart.c + 1 + ..\..\..\Bsp\Src\Usart.c + + + + + StdLib + + + misc.c + 1 + ..\..\..\StdLib\Src\misc.c + + + stm32f10x_adc.c + 1 + ..\..\..\StdLib\Src\stm32f10x_adc.c + + + stm32f10x_bkp.c + 1 + ..\..\..\StdLib\Src\stm32f10x_bkp.c + + + stm32f10x_can.c + 1 + ..\..\..\StdLib\Src\stm32f10x_can.c + + + stm32f10x_cec.c + 1 + ..\..\..\StdLib\Src\stm32f10x_cec.c + + + stm32f10x_crc.c + 1 + ..\..\..\StdLib\Src\stm32f10x_crc.c + + + stm32f10x_dac.c + 1 + ..\..\..\StdLib\Src\stm32f10x_dac.c + + + stm32f10x_dbgmcu.c + 1 + ..\..\..\StdLib\Src\stm32f10x_dbgmcu.c + + + stm32f10x_dma.c + 1 + ..\..\..\StdLib\Src\stm32f10x_dma.c + + + stm32f10x_exti.c + 1 + ..\..\..\StdLib\Src\stm32f10x_exti.c + + + stm32f10x_flash.c + 1 + ..\..\..\StdLib\Src\stm32f10x_flash.c + + + stm32f10x_fsmc.c + 1 + ..\..\..\StdLib\Src\stm32f10x_fsmc.c + + + stm32f10x_gpio.c + 1 + ..\..\..\StdLib\Src\stm32f10x_gpio.c + + + stm32f10x_i2c.c + 1 + ..\..\..\StdLib\Src\stm32f10x_i2c.c + + + stm32f10x_iwdg.c + 1 + ..\..\..\StdLib\Src\stm32f10x_iwdg.c + + + stm32f10x_pwr.c + 1 + ..\..\..\StdLib\Src\stm32f10x_pwr.c + + + stm32f10x_rcc.c + 1 + ..\..\..\StdLib\Src\stm32f10x_rcc.c + + + stm32f10x_rtc.c + 1 + ..\..\..\StdLib\Src\stm32f10x_rtc.c + + + stm32f10x_sdio.c + 1 + ..\..\..\StdLib\Src\stm32f10x_sdio.c + + + stm32f10x_spi.c + 1 + ..\..\..\StdLib\Src\stm32f10x_spi.c + + + stm32f10x_tim.c + 1 + ..\..\..\StdLib\Src\stm32f10x_tim.c + + + stm32f10x_usart.c + 1 + ..\..\..\StdLib\Src\stm32f10x_usart.c + + + stm32f10x_wwdg.c + 1 + ..\..\..\StdLib\Src\stm32f10x_wwdg.c + + + + + System + + + core_cm3.c + 1 + ..\..\..\System\CMSIS\core_cm3.c + + + system_stm32f10x.c + 1 + ..\..\..\System\system_stm32f10x.c + + + startup_stm32f10x_hd.s + 2 + ..\..\..\System\Startup\arm\startup_stm32f10x_hd.s + + + stm32f10x_it_os.c + 1 + ..\..\..\System\stm32f10x_it_os.c + + + + + LetterShell + + + shell.c + 1 + ..\..\..\ThirdLib\LetterShell\Src\shell.c + + + shell_cmd_list.c + 1 + ..\..\..\ThirdLib\LetterShell\Src\shell_cmd_list.c + + + shell_companion.c + 1 + ..\..\..\ThirdLib\LetterShell\Src\shell_companion.c + + + shell_ext.c + 1 + ..\..\..\ThirdLib\LetterShell\Src\shell_ext.c + + + + + ThreadX + + + tx_block_allocate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_allocate.c + + + tx_block_pool_cleanup.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_pool_cleanup.c + + + tx_block_pool_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_pool_create.c + + + tx_block_pool_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_pool_delete.c + + + tx_block_pool_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_pool_info_get.c + + + tx_block_pool_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_pool_initialize.c + + + tx_block_pool_performance_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_pool_performance_info_get.c + + + tx_block_pool_performance_system_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_pool_performance_system_info_get.c + + + tx_block_pool_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_pool_prioritize.c + + + tx_block_release.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_release.c + + + tx_byte_allocate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_allocate.c + + + tx_byte_pool_cleanup.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_cleanup.c + + + tx_byte_pool_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_create.c + + + tx_byte_pool_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_delete.c + + + tx_byte_pool_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_info_get.c + + + tx_byte_pool_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_initialize.c + + + tx_byte_pool_performance_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_performance_info_get.c + + + tx_byte_pool_performance_system_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_performance_system_info_get.c + + + tx_byte_pool_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_prioritize.c + + + tx_byte_pool_search.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_search.c + + + tx_byte_release.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_release.c + + + tx_event_flags_cleanup.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_cleanup.c + + + tx_event_flags_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_create.c + + + tx_event_flags_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_delete.c + + + tx_event_flags_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_get.c + + + tx_event_flags_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_info_get.c + + + tx_event_flags_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_initialize.c + + + tx_event_flags_performance_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_performance_info_get.c + + + tx_event_flags_performance_system_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_performance_system_info_get.c + + + tx_event_flags_set.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_set.c + + + tx_event_flags_set_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_set_notify.c + + + tx_initialize_high_level.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_initialize_high_level.c + + + tx_initialize_kernel_enter.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_initialize_kernel_enter.c + + + tx_initialize_kernel_setup.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_initialize_kernel_setup.c + + + tx_misra.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_misra.c + + + tx_mutex_cleanup.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_cleanup.c + + + tx_mutex_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_create.c + + + tx_mutex_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_delete.c + + + tx_mutex_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_get.c + + + tx_mutex_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_info_get.c + + + tx_mutex_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_initialize.c + + + tx_mutex_performance_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_performance_info_get.c + + + tx_mutex_performance_system_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_performance_system_info_get.c + + + tx_mutex_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_prioritize.c + + + tx_mutex_priority_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_priority_change.c + + + tx_mutex_put.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_put.c + + + tx_queue_cleanup.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_cleanup.c + + + tx_queue_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_create.c + + + tx_queue_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_delete.c + + + tx_queue_flush.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_flush.c + + + tx_queue_front_send.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_front_send.c + + + tx_queue_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_info_get.c + + + tx_queue_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_initialize.c + + + tx_queue_performance_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_performance_info_get.c + + + tx_queue_performance_system_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_performance_system_info_get.c + + + tx_queue_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_prioritize.c + + + tx_queue_receive.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_receive.c + + + tx_queue_send.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_send.c + + + tx_queue_send_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_send_notify.c + + + tx_semaphore_ceiling_put.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_ceiling_put.c + + + tx_semaphore_cleanup.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_cleanup.c + + + tx_semaphore_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_create.c + + + tx_semaphore_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_delete.c + + + tx_semaphore_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_get.c + + + tx_semaphore_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_info_get.c + + + tx_semaphore_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_initialize.c + + + tx_semaphore_performance_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_performance_info_get.c + + + tx_semaphore_performance_system_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_performance_system_info_get.c + + + tx_semaphore_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_prioritize.c + + + tx_semaphore_put.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_put.c + + + tx_semaphore_put_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_put_notify.c + + + tx_thread_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_create.c + + + tx_thread_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_delete.c + + + tx_thread_entry_exit_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_entry_exit_notify.c + + + tx_thread_identify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_identify.c + + + tx_thread_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_info_get.c + + + tx_thread_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_initialize.c + + + tx_thread_performance_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_performance_info_get.c + + + tx_thread_performance_system_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_performance_system_info_get.c + + + tx_thread_preemption_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_preemption_change.c + + + tx_thread_priority_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_priority_change.c + + + tx_thread_relinquish.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_relinquish.c + + + tx_thread_reset.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_reset.c + + + tx_thread_resume.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_resume.c + + + tx_thread_shell_entry.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_shell_entry.c + + + tx_thread_sleep.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_sleep.c + + + tx_thread_stack_analyze.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_stack_analyze.c + + + tx_thread_stack_error_handler.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_stack_error_handler.c + + + tx_thread_stack_error_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_stack_error_notify.c + + + tx_thread_suspend.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_suspend.c + + + tx_thread_system_preempt_check.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_system_preempt_check.c + + + tx_thread_system_resume.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_system_resume.c + + + tx_thread_system_suspend.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_system_suspend.c + + + tx_thread_terminate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_terminate.c + + + tx_thread_time_slice.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_time_slice.c + + + tx_thread_time_slice_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_time_slice_change.c + + + tx_thread_timeout.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_timeout.c + + + tx_thread_wait_abort.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_wait_abort.c + + + tx_time_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_time_get.c + + + tx_time_set.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_time_set.c + + + tx_timer_activate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_activate.c + + + tx_timer_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_change.c + + + tx_timer_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_create.c + + + tx_timer_deactivate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_deactivate.c + + + tx_timer_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_delete.c + + + tx_timer_expiration_process.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_expiration_process.c + + + tx_timer_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_info_get.c + + + tx_timer_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_initialize.c + + + tx_timer_performance_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_performance_info_get.c + + + tx_timer_performance_system_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_performance_system_info_get.c + + + tx_timer_system_activate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_system_activate.c + + + tx_timer_system_deactivate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_system_deactivate.c + + + tx_timer_thread_entry.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_thread_entry.c + + + tx_trace_buffer_full_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_buffer_full_notify.c + + + tx_trace_disable.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_disable.c + + + tx_trace_enable.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_enable.c + + + tx_trace_event_filter.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_event_filter.c + + + tx_trace_event_unfilter.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_event_unfilter.c + + + tx_trace_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_initialize.c + + + tx_trace_interrupt_control.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_interrupt_control.c + + + tx_trace_isr_enter_insert.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_isr_enter_insert.c + + + tx_trace_isr_exit_insert.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_isr_exit_insert.c + + + tx_trace_object_register.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_object_register.c + + + tx_trace_object_unregister.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_object_unregister.c + + + tx_trace_user_event_insert.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_user_event_insert.c + + + txe_block_allocate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_block_allocate.c + + + txe_block_pool_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_block_pool_create.c + + + txe_block_pool_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_block_pool_delete.c + + + txe_block_pool_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_block_pool_info_get.c + + + txe_block_pool_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_block_pool_prioritize.c + + + txe_block_release.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_block_release.c + + + txe_byte_allocate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_byte_allocate.c + + + txe_byte_pool_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_byte_pool_create.c + + + txe_byte_pool_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_byte_pool_delete.c + + + txe_byte_pool_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_byte_pool_info_get.c + + + txe_byte_pool_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_byte_pool_prioritize.c + + + txe_byte_release.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_byte_release.c + + + txe_event_flags_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_event_flags_create.c + + + txe_event_flags_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_event_flags_delete.c + + + txe_event_flags_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_event_flags_get.c + + + txe_event_flags_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_event_flags_info_get.c + + + txe_event_flags_set.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_event_flags_set.c + + + txe_event_flags_set_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_event_flags_set_notify.c + + + txe_mutex_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_mutex_create.c + + + txe_mutex_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_mutex_delete.c + + + txe_mutex_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_mutex_get.c + + + txe_mutex_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_mutex_info_get.c + + + txe_mutex_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_mutex_prioritize.c + + + txe_mutex_put.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_mutex_put.c + + + txe_queue_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_create.c + + + txe_queue_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_delete.c + + + txe_queue_flush.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_flush.c + + + txe_queue_front_send.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_front_send.c + + + txe_queue_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_info_get.c + + + txe_queue_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_prioritize.c + + + txe_queue_receive.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_receive.c + + + txe_queue_send.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_send.c + + + txe_queue_send_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_send_notify.c + + + txe_semaphore_ceiling_put.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_semaphore_ceiling_put.c + + + txe_semaphore_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_semaphore_create.c + + + txe_semaphore_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_semaphore_delete.c + + + txe_semaphore_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_semaphore_get.c + + + txe_semaphore_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_semaphore_info_get.c + + + txe_semaphore_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_semaphore_prioritize.c + + + txe_semaphore_put.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_semaphore_put.c + + + txe_semaphore_put_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_semaphore_put_notify.c + + + txe_thread_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_create.c + + + txe_thread_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_delete.c + + + txe_thread_entry_exit_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_entry_exit_notify.c + + + txe_thread_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_info_get.c + + + txe_thread_preemption_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_preemption_change.c + + + txe_thread_priority_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_priority_change.c + + + txe_thread_relinquish.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_relinquish.c + + + txe_thread_reset.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_reset.c + + + txe_thread_resume.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_resume.c + + + txe_thread_suspend.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_suspend.c + + + txe_thread_terminate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_terminate.c + + + txe_thread_time_slice_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_time_slice_change.c + + + txe_thread_wait_abort.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_wait_abort.c + + + txe_timer_activate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_timer_activate.c + + + txe_timer_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_timer_change.c + + + txe_timer_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_timer_create.c + + + txe_timer_deactivate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_timer_deactivate.c + + + txe_timer_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_timer_delete.c + + + txe_timer_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_timer_info_get.c + + + tx_thread_context_restore.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_thread_context_restore.s + + + tx_thread_context_save.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_thread_context_save.s + + + tx_thread_interrupt_control.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_thread_interrupt_control.s + + + tx_thread_interrupt_disable.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_thread_interrupt_disable.s + + + tx_thread_interrupt_restore.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_thread_interrupt_restore.s + + + tx_thread_schedule.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_thread_schedule.s + + + tx_thread_stack_build.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_thread_stack_build.s + + + tx_thread_system_return.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_thread_system_return.s + + + tx_timer_interrupt.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_timer_interrupt.s + + + tx_initialize_low_level.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_initialize_low_level.s + + + + + + + Release + 0x4 + ARM-ADS + 1 + + + STM32F103ZE + STMicroelectronics + Keil.STM32F1xx_DFP.2.4.1 + https://www.keil.com/pack/ + IRAM(0x20000000,0x00010000) IROM(0x08000000,0x00080000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_512 -FS08000000 -FL080000 -FP0($$Device:STM32F103ZE$Flash\STM32F10x_512.FLM)) + 0 + $$Device:STM32F103ZE$Device\Include\stm32f10x.h + + + + + + + + + + $$Device:STM32F103ZE$SVD\STM32F103xx.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\Objects\ + Application + 1 + 0 + 0 + 1 + 1 + .\Listings\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + SARMCM3.DLL + -REMAP + DCM.DLL + -pCM3 + SARMCM3.DLL + + TCM.DLL + -pCM3 + + + + 1 + 0 + 0 + 0 + 16 + + + + + 1 + 0 + 0 + 1 + 1 + -1 + + 1 + BIN\UL2CM3.DLL + + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M3" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x10000 + + + 1 + 0x8000000 + 0x80000 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x80000 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x10000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 2 + 0 + 0 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + + + + + + + + + 0 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + + + + + + + + + App + + + Main.c + 1 + ..\App\Src\Main.c + + + LedTest.c + 1 + ..\App\Src\LedTest.c + + + LetterShell.c + 1 + ..\App\Src\LetterShell.c + + + + + Bsp + + + Bsp.c + 1 + ..\..\..\Bsp\Src\Bsp.c + + + Delay.c + 1 + ..\..\..\Bsp\Src\Delay.c + + + Gpio.c + 1 + ..\..\..\Bsp\Src\Gpio.c + + + Interrupt.c + 1 + ..\..\..\Bsp\Src\Interrupt.c + + + Usart.c + 1 + ..\..\..\Bsp\Src\Usart.c + + + + + StdLib + + + misc.c + 1 + ..\..\..\StdLib\Src\misc.c + + + stm32f10x_adc.c + 1 + ..\..\..\StdLib\Src\stm32f10x_adc.c + + + stm32f10x_bkp.c + 1 + ..\..\..\StdLib\Src\stm32f10x_bkp.c + + + stm32f10x_can.c + 1 + ..\..\..\StdLib\Src\stm32f10x_can.c + + + stm32f10x_cec.c + 1 + ..\..\..\StdLib\Src\stm32f10x_cec.c + + + stm32f10x_crc.c + 1 + ..\..\..\StdLib\Src\stm32f10x_crc.c + + + stm32f10x_dac.c + 1 + ..\..\..\StdLib\Src\stm32f10x_dac.c + + + stm32f10x_dbgmcu.c + 1 + ..\..\..\StdLib\Src\stm32f10x_dbgmcu.c + + + stm32f10x_dma.c + 1 + ..\..\..\StdLib\Src\stm32f10x_dma.c + + + stm32f10x_exti.c + 1 + ..\..\..\StdLib\Src\stm32f10x_exti.c + + + stm32f10x_flash.c + 1 + ..\..\..\StdLib\Src\stm32f10x_flash.c + + + stm32f10x_fsmc.c + 1 + ..\..\..\StdLib\Src\stm32f10x_fsmc.c + + + stm32f10x_gpio.c + 1 + ..\..\..\StdLib\Src\stm32f10x_gpio.c + + + stm32f10x_i2c.c + 1 + ..\..\..\StdLib\Src\stm32f10x_i2c.c + + + stm32f10x_iwdg.c + 1 + ..\..\..\StdLib\Src\stm32f10x_iwdg.c + + + stm32f10x_pwr.c + 1 + ..\..\..\StdLib\Src\stm32f10x_pwr.c + + + stm32f10x_rcc.c + 1 + ..\..\..\StdLib\Src\stm32f10x_rcc.c + + + stm32f10x_rtc.c + 1 + ..\..\..\StdLib\Src\stm32f10x_rtc.c + + + stm32f10x_sdio.c + 1 + ..\..\..\StdLib\Src\stm32f10x_sdio.c + + + stm32f10x_spi.c + 1 + ..\..\..\StdLib\Src\stm32f10x_spi.c + + + stm32f10x_tim.c + 1 + ..\..\..\StdLib\Src\stm32f10x_tim.c + + + stm32f10x_usart.c + 1 + ..\..\..\StdLib\Src\stm32f10x_usart.c + + + stm32f10x_wwdg.c + 1 + ..\..\..\StdLib\Src\stm32f10x_wwdg.c + + + + + System + + + core_cm3.c + 1 + ..\..\..\System\CMSIS\core_cm3.c + + + system_stm32f10x.c + 1 + ..\..\..\System\system_stm32f10x.c + + + startup_stm32f10x_hd.s + 2 + ..\..\..\System\Startup\arm\startup_stm32f10x_hd.s + + + stm32f10x_it_os.c + 1 + ..\..\..\System\stm32f10x_it_os.c + + + + + LetterShell + + + shell.c + 1 + ..\..\..\ThirdLib\LetterShell\Src\shell.c + + + shell_cmd_list.c + 1 + ..\..\..\ThirdLib\LetterShell\Src\shell_cmd_list.c + + + shell_companion.c + 1 + ..\..\..\ThirdLib\LetterShell\Src\shell_companion.c + + + shell_ext.c + 1 + ..\..\..\ThirdLib\LetterShell\Src\shell_ext.c + + + + + ThreadX + + + tx_block_allocate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_allocate.c + + + tx_block_pool_cleanup.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_pool_cleanup.c + + + tx_block_pool_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_pool_create.c + + + tx_block_pool_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_pool_delete.c + + + tx_block_pool_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_pool_info_get.c + + + tx_block_pool_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_pool_initialize.c + + + tx_block_pool_performance_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_pool_performance_info_get.c + + + tx_block_pool_performance_system_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_pool_performance_system_info_get.c + + + tx_block_pool_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_pool_prioritize.c + + + tx_block_release.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_block_release.c + + + tx_byte_allocate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_allocate.c + + + tx_byte_pool_cleanup.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_cleanup.c + + + tx_byte_pool_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_create.c + + + tx_byte_pool_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_delete.c + + + tx_byte_pool_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_info_get.c + + + tx_byte_pool_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_initialize.c + + + tx_byte_pool_performance_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_performance_info_get.c + + + tx_byte_pool_performance_system_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_performance_system_info_get.c + + + tx_byte_pool_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_prioritize.c + + + tx_byte_pool_search.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_pool_search.c + + + tx_byte_release.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_byte_release.c + + + tx_event_flags_cleanup.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_cleanup.c + + + tx_event_flags_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_create.c + + + tx_event_flags_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_delete.c + + + tx_event_flags_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_get.c + + + tx_event_flags_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_info_get.c + + + tx_event_flags_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_initialize.c + + + tx_event_flags_performance_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_performance_info_get.c + + + tx_event_flags_performance_system_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_performance_system_info_get.c + + + tx_event_flags_set.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_set.c + + + tx_event_flags_set_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_event_flags_set_notify.c + + + tx_initialize_high_level.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_initialize_high_level.c + + + tx_initialize_kernel_enter.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_initialize_kernel_enter.c + + + tx_initialize_kernel_setup.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_initialize_kernel_setup.c + + + tx_misra.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_misra.c + + + tx_mutex_cleanup.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_cleanup.c + + + tx_mutex_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_create.c + + + tx_mutex_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_delete.c + + + tx_mutex_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_get.c + + + tx_mutex_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_info_get.c + + + tx_mutex_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_initialize.c + + + tx_mutex_performance_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_performance_info_get.c + + + tx_mutex_performance_system_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_performance_system_info_get.c + + + tx_mutex_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_prioritize.c + + + tx_mutex_priority_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_priority_change.c + + + tx_mutex_put.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_mutex_put.c + + + tx_queue_cleanup.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_cleanup.c + + + tx_queue_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_create.c + + + tx_queue_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_delete.c + + + tx_queue_flush.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_flush.c + + + tx_queue_front_send.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_front_send.c + + + tx_queue_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_info_get.c + + + tx_queue_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_initialize.c + + + tx_queue_performance_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_performance_info_get.c + + + tx_queue_performance_system_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_performance_system_info_get.c + + + tx_queue_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_prioritize.c + + + tx_queue_receive.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_receive.c + + + tx_queue_send.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_send.c + + + tx_queue_send_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_queue_send_notify.c + + + tx_semaphore_ceiling_put.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_ceiling_put.c + + + tx_semaphore_cleanup.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_cleanup.c + + + tx_semaphore_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_create.c + + + tx_semaphore_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_delete.c + + + tx_semaphore_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_get.c + + + tx_semaphore_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_info_get.c + + + tx_semaphore_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_initialize.c + + + tx_semaphore_performance_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_performance_info_get.c + + + tx_semaphore_performance_system_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_performance_system_info_get.c + + + tx_semaphore_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_prioritize.c + + + tx_semaphore_put.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_put.c + + + tx_semaphore_put_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_semaphore_put_notify.c + + + tx_thread_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_create.c + + + tx_thread_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_delete.c + + + tx_thread_entry_exit_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_entry_exit_notify.c + + + tx_thread_identify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_identify.c + + + tx_thread_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_info_get.c + + + tx_thread_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_initialize.c + + + tx_thread_performance_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_performance_info_get.c + + + tx_thread_performance_system_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_performance_system_info_get.c + + + tx_thread_preemption_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_preemption_change.c + + + tx_thread_priority_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_priority_change.c + + + tx_thread_relinquish.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_relinquish.c + + + tx_thread_reset.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_reset.c + + + tx_thread_resume.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_resume.c + + + tx_thread_shell_entry.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_shell_entry.c + + + tx_thread_sleep.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_sleep.c + + + tx_thread_stack_analyze.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_stack_analyze.c + + + tx_thread_stack_error_handler.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_stack_error_handler.c + + + tx_thread_stack_error_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_stack_error_notify.c + + + tx_thread_suspend.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_suspend.c + + + tx_thread_system_preempt_check.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_system_preempt_check.c + + + tx_thread_system_resume.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_system_resume.c + + + tx_thread_system_suspend.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_system_suspend.c + + + tx_thread_terminate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_terminate.c + + + tx_thread_time_slice.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_time_slice.c + + + tx_thread_time_slice_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_time_slice_change.c + + + tx_thread_timeout.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_timeout.c + + + tx_thread_wait_abort.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_thread_wait_abort.c + + + tx_time_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_time_get.c + + + tx_time_set.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_time_set.c + + + tx_timer_activate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_activate.c + + + tx_timer_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_change.c + + + tx_timer_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_create.c + + + tx_timer_deactivate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_deactivate.c + + + tx_timer_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_delete.c + + + tx_timer_expiration_process.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_expiration_process.c + + + tx_timer_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_info_get.c + + + tx_timer_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_initialize.c + + + tx_timer_performance_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_performance_info_get.c + + + tx_timer_performance_system_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_performance_system_info_get.c + + + tx_timer_system_activate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_system_activate.c + + + tx_timer_system_deactivate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_system_deactivate.c + + + tx_timer_thread_entry.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_timer_thread_entry.c + + + tx_trace_buffer_full_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_buffer_full_notify.c + + + tx_trace_disable.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_disable.c + + + tx_trace_enable.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_enable.c + + + tx_trace_event_filter.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_event_filter.c + + + tx_trace_event_unfilter.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_event_unfilter.c + + + tx_trace_initialize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_initialize.c + + + tx_trace_interrupt_control.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_interrupt_control.c + + + tx_trace_isr_enter_insert.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_isr_enter_insert.c + + + tx_trace_isr_exit_insert.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_isr_exit_insert.c + + + tx_trace_object_register.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_object_register.c + + + tx_trace_object_unregister.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_object_unregister.c + + + tx_trace_user_event_insert.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\tx_trace_user_event_insert.c + + + txe_block_allocate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_block_allocate.c + + + txe_block_pool_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_block_pool_create.c + + + txe_block_pool_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_block_pool_delete.c + + + txe_block_pool_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_block_pool_info_get.c + + + txe_block_pool_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_block_pool_prioritize.c + + + txe_block_release.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_block_release.c + + + txe_byte_allocate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_byte_allocate.c + + + txe_byte_pool_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_byte_pool_create.c + + + txe_byte_pool_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_byte_pool_delete.c + + + txe_byte_pool_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_byte_pool_info_get.c + + + txe_byte_pool_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_byte_pool_prioritize.c + + + txe_byte_release.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_byte_release.c + + + txe_event_flags_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_event_flags_create.c + + + txe_event_flags_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_event_flags_delete.c + + + txe_event_flags_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_event_flags_get.c + + + txe_event_flags_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_event_flags_info_get.c + + + txe_event_flags_set.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_event_flags_set.c + + + txe_event_flags_set_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_event_flags_set_notify.c + + + txe_mutex_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_mutex_create.c + + + txe_mutex_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_mutex_delete.c + + + txe_mutex_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_mutex_get.c + + + txe_mutex_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_mutex_info_get.c + + + txe_mutex_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_mutex_prioritize.c + + + txe_mutex_put.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_mutex_put.c + + + txe_queue_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_create.c + + + txe_queue_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_delete.c + + + txe_queue_flush.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_flush.c + + + txe_queue_front_send.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_front_send.c + + + txe_queue_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_info_get.c + + + txe_queue_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_prioritize.c + + + txe_queue_receive.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_receive.c + + + txe_queue_send.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_send.c + + + txe_queue_send_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_queue_send_notify.c + + + txe_semaphore_ceiling_put.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_semaphore_ceiling_put.c + + + txe_semaphore_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_semaphore_create.c + + + txe_semaphore_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_semaphore_delete.c + + + txe_semaphore_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_semaphore_get.c + + + txe_semaphore_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_semaphore_info_get.c + + + txe_semaphore_prioritize.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_semaphore_prioritize.c + + + txe_semaphore_put.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_semaphore_put.c + + + txe_semaphore_put_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_semaphore_put_notify.c + + + txe_thread_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_create.c + + + txe_thread_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_delete.c + + + txe_thread_entry_exit_notify.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_entry_exit_notify.c + + + txe_thread_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_info_get.c + + + txe_thread_preemption_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_preemption_change.c + + + txe_thread_priority_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_priority_change.c + + + txe_thread_relinquish.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_relinquish.c + + + txe_thread_reset.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_reset.c + + + txe_thread_resume.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_resume.c + + + txe_thread_suspend.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_suspend.c + + + txe_thread_terminate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_terminate.c + + + txe_thread_time_slice_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_time_slice_change.c + + + txe_thread_wait_abort.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_thread_wait_abort.c + + + txe_timer_activate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_timer_activate.c + + + txe_timer_change.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_timer_change.c + + + txe_timer_create.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_timer_create.c + + + txe_timer_deactivate.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_timer_deactivate.c + + + txe_timer_delete.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_timer_delete.c + + + txe_timer_info_get.c + 1 + ..\..\..\ThirdLib\ThreadX\common\src\txe_timer_info_get.c + + + tx_thread_context_restore.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_thread_context_restore.s + + + tx_thread_context_save.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_thread_context_save.s + + + tx_thread_interrupt_control.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_thread_interrupt_control.s + + + tx_thread_interrupt_disable.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_thread_interrupt_disable.s + + + tx_thread_interrupt_restore.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_thread_interrupt_restore.s + + + tx_thread_schedule.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_thread_schedule.s + + + tx_thread_stack_build.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_thread_stack_build.s + + + tx_thread_system_return.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_thread_system_return.s + + + tx_timer_interrupt.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_timer_interrupt.s + + + tx_initialize_low_level.s + 2 + ..\..\..\ThirdLib\ThreadX\ports\cortex_m3\keil\src\tx_initialize_low_level.s + + + + + + + + + + + + + + + + + Application + 1 + + + + +
diff --git a/MdkV5/DebugConfig/Debug_STM32F103ZE_1.0.0.dbgconf b/MdkV5/DebugConfig/Debug_STM32F103ZE_1.0.0.dbgconf new file mode 100644 index 0000000..9c4804d --- /dev/null +++ b/MdkV5/DebugConfig/Debug_STM32F103ZE_1.0.0.dbgconf @@ -0,0 +1,36 @@ +// File: STM32F101_102_103_105_107.dbgconf +// Version: 1.0.0 +// Note: refer to STM32F101xx STM32F102xx STM32F103xx STM32F105xx STM32F107xx Reference manual (RM0008) +// STM32F101xx STM32F102xx STM32F103xx STM32F105xx STM32F107xx datasheets + +// <<< Use Configuration Wizard in Context Menu >>> + +// Debug MCU configuration register (DBGMCU_CR) +// Reserved bits must be kept at reset value +// DBG_TIM11_STOP TIM11 counter stopped when core is halted +// DBG_TIM10_STOP TIM10 counter stopped when core is halted +// DBG_TIM9_STOP TIM9 counter stopped when core is halted +// DBG_TIM14_STOP TIM14 counter stopped when core is halted +// DBG_TIM13_STOP TIM13 counter stopped when core is halted +// DBG_TIM12_STOP TIM12 counter stopped when core is halted +// DBG_CAN2_STOP Debug CAN2 stopped when core is halted +// DBG_TIM7_STOP TIM7 counter stopped when core is halted +// DBG_TIM6_STOP TIM6 counter stopped when core is halted +// DBG_TIM5_STOP TIM5 counter stopped when core is halted +// DBG_TIM8_STOP TIM8 counter stopped when core is halted +// DBG_I2C2_SMBUS_TIMEOUT SMBUS timeout mode stopped when core is halted +// DBG_I2C1_SMBUS_TIMEOUT SMBUS timeout mode stopped when core is halted +// DBG_CAN1_STOP Debug CAN1 stopped when Core is halted +// DBG_TIM4_STOP TIM4 counter stopped when core is halted +// DBG_TIM3_STOP TIM3 counter stopped when core is halted +// DBG_TIM2_STOP TIM2 counter stopped when core is halted +// DBG_TIM1_STOP TIM1 counter stopped when core is halted +// DBG_WWDG_STOP Debug window watchdog stopped when core is halted +// DBG_IWDG_STOP Debug independent watchdog stopped when core is halted +// DBG_STANDBY Debug standby mode +// DBG_STOP Debug stop mode +// DBG_SLEEP Debug sleep mode +// +DbgMCU_CR = 0x00000007; + +// <<< end of configuration section >>> diff --git a/MdkV5/DebugConfig/Target_1_STM32F103ZE_1.0.0.dbgconf b/MdkV5/DebugConfig/Target_1_STM32F103ZE_1.0.0.dbgconf new file mode 100644 index 0000000..9c4804d --- /dev/null +++ b/MdkV5/DebugConfig/Target_1_STM32F103ZE_1.0.0.dbgconf @@ -0,0 +1,36 @@ +// File: STM32F101_102_103_105_107.dbgconf +// Version: 1.0.0 +// Note: refer to STM32F101xx STM32F102xx STM32F103xx STM32F105xx STM32F107xx Reference manual (RM0008) +// STM32F101xx STM32F102xx STM32F103xx STM32F105xx STM32F107xx datasheets + +// <<< Use Configuration Wizard in Context Menu >>> + +// Debug MCU configuration register (DBGMCU_CR) +// Reserved bits must be kept at reset value +// DBG_TIM11_STOP TIM11 counter stopped when core is halted +// DBG_TIM10_STOP TIM10 counter stopped when core is halted +// DBG_TIM9_STOP TIM9 counter stopped when core is halted +// DBG_TIM14_STOP TIM14 counter stopped when core is halted +// DBG_TIM13_STOP TIM13 counter stopped when core is halted +// DBG_TIM12_STOP TIM12 counter stopped when core is halted +// DBG_CAN2_STOP Debug CAN2 stopped when core is halted +// DBG_TIM7_STOP TIM7 counter stopped when core is halted +// DBG_TIM6_STOP TIM6 counter stopped when core is halted +// DBG_TIM5_STOP TIM5 counter stopped when core is halted +// DBG_TIM8_STOP TIM8 counter stopped when core is halted +// DBG_I2C2_SMBUS_TIMEOUT SMBUS timeout mode stopped when core is halted +// DBG_I2C1_SMBUS_TIMEOUT SMBUS timeout mode stopped when core is halted +// DBG_CAN1_STOP Debug CAN1 stopped when Core is halted +// DBG_TIM4_STOP TIM4 counter stopped when core is halted +// DBG_TIM3_STOP TIM3 counter stopped when core is halted +// DBG_TIM2_STOP TIM2 counter stopped when core is halted +// DBG_TIM1_STOP TIM1 counter stopped when core is halted +// DBG_WWDG_STOP Debug window watchdog stopped when core is halted +// DBG_IWDG_STOP Debug independent watchdog stopped when core is halted +// DBG_STANDBY Debug standby mode +// DBG_STOP Debug stop mode +// DBG_SLEEP Debug sleep mode +// +DbgMCU_CR = 0x00000007; + +// <<< end of configuration section >>> diff --git a/Ses/Application.emProject b/Ses/Application.emProject new file mode 100644 index 0000000..90ffe34 --- /dev/null +++ b/Ses/Application.emProject @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Ses/SEGGER_THUMB_Startup.s b/Ses/SEGGER_THUMB_Startup.s new file mode 100644 index 0000000..62c2496 --- /dev/null +++ b/Ses/SEGGER_THUMB_Startup.s @@ -0,0 +1,288 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 2014 - 2024 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* - Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** + +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_THUMB_Startup.s +Purpose : Generic runtime init startup code for ARM CPUs running + in THUMB mode. + Designed to work with the SEGGER linker to produce + smallest possible executables. + + This file does not normally require any customization. + +Additional information: + Preprocessor Definitions + FULL_LIBRARY + If defined then + - argc, argv are set up by calling SEGGER_SEMIHOST_GetArgs(). + - the exit symbol is defined and executes on return from main. + - the exit symbol calls destructors, atexit functions and then + calls SEGGER_SEMIHOST_Exit(). + + If not defined then + - argc and argv are not valid (main is assumed to not take parameters) + - the exit symbol is defined, executes on return from main and + halts in a loop. +*/ + + .syntax unified + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ + +#ifndef APP_ENTRY_POINT + #define APP_ENTRY_POINT main +#endif + +#ifndef ARGSSPACE + #define ARGSSPACE 128 +#endif + +/********************************************************************* +* +* Macros +* +********************************************************************** +*/ +// +// Declare a label as function symbol (without switching sections) +// +.macro MARK_FUNC Name + .global \Name + .thumb_func + .code 16 +\Name: +.endm +// +// Declare a regular function. +// Functions from the startup are placed in the init section. +// +.macro START_FUNC Name + .section .init.\Name, "ax" + .global \Name + .balign 2 + .thumb_func + .code 16 +\Name: +.endm + +// +// Declare a weak function +// +.macro WEAK_FUNC Name + .section .init.\Name, "ax", %progbits + .weak \Name + .balign 2 + .thumb_func + .code 16 +\Name: +.endm + +// +// Mark the end of a function and calculate its size +// +.macro END_FUNC name + .size \name,.-\name +.endm + +/********************************************************************* +* +* Externals +* +********************************************************************** +*/ + .extern APP_ENTRY_POINT // typically main + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* _start +* +* Function description +* Entry point for the startup code. +* Usually called by the reset handler. +* Performs all initialisation, based on the entries in the +* linker-generated init table, then calls main(). +* It is device independent, so there should not be any need for an +* end-user to modify it. +* +* Additional information +* At this point, the stack pointer should already have been +* initialized +* - by hardware (such as on Cortex-M), +* - by the device-specific reset handler, +* - or by the debugger (such as for RAM Code). +*/ +#undef L +#define L(label) .L_start_##label + +START_FUNC _start + // + // Call linker init functions which in turn performs the following: + // * Perform segment init + // * Perform heap init (if used) + // * Call constructors of global Objects (if any exist) + // + ldr R4, =__SEGGER_init_table__ // Set table pointer to start of initialization table +L(RunInit): + ldr R0, [R4] // Get next initialization function from table + adds R4, R4, #4 // Increment table pointer to point to function arguments + blx R0 // Call initialization function + b L(RunInit) + // +MARK_FUNC __SEGGER_init_done +MARK_FUNC __startup_complete + // + // Time to call main(), the application entry point. + // +#ifndef FULL_LIBRARY + // + // In a real embedded application ("Free-standing environment"), + // main() does not get any arguments, + // which means it is not necessary to init R0 and R1. + // + bl APP_ENTRY_POINT // Call to application entry point (usually main()) + +END_FUNC _start + // + // end of _start + // Fall-through to exit if main ever returns. + // +MARK_FUNC exit + // + // In a free-standing environment, if returned from application: + // Loop forever. + // + b . + .size exit,.-exit +#else + // + // In a hosted environment, + // we need to load R0 and R1 with argc and argv, in order to handle + // the command line arguments. + // This is required for some programs running under control of a + // debugger, such as automated tests. + // + movs R0, #ARGSSPACE + ldr R1, =__SEGGER_init_arg_data + bl SEGGER_SEMIHOST_GetArgs + ldr R1, =__SEGGER_init_arg_data + bl APP_ENTRY_POINT // Call to application entry point (usually main()) + bl exit // Call exit function + b . // If we unexpectedly return from exit, hang. +END_FUNC _start +#endif + // +#ifdef FULL_LIBRARY +/********************************************************************* +* +* exit +* +* Function description +* Exit of the system. +* Called on return from application entry point or explicit call +* to exit. +* +* Additional information +* In a hosted environment exit gracefully, by +* saving the return value, +* calling destructurs of global objects, +* calling registered atexit functions, +* and notifying the host/debugger. +*/ +#undef L +#define L(label) .L_exit_##label + +WEAK_FUNC exit + mov R5, R0 // Save the exit parameter/return result + // + // Call destructors + // + ldr R0, =__dtors_start__ // Pointer to destructor list + ldr R1, =__dtors_end__ +L(Loop): + cmp R0, R1 + beq L(End) // Reached end of destructor list? => Done + ldr R2, [R0] // Load current destructor address into R2 + adds R0, R0, #4 // Increment pointer + push {R0-R1} // Save R0 and R1 + blx R2 // Call destructor + pop {R0-R1} // Restore R0 and R1 + b L(Loop) +L(End): + // + // Call atexit functions + // + bl __SEGGER_RTL_execute_at_exit_fns + // + // Call debug_exit with return result/exit parameter + // + mov R0, R5 + // + // Entry points for _exit and _Exit, which terminate immediately. + // Note: Destructors and registered atexit functions are not called. File descriptors are not closed. + // +MARK_FUNC _exit +MARK_FUNC _Exit + bl SEGGER_SEMIHOST_Exit + // + // If execution is not terminated, loop forever + // +L(ExitLoop): + b L(ExitLoop) // Loop forever. +END_FUNC exit +#endif + +#ifdef FULL_LIBRARY + .bss + .balign 4 +__SEGGER_init_arg_data: + .space ARGSSPACE + .size __SEGGER_init_arg_data, .-__SEGGER_init_arg_data + .type __SEGGER_init_arg_data, %object +#endif + +/*************************** End of file ****************************/ diff --git a/Ses/STM32F103ZE_MemoryMap.xml b/Ses/STM32F103ZE_MemoryMap.xml new file mode 100644 index 0000000..d51da46 --- /dev/null +++ b/Ses/STM32F103ZE_MemoryMap.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/Ses/STM32F103xx_Registers.xml b/Ses/STM32F103xx_Registers.xml new file mode 100644 index 0000000..45d7d36 --- /dev/null +++ b/Ses/STM32F103xx_Registers.xml @@ -0,0 +1,6596 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Ses/STM32F1xx_Target.js b/Ses/STM32F1xx_Target.js new file mode 100644 index 0000000..e3ba17a --- /dev/null +++ b/Ses/STM32F1xx_Target.js @@ -0,0 +1,44 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 2014 - 2024 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* - Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +*********************************************************************/ + +function Reset() { + TargetInterface.resetAndStop(); +} + +function EnableTrace(traceInterfaceType) { + // TODO: Enable trace +} + diff --git a/Ses/SysCall.c b/Ses/SysCall.c new file mode 100644 index 0000000..e954d5f --- /dev/null +++ b/Ses/SysCall.c @@ -0,0 +1,288 @@ +/********************************************************************* +* (c) SEGGER Microcontroller GmbH * +* The Embedded Experts * +* www.segger.com * +********************************************************************** + +-------------------------- END-OF-HEADER ----------------------------- +Purpose : Implementation of low-level functions for I/O with the + SEGGER Runtime Library + using a UART (SEGGER's BSP UART module) +*/ + +/********************************************************************* +* +* #include section +* +********************************************************************** +*/ + +#include "__SEGGER_RTL_Int.h" +#include "stdio.h" +#include "Bsp.h" + +/********************************************************************* +* +* Local types +* +********************************************************************** +*/ + +struct __SEGGER_RTL_FILE_impl { // NOTE: Provides implementation for FILE + int stub; // only needed so impl has size != 0. +}; + +/********************************************************************* +* +* Static data +* +********************************************************************** +*/ + +static FILE __SEGGER_RTL_stdin_file = { 0 }; // stdin reads from UART +static FILE __SEGGER_RTL_stdout_file = { 0 }; // stdout writes to UART +static FILE __SEGGER_RTL_stderr_file = { 0 }; // stderr writes to UART + +static unsigned int _UART_Port = TTY_COM; +static int _stdin_ungot = EOF; + +/********************************************************************* +* +* Public data +* +********************************************************************** +*/ + +FILE *stdin = &__SEGGER_RTL_stdin_file; // NOTE: Provide implementation of stdin for RTL. +FILE *stdout = &__SEGGER_RTL_stdout_file; // NOTE: Provide implementation of stdout for RTL. +FILE *stderr = &__SEGGER_RTL_stderr_file; // NOTE: Provide implementation of stderr for RTL. + + +void *__aeabi_read_tp(void) { + return 0; // 鍗曠嚎绋嬬幆澧冧笅鐩存帴杩斿洖 0 +} + +/********************************************************************* +* +* Static code +* +********************************************************************** +*/ + +/********************************************************************* +* +* _stdin_getc() +* +* Function description +* Get character from standard input. +* +* Return value +* Character received. +* +* Additional information +* This function never fails to deliver a character. +*/ +static char _stdin_getc(void) { + unsigned char c; + + if (_stdin_ungot != EOF) { + c = _stdin_ungot; + _stdin_ungot = EOF; + } else { + c = UsartReceiveChar(_UART_Port); + } + return c; +} + +/********************************************************************* +* +* Public code +* +********************************************************************** +*/ + +/********************************************************************* +* +* RTL_UART_Init() +* +* Function description +* Initialize RTL to use given UART for stdio. +* +* Parameters +* Unit : UART unit number (typically zero-based). +* Baudrate : Baud rate to configure [Hz]. +* NumDataBits: Number of data bits to use. +* Parity : One of the following values: +* * BSP_UART_PARITY_NONE +* * BSP_UART_PARITY_ODD +* * BSP_UART_PARITY_EVEN +* NumStopBits: Number of stop bits to use. +* +* Additional description +* Parameters are same as for BSP_UART_Init(). +* This also sets appropriate RX and TX interrupt handlers. +*/ +void RTL_UART_Init(unsigned int Unit, unsigned long Baudrate, unsigned char NumDataBits, unsigned char Parity, unsigned char NumStopBits) { + _UART_Port = Unit; + UsartStdConfig(_UART_Port, Baudrate); +} + +/********************************************************************* +* +* __SEGGER_RTL_X_file_stat() +* +* Function description +* Get file status. +* +* Parameters +* stream - Pointer to file. +* +* Additional information +* Low-overhead test to determine if stream is valid. If stream +* is a valid pointer and the stream is open, this function must +* succeed. If stream is a valid pointer and the stream is closed, +* this function must fail. +* +* The implementation may optionally determine whether stream is +* a valid pointer: this may not always be possible and is not +* required, but may assist debugging when clients provide wild +* pointers. +* +* Return value +* < 0 - Failure, stream is not a valid file. +* >= 0 - Success, stream is a valid file. +*/ +int __SEGGER_RTL_X_file_stat(FILE *stream) { + if (stream == stdin || stream == stdout || stream == stderr) { + return 0; // NOTE: stdin, stdout, and stderr are assumed to be valid. + } else { + return EOF; + } +} + +/********************************************************************* +* +* __SEGGER_RTL_X_file_bufsize() +* +* Function description +* Get stream buffer size. +* +* Parameters +* stream - Pointer to file. +* +* Additional information +* Returns the number of characters to use for buffered I/O on +* the file stream. The I/O buffer is allocated on the stack +* for the duration of the I/O call, therefore this value should +* not be set arbitrarily large. +* +* For unbuffered I/O, return 1. +* +* Return value +* Nonzero number of characters to use for buffered I/O; for +* unbuffered I/O, return 1. +*/ +int __SEGGER_RTL_X_file_bufsize(FILE *stream) { + (void)stream; + return 1; +} + +/********************************************************************* +* +* __SEGGER_RTL_X_file_read() +* +* Function description +* Read data from file. +* +* Parameters +* stream - Pointer to file to read from. +* s - Pointer to object that receives the input. +* len - Number of characters to read from file. +* +* Return value +* >= 0 - Success, amount of data read. +* < 0 - Failure. +* +* Additional information +* Reading from any stream other than stdin results in an error. +*/ +int __SEGGER_RTL_X_file_read(FILE *stream, char *s, unsigned len) { + int c; + + if (stream == stdin) { + c = 0; + while (len > 0) { + *s = _stdin_getc(); + ++s; + ++c; + --len; + } + } else { + c = EOF; + } + return c; +} + +/********************************************************************* +* +* __SEGGER_RTL_X_file_write() +* +* Function description +* Write data to file. +* +* Parameters +* stream - Pointer to file to write to. +* s - Pointer to object to write to file. +* len - Number of characters to write to the file. +* +* Return value +* >= 0 - Success. +* < 0 - Failure. +* +* Additional information +* this version is NOT reentrant! +* stdout and stderr are directed to UART; +* writing to any stream other than stdout or stderr results in an error +*/ +int __SEGGER_RTL_X_file_write(FILE *stream, const char *s, unsigned len) { + if ((stream == stdout) || (stream == stderr)) { + UsartSendStr(_UART_Port, (uint8_t* ) s, len); + return len; + } else { + return EOF; + } +} + +/********************************************************************* +* +* __SEGGER_RTL_X_file_unget() +* +* Function description +* Push character back to stream. +* +* Parameters +* stream - Pointer to file to push back to. +* c - Character to push back. +* +* Return value +* >= 0 - Success. +* < 0 - Failure. +* +* Additional information +* Push-back is only supported for standard input, and +* only a single-character pushback buffer is implemented. +*/ +int __SEGGER_RTL_X_file_unget(FILE *stream, int c) { + if (stream == stdin) { + if (c != EOF && _stdin_ungot == EOF) { + _stdin_ungot = c; + } else { + c = EOF; + } + } else { + c = EOF; + } + return c; +} + +/*************************** End of file ****************************/ \ No newline at end of file