将历史数据底层串口接收完成从信号量改为完成量方式

This commit is contained in:
小马_666 2024-09-19 15:04:25 +08:00
parent f4f07d151c
commit 9e5735e4bc
29 changed files with 7256 additions and 6583 deletions

Binary file not shown.

View File

@ -26,26 +26,89 @@ Project File Date: 09/19/2024
<h2>Output:</h2>
*** Using Compiler 'V6.21', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin'
Build target 'USART1_Interrupt'
Rebuild target 'USART1_Interrupt'
Note: source file '..\RTOS\components\drivers\src\dev_pin.c' - object file renamed from '.\dev_pin.o' to '.\dev_pin_1.o'.
compiling slab.c...
assembling startup_ciu32l051.s...
compiling bsp_io_dev.c...
compiling bsp_button.c...
compiling idle.c...
compiling bsp_history.c...
compiling ulog.c...
compiling bsp_wdg.c...
compiling finsh_port.c...
compiling bsp_adc.c...
compiling bsp_sensor.c...
compiling bsp_rtc.c...
compiling bsp_flash.c...
compiling main.c...
compiling cmd.c...
compiling msh.c...
compiling board.c...
compiling clock.c...
compiling shell.c...
compiling cpu.c...
compiling components.c...
compiling cpuport.c...
compiling irq.c...
compiling idle.c...
compiling memheap.c...
compiling mempool.c...
assembling context_rvds.S...
compiling mem.c...
compiling scheduler.c...
compiling kservice.c...
compiling object.c...
compiling slab.c...
compiling ipc.c...
compiling drv_common.c...
compiling thread.c...
compiling timer.c...
compiling device.c...
compiling drv_gpio.c...
compiling ciu32l051_std.c...
compiling ciu32l051_std_adc.c...
compiling ciu32l051_std_aes.c...
compiling ciu32l051_std_crc.c...
compiling ciu32l051_std_comp.c...
compiling drv_uart.c...
compiling ciu32l051_std_dma.c...
compiling ciu32l051_std_exti.c...
compiling ciu32l051_std_flash.c...
compiling ciu32l051_std_gpio.c...
compiling ciu32l051_std_i2c.c...
compiling ciu32l051_std_lcd.c...
compiling ciu32l051_std_lptim.c...
compiling ciu32l051_std_pmu.c...
compiling ciu32l051_std_lpuart.c...
compiling ciu32l051_std_rcc.c...
compiling ciu32l051_std_rtc.c...
compiling ciu32l051_std_spi.c...
compiling ciu32l051_std_tamp.c...
compiling ciu32l051_std_trng.c...
compiling ciu32l051_std_tim.c...
compiling system_ciu32l051.c...
compiling ciu32l051_std_usart.c...
compiling SEGGER_RTT_printf.c...
compiling lwutil.c...
compiling lwrb.c...
compiling flexible_button.c...
compiling SEGGER_RTT.c...
compiling perf_os_patch_rt_thread.c...
compiling perf_counter.c...
compiling agile_led.c...
compiling dev_pin.c...
compiling completion.c...
compiling console_be.c...
compiling ringbuffer.c...
compiling ulog.c...
linking...
Program Size: Code=40278 RO-data=7878 RW-data=144 ZI-data=12328
Program Size: Code=40802 RO-data=7966 RW-data=144 ZI-data=12336
FromELF: creating hex file...
After Build - User command #1: "D:\SXDT\Official_information\HDDZ\demo\CIU32_L051_PROJECT\USART1_Interrupt - RT-Thread\keil5_disp_size_bar\keil5_disp_size_bar.exe"
ram:
RW_IRAM1 :0x20000000
16.00 KB :|¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö_____| 76.12 % ( 12.18 KB / 16.00 KB) [3912 B]
16.00 KB :|¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö_____| 76.17 % ( 12.19 KB / 16.00 KB) [3904 B]
flash:
ER_IROM1 :0x8000000
64.00 KB :|¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö______| 73.48 % ( 47.03 KB / 64.00 KB) [17380 B]
64.00 KB :|¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö______| 74.41 % ( 47.62 KB / 64.00 KB) [16768 B]
".\CIU32_L051_M307R.axf" - 0 Error(s), 0 Warning(s).
<h2>Software Packages used:</h2>
@ -59,7 +122,7 @@ Package Vendor: HED
C:/Users/16005/AppData/Local/Arm/Packs/HED/CIU32L0xx_DFP/1.2.5/Drivers/CMSIS/Device/CIU32L051/Include
<h2>Collection of Component Files used:</h2>
Build Time Elapsed: 00:00:02
Build Time Elapsed: 00:00:03
</pre>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -67,6 +67,7 @@
".\flexible_button.o"
".\dev_pin_1.o"
".\ringbuffer.o"
".\completion.o"
".\ulog.o"
".\console_be.o"
--library_type=microlib --strict --scatter ".\CIU32_L051_M307R.sct"

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1822,7 +1822,7 @@
<Name>Build</Name>
<Buttons>
<Len>992</Len>
<Data>00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000004001C0000000000000000000000000000000001000000010000000180D07F0000000002001D000000000000000000000000000000000100000001000000018030800000000000001E000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6EC7040000000000006A0000000C4261746368204275696C2664000000000000000000000000010000000100000000000000000000000100000004000580C7040000000000006A0000000C4261746368204275696C266400000000000000000000000001000000010000000000000000000000010000000000058046070000000000006B0000000D42617463682052656275696C640000000000000000000000000100000001000000000000000000000001000000000005804707000000000000FFFFFFFF0B426174636820436C65616E0100000000000000000000000100000001000000000000000000000001000000000005809E8A0000000000001F0000000F4261746326682053657475702E2E2E000000000000000000000000010000000100000000000000000000000100000000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA0000000000000000000000000000000000000000000000000100000001000000960000000300205000000000105553415254315F496E7465727275707496000000000000000100105553415254315F496E74657272757074000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000400240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C64DC010000</Data>
<Data>00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000004001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000002001E000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6EC7040000000000006A0000000C4261746368204275696C2664000000000000000000000000010000000100000000000000000000000100000004000580C7040000000000006A0000000C4261746368204275696C266400000000000000000000000001000000010000000000000000000000010000000000058046070000000000006B0000000D42617463682052656275696C640000000000000000000000000100000001000000000000000000000001000000000005804707000000000000FFFFFFFF0B426174636820436C65616E0100000000000000000000000100000001000000000000000000000001000000000005809E8A0000000000001F0000000F4261746326682053657475702E2E2E000000000000000000000000010000000100000000000000000000000100000000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA0000000000000000000000000000000000000000000000000100000001000000960000000300205000000000105553415254315F496E7465727275707496000000000000000100105553415254315F496E74657272757074000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000400240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C64DC010000</Data>
</Buttons>
<OriginalItems>
<Len>583</Len>

View File

@ -1157,6 +1157,18 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>69</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\RTOS\components\drivers\src\completion.c</PathWithFileName>
<FilenameWithoutPath>completion.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
@ -1167,7 +1179,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>12</GroupNumber>
<FileNumber>69</FileNumber>
<FileNumber>70</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1179,7 +1191,7 @@
</File>
<File>
<GroupNumber>12</GroupNumber>
<FileNumber>70</FileNumber>
<FileNumber>71</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>

View File

@ -773,6 +773,11 @@
<FileType>1</FileType>
<FilePath>..\RTOS\components\drivers\src\ringbuffer.c</FilePath>
</File>
<File>
<FileName>completion.c</FileName>
<FileType>1</FileType>
<FilePath>..\RTOS\components\drivers\src\completion.c</FilePath>
</File>
</Files>
</Group>
<Group>

View File

@ -98,7 +98,7 @@ I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_vrefbuf.h)(0x65800BC6)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_wwdg.h)(0x65800BC5)
I (..\RTOS\components\drivers\inc\dev_pin.h)(0x66D9591B)
I (..\RTOS\components\finsh\finsh_api.h)(0x66C2AAF0)
F (..\bsp\src\bsp_history.c)(0x66EBC01D)(-xc -std=gnu99 --target=arm-arm-none-eabi -mcpu=cortex-m0plus -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -Oz -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../RTOS/inc -I ../RTOS/components/finsh -I ../drivers/inc -I ../Peripheral/CIU32L051_Lib/Include -I ../Peripheral/CMSIS/Core -I ../Peripheral/CMSIS/Device -I ../startup -I ../user/Include -I ../RTOS -I ../RTOS/components/utilities/ulog -I ../RTOS/components/utilities/ulog/backend -I ../RTOS/components/drivers/inc -I ../LIB/lwrb -I ../LIB/RTT -I ../bsp/inc -I ../LIB/LwUtil -I ../LIB/perf_counter -I ../LIB/agile_led -I ../LIB/FlexibleButton-master -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./bsp_history.o -MD)
F (..\bsp\src\bsp_history.c)(0x66EBCB2D)(-xc -std=gnu99 --target=arm-arm-none-eabi -mcpu=cortex-m0plus -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -Oz -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../RTOS/inc -I ../RTOS/components/finsh -I ../drivers/inc -I ../Peripheral/CIU32L051_Lib/Include -I ../Peripheral/CMSIS/Core -I ../Peripheral/CMSIS/Device -I ../startup -I ../user/Include -I ../RTOS -I ../RTOS/components/utilities/ulog -I ../RTOS/components/utilities/ulog/backend -I ../RTOS/components/drivers/inc -I ../LIB/lwrb -I ../LIB/RTT -I ../bsp/inc -I ../LIB/LwUtil -I ../LIB/perf_counter -I ../LIB/agile_led -I ../LIB/FlexibleButton-master -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./bsp_history.o -MD)
I (..\RTOS\inc\rtthread.h..\RTOS\rtconfig.h)(0x00000000)
I (..\RTOS\components\finsh\finsh_config.hh.\RTOS\inc\rtdebug.h)(0x00000000)
I (..\RTOS\inc\rtdef.hf.\RTOS\inc\stdarg.hh.\RTOS\inc\rtservice.h)(0x00000000)
@ -148,9 +148,10 @@ I (..\LIB\lwrb\lwrb.h.:\Keil_v5\ARM\ARMCLANG\include\string.h)(0x00000000)
I (..\RTOS\components\drivers\inc\serial.hN.\LIB\RTT\user_rtt.h)(0x00000000)
I (..\LIB\RTT\SEGGER_RTT.he.\LIB\RTT\SEGGER_RTT_Conf.h)(0x00000000)
I (C:\Keil_v5\ARM\ARMCLANG\include\stdlib.h)(0x6569B012)
I (..\RTOS\components\drivers\inc\completion.h)(0x66EBC82A)
I (..\RTOS\components\utilities\ulog\ulog.h)(0x66D94573)
I (..\RTOS\components\utilities\ulog\ulog_def.h)(0x666E44C6)
F (..\bsp\src\bsp_flash.c)(0x66EBBACA)(-xc -std=gnu99 --target=arm-arm-none-eabi -mcpu=cortex-m0plus -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -Oz -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../RTOS/inc -I ../RTOS/components/finsh -I ../drivers/inc -I ../Peripheral/CIU32L051_Lib/Include -I ../Peripheral/CMSIS/Core -I ../Peripheral/CMSIS/Device -I ../startup -I ../user/Include -I ../RTOS -I ../RTOS/components/utilities/ulog -I ../RTOS/components/utilities/ulog/backend -I ../RTOS/components/drivers/inc -I ../LIB/lwrb -I ../LIB/RTT -I ../bsp/inc -I ../LIB/LwUtil -I ../LIB/perf_counter -I ../LIB/agile_led -I ../LIB/FlexibleButton-master -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./bsp_flash.o -MD)
F (..\bsp\src\bsp_flash.c)(0x66EBC52C)(-xc -std=gnu99 --target=arm-arm-none-eabi -mcpu=cortex-m0plus -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -Oz -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../RTOS/inc -I ../RTOS/components/finsh -I ../drivers/inc -I ../Peripheral/CIU32L051_Lib/Include -I ../Peripheral/CMSIS/Core -I ../Peripheral/CMSIS/Device -I ../startup -I ../user/Include -I ../RTOS -I ../RTOS/components/utilities/ulog -I ../RTOS/components/utilities/ulog/backend -I ../RTOS/components/drivers/inc -I ../LIB/lwrb -I ../LIB/RTT -I ../bsp/inc -I ../LIB/LwUtil -I ../LIB/perf_counter -I ../LIB/agile_led -I ../LIB/FlexibleButton-master -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./bsp_flash.o -MD)
I (..\RTOS\inc\rtthread.hl.\RTOS\rtconfig.h)(0x00000000)
I (..\RTOS\components\finsh\finsh_config.hh.\RTOS\inc\rtdebug.h)(0x00000000)
I (..\RTOS\inc\rtdef.hf.\RTOS\inc\stdarg.hh.\RTOS\inc\rtservice.h)(0x00000000)
@ -1541,7 +1542,7 @@ I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_wwdg.h)(0x65800BC5)
I (..\RTOS\components\drivers\inc\dev_pin.h)(0x66D9591B)
I (..\RTOS\components\finsh\finsh_api.hi.\RTOS\inc\rthw.h)(0x00000000)
I (..\drivers\inc\drv_gpio.h)(0x66EBB44C)
F (..\drivers\src\drv_uart.c)(0x66EBB80C)(-xc -std=gnu99 --target=arm-arm-none-eabi -mcpu=cortex-m0plus -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -Oz -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../RTOS/inc -I ../RTOS/components/finsh -I ../drivers/inc -I ../Peripheral/CIU32L051_Lib/Include -I ../Peripheral/CMSIS/Core -I ../Peripheral/CMSIS/Device -I ../startup -I ../user/Include -I ../RTOS -I ../RTOS/components/utilities/ulog -I ../RTOS/components/utilities/ulog/backend -I ../RTOS/components/drivers/inc -I ../LIB/lwrb -I ../LIB/RTT -I ../bsp/inc -I ../LIB/LwUtil -I ../LIB/perf_counter -I ../LIB/agile_led -I ../LIB/FlexibleButton-master -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./drv_uart.o -MD)
F (..\drivers\src\drv_uart.c)(0x66EBCB61)(-xc -std=gnu99 --target=arm-arm-none-eabi -mcpu=cortex-m0plus -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -Oz -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../RTOS/inc -I ../RTOS/components/finsh -I ../drivers/inc -I ../Peripheral/CIU32L051_Lib/Include -I ../Peripheral/CMSIS/Core -I ../Peripheral/CMSIS/Device -I ../startup -I ../user/Include -I ../RTOS -I ../RTOS/components/utilities/ulog -I ../RTOS/components/utilities/ulog/backend -I ../RTOS/components/drivers/inc -I ../LIB/lwrb -I ../LIB/RTT -I ../bsp/inc -I ../LIB/LwUtil -I ../LIB/perf_counter -I ../LIB/agile_led -I ../LIB/FlexibleButton-master -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./drv_uart.o -MD)
I (..\RTOS\inc\rtthread.ht.\RTOS\rtconfig.h)(0x00000000)
I (..\RTOS\components\finsh\finsh_config.hh.\RTOS\inc\rtdebug.h)(0x00000000)
I (..\RTOS\inc\rtdef.hf.\RTOS\inc\stdarg.hh.\RTOS\inc\rtservice.h)(0x00000000)
@ -1590,6 +1591,7 @@ I (..\LIB\lwrb\lwrb.h\:\Keil_v5\ARM\ARMCLANG\include\string.h)(0x00000000)
I (..\RTOS\components\drivers\inc\serial.hN.\LIB\LwUtil\lwutil.h)(0x00000000)
I (C:\Keil_v5\ARM\ARMCLANG\include\stdlib.h..\bsp\inc\bsp_history.h)(0x00000000)
I (..\drivers\inc\drv_gpio.hn.\bsp\inc\bsp_sensor.h)(0x00000000)
I (..\RTOS\components\drivers\inc\completion.h)(0x66EBC82A)
I (..\RTOS\components\utilities\ulog\ulog.h)(0x66D94573)
I (..\RTOS\components\utilities\ulog\ulog_def.h)(0x666E44C6)
F (..\Peripheral\CIU32L051_Lib\Source\ciu32l051_std.c)(0x6614AB29)(-xc -std=gnu99 --target=arm-arm-none-eabi -mcpu=cortex-m0plus -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -Oz -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../RTOS/inc -I ../RTOS/components/finsh -I ../drivers/inc -I ../Peripheral/CIU32L051_Lib/Include -I ../Peripheral/CMSIS/Core -I ../Peripheral/CMSIS/Device -I ../startup -I ../user/Include -I ../RTOS -I ../RTOS/components/utilities/ulog -I ../RTOS/components/utilities/ulog/backend -I ../RTOS/components/drivers/inc -I ../LIB/lwrb -I ../LIB/RTT -I ../bsp/inc -I ../LIB/LwUtil -I ../LIB/perf_counter -I ../LIB/agile_led -I ../LIB/FlexibleButton-master -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./ciu32l051_std.o -MD)
@ -2741,8 +2743,54 @@ I (..\RTOS\components\drivers\inc\dev_pin.h)(0x66D9591B)
I (..\RTOS\components\finsh\finsh_api.h)(0x66C2AAF0)
I (..\RTOS\components\drivers\inc\ringbuffer.h)(0x66EB9079)
I (C:\Keil_v5\ARM\ARMCLANG\include\string.hr\RTOS\inc\rtm.h)(0x00000000)
F (..\RTOS\components\drivers\src\completion.c)(0x66EBCBA8)(-xc -std=gnu99 --target=arm-arm-none-eabi -mcpu=cortex-m0plus -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -Oz -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../RTOS/inc -I ../RTOS/components/finsh -I ../drivers/inc -I ../Peripheral/CIU32L051_Lib/Include -I ../Peripheral/CMSIS/Core -I ../Peripheral/CMSIS/Device -I ../startup -I ../user/Include -I ../RTOS -I ../RTOS/components/utilities/ulog -I ../RTOS/components/utilities/ulog/backend -I ../RTOS/components/drivers/inc -I ../LIB/lwrb -I ../LIB/RTT -I ../bsp/inc -I ../LIB/LwUtil -I ../LIB/perf_counter -I ../LIB/agile_led -I ../LIB/FlexibleButton-master -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./completion.o -MD)
I (..\RTOS\inc\rthw.h\.\RTOS\inc\rtthread.hn.\RTOS\rtconfig.h)(0x00000000)
I (..\RTOS\components\finsh\finsh_config.hh.\RTOS\inc\rtdebug.h)(0x00000000)
I (..\RTOS\inc\rtdef.hf.\RTOS\inc\stdarg.hh.\RTOS\inc\rtservice.h)(0x00000000)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std.h)(0x66138664)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_config.h)(0x65800BC6)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_rcc.h)(0x66EA35C2)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_common.h)(0x65800BC5)
I (C:\Keil_v5\ARM\ARMCLANG\include\stddef.h)(0x6569B012)
I (C:\Keil_v5\ARM\ARMCLANG\include\stdbool.h)(0x6569B012)
I (..\Peripheral\CMSIS\Device\ciu32l051.h)(0x65E68265)
I (..\Peripheral\CMSIS\Core\core_cm0plus.h)(0x65800BC8)
I (C:\Keil_v5\ARM\ARMCLANG\include\stdint.h)(0x6569B012)
I (D:\SXDT\Project\HED\4G\USART1_Interrupt - RT-Thread\Peripheral\CMSIS\Core\cmsis_version.h)(0x65800BC8)
I (D:\SXDT\Project\HED\4G\USART1_Interrupt - RT-Thread\Peripheral\CMSIS\Core\cmsis_compiler.h)(0x65800BC8)
I (D:\SXDT\Project\HED\4G\USART1_Interrupt - RT-Thread\Peripheral\CMSIS\Core\cmsis_armclang.h)(0x65800BC8)
I (C:\Keil_v5\ARM\ARMCLANG\include\arm_compat.h)(0x64F9642C)
I (C:\Keil_v5\ARM\ARMCLANG\include\arm_acle.h)(0x6569B010)
I (..\Peripheral\CMSIS\Device\system_ciu32l051.h)(0x65800BC6)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_adc.h)(0x66138664)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_aes.h)(0x65800BC5)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_comp.h)(0x661645AE)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_crc.h)(0x65800BC6)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_dbg.h)(0x6656B817)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_dma.h)(0x65800BC6)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_exti.h)(0x65E67A4D)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_flash.h)(0x66D6BBA1)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_gpio.h)(0x6656A3F6)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_i2c.h)(0x65800BC5)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_iwdg.h)(0x65800BC5)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_lcd.h)(0x661645AE)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_lptim.h)(0x665E764E)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_lpuart.h)(0x65800BC6)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_pmu.h)(0x65800BC6)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_rtc.h)(0x65800BC5)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_spi.h)(0x65800BC5)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_syscfg.h)(0x6613CF0C)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_tamp.h)(0x65E6836D)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_tim.h)(0x66ACA92A)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_trng.h)(0x65800BC5)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_usart.h)(0x65800BC6)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_vrefbuf.h)(0x65800BC6)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_wwdg.h)(0x65800BC5)
I (..\RTOS\components\drivers\inc\dev_pin.h)(0x66D9591B)
I (..\RTOS\components\finsh\finsh_api.hi.\RTOS\inc\rtm.h)(0x00000000)
I (..\RTOS\components\drivers\inc\completion.h)(0x66EBC82A)
F (..\RTOS\components\utilities\ulog\ulog.c)(0x666E44C6)(-xc -std=gnu99 --target=arm-arm-none-eabi -mcpu=cortex-m0plus -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -Oz -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../RTOS/inc -I ../RTOS/components/finsh -I ../drivers/inc -I ../Peripheral/CIU32L051_Lib/Include -I ../Peripheral/CMSIS/Core -I ../Peripheral/CMSIS/Device -I ../startup -I ../user/Include -I ../RTOS -I ../RTOS/components/utilities/ulog -I ../RTOS/components/utilities/ulog/backend -I ../RTOS/components/drivers/inc -I ../LIB/lwrb -I ../LIB/RTT -I ../bsp/inc -I ../LIB/LwUtil -I ../LIB/perf_counter -I ../LIB/agile_led -I ../LIB/FlexibleButton-master -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./ulog.o -MD)
I (..\RTOS\components\utilities\ulog\ulog.hr.\RTOS\inc\rtthread.h)(0x00000000)
I (..\RTOS\components\utilities\ulog\ulog.hn.\RTOS\inc\rtthread.h)(0x00000000)
I (..\RTOS\rtconfig.h\.\RTOS\components\finsh\finsh_config.h)(0x00000000)
I (..\RTOS\inc\rtdebug.hR.\RTOS\inc\rtdef.hs.\RTOS\inc\rtservice.h)(0x00000000)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std.h)(0x66138664)

View File

@ -6,18 +6,18 @@
[Found keyword]: ----------Execution Region----------
[name]: ER_IROM1
[Exec base]: 0x8000000
[Size]: 0xbc1c
[Size]: 0xbe80
[Max]: 0x10000
[Found keyword]: ----------Execution Region----------
[name]: RW_IRAM1
[Exec base]: 0x20000000
[Size]: 0x30b8
[Size]: 0x30c0
[Max]: 0x4000
[parse_keil_map over printf bar]:
RW_IRAM1 :0x20000000
16.00 KB :|ĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄö_____| 76.12 % ( 12.18 KB / 16.00 KB) [3912 B]
16.00 KB :|ĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄö_____| 76.17 % ( 12.19 KB / 16.00 KB) [3904 B]
ER_IROM1 :0x8000000
64.00 KB :|ĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄö______| 73.48 % ( 47.03 KB / 64.00 KB) [17380 B]
64.00 KB :|ĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄö______| 74.41 % ( 47.62 KB / 64.00 KB) [16768 B]
[export csv]: ./USART1_Interrupt_sort_by_flash.csv
[export csv]: ./USART1_Interrupt_sort_by_ram.csv
[export xlsx]: USART1_Interrupt_analysis.xlsx

Binary file not shown.

View File

@ -1,96 +1,97 @@
File_name,flash percent,flash,ram,Code,RO_data,RW_data,ZI_data
cmd.o,8.430874%,4473,0,2872,1601,0,0
bsp_flash.o,7.480916%,3969,4,2928,1041,0,4
mc_p.l,7.100179%,3767,4,3630,133,4,0
ipc.o,5.982471%,3174,0,2160,1014,0,0
drv_uart.o,4.265385%,2263,2852,2206,57,0,2852
kservice.o,4.086326%,2168,140,1912,256,0,140
thread.o,4.059938%,2154,12,1912,242,0,12
ulog.o,4.042974%,2145,333,1934,211,0,333
main.o,3.816794%,2025,1804,1820,205,0,1804
mem.o,3.543493%,1880,72,1512,368,0,72
shell.o,3.390821%,1799,153,1768,31,0,153
agile_led.o,2.864951%,1520,964,1320,200,0,964
bsp_history.o,2.599190%,1379,1172,1300,79,0,1172
timer.o,2.180756%,1157,20,1002,155,0,20
object.o,2.011121%,1067,148,832,107,128,20
drv_gpio.o,1.967769%,1044,0,244,800,0,0
mf_p.l,1.941382%,1030,0,1030,0,0,0
bsp_button.o,1.935727%,1027,684,636,391,0,684
device.o,1.850909%,982,0,670,312,0,0
msh.o,1.781170%,945,0,784,161,0,0
bsp_sensor.o,1.724625%,915,1256,898,17,0,1256
scanf_fp.o,1.692583%,898,0,898,0,0,0
_scanf.o,1.553105%,824,0,824,0,0,0
bsp_rtc.o,1.317501%,699,6,600,99,0,6
lwrb.o,1.194986%,634,0,634,0,0,0
flexible_button.o,1.017812%,540,16,540,0,0,16
scheduler.o,0.946188%,502,280,484,18,0,280
dev_pin_1.o,0.916031%,486,76,448,38,0,76
ciu32l051_std_lpuart.o,0.625766%,332,0,332,0,0,0
_scanf_int.o,0.621996%,330,0,330,0,0,0
perf_counter.o,0.584299%,310,56,298,4,8,48
cpuport.o,0.580530%,308,12,308,0,0,12
board.o,0.523985%,278,0,278,0,0,0
idle.o,0.508906%,270,416,248,22,0,416
components.o,0.459900%,244,0,228,16,0,0
ddiv.o,0.452361%,240,0,240,0,0,0
depilogue.o,0.444821%,236,0,236,0,0,0
ciu32l051_std_rtc.o,0.444821%,236,0,236,0,0,0
_scanf_str.o,0.437282%,232,0,232,0,0,0
bsp_wdg.o,0.437282%,232,784,220,12,0,784
startup_ciu32l051.o,0.414664%,220,1024,28,192,0,1024
context_rvds.o,0.407125%,216,0,216,0,0,0
ciu32l051_std_rcc.o,0.407125%,216,0,216,0,0,0
dmul.o,0.392046%,208,0,208,0,0,0
drv_common.o,0.384507%,204,0,204,0,0,0
system_ciu32l051.o,0.376967%,200,4,164,32,4,0
ciu32l051_std_flash.o,0.354349%,188,0,188,0,0,0
ciu32l051_std_usart.o,0.350580%,186,0,186,0,0,0
strtod.o,0.339271%,180,0,180,0,0,0
_strtoul.o,0.312883%,166,0,166,0,0,0
ciu32l051_std_gpio.o,0.290265%,154,0,154,0,0,0
ctype_o.o,0.265762%,141,0,8,133,0,0
fepilogue.o,0.245029%,130,0,130,0,0,0
perf_os_patch_rt_thread.o,0.239374%,127,0,118,9,0,0
strtol.o,0.211102%,112,0,112,0,0,0
ciu32l051_std_dma.o,0.188484%,100,0,100,0,0,0
uldiv.o,0.180944%,96,0,96,0,0,0
console_be.o,0.169635%,90,48,86,4,0,48
bsp_io_dev.o,0.167750%,89,16,76,13,0,16
irq.o,0.165866%,88,12,88,0,0,12
_sgetc.o,0.128169%,68,0,68,0,0,0
uidiv_div0.o,0.116860%,62,0,62,0,0,0
__0sscanf.o,0.113090%,60,0,60,0,0,0
bsp_adc.o,0.113090%,60,92,60,0,0,92
d2f.o,0.105551%,56,0,56,0,0,0
clock.o,0.101781%,54,4,54,0,0,4
llmul.o,0.090472%,48,0,48,0,0,0
init.o,0.090472%,48,0,48,0,0,0
m_ps.l,0.082933%,44,0,44,0,0,0
dcmplt.o,0.082933%,44,0,44,0,0,0
dcmple.o,0.082933%,44,0,44,0,0,0
dcmpge.o,0.082933%,44,0,44,0,0,0
scanf_char.o,0.082933%,44,0,44,0,0,0
atof.o,0.082933%,44,0,44,0,0,0
cpp_init.o,0.075393%,40,0,40,0,0,0
memseta.o,0.067854%,36,0,36,0,0,0
memcpya.o,0.067854%,36,0,36,0,0,0
errno.o,0.067854%,36,4,32,0,4,0
llushr.o,0.064084%,34,0,34,0,0,0
llshl.o,0.060315%,32,0,32,0,0,0
strncmp.o,0.056545%,30,0,30,0,0,0
handlers.o,0.056545%,30,0,30,0,0,0
_chval.o,0.056545%,30,0,30,0,0,0
dfltul.o,0.052775%,28,0,28,0,0,0
strncpy.o,0.049006%,26,0,26,0,0,0
memcmp.o,0.049006%,26,0,26,0,0,0
atoi.o,0.049006%,26,0,26,0,0,0
ciu32l051_std.o,0.045236%,24,0,24,0,0,0
strchr.o,0.037697%,20,0,20,0,0,0
isspace_o.o,0.033927%,18,0,18,0,0,0
strlen.o,0.026388%,14,0,14,0,0,0
entry9a.o,0.015079%,8,0,8,0,0,0
entry2.o,0.015079%,8,0,8,0,0,0
entry8a.o,0.007539%,4,0,4,0,0,0
entry5.o,0.007539%,4,0,4,0,0,0
cmd.o,8.334731%,4473,0,2872,1601,0,0
bsp_flash.o,7.395606%,3969,4,2928,1041,0,4
mc_p.l,7.019211%,3767,4,3630,133,4,0
ipc.o,5.914249%,3174,0,2160,1014,0,0
drv_uart.o,4.216744%,2263,2852,2206,57,0,2852
kservice.o,4.039726%,2168,140,1912,256,0,140
thread.o,4.013639%,2154,12,1912,242,0,12
ulog.o,3.996870%,2145,333,1934,211,0,333
main.o,3.773268%,2025,1804,1820,205,0,1804
mem.o,3.503084%,1880,72,1512,368,0,72
shell.o,3.352153%,1799,153,1768,31,0,153
agile_led.o,2.832281%,1520,964,1320,200,0,964
bsp_history.o,2.457749%,1319,1180,1240,79,0,1180
timer.o,2.155887%,1157,20,1002,155,0,20
object.o,1.988186%,1067,148,832,107,128,20
drv_gpio.o,1.945330%,1044,0,244,800,0,0
mf_p.l,1.919243%,1030,0,1030,0,0,0
bsp_button.o,1.913653%,1027,684,636,391,0,684
device.o,1.829802%,982,0,670,312,0,0
msh.o,1.760859%,945,0,784,161,0,0
bsp_sensor.o,1.704958%,915,1256,898,17,0,1256
scanf_fp.o,1.673282%,898,0,898,0,0,0
_scanf.o,1.535394%,824,0,824,0,0,0
bsp_rtc.o,1.302476%,699,6,600,99,0,6
completion.o,1.229806%,660,0,572,88,0,0
lwrb.o,1.181359%,634,0,634,0,0,0
flexible_button.o,1.006205%,540,16,540,0,0,16
scheduler.o,0.957758%,514,280,496,18,0,280
dev_pin_1.o,0.905584%,486,76,448,38,0,76
ciu32l051_std_lpuart.o,0.618630%,332,0,332,0,0,0
_scanf_int.o,0.614903%,330,0,330,0,0,0
perf_counter.o,0.577636%,310,56,298,4,8,48
cpuport.o,0.573909%,308,12,308,0,0,12
board.o,0.518009%,278,0,278,0,0,0
idle.o,0.503102%,270,416,248,22,0,416
components.o,0.454656%,244,0,228,16,0,0
ddiv.o,0.447202%,240,0,240,0,0,0
depilogue.o,0.439749%,236,0,236,0,0,0
ciu32l051_std_rtc.o,0.439749%,236,0,236,0,0,0
_scanf_str.o,0.432295%,232,0,232,0,0,0
bsp_wdg.o,0.432295%,232,784,220,12,0,784
startup_ciu32l051.o,0.409935%,220,1024,28,192,0,1024
context_rvds.o,0.402482%,216,0,216,0,0,0
ciu32l051_std_rcc.o,0.402482%,216,0,216,0,0,0
dmul.o,0.387575%,208,0,208,0,0,0
drv_common.o,0.380122%,204,0,204,0,0,0
system_ciu32l051.o,0.372669%,200,4,164,32,4,0
ciu32l051_std_flash.o,0.350308%,188,0,188,0,0,0
ciu32l051_std_usart.o,0.346582%,186,0,186,0,0,0
strtod.o,0.335402%,180,0,180,0,0,0
_strtoul.o,0.309315%,166,0,166,0,0,0
ciu32l051_std_gpio.o,0.286955%,154,0,154,0,0,0
ctype_o.o,0.262731%,141,0,8,133,0,0
fepilogue.o,0.242235%,130,0,130,0,0,0
perf_os_patch_rt_thread.o,0.236644%,127,0,118,9,0,0
strtol.o,0.208694%,112,0,112,0,0,0
ciu32l051_std_dma.o,0.186334%,100,0,100,0,0,0
uldiv.o,0.178881%,96,0,96,0,0,0
console_be.o,0.167701%,90,48,86,4,0,48
bsp_io_dev.o,0.165837%,89,16,76,13,0,16
irq.o,0.163974%,88,12,88,0,0,12
_sgetc.o,0.126707%,68,0,68,0,0,0
uidiv_div0.o,0.115527%,62,0,62,0,0,0
__0sscanf.o,0.111801%,60,0,60,0,0,0
bsp_adc.o,0.111801%,60,92,60,0,0,92
d2f.o,0.104347%,56,0,56,0,0,0
clock.o,0.100620%,54,4,54,0,0,4
llmul.o,0.089440%,48,0,48,0,0,0
init.o,0.089440%,48,0,48,0,0,0
m_ps.l,0.081987%,44,0,44,0,0,0
dcmplt.o,0.081987%,44,0,44,0,0,0
dcmple.o,0.081987%,44,0,44,0,0,0
dcmpge.o,0.081987%,44,0,44,0,0,0
scanf_char.o,0.081987%,44,0,44,0,0,0
atof.o,0.081987%,44,0,44,0,0,0
cpp_init.o,0.074534%,40,0,40,0,0,0
memseta.o,0.067080%,36,0,36,0,0,0
memcpya.o,0.067080%,36,0,36,0,0,0
errno.o,0.067080%,36,4,32,0,4,0
llushr.o,0.063354%,34,0,34,0,0,0
llshl.o,0.059627%,32,0,32,0,0,0
strncmp.o,0.055900%,30,0,30,0,0,0
handlers.o,0.055900%,30,0,30,0,0,0
_chval.o,0.055900%,30,0,30,0,0,0
dfltul.o,0.052174%,28,0,28,0,0,0
strncpy.o,0.048447%,26,0,26,0,0,0
memcmp.o,0.048447%,26,0,26,0,0,0
atoi.o,0.048447%,26,0,26,0,0,0
ciu32l051_std.o,0.044720%,24,0,24,0,0,0
strchr.o,0.037267%,20,0,20,0,0,0
isspace_o.o,0.033540%,18,0,18,0,0,0
strlen.o,0.026087%,14,0,14,0,0,0
entry9a.o,0.014907%,8,0,8,0,0,0
entry2.o,0.014907%,8,0,8,0,0,0
entry8a.o,0.007453%,4,0,4,0,0,0
entry5.o,0.007453%,4,0,4,0,0,0

1 File_name flash percent flash ram Code RO_data RW_data ZI_data
2 cmd.o 8.430874% 8.334731% 4473 0 2872 1601 0 0
3 bsp_flash.o 7.480916% 7.395606% 3969 4 2928 1041 0 4
4 mc_p.l 7.100179% 7.019211% 3767 4 3630 133 4 0
5 ipc.o 5.982471% 5.914249% 3174 0 2160 1014 0 0
6 drv_uart.o 4.265385% 4.216744% 2263 2852 2206 57 0 2852
7 kservice.o 4.086326% 4.039726% 2168 140 1912 256 0 140
8 thread.o 4.059938% 4.013639% 2154 12 1912 242 0 12
9 ulog.o 4.042974% 3.996870% 2145 333 1934 211 0 333
10 main.o 3.816794% 3.773268% 2025 1804 1820 205 0 1804
11 mem.o 3.543493% 3.503084% 1880 72 1512 368 0 72
12 shell.o 3.390821% 3.352153% 1799 153 1768 31 0 153
13 agile_led.o 2.864951% 2.832281% 1520 964 1320 200 0 964
14 bsp_history.o 2.599190% 2.457749% 1379 1319 1172 1180 1300 1240 79 0 1172 1180
15 timer.o 2.180756% 2.155887% 1157 20 1002 155 0 20
16 object.o 2.011121% 1.988186% 1067 148 832 107 128 20
17 drv_gpio.o 1.967769% 1.945330% 1044 0 244 800 0 0
18 mf_p.l 1.941382% 1.919243% 1030 0 1030 0 0 0
19 bsp_button.o 1.935727% 1.913653% 1027 684 636 391 0 684
20 device.o 1.850909% 1.829802% 982 0 670 312 0 0
21 msh.o 1.781170% 1.760859% 945 0 784 161 0 0
22 bsp_sensor.o 1.724625% 1.704958% 915 1256 898 17 0 1256
23 scanf_fp.o 1.692583% 1.673282% 898 0 898 0 0 0
24 _scanf.o 1.553105% 1.535394% 824 0 824 0 0 0
25 bsp_rtc.o 1.317501% 1.302476% 699 6 600 99 0 6
26 lwrb.o completion.o 1.194986% 1.229806% 634 660 0 634 572 0 88 0 0
27 flexible_button.o lwrb.o 1.017812% 1.181359% 540 634 16 0 540 634 0 0 16 0
28 scheduler.o flexible_button.o 0.946188% 1.006205% 502 540 280 16 484 540 18 0 0 280 16
29 dev_pin_1.o scheduler.o 0.916031% 0.957758% 486 514 76 280 448 496 38 18 0 76 280
30 ciu32l051_std_lpuart.o dev_pin_1.o 0.625766% 0.905584% 332 486 0 76 332 448 0 38 0 0 76
31 _scanf_int.o ciu32l051_std_lpuart.o 0.621996% 0.618630% 330 332 0 330 332 0 0 0
32 perf_counter.o _scanf_int.o 0.584299% 0.614903% 310 330 56 0 298 330 4 0 8 0 48 0
33 cpuport.o perf_counter.o 0.580530% 0.577636% 308 310 12 56 308 298 0 4 0 8 12 48
34 board.o cpuport.o 0.523985% 0.573909% 278 308 0 12 278 308 0 0 0 12
35 idle.o board.o 0.508906% 0.518009% 270 278 416 0 248 278 22 0 0 416 0
36 components.o idle.o 0.459900% 0.503102% 244 270 0 416 228 248 16 22 0 0 416
37 ddiv.o components.o 0.452361% 0.454656% 240 244 0 240 228 0 16 0 0
38 depilogue.o ddiv.o 0.444821% 0.447202% 236 240 0 236 240 0 0 0
39 ciu32l051_std_rtc.o depilogue.o 0.444821% 0.439749% 236 0 236 0 0 0
40 _scanf_str.o ciu32l051_std_rtc.o 0.437282% 0.439749% 232 236 0 232 236 0 0 0
41 bsp_wdg.o _scanf_str.o 0.437282% 0.432295% 232 784 0 220 232 12 0 0 784 0
42 startup_ciu32l051.o bsp_wdg.o 0.414664% 0.432295% 220 232 1024 784 28 220 192 12 0 1024 784
43 context_rvds.o startup_ciu32l051.o 0.407125% 0.409935% 216 220 0 1024 216 28 0 192 0 0 1024
44 ciu32l051_std_rcc.o context_rvds.o 0.407125% 0.402482% 216 0 216 0 0 0
45 dmul.o ciu32l051_std_rcc.o 0.392046% 0.402482% 208 216 0 208 216 0 0 0
46 drv_common.o dmul.o 0.384507% 0.387575% 204 208 0 204 208 0 0 0
47 system_ciu32l051.o drv_common.o 0.376967% 0.380122% 200 204 4 0 164 204 32 0 4 0 0
48 ciu32l051_std_flash.o system_ciu32l051.o 0.354349% 0.372669% 188 200 0 4 188 164 0 32 0 4 0
49 ciu32l051_std_usart.o ciu32l051_std_flash.o 0.350580% 0.350308% 186 188 0 186 188 0 0 0
50 strtod.o ciu32l051_std_usart.o 0.339271% 0.346582% 180 186 0 180 186 0 0 0
51 _strtoul.o strtod.o 0.312883% 0.335402% 166 180 0 166 180 0 0 0
52 ciu32l051_std_gpio.o _strtoul.o 0.290265% 0.309315% 154 166 0 154 166 0 0 0
53 ctype_o.o ciu32l051_std_gpio.o 0.265762% 0.286955% 141 154 0 8 154 133 0 0 0
54 fepilogue.o ctype_o.o 0.245029% 0.262731% 130 141 0 130 8 0 133 0 0
55 perf_os_patch_rt_thread.o fepilogue.o 0.239374% 0.242235% 127 130 0 118 130 9 0 0 0
56 strtol.o perf_os_patch_rt_thread.o 0.211102% 0.236644% 112 127 0 112 118 0 9 0 0
57 ciu32l051_std_dma.o strtol.o 0.188484% 0.208694% 100 112 0 100 112 0 0 0
58 uldiv.o ciu32l051_std_dma.o 0.180944% 0.186334% 96 100 0 96 100 0 0 0
59 console_be.o uldiv.o 0.169635% 0.178881% 90 96 48 0 86 96 4 0 0 48 0
60 bsp_io_dev.o console_be.o 0.167750% 0.167701% 89 90 16 48 76 86 13 4 0 16 48
61 irq.o bsp_io_dev.o 0.165866% 0.165837% 88 89 12 16 88 76 0 13 0 12 16
62 _sgetc.o irq.o 0.128169% 0.163974% 68 88 0 12 68 88 0 0 0 12
63 uidiv_div0.o _sgetc.o 0.116860% 0.126707% 62 68 0 62 68 0 0 0
64 __0sscanf.o uidiv_div0.o 0.113090% 0.115527% 60 62 0 60 62 0 0 0
65 bsp_adc.o __0sscanf.o 0.113090% 0.111801% 60 92 0 60 0 0 92 0
66 d2f.o bsp_adc.o 0.105551% 0.111801% 56 60 0 92 56 60 0 0 0 92
67 clock.o d2f.o 0.101781% 0.104347% 54 56 4 0 54 56 0 0 4 0
68 llmul.o clock.o 0.090472% 0.100620% 48 54 0 4 48 54 0 0 0 4
69 init.o llmul.o 0.090472% 0.089440% 48 0 48 0 0 0
70 m_ps.l init.o 0.082933% 0.089440% 44 48 0 44 48 0 0 0
71 dcmplt.o m_ps.l 0.082933% 0.081987% 44 0 44 0 0 0
72 dcmple.o dcmplt.o 0.082933% 0.081987% 44 0 44 0 0 0
73 dcmpge.o dcmple.o 0.082933% 0.081987% 44 0 44 0 0 0
74 scanf_char.o dcmpge.o 0.082933% 0.081987% 44 0 44 0 0 0
75 atof.o scanf_char.o 0.082933% 0.081987% 44 0 44 0 0 0
76 cpp_init.o atof.o 0.075393% 0.081987% 40 44 0 40 44 0 0 0
77 memseta.o cpp_init.o 0.067854% 0.074534% 36 40 0 36 40 0 0 0
78 memcpya.o memseta.o 0.067854% 0.067080% 36 0 36 0 0 0
79 errno.o memcpya.o 0.067854% 0.067080% 36 4 0 32 36 0 4 0 0
80 llushr.o errno.o 0.064084% 0.067080% 34 36 0 4 34 32 0 0 4 0
81 llshl.o llushr.o 0.060315% 0.063354% 32 34 0 32 34 0 0 0
82 strncmp.o llshl.o 0.056545% 0.059627% 30 32 0 30 32 0 0 0
83 handlers.o strncmp.o 0.056545% 0.055900% 30 0 30 0 0 0
84 _chval.o handlers.o 0.056545% 0.055900% 30 0 30 0 0 0
85 dfltul.o _chval.o 0.052775% 0.055900% 28 30 0 28 30 0 0 0
86 strncpy.o dfltul.o 0.049006% 0.052174% 26 28 0 26 28 0 0 0
87 memcmp.o strncpy.o 0.049006% 0.048447% 26 0 26 0 0 0
88 atoi.o memcmp.o 0.049006% 0.048447% 26 0 26 0 0 0
89 ciu32l051_std.o atoi.o 0.045236% 0.048447% 24 26 0 24 26 0 0 0
90 strchr.o ciu32l051_std.o 0.037697% 0.044720% 20 24 0 20 24 0 0 0
91 isspace_o.o strchr.o 0.033927% 0.037267% 18 20 0 18 20 0 0 0
92 strlen.o isspace_o.o 0.026388% 0.033540% 14 18 0 14 18 0 0 0
93 entry9a.o strlen.o 0.015079% 0.026087% 8 14 0 8 14 0 0 0
94 entry2.o entry9a.o 0.015079% 0.014907% 8 0 8 0 0 0
95 entry8a.o entry2.o 0.007539% 0.014907% 4 8 0 4 8 0 0 0
96 entry5.o entry8a.o 0.007539% 0.007453% 4 0 4 0 0 0
97 entry5.o 0.007453% 4 0 4 0 0 0

View File

@ -1,32 +1,32 @@
File_name,ram_percent,ram,flash,Code,RO_data,RW_data,ZI_data
drv_uart.o,22.874559%,2852,2263,2206,57,0,2852
main.o,14.469041%,1804,2025,1820,205,0,1804
bsp_sensor.o,10.073789%,1256,915,898,17,0,1256
bsp_history.o,9.400064%,1172,1379,1300,79,0,1172
startup_ciu32l051.o,8.213025%,1024,220,28,192,0,1024
agile_led.o,7.731793%,964,1520,1320,200,0,964
bsp_wdg.o,6.288097%,784,232,220,12,0,784
bsp_button.o,5.486044%,684,1027,636,391,0,684
idle.o,3.336542%,416,270,248,22,0,416
ulog.o,2.670837%,333,2145,1934,211,0,333
scheduler.o,2.245749%,280,502,484,18,0,280
shell.o,1.227141%,153,1799,1768,31,0,153
object.o,1.187039%,148,1067,832,107,128,20
kservice.o,1.122875%,140,2168,1912,256,0,140
bsp_adc.o,0.737889%,92,60,60,0,0,92
dev_pin_1.o,0.609560%,76,486,448,38,0,76
mem.o,0.577478%,72,1880,1512,368,0,72
perf_counter.o,0.449150%,56,310,298,4,8,48
console_be.o,0.384986%,48,90,86,4,0,48
timer.o,0.160411%,20,1157,1002,155,0,20
flexible_button.o,0.128329%,16,540,540,0,0,16
bsp_io_dev.o,0.128329%,16,89,76,13,0,16
thread.o,0.096246%,12,2154,1912,242,0,12
irq.o,0.096246%,12,88,88,0,0,12
cpuport.o,0.096246%,12,308,308,0,0,12
bsp_rtc.o,0.048123%,6,699,600,99,0,6
mc_p.l,0.032082%,4,3767,3630,133,4,0
errno.o,0.032082%,4,36,32,0,4,0
system_ciu32l051.o,0.032082%,4,200,164,32,4,0
clock.o,0.032082%,4,54,54,0,0,4
bsp_flash.o,0.032082%,4,3969,2928,1041,0,4
drv_uart.o,22.859892%,2852,2263,2206,57,0,2852
main.o,14.459763%,1804,2025,1820,205,0,1804
bsp_sensor.o,10.067329%,1256,915,898,17,0,1256
bsp_history.o,9.458159%,1180,1319,1240,79,0,1180
startup_ciu32l051.o,8.207759%,1024,220,28,192,0,1024
agile_led.o,7.726836%,964,1520,1320,200,0,964
bsp_wdg.o,6.284065%,784,232,220,12,0,784
bsp_button.o,5.482526%,684,1027,636,391,0,684
idle.o,3.334402%,416,270,248,22,0,416
ulog.o,2.669125%,333,2145,1934,211,0,333
scheduler.o,2.244309%,280,514,496,18,0,280
shell.o,1.226355%,153,1799,1768,31,0,153
object.o,1.186278%,148,1067,832,107,128,20
kservice.o,1.122155%,140,2168,1912,256,0,140
bsp_adc.o,0.737416%,92,60,60,0,0,92
dev_pin_1.o,0.609170%,76,486,448,38,0,76
mem.o,0.577108%,72,1880,1512,368,0,72
perf_counter.o,0.448862%,56,310,298,4,8,48
console_be.o,0.384739%,48,90,86,4,0,48
timer.o,0.160308%,20,1157,1002,155,0,20
flexible_button.o,0.128246%,16,540,540,0,0,16
bsp_io_dev.o,0.128246%,16,89,76,13,0,16
thread.o,0.096185%,12,2154,1912,242,0,12
irq.o,0.096185%,12,88,88,0,0,12
cpuport.o,0.096185%,12,308,308,0,0,12
bsp_rtc.o,0.048092%,6,699,600,99,0,6
mc_p.l,0.032062%,4,3767,3630,133,4,0
errno.o,0.032062%,4,36,32,0,4,0
system_ciu32l051.o,0.032062%,4,200,164,32,4,0
clock.o,0.032062%,4,54,54,0,0,4
bsp_flash.o,0.032062%,4,3969,2928,1041,0,4

1 File_name ram_percent ram flash Code RO_data RW_data ZI_data
2 drv_uart.o 22.874559% 22.859892% 2852 2263 2206 57 0 2852
3 main.o 14.469041% 14.459763% 1804 2025 1820 205 0 1804
4 bsp_sensor.o 10.073789% 10.067329% 1256 915 898 17 0 1256
5 bsp_history.o 9.400064% 9.458159% 1172 1180 1379 1319 1300 1240 79 0 1172 1180
6 startup_ciu32l051.o 8.213025% 8.207759% 1024 220 28 192 0 1024
7 agile_led.o 7.731793% 7.726836% 964 1520 1320 200 0 964
8 bsp_wdg.o 6.288097% 6.284065% 784 232 220 12 0 784
9 bsp_button.o 5.486044% 5.482526% 684 1027 636 391 0 684
10 idle.o 3.336542% 3.334402% 416 270 248 22 0 416
11 ulog.o 2.670837% 2.669125% 333 2145 1934 211 0 333
12 scheduler.o 2.245749% 2.244309% 280 502 514 484 496 18 0 280
13 shell.o 1.227141% 1.226355% 153 1799 1768 31 0 153
14 object.o 1.187039% 1.186278% 148 1067 832 107 128 20
15 kservice.o 1.122875% 1.122155% 140 2168 1912 256 0 140
16 bsp_adc.o 0.737889% 0.737416% 92 60 60 0 0 92
17 dev_pin_1.o 0.609560% 0.609170% 76 486 448 38 0 76
18 mem.o 0.577478% 0.577108% 72 1880 1512 368 0 72
19 perf_counter.o 0.449150% 0.448862% 56 310 298 4 8 48
20 console_be.o 0.384986% 0.384739% 48 90 86 4 0 48
21 timer.o 0.160411% 0.160308% 20 1157 1002 155 0 20
22 flexible_button.o 0.128329% 0.128246% 16 540 540 0 0 16
23 bsp_io_dev.o 0.128329% 0.128246% 16 89 76 13 0 16
24 thread.o 0.096246% 0.096185% 12 2154 1912 242 0 12
25 irq.o 0.096246% 0.096185% 12 88 88 0 0 12
26 cpuport.o 0.096246% 0.096185% 12 308 308 0 0 12
27 bsp_rtc.o 0.048123% 0.048092% 6 699 600 99 0 6
28 mc_p.l 0.032082% 0.032062% 4 3767 3630 133 4 0
29 errno.o 0.032082% 0.032062% 4 36 32 0 4 0
30 system_ciu32l051.o 0.032082% 0.032062% 4 200 164 32 4 0
31 clock.o 0.032082% 0.032062% 4 54 54 0 0 4
32 bsp_flash.o 0.032082% 0.032062% 4 3969 2928 1041 0 4

View File

@ -48,5 +48,6 @@
..\RTOS\components\drivers\inc\serial.h ..\LIB\RTT\user_rtt.h \
..\LIB\RTT\SEGGER_RTT.h ..\LIB\RTT\SEGGER_RTT_Conf.h \
C:\Keil_v5\ARM\ARMCLANG\include\stdlib.h \
..\RTOS\components\drivers\inc\completion.h \
..\RTOS\components\utilities\ulog\ulog.h \
..\RTOS\components\utilities\ulog\ulog_def.h

Binary file not shown.

46
MDK/completion.d Normal file
View File

@ -0,0 +1,46 @@
./completion.o: ..\RTOS\components\drivers\src\completion.c \
..\RTOS\inc\rthw.h ..\RTOS\inc\rtthread.h ..\RTOS\rtconfig.h \
..\RTOS\components\finsh\finsh_config.h ..\RTOS\inc\rtdebug.h \
..\RTOS\inc\rtdef.h ..\RTOS\inc\stdarg.h ..\RTOS\inc\rtservice.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_config.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_rcc.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_common.h \
C:\Keil_v5\ARM\ARMCLANG\include\stddef.h \
C:\Keil_v5\ARM\ARMCLANG\include\stdbool.h \
..\Peripheral\CMSIS\Device\ciu32l051.h \
..\Peripheral\CMSIS\Core\core_cm0plus.h \
C:\Keil_v5\ARM\ARMCLANG\include\stdint.h \
D:\SXDT\Project\HED\4G\USART1_Interrupt\ -\ RT-Thread\Peripheral\CMSIS\Core\cmsis_version.h \
D:\SXDT\Project\HED\4G\USART1_Interrupt\ -\ RT-Thread\Peripheral\CMSIS\Core\cmsis_compiler.h \
D:\SXDT\Project\HED\4G\USART1_Interrupt\ -\ RT-Thread\Peripheral\CMSIS\Core\cmsis_armclang.h \
C:\Keil_v5\ARM\ARMCLANG\include\arm_compat.h \
C:\Keil_v5\ARM\ARMCLANG\include\arm_acle.h \
..\Peripheral\CMSIS\Device\system_ciu32l051.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_adc.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_aes.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_comp.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_crc.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_dbg.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_dma.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_exti.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_flash.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_gpio.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_i2c.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_iwdg.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_lcd.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_lptim.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_lpuart.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_pmu.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_rtc.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_spi.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_syscfg.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_tamp.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_tim.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_trng.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_usart.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_vrefbuf.h \
..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_wwdg.h \
..\RTOS\components\drivers\inc\dev_pin.h \
..\RTOS\components\finsh\finsh_api.h ..\RTOS\inc\rtm.h \
..\RTOS\components\drivers\inc\completion.h

BIN
MDK/completion.o Normal file

Binary file not shown.

View File

@ -47,5 +47,6 @@
..\RTOS\components\drivers\inc\serial.h ..\LIB\LwUtil\lwutil.h \
C:\Keil_v5\ARM\ARMCLANG\include\stdlib.h ..\bsp\inc\bsp_history.h \
..\drivers\inc\drv_gpio.h ..\bsp\inc\bsp_sensor.h \
..\RTOS\components\drivers\inc\completion.h \
..\RTOS\components\utilities\ulog\ulog.h \
..\RTOS\components\utilities\ulog\ulog_def.h

Binary file not shown.

View File

@ -0,0 +1,31 @@
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
*/
#ifndef COMPLETION_H_
#define COMPLETION_H_
#include <rtthread.h>
/**
* Completion
*/
struct rt_completion
{
rt_uint32_t flag;
/* suspended list */
rt_list_t suspended_list;
};
void rt_completion_init(struct rt_completion *completion);
rt_err_t rt_completion_wait(struct rt_completion *completion,
rt_int32_t timeout);
void rt_completion_done(struct rt_completion *completion);
#endif

View File

@ -0,0 +1,161 @@
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2012-09-30 Bernard first version.
* 2021-08-18 chenyingchun add comments
*/
#include <rthw.h>
#include <rtthread.h>
#include "rtm.h"
#include "rtservice.h"
#include "completion.h"
#include "rtdebug.h"
#define RT_COMPLETED 1
#define RT_UNCOMPLETED 0
/**
* @brief This function will initialize a completion object.
*
* @param completion is a pointer to a completion object.
*/
void rt_completion_init(struct rt_completion *completion)
{
rt_base_t level;
RT_ASSERT(completion != RT_NULL);
level = rt_hw_interrupt_disable();
completion->flag = RT_UNCOMPLETED;
rt_list_init(&completion->suspended_list);
rt_hw_interrupt_enable(level);
}
RTM_EXPORT(rt_completion_init);
/**
* @brief This function will wait for a completion, if the completion is unavailable, the thread shall wait for
* the completion up to a specified time.
*
* @param completion is a pointer to a completion object.
*
* @param timeout is a timeout period (unit: OS ticks). If the completion is unavailable, the thread will wait for
* the completion done up to the amount of time specified by the argument.
* NOTE: Generally, we use the macro RT_WAITING_FOREVER to set this parameter, which means that when the
* completion is unavailable, the thread will be waitting forever.
*
* @return Return the operation status. ONLY when the return value is RT_EOK, the operation is successful.
* If the return value is any other values, it means that the completion wait failed.
*
* @warning This function can ONLY be called in the thread context. It MUST NOT be called in interrupt context.
*/
rt_err_t rt_completion_wait(struct rt_completion *completion,
rt_int32_t timeout)
{
rt_err_t result;
rt_base_t level;
rt_thread_t thread;
RT_ASSERT(completion != RT_NULL);
/* current context checking */
RT_DEBUG_SCHEDULER_AVAILABLE(timeout != 0);
result = RT_EOK;
thread = rt_thread_self();
level = rt_hw_interrupt_disable();
if (completion->flag != RT_COMPLETED)
{
/* only one thread can suspend on complete */
RT_ASSERT(rt_list_isempty(&(completion->suspended_list)));
if (timeout == 0)
{
result = -RT_ETIMEOUT;
goto __exit;
}
else
{
/* reset thread error number */
thread->error = RT_EOK;
/* suspend thread */
rt_thread_suspend(thread);
/* add to suspended list */
rt_list_insert_before(&(completion->suspended_list),
&(thread->tlist));
/* start timer */
if (timeout > 0)
{
/* reset the timeout of thread timer and start it */
rt_timer_control(&(thread->thread_timer),
RT_TIMER_CTRL_SET_TIME,
&timeout);
rt_timer_start(&(thread->thread_timer));
}
/* enable interrupt */
rt_hw_interrupt_enable(level);
/* do schedule */
rt_schedule();
/* thread is waked up */
result = thread->error;
level = rt_hw_interrupt_disable();
}
}
/* clean completed flag */
completion->flag = RT_UNCOMPLETED;
__exit:
rt_hw_interrupt_enable(level);
return result;
}
RTM_EXPORT(rt_completion_wait);
/**
* @brief This function indicates a completion has done.
*
* @param completion is a pointer to a completion object.
*/
void rt_completion_done(struct rt_completion *completion)
{
rt_base_t level;
RT_ASSERT(completion != RT_NULL);
if (completion->flag == RT_COMPLETED)
return;
level = rt_hw_interrupt_disable();
completion->flag = RT_COMPLETED;
if (!rt_list_isempty(&(completion->suspended_list)))
{
/* there is one thread in suspended list */
struct rt_thread *thread;
/* get thread entry */
thread = rt_list_entry(completion->suspended_list.next,
struct rt_thread,
tlist);
/* resume it */
rt_thread_resume(thread);
rt_hw_interrupt_enable(level);
/* perform a schedule */
rt_schedule();
}
else
{
rt_hw_interrupt_enable(level);
}
}
RTM_EXPORT(rt_completion_done);

View File

@ -1,7 +1,136 @@
// /*
// * Copyright (c) 2006-2021, RT-Thread Development Team
// *
// * SPDX-License-Identifier: Apache-2.0
// */
// #ifndef __RTDEBUG_H__
// #define __RTDEBUG_H__
// #include <rtconfig.h>
// /* settings depend check */
// /* Using this macro to control all kernel debug features. */
// #ifdef RT_DEBUG
// /* Turn on some of these (set to non-zero) to debug kernel */
// #ifndef RT_DEBUG_MEM
// #define RT_DEBUG_MEM 0
// #endif
// #ifndef RT_DEBUG_MEMHEAP
// #define RT_DEBUG_MEMHEAP 0
// #endif
// #ifndef RT_DEBUG_MODULE
// #define RT_DEBUG_MODULE 0
// #endif
// #ifndef RT_DEBUG_SCHEDULER
// #define RT_DEBUG_SCHEDULER 0
// #endif
// #ifndef RT_DEBUG_SLAB
// #define RT_DEBUG_SLAB 0
// #endif
// #ifndef RT_DEBUG_THREAD
// #define RT_DEBUG_THREAD 0
// #endif
// #ifndef RT_DEBUG_TIMER
// #define RT_DEBUG_TIMER 0
// #endif
// #ifndef RT_DEBUG_IRQ
// #define RT_DEBUG_IRQ 0
// #endif
// #ifndef RT_DEBUG_IPC
// #define RT_DEBUG_IPC 0
// #endif
// #ifndef RT_DEBUG_INIT
// #define RT_DEBUG_INIT 0
// #endif
// /* Turn on this to enable context check */
// #ifndef RT_DEBUG_CONTEXT_CHECK
// #define RT_DEBUG_CONTEXT_CHECK 1
// #endif
// #define RT_DEBUG_LOG(type, message) \
// do \
// { \
// if (type) \
// rt_kprintf message; \
// } \
// while (0)
// #define RT_ASSERT(EX) \
// if (!(EX)) \
// { \
// rt_assert_handler(#EX, __FUNCTION__, __LINE__); \
// }
// /* Macro to check current context */
// #if RT_DEBUG_CONTEXT_CHECK
// #define RT_DEBUG_NOT_IN_INTERRUPT \
// do \
// { \
// rt_base_t level; \
// level = rt_hw_interrupt_disable(); \
// if (rt_interrupt_get_nest() != 0) \
// { \
// rt_kprintf("Function[%s] shall not be used in ISR\n", __FUNCTION__); \
// RT_ASSERT(0) \
// } \
// rt_hw_interrupt_enable(level); \
// } \
// while (0)
// /* "In thread context" means:
// * 1) the scheduler has been started
// * 2) not in interrupt context.
// */
// #define RT_DEBUG_IN_THREAD_CONTEXT \
// do \
// { \
// rt_base_t level; \
// level = rt_hw_interrupt_disable(); \
// if (rt_thread_self() == RT_NULL) \
// { \
// rt_kprintf("Function[%s] shall not be used before scheduler start\n", \
// __FUNCTION__); \
// RT_ASSERT(0) \
// } \
// RT_DEBUG_NOT_IN_INTERRUPT; \
// rt_hw_interrupt_enable(level); \
// } \
// while (0)
// #else
// #define RT_DEBUG_NOT_IN_INTERRUPT
// #define RT_DEBUG_IN_THREAD_CONTEXT
// #endif
// #else /* RT_DEBUG */
// #define RT_ASSERT(EX)
// #define RT_DEBUG_LOG(type, message)
// #define RT_DEBUG_NOT_IN_INTERRUPT
// #define RT_DEBUG_IN_THREAD_CONTEXT
// #endif /* RT_DEBUG */
// #endif /* __RTDEBUG_H__ */
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
*/
#ifndef __RTDEBUG_H__
@ -9,8 +138,6 @@
#include <rtconfig.h>
/* settings depend check */
/* Using this macro to control all kernel debug features. */
#ifdef RT_DEBUG
@ -51,6 +178,10 @@
#define RT_DEBUG_IPC 0
#endif
#ifndef RT_DEBUG_DEVICE
#define RT_DEBUG_DEVICE 1
#endif
#ifndef RT_DEBUG_INIT
#define RT_DEBUG_INIT 0
#endif
@ -109,9 +240,34 @@ do \
rt_hw_interrupt_enable(level); \
} \
while (0)
/* "scheduler available" means:
* 1) the scheduler has been started.
* 2) not in interrupt context.
* 3) scheduler is not locked.
*/
#define RT_DEBUG_SCHEDULER_AVAILABLE(need_check) \
do \
{ \
if (need_check) \
{ \
rt_base_t level; \
level = rt_hw_interrupt_disable(); \
if (rt_critical_level() != 0) \
{ \
rt_kprintf("Function[%s]: scheduler is not available\n", \
__FUNCTION__); \
RT_ASSERT(0) \
} \
RT_DEBUG_IN_THREAD_CONTEXT; \
rt_hw_interrupt_enable(level); \
} \
} \
while (0)
#else
#define RT_DEBUG_NOT_IN_INTERRUPT
#define RT_DEBUG_IN_THREAD_CONTEXT
#define RT_DEBUG_SCHEDULER_AVAILABLE(need_check)
#endif
#else /* RT_DEBUG */
@ -120,6 +276,7 @@ while (0)
#define RT_DEBUG_LOG(type, message)
#define RT_DEBUG_NOT_IN_INTERRUPT
#define RT_DEBUG_IN_THREAD_CONTEXT
#define RT_DEBUG_SCHEDULER_AVAILABLE(need_check)
#endif /* RT_DEBUG */

View File

@ -96,8 +96,8 @@ typedef struct
} TsRawFrameData;
#pragma pack()
extern rt_sem_t hr_rx_sem;
// extern rt_sem_t hr_rx_sem;
extern struct rt_completion hr_rx_sem;
#endif // !__BSP_HISTORY_H__

View File

@ -2,7 +2,7 @@
* @Author: mbw
* @Date: 2024-08-22 16:15:08
* @LastEditors: mbw && 1600520629@qq.com
* @LastEditTime: 2024-09-19 13:46:19
* @LastEditTime: 2024-09-19 14:30:00
* @FilePath: \USART1_Interrupt - RT-Thread\bsp\src\bsp_flash.c
* @Description:
*
@ -695,7 +695,7 @@ ErrorStatus Flash_Read_Record(TuFlashHrRecordFrame *pHrRecord, TeRecord record,
uint32_t start_addr_default = hr_start_addr[record];
uint32_t hr_record_pages_default = hr_record_pages[record];
uint8_t sum_check = 0;
if ((index <= hr_record_max_num[record]) && (index > 0))
if ((index <= hr_record_max_num[record]) && (index > 0))//这个读取的索引值不能超过255因为历史数据输入值为1-255所以这里读最大只能给255
{
if (index <= Index_Frame.hr_num)
{
@ -712,7 +712,7 @@ ErrorStatus Flash_Read_Record(TuFlashHrRecordFrame *pHrRecord, TeRecord record,
RTT_LOG_D("read :hr_start_addr1 = %#x", Index_Frame.hr_start_addr);
index_addr = Index_Frame.hr_start_addr + (index - 1) * HR_RECORD_FRAME_LEN;
}
else // 超过了所在项目的最大地址
else // 超过了所在项目的最大地址,此时应该循环了
{
RTT_LOG_D("read :hr_start_addr2 = %#x", Index_Frame.hr_start_addr);
index_addr = (Index_Frame.hr_start_addr + (index - 1) * HR_RECORD_FRAME_LEN - hr_record_pages[record] * FLASH_PAGE_BYTE_SIZE);

View File

@ -6,6 +6,7 @@
#include "serial.h"
#include "rtdef.h"
#include "user_rtt.h"
#include "completion.h"
#define LOG_TAG "bsp_hr" // 该模块对应的标签。不定义时默认NO_TAG
@ -17,7 +18,10 @@ static char hr_thread_stack[HR_THREAD_STACK_SIZE];
static struct rt_thread hr_thread;
/* 用于接收消息的信号量 */
rt_sem_t hr_rx_sem = RT_NULL;
// rt_sem_t hr_rx_sem = RT_NULL;
/* 完成量控制块 */
struct rt_completion hr_rx_sem;
/**
* @description: 256255
@ -108,8 +112,6 @@ rt_uint8_t HR_GenerateRawFrame(TsRawFrameData *pRawData, rt_uint8_t c1, TeFrameC
pRawData->buf[pRawData->len - 2] = HR_CheckSum(&pRawData->buf[0], pRawData->len - 2);
pRawData->buf[pRawData->len - 1] = FRAME_TAIL;
// LOG_HEX("HrRawData", 16, &pRawData->buf[0], pRawData->len);
return RT_EOK;
}
#endif
@ -300,7 +302,9 @@ static void Hr_Thread_Entry(void *param)
while (1)
{
rt_sem_take(hr_rx_sem, RT_WAITING_FOREVER); // 等待信号量
// rt_sem_take(hr_rx_sem, RT_WAITING_FOREVER); // 等待信号量
rt_completion_wait(&hr_rx_sem, RT_WAITING_FOREVER);
// LOG_D("hr_rx_sem");
rt_uint8_t buf_len = lwrb_get_full(&lpuart1_rx_rb);
@ -324,11 +328,12 @@ static void Hr_Thread_Entry(void *param)
int BSP_HR_Init(void)
{
hr_rx_sem = rt_sem_create("hr_rx_sem", 0, RT_IPC_FLAG_FIFO);
if (hr_rx_sem == RT_NULL)
{
LOG_E("hr_rx_sem create failed");
}
// hr_rx_sem = rt_sem_create("hr_rx_sem", 0, RT_IPC_FLAG_FIFO);
// if (hr_rx_sem == RT_NULL)
// {
// LOG_E("hr_rx_sem create failed");
// }
rt_completion_init(&hr_rx_sem);
rt_thread_init(&hr_thread,
"hr_thread",

View File

@ -8,16 +8,6 @@
*
* Copyright (c) 2024 by ${git_name_email}, All Rights Reserved.
*/
// /*
// * @Author: mbw
// * @Date: 2024-09-18 15:32:35
// * @LastEditors: mbw && 1600520629@qq.com
// * @LastEditTime: 2024-09-19 10:22:40
// * @FilePath: \USART1_Interrupt - RT-Thread\bsp\src\bsp_net.c
// * @Description:
// *
// * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved.
// */
// #include "bsp_net.h"
// #include <stdio.h>
// #include <string.h>

View File

@ -23,6 +23,7 @@
#include "bsp_history.h"
#include "drv_gpio.h"
#include "bsp_sensor.h"
#include "completion.h"
#define LOG_TAG "drv_uart"
#define LOG_LVL LOG_LVL_DBG
@ -775,7 +776,8 @@ void Lpuart_Rx_Complate_Check_Entry(void *parameter)
{
// LOG_D("lpuart1_rx_rb: %d", pos);
// TODO: 处理接收到的数据
rt_sem_release(hr_rx_sem);
// rt_sem_release(hr_rx_sem);
rt_completion_done(&hr_rx_sem);
/*测试读取*/
{
#if 0