mcm-ddc-ble补齐BLE三业务:OTA(直写flash,惰性擦扇区,仅4B对齐暂存)+设备信息查询(INFO_QUERY/INFO_RSP TLV,ADC芯片温度/VDD,风扇转速weak数据源)+CLI透传;连接后主动MTU=247交换;CLI新增devinfo命令;ble_protocol.md升级V1.1;修复出包流程(必须UV4 -r全量重建,校验向量表SP与map一致);整包上板验证通过
This commit is contained in:
parent
31357227d0
commit
8ee0a7cce2
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -3,4 +3,6 @@
|
|||||||
.\objects\app_ble_proto.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
|
.\objects\app_ble_proto.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
|
||||||
.\objects\app_ble_proto.o: ..\inc\cli_core.h
|
.\objects\app_ble_proto.o: ..\inc\cli_core.h
|
||||||
.\objects\app_ble_proto.o: ..\inc\ble_up.h
|
.\objects\app_ble_proto.o: ..\inc\ble_up.h
|
||||||
|
.\objects\app_ble_proto.o: ..\inc\app_ota.h
|
||||||
|
.\objects\app_ble_proto.o: ..\inc\app_info.h
|
||||||
.\objects\app_ble_proto.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
|
.\objects\app_ble_proto.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
mcm-ddc-ble/MDK-ARM/Objects/app_info.crf
Normal file
BIN
mcm-ddc-ble/MDK-ARM/Objects/app_info.crf
Normal file
Binary file not shown.
43
mcm-ddc-ble/MDK-ARM/Objects/app_info.d
Normal file
43
mcm-ddc-ble/MDK-ARM/Objects/app_info.d
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
.\objects\app_info.o: ..\src\app_info.c
|
||||||
|
.\objects\app_info.o: ..\inc\app_info.h
|
||||||
|
.\objects\app_info.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
|
||||||
|
.\objects\app_info.o: ..\inc\app_ble_proto.h
|
||||||
|
.\objects\app_info.o: ..\inc\app_version.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\device\n32wb03x.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\core\core_cm0.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\core\core_cmInstr.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\core\core_cmFunc.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\device\system_n32wb03x.h
|
||||||
|
.\objects\app_info.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\device\n32wb03x_conf.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_adc.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\device\n32wb03x.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_crc.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_dma.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_exti.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_gpio.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_i2c.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_iwdg.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_pwr.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_rcc.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_rtc.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_spi.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_tim.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_usart.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_lpuart.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_wwdg.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_irgen.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_keyscan.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_qflash.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\misc.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\include\FreeRTOS.h
|
||||||
|
.\objects\app_info.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
|
||||||
|
.\objects\app_info.o: ..\inc\FreeRTOSConfig.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\include\projdefs.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\include\portable.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\include\deprecated_definitions.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM0\portmacro.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\include\mpu_wrappers.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\include\task.h
|
||||||
|
.\objects\app_info.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\include\list.h
|
||||||
|
.\objects\app_info.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
|
||||||
BIN
mcm-ddc-ble/MDK-ARM/Objects/app_info.o
Normal file
BIN
mcm-ddc-ble/MDK-ARM/Objects/app_info.o
Normal file
Binary file not shown.
BIN
mcm-ddc-ble/MDK-ARM/Objects/app_ota.crf
Normal file
BIN
mcm-ddc-ble/MDK-ARM/Objects/app_ota.crf
Normal file
Binary file not shown.
44
mcm-ddc-ble/MDK-ARM/Objects/app_ota.d
Normal file
44
mcm-ddc-ble/MDK-ARM/Objects/app_ota.d
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
.\objects\app_ota.o: ..\src\app_ota.c
|
||||||
|
.\objects\app_ota.o: ..\inc\app_ota.h
|
||||||
|
.\objects\app_ota.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
|
||||||
|
.\objects\app_ota.o: ..\inc\app_ble_proto.h
|
||||||
|
.\objects\app_ota.o: ..\..\Boot\src\dfu_layout.h
|
||||||
|
.\objects\app_ota.o: ..\..\Boot\src\boot_crc32.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\device\n32wb03x.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\core\core_cm0.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\core\core_cmInstr.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\core\core_cmFunc.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\device\system_n32wb03x.h
|
||||||
|
.\objects\app_ota.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\device\n32wb03x_conf.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_adc.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\device\n32wb03x.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_crc.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_dma.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_exti.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_gpio.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_i2c.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_iwdg.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_pwr.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_rcc.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_rtc.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_spi.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_tim.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_usart.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_lpuart.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_wwdg.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_irgen.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_keyscan.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_qflash.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\misc.h
|
||||||
|
.\objects\app_ota.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
|
||||||
|
.\objects\app_ota.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\include\FreeRTOS.h
|
||||||
|
.\objects\app_ota.o: ..\inc\FreeRTOSConfig.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\include\projdefs.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\include\portable.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\include\deprecated_definitions.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM0\portmacro.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\include\mpu_wrappers.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\include\task.h
|
||||||
|
.\objects\app_ota.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\include\list.h
|
||||||
BIN
mcm-ddc-ble/MDK-ARM/Objects/app_ota.o
Normal file
BIN
mcm-ddc-ble/MDK-ARM/Objects/app_ota.o
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
mcm-ddc-ble/MDK-ARM/Objects/boot_crc32.crf
Normal file
BIN
mcm-ddc-ble/MDK-ARM/Objects/boot_crc32.crf
Normal file
Binary file not shown.
3
mcm-ddc-ble/MDK-ARM/Objects/boot_crc32.d
Normal file
3
mcm-ddc-ble/MDK-ARM/Objects/boot_crc32.d
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.\objects\boot_crc32.o: ..\..\Boot\src\boot_crc32.c
|
||||||
|
.\objects\boot_crc32.o: ..\..\Boot\src\boot_crc32.h
|
||||||
|
.\objects\boot_crc32.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
|
||||||
BIN
mcm-ddc-ble/MDK-ARM/Objects/boot_crc32.o
Normal file
BIN
mcm-ddc-ble/MDK-ARM/Objects/boot_crc32.o
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -31,6 +31,7 @@
|
|||||||
.\objects\cli_core.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_qflash.h
|
.\objects\cli_core.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_qflash.h
|
||||||
.\objects\cli_core.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\misc.h
|
.\objects\cli_core.o: ..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc\misc.h
|
||||||
.\objects\cli_core.o: ..\inc\app_gpio.h
|
.\objects\cli_core.o: ..\inc\app_gpio.h
|
||||||
|
.\objects\cli_core.o: ..\inc\app_info.h
|
||||||
.\objects\cli_core.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
|
.\objects\cli_core.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
|
||||||
.\objects\cli_core.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
|
.\objects\cli_core.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
|
||||||
.\objects\cli_core.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdarg.h
|
.\objects\cli_core.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdarg.h
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -22,30 +22,30 @@ Dialog DLL: TARMCM1.DLL V1.14.2.0
|
|||||||
|
|
||||||
<h2>Project:</h2>
|
<h2>Project:</h2>
|
||||||
H:\caiic_workspace\mothercup\mcm-ddc-ble\MDK-ARM\mcm-ddc-ble.uvprojx
|
H:\caiic_workspace\mothercup\mcm-ddc-ble\MDK-ARM\mcm-ddc-ble.uvprojx
|
||||||
Project File Date: 09/02/2026
|
Project File Date: 09/03/2026
|
||||||
|
|
||||||
<h2>Output:</h2>
|
<h2>Output:</h2>
|
||||||
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'D:\Keil_v5\ARM\ARMCC\Bin'
|
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'D:\Keil_v5\ARM\ARMCC\Bin'
|
||||||
Rebuild target 'N32WB03x'
|
Rebuild target 'N32WB03x'
|
||||||
assembling startup_n32wb03x.s...
|
assembling startup_n32wb03x.s...
|
||||||
compiling misc.c...
|
|
||||||
compiling n32wb03x_crc.c...
|
|
||||||
compiling n32wb03x_usart.c...
|
|
||||||
compiling n32wb03x_adc.c...
|
|
||||||
compiling n32wb03x_exti.c...
|
|
||||||
compiling system_n32wb03x.c...
|
compiling system_n32wb03x.c...
|
||||||
|
compiling n32wb03x_crc.c...
|
||||||
|
compiling n32wb03x_exti.c...
|
||||||
compiling n32wb03x_dma.c...
|
compiling n32wb03x_dma.c...
|
||||||
compiling n32wb03x_rcc.c...
|
compiling n32wb03x_usart.c...
|
||||||
compiling n32wb03x_spi.c...
|
compiling misc.c...
|
||||||
compiling n32wb03x_gpio.c...
|
compiling n32wb03x_gpio.c...
|
||||||
|
compiling n32wb03x_spi.c...
|
||||||
|
compiling n32wb03x_adc.c...
|
||||||
|
compiling n32wb03x_rcc.c...
|
||||||
compiling n32wb03x_tim.c...
|
compiling n32wb03x_tim.c...
|
||||||
compiling n32wb03x_lpuart.c...
|
compiling n32wb03x_lpuart.c...
|
||||||
compiling n32wb03x_qflash.c...
|
compiling n32wb03x_qflash.c...
|
||||||
compiling lib_att.c...
|
compiling lib_att.c...
|
||||||
compiling bass.c...
|
compiling bass.c...
|
||||||
compiling bass_task.c...
|
compiling bass_task.c...
|
||||||
compiling diss.c...
|
|
||||||
compiling prf.c...
|
compiling prf.c...
|
||||||
|
compiling diss.c...
|
||||||
compiling prf_utils.c...
|
compiling prf_utils.c...
|
||||||
compiling diss_task.c...
|
compiling diss_task.c...
|
||||||
compiling rdtss.c...
|
compiling rdtss.c...
|
||||||
@ -53,32 +53,35 @@ compiling ns_error.c...
|
|||||||
compiling rdtss_task.c...
|
compiling rdtss_task.c...
|
||||||
compiling rdts_common.c...
|
compiling rdts_common.c...
|
||||||
compiling app_batt.c...
|
compiling app_batt.c...
|
||||||
compiling rwip_driver.c...
|
|
||||||
compiling rwip.c...
|
compiling rwip.c...
|
||||||
|
compiling rwip_driver.c...
|
||||||
compiling bsp_usart.c...
|
compiling bsp_usart.c...
|
||||||
compiling cli_core.c...
|
compiling cli_core.c...
|
||||||
compiling ns_sleep.c...
|
compiling ns_sleep.c...
|
||||||
compiling ns_timer.c...
|
compiling ns_timer.c...
|
||||||
compiling ns_sec.c...
|
|
||||||
compiling app_dis.c...
|
|
||||||
compiling app_rdtss.c...
|
|
||||||
compiling ns_ble_task.c...
|
|
||||||
compiling app_cli.c...
|
|
||||||
compiling app_ble_proto.c...
|
|
||||||
compiling ns_ble.c...
|
|
||||||
compiling ble_up.c...
|
compiling ble_up.c...
|
||||||
|
compiling app_cli.c...
|
||||||
|
compiling app_dis.c...
|
||||||
|
compiling ns_sec.c...
|
||||||
|
compiling ns_ble_task.c...
|
||||||
|
compiling ns_ble.c...
|
||||||
|
compiling app_ble_proto.c...
|
||||||
|
compiling app_rdtss.c...
|
||||||
compiling n32wb03x_it.c...
|
compiling n32wb03x_it.c...
|
||||||
|
compiling boot_crc32.c...
|
||||||
compiling app_ble.c...
|
compiling app_ble.c...
|
||||||
compiling app_gpio.c...
|
compiling app_info.c...
|
||||||
|
compiling app_ota.c...
|
||||||
compiling main.c...
|
compiling main.c...
|
||||||
compiling list.c...
|
compiling list.c...
|
||||||
compiling tasks.c...
|
|
||||||
compiling queue.c...
|
|
||||||
compiling timers.c...
|
compiling timers.c...
|
||||||
compiling heap_4.c...
|
compiling heap_4.c...
|
||||||
|
compiling app_gpio.c...
|
||||||
|
compiling queue.c...
|
||||||
|
compiling tasks.c...
|
||||||
compiling port.c...
|
compiling port.c...
|
||||||
linking...
|
linking...
|
||||||
Program Size: Code=31184 RO-data=3504 RW-data=1968 ZI-data=26912
|
Program Size: Code=34564 RO-data=3592 RW-data=2016 ZI-data=26912
|
||||||
After Build - User command #1: fromelf --bin --output=.\bin\mcm-ddc-ble.bin .\Objects\mcm-ddc-ble.axf
|
After Build - User command #1: fromelf --bin --output=.\bin\mcm-ddc-ble.bin .\Objects\mcm-ddc-ble.axf
|
||||||
".\Objects\mcm-ddc-ble.axf" - 0 Error(s), 0 Warning(s).
|
".\Objects\mcm-ddc-ble.axf" - 0 Error(s), 0 Warning(s).
|
||||||
|
|
||||||
@ -93,7 +96,7 @@ Package Vendor: Nationstech
|
|||||||
D:\Keil_v5\Arm\Packs\Nationstech\N32WB03X_DFP\1.4.0\firmware\CMSIS\device
|
D:\Keil_v5\Arm\Packs\Nationstech\N32WB03X_DFP\1.4.0\firmware\CMSIS\device
|
||||||
|
|
||||||
<h2>Collection of Component Files used:</h2>
|
<h2>Collection of Component Files used:</h2>
|
||||||
Build Time Elapsed: 00:00:04
|
Build Time Elapsed: 00:00:05
|
||||||
</pre>
|
</pre>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -42,6 +42,9 @@
|
|||||||
".\objects\ble_up.o"
|
".\objects\ble_up.o"
|
||||||
".\objects\n32wb03x_it.o"
|
".\objects\n32wb03x_it.o"
|
||||||
".\objects\app_ble_proto.o"
|
".\objects\app_ble_proto.o"
|
||||||
|
".\objects\app_ota.o"
|
||||||
|
".\objects\app_info.o"
|
||||||
|
".\objects\boot_crc32.o"
|
||||||
".\objects\app_gpio.o"
|
".\objects\app_gpio.o"
|
||||||
".\objects\tasks.o"
|
".\objects\tasks.o"
|
||||||
".\objects\queue.o"
|
".\objects\queue.o"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,24 +1,24 @@
|
|||||||
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'D:\Keil_v5\ARM\ARMCC\Bin'
|
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'D:\Keil_v5\ARM\ARMCC\Bin'
|
||||||
Rebuild target 'N32WB03x'
|
Rebuild target 'N32WB03x'
|
||||||
assembling startup_n32wb03x.s...
|
assembling startup_n32wb03x.s...
|
||||||
compiling misc.c...
|
|
||||||
compiling n32wb03x_crc.c...
|
|
||||||
compiling n32wb03x_usart.c...
|
|
||||||
compiling n32wb03x_adc.c...
|
|
||||||
compiling n32wb03x_exti.c...
|
|
||||||
compiling system_n32wb03x.c...
|
compiling system_n32wb03x.c...
|
||||||
|
compiling n32wb03x_crc.c...
|
||||||
|
compiling n32wb03x_exti.c...
|
||||||
compiling n32wb03x_dma.c...
|
compiling n32wb03x_dma.c...
|
||||||
compiling n32wb03x_rcc.c...
|
compiling n32wb03x_usart.c...
|
||||||
compiling n32wb03x_spi.c...
|
compiling misc.c...
|
||||||
compiling n32wb03x_gpio.c...
|
compiling n32wb03x_gpio.c...
|
||||||
|
compiling n32wb03x_spi.c...
|
||||||
|
compiling n32wb03x_adc.c...
|
||||||
|
compiling n32wb03x_rcc.c...
|
||||||
compiling n32wb03x_tim.c...
|
compiling n32wb03x_tim.c...
|
||||||
compiling n32wb03x_lpuart.c...
|
compiling n32wb03x_lpuart.c...
|
||||||
compiling n32wb03x_qflash.c...
|
compiling n32wb03x_qflash.c...
|
||||||
compiling lib_att.c...
|
compiling lib_att.c...
|
||||||
compiling bass.c...
|
compiling bass.c...
|
||||||
compiling bass_task.c...
|
compiling bass_task.c...
|
||||||
compiling diss.c...
|
|
||||||
compiling prf.c...
|
compiling prf.c...
|
||||||
|
compiling diss.c...
|
||||||
compiling prf_utils.c...
|
compiling prf_utils.c...
|
||||||
compiling diss_task.c...
|
compiling diss_task.c...
|
||||||
compiling rdtss.c...
|
compiling rdtss.c...
|
||||||
@ -26,32 +26,35 @@ compiling ns_error.c...
|
|||||||
compiling rdtss_task.c...
|
compiling rdtss_task.c...
|
||||||
compiling rdts_common.c...
|
compiling rdts_common.c...
|
||||||
compiling app_batt.c...
|
compiling app_batt.c...
|
||||||
compiling rwip_driver.c...
|
|
||||||
compiling rwip.c...
|
compiling rwip.c...
|
||||||
|
compiling rwip_driver.c...
|
||||||
compiling bsp_usart.c...
|
compiling bsp_usart.c...
|
||||||
compiling cli_core.c...
|
compiling cli_core.c...
|
||||||
compiling ns_sleep.c...
|
compiling ns_sleep.c...
|
||||||
compiling ns_timer.c...
|
compiling ns_timer.c...
|
||||||
compiling ns_sec.c...
|
|
||||||
compiling app_dis.c...
|
|
||||||
compiling app_rdtss.c...
|
|
||||||
compiling ns_ble_task.c...
|
|
||||||
compiling app_cli.c...
|
|
||||||
compiling app_ble_proto.c...
|
|
||||||
compiling ns_ble.c...
|
|
||||||
compiling ble_up.c...
|
compiling ble_up.c...
|
||||||
|
compiling app_cli.c...
|
||||||
|
compiling app_dis.c...
|
||||||
|
compiling ns_sec.c...
|
||||||
|
compiling ns_ble_task.c...
|
||||||
|
compiling ns_ble.c...
|
||||||
|
compiling app_ble_proto.c...
|
||||||
|
compiling app_rdtss.c...
|
||||||
compiling n32wb03x_it.c...
|
compiling n32wb03x_it.c...
|
||||||
|
compiling boot_crc32.c...
|
||||||
compiling app_ble.c...
|
compiling app_ble.c...
|
||||||
compiling app_gpio.c...
|
compiling app_info.c...
|
||||||
|
compiling app_ota.c...
|
||||||
compiling main.c...
|
compiling main.c...
|
||||||
compiling list.c...
|
compiling list.c...
|
||||||
compiling tasks.c...
|
|
||||||
compiling queue.c...
|
|
||||||
compiling timers.c...
|
compiling timers.c...
|
||||||
compiling heap_4.c...
|
compiling heap_4.c...
|
||||||
|
compiling app_gpio.c...
|
||||||
|
compiling queue.c...
|
||||||
|
compiling tasks.c...
|
||||||
compiling port.c...
|
compiling port.c...
|
||||||
linking...
|
linking...
|
||||||
Program Size: Code=31184 RO-data=3504 RW-data=1968 ZI-data=26912
|
Program Size: Code=34564 RO-data=3592 RW-data=2016 ZI-data=26912
|
||||||
After Build - User command #1: fromelf --bin --output=.\bin\mcm-ddc-ble.bin .\Objects\mcm-ddc-ble.axf
|
After Build - User command #1: fromelf --bin --output=.\bin\mcm-ddc-ble.bin .\Objects\mcm-ddc-ble.axf
|
||||||
".\Objects\mcm-ddc-ble.axf" - 0 Error(s), 0 Warning(s).
|
".\Objects\mcm-ddc-ble.axf" - 0 Error(s), 0 Warning(s).
|
||||||
Build Time Elapsed: 00:00:04
|
Build Time Elapsed: 00:00:05
|
||||||
|
|||||||
3601
mcm-ddc-ble/MDK-ARM/mcm-ddc-ble.uvguix.Administrator
Normal file
3601
mcm-ddc-ble/MDK-ARM/mcm-ddc-ble.uvguix.Administrator
Normal file
File diff suppressed because one or more lines are too long
@ -155,7 +155,7 @@
|
|||||||
<DebugFlag>
|
<DebugFlag>
|
||||||
<trace>0</trace>
|
<trace>0</trace>
|
||||||
<periodic>0</periodic>
|
<periodic>0</periodic>
|
||||||
<aLwin>0</aLwin>
|
<aLwin>1</aLwin>
|
||||||
<aCover>0</aCover>
|
<aCover>0</aCover>
|
||||||
<aSer1>0</aSer1>
|
<aSer1>0</aSer1>
|
||||||
<aSer2>0</aSer2>
|
<aSer2>0</aSer2>
|
||||||
@ -977,18 +977,6 @@
|
|||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<bDave2>0</bDave2>
|
<bDave2>0</bDave2>
|
||||||
<PathWithFileName>..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_library\log\ns_log_lpuart.c</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>ns_log_lpuart.c</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>8</GroupNumber>
|
|
||||||
<FileNumber>38</FileNumber>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_library\sleep\ns_sleep.c</PathWithFileName>
|
<PathWithFileName>..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_library\sleep\ns_sleep.c</PathWithFileName>
|
||||||
<FilenameWithoutPath>ns_sleep.c</FilenameWithoutPath>
|
<FilenameWithoutPath>ns_sleep.c</FilenameWithoutPath>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
@ -996,7 +984,7 @@
|
|||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>8</GroupNumber>
|
<GroupNumber>8</GroupNumber>
|
||||||
<FileNumber>39</FileNumber>
|
<FileNumber>38</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1008,7 +996,7 @@
|
|||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>8</GroupNumber>
|
<GroupNumber>8</GroupNumber>
|
||||||
<FileNumber>40</FileNumber>
|
<FileNumber>39</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1020,7 +1008,7 @@
|
|||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>8</GroupNumber>
|
<GroupNumber>8</GroupNumber>
|
||||||
<FileNumber>41</FileNumber>
|
<FileNumber>40</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1032,7 +1020,7 @@
|
|||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>8</GroupNumber>
|
<GroupNumber>8</GroupNumber>
|
||||||
<FileNumber>42</FileNumber>
|
<FileNumber>41</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1044,7 +1032,7 @@
|
|||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>8</GroupNumber>
|
<GroupNumber>8</GroupNumber>
|
||||||
<FileNumber>43</FileNumber>
|
<FileNumber>42</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1064,7 +1052,7 @@
|
|||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>44</FileNumber>
|
<FileNumber>43</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1076,7 +1064,7 @@
|
|||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>45</FileNumber>
|
<FileNumber>44</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1088,7 +1076,7 @@
|
|||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>46</FileNumber>
|
<FileNumber>45</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1100,7 +1088,7 @@
|
|||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>47</FileNumber>
|
<FileNumber>46</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1112,7 +1100,7 @@
|
|||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>48</FileNumber>
|
<FileNumber>47</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1132,7 +1120,7 @@
|
|||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>10</GroupNumber>
|
<GroupNumber>10</GroupNumber>
|
||||||
<FileNumber>49</FileNumber>
|
<FileNumber>48</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1142,6 +1130,18 @@
|
|||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<bShared>0</bShared>
|
<bShared>0</bShared>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>10</GroupNumber>
|
||||||
|
<FileNumber>49</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>..\src\bsp_usart.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>bsp_usart.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>10</GroupNumber>
|
<GroupNumber>10</GroupNumber>
|
||||||
<FileNumber>50</FileNumber>
|
<FileNumber>50</FileNumber>
|
||||||
@ -1149,8 +1149,8 @@
|
|||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<bDave2>0</bDave2>
|
<bDave2>0</bDave2>
|
||||||
<PathWithFileName>..\src\app_usart.c</PathWithFileName>
|
<PathWithFileName>..\src\cli_core.c</PathWithFileName>
|
||||||
<FilenameWithoutPath>app_usart.c</FilenameWithoutPath>
|
<FilenameWithoutPath>cli_core.c</FilenameWithoutPath>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<bShared>0</bShared>
|
<bShared>0</bShared>
|
||||||
</File>
|
</File>
|
||||||
@ -1161,6 +1161,90 @@
|
|||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<bDave2>0</bDave2>
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>..\src\app_cli.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>app_cli.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>10</GroupNumber>
|
||||||
|
<FileNumber>52</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>..\src\ble_up.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>ble_up.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>10</GroupNumber>
|
||||||
|
<FileNumber>53</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>..\src\n32wb03x_it.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>n32wb03x_it.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>10</GroupNumber>
|
||||||
|
<FileNumber>54</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>..\src\app_ble_proto.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>app_ble_proto.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>10</GroupNumber>
|
||||||
|
<FileNumber>55</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>..\src\app_ota.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>app_ota.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>10</GroupNumber>
|
||||||
|
<FileNumber>56</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>..\src\app_info.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>app_info.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>10</GroupNumber>
|
||||||
|
<FileNumber>57</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>..\..\Boot\src\boot_crc32.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>boot_crc32.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>10</GroupNumber>
|
||||||
|
<FileNumber>58</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
<PathWithFileName>..\src\app_gpio.c</PathWithFileName>
|
<PathWithFileName>..\src\app_gpio.c</PathWithFileName>
|
||||||
<FilenameWithoutPath>app_gpio.c</FilenameWithoutPath>
|
<FilenameWithoutPath>app_gpio.c</FilenameWithoutPath>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
@ -1170,13 +1254,13 @@
|
|||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>CONFIG</GroupName>
|
<GroupName>CONFIG</GroupName>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<cbSel>0</cbSel>
|
<cbSel>0</cbSel>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>11</GroupNumber>
|
<GroupNumber>11</GroupNumber>
|
||||||
<FileNumber>52</FileNumber>
|
<FileNumber>59</FileNumber>
|
||||||
<FileType>5</FileType>
|
<FileType>5</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1190,13 +1274,13 @@
|
|||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>DOC</GroupName>
|
<GroupName>DOC</GroupName>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<cbSel>0</cbSel>
|
<cbSel>0</cbSel>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>12</GroupNumber>
|
<GroupNumber>12</GroupNumber>
|
||||||
<FileNumber>53</FileNumber>
|
<FileNumber>60</FileNumber>
|
||||||
<FileType>5</FileType>
|
<FileType>5</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1216,7 +1300,7 @@
|
|||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>13</GroupNumber>
|
<GroupNumber>13</GroupNumber>
|
||||||
<FileNumber>54</FileNumber>
|
<FileNumber>61</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1228,7 +1312,7 @@
|
|||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>13</GroupNumber>
|
<GroupNumber>13</GroupNumber>
|
||||||
<FileNumber>55</FileNumber>
|
<FileNumber>62</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1240,7 +1324,7 @@
|
|||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>13</GroupNumber>
|
<GroupNumber>13</GroupNumber>
|
||||||
<FileNumber>56</FileNumber>
|
<FileNumber>63</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1252,7 +1336,7 @@
|
|||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>13</GroupNumber>
|
<GroupNumber>13</GroupNumber>
|
||||||
<FileNumber>57</FileNumber>
|
<FileNumber>64</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1264,7 +1348,7 @@
|
|||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>13</GroupNumber>
|
<GroupNumber>13</GroupNumber>
|
||||||
<FileNumber>58</FileNumber>
|
<FileNumber>65</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
@ -1276,7 +1360,7 @@
|
|||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>13</GroupNumber>
|
<GroupNumber>13</GroupNumber>
|
||||||
<FileNumber>59</FileNumber>
|
<FileNumber>66</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|||||||
@ -339,7 +339,7 @@
|
|||||||
<MiscControls></MiscControls>
|
<MiscControls></MiscControls>
|
||||||
<Define>N32WB03X, USE_STDPERIPH_DRIVER</Define>
|
<Define>N32WB03X, USE_STDPERIPH_DRIVER</Define>
|
||||||
<Undefine></Undefine>
|
<Undefine></Undefine>
|
||||||
<IncludePath>..\inc;..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\core;..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\device;..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_profile\dis\diss\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_profile\bas\bass\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_profile\bas\bass\src;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_profile\hogp;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_profile\hogp\hogpd\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_profile\hogp\hogpd\src;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_profile\rdts;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_profile\rdts\rdtss\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ahi\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\hl\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\hl\inc;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\hl\src\gap;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\hl\src\gatt;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\hl\src\l2c;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\ll\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\ll\src;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\ll\src\llc;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\ll\src\lld;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\ll\src\llm;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\em\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\hci\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\sch\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\aes\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\common\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\dbg\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\ecc_p256\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\h4tl\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\ke\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\rwip\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\rfinit\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\arch;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\common\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\common\src;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\stack_common;..\inc\rw;..\inc\app_profile;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\arch;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_library\adv;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_library\timer;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_library\log;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_library\delay;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_library\sleep;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_library\sec;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_library\ble;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\include;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM0</IncludePath>
|
<IncludePath>..\inc;..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\core;..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\CMSIS\device;..\..\nations-tec\N32WB03x_SDK_V2.0.0\firmware\n32wb03x_std_periph_driver\inc;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_profile\dis\diss\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_profile\bas\bass\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_profile\bas\bass\src;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_profile\hogp;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_profile\hogp\hogpd\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_profile\hogp\hogpd\src;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_profile\rdts;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_profile\rdts\rdtss\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ahi\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\hl\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\hl\inc;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\hl\src\gap;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\hl\src\gatt;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\hl\src\l2c;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\ll\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\ll\src;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\ll\src\llc;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\ll\src\lld;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\ble\ll\src\llm;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\em\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\hci\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\ip\sch\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\aes\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\common\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\dbg\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\ecc_p256\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\h4tl\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\ke\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\rwip\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\rfinit\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\arch;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\common\api;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\modules\common\src;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\stack_common;..\inc\rw;..\inc\app_profile;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_ble_stack\arch;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_library\adv;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_library\timer;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_library\log;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_library\delay;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_library\sleep;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_library\sec;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Nationstech\ble_library\ns_library\ble;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\include;..\..\nations-tec\N32WB03x_SDK_V2.0.0\middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM0;..\..\Boot\src</IncludePath>
|
||||||
</VariousControls>
|
</VariousControls>
|
||||||
</Cads>
|
</Cads>
|
||||||
<Aads>
|
<Aads>
|
||||||
@ -1058,6 +1058,21 @@
|
|||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\src\app_ble_proto.c</FilePath>
|
<FilePath>..\src\app_ble_proto.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>app_ota.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\app_ota.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>app_info.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\app_info.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>boot_crc32.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\Boot\src\boot_crc32.c</FilePath>
|
||||||
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>app_gpio.c</FileName>
|
<FileName>app_gpio.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
@ -1853,6 +1868,51 @@
|
|||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\src\main.c</FilePath>
|
<FilePath>..\src\main.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>bsp_usart.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\bsp_usart.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>cli_core.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\cli_core.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>app_cli.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\app_cli.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>ble_up.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\ble_up.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>n32wb03x_it.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\n32wb03x_it.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>app_ble_proto.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\app_ble_proto.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>app_ota.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\app_ota.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>app_info.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\app_info.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>boot_crc32.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\Boot\src\boot_crc32.c</FilePath>
|
||||||
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>app_gpio.c</FileName>
|
<FileName>app_gpio.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
@ -2648,6 +2708,51 @@
|
|||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\src\main.c</FilePath>
|
<FilePath>..\src\main.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>bsp_usart.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\bsp_usart.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>cli_core.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\cli_core.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>app_cli.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\app_cli.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>ble_up.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\ble_up.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>n32wb03x_it.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\n32wb03x_it.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>app_ble_proto.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\app_ble_proto.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>app_ota.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\app_ota.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>app_info.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\src\app_info.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>boot_crc32.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\Boot\src\boot_crc32.c</FilePath>
|
||||||
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>app_gpio.c</FileName>
|
<FileName>app_gpio.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
|
|||||||
@ -1,30 +1,32 @@
|
|||||||
# CAIIC BLE 通信协议 V1.0
|
# CAIIC BLE 通信协议 V1.1
|
||||||
|
|
||||||
适用于 mcm-ddc-04 固件(N32WB031KEQ6-2,512KB Flash)。手机 APP(自研)或通用 BLE
|
适用于 mcm-ddc-ble 固件(N32WB031KEQ6-2,Cortex-M0 64MHz,512KB Flash)。
|
||||||
调试工具(如 nRF Connect)通过本文协议与设备通信,支持 CLI 命令透传与 BLE OTA 固件升级。
|
手机 APP(自研)或通用 BLE 调试工具(如 nRF Connect)通过本文协议与设备通信,
|
||||||
|
支持三类业务:**CLI 命令透传**、**设备信息查询**(温度/风扇转速等)、**BLE OTA 固件升级**。
|
||||||
|
|
||||||
## 1. GATT 服务
|
## 1. GATT 服务
|
||||||
|
|
||||||
广播名:`CAIIC-MCM`(连接参数:interval 15–30ms,latency 0,supervision timeout 5s)
|
广播名:`CAIIC-MCM-20260902`
|
||||||
|
|
||||||
自定义 128-bit UUID 服务(CLS):
|
使用 SDK rdtss(raw data transfer server)自定义 128-bit UUID 服务:
|
||||||
|
|
||||||
| 项 | UUID | 属性 |
|
| 项 | UUID | 属性 |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| Service | `0000CA10-CA11-4B11-8000-CA11CA11CA11` | Primary Service |
|
| Service | `00002760-08C2-11E1-9073-0E8AC72E1001` | Primary Service |
|
||||||
| 下行特征(手机→设备) | `0000CA11-CA11-4B11-8000-CA11CA11CA11` | Write Without Response |
|
| 下行特征(手机→设备) | `00002760-08C2-11E1-9073-0E8AC72EE001` | Write Without Response |
|
||||||
| 上行特征(设备→手机) | `0000CA12-CA11-4B11-8000-CA11CA11CA11` | Notify(需写 CCCD=0x0001 使能) |
|
| 上行特征(设备→手机) | `00002760-08C2-11E1-9073-0E8AC72EE002` | Notify(需写 CCCD=0x0001 使能) |
|
||||||
|
|
||||||
建议手机端连接后立即协商 **MTU=247**(否则默认 23 字节 ATT MTU,OTA 会非常慢)。
|
MTU:**设备在连接建立后主动发起 MTU 交换(请求 247)**;手机端也可自行发起。
|
||||||
一次 BLE 写入/通知的最大数据量 = att_mtu − 3。**一个协议帧可以跨多次 BLE 写入传输,
|
一次 BLE 写入/通知的最大数据量 = att_mtu − 3(默认 MTU 23 时为 20B)。
|
||||||
设备侧按字节流重组**;设备上行每帧不超过一次 notify 容量。
|
**一个协议帧可以跨多次 BLE 写入传输,一次写入也可以携带多个帧**——设备侧按字节流重组。
|
||||||
|
设备上行每个 notify 固定 ≤20B(对端 MTU 未知时也能工作)。
|
||||||
|
|
||||||
## 2. 帧格式(小端)
|
## 2. 帧格式(小端)
|
||||||
|
|
||||||
| 偏移 | 字段 | 说明 |
|
| 偏移 | 字段 | 说明 |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| 0 | SOF = 0xCA | 帧起始 |
|
| 0 | SOF = 0xCA | 帧起始 |
|
||||||
| 1 | TYPE | 帧类型(见下表) |
|
| 1 | TYPE | 帧类型(见第 3 节) |
|
||||||
| 2 | SEQ | 序号(模 256,发送方自增;应答帧回显请求帧 SEQ) |
|
| 2 | SEQ | 序号(模 256,发送方自增;应答帧回显请求帧 SEQ) |
|
||||||
| 3–4 | LEN | payload 长度(0–480),小端 |
|
| 3–4 | LEN | payload 长度(0–480),小端 |
|
||||||
| 5.. | PAYLOAD | LEN 字节 |
|
| 5.. | PAYLOAD | LEN 字节 |
|
||||||
@ -33,7 +35,7 @@
|
|||||||
帧开销 = 7 字节(头 5 + CRC 2)。
|
帧开销 = 7 字节(头 5 + CRC 2)。
|
||||||
|
|
||||||
- 设备单帧 payload 上限 480B;超出或 CRC 错误的帧被静默丢弃并重新找 SOF。
|
- 设备单帧 payload 上限 480B;超出或 CRC 错误的帧被静默丢弃并重新找 SOF。
|
||||||
- 设备→手机的 CLI_RSP 分块大小 = min(att_mtu − 3, 244) − 7。
|
- 设备→手机的 CLI_RSP 分块大小 = 20 − 7 = 13B(固定按默认 MTU 分包)。
|
||||||
|
|
||||||
## 3. 帧类型
|
## 3. 帧类型
|
||||||
|
|
||||||
@ -46,47 +48,88 @@
|
|||||||
| 0x11 | 手机→设备 | OTA_DATA | {offset u32, data…}(offset 必须严格连续) |
|
| 0x11 | 手机→设备 | OTA_DATA | {offset u32, data…}(offset 必须严格连续) |
|
||||||
| 0x12 | 手机→设备 | OTA_END | {crc32 u32}(与 OTA_BEGIN 中一致) |
|
| 0x12 | 手机→设备 | OTA_END | {crc32 u32}(与 OTA_BEGIN 中一致) |
|
||||||
| 0x1F | 设备→手机 | OTA_RSP | {cmd_echo u8, status u8, offset u32} |
|
| 0x1F | 设备→手机 | OTA_RSP | {cmd_echo u8, status u8, offset u32} |
|
||||||
|
| 0x20 | 手机→设备 | INFO_QUERY | {item_id u8}×n;空 payload 或单个 0xFF = 查询全部 |
|
||||||
|
| 0x21 | 设备→手机 | INFO_RSP | TLV 序列 {id u8, len u8, value…}×n |
|
||||||
|
|
||||||
OTA_RSP status:0=ok,1=bad_frame,2=bad_state/offset 乱序(offset 字段=设备期望的下一字节偏移),
|
OTA_RSP status:0=ok,1=bad_frame,2=bad_state/offset 乱序(offset 字段=设备期望的下一字节偏移),
|
||||||
3=size_too_big,4=crc_fail,5=flash_fail。
|
3=size_too_big,4=crc_fail,5=flash_fail。
|
||||||
|
|
||||||
## 4. CLI 透传流程
|
## 4. CLI 透传流程
|
||||||
|
|
||||||
1. 手机:CLI_REQ,payload 如 `help`、`sysinfo`、`log on`、`led 1 toggle`(与 UART CLI 命令集一致)。
|
1. 手机:CLI_REQ,payload 如 `help`、`sysinfo`、`devinfo`、`led 1 toggle`(与 UART CLI 命令集一致)。
|
||||||
2. 设备:若干 CLI_RSP(命令输出的文本流分块)+ 最后一帧 CLI_RSP_END 带状态码。
|
2. 设备:若干 CLI_RSP(命令输出的文本流分块)+ 最后一帧 CLI_RSP_END 带状态码。
|
||||||
3. 无命令执行中时可随时发下一条;命令是同步执行的,设备应答完毕前不要再发 CLI_REQ。
|
3. 无命令执行中时可随时发下一条;命令是同步执行的,设备应答完毕前不要再发 CLI_REQ。
|
||||||
|
|
||||||
UART CLI 特有的交互功能(行编辑、Tab 补全、历史、Ctrl+Z)不适用于 BLE 通道。
|
UART CLI 特有的交互功能(行编辑、Tab 补全、历史、Ctrl+Z)不适用于 BLE 通道。
|
||||||
|
|
||||||
## 5. OTA 升级流程(双 bank 直写,无中转区)
|
自测示例(默认 MTU,写入下行特征):`help` 命令帧 =
|
||||||
|
`CA 01 00 04 00 68 65 6C 70 16 EC`
|
||||||
|
|
||||||
设备当前运行 APP1(0x01008000)则新固件写入 APP2(0x01040000),反之亦然。
|
## 5. 设备信息查询流程
|
||||||
bank 上限 224KB(0x38000)。镜像 = Keil 产物 bin(裸二进制,从 bank 基址开始的镜像)。
|
|
||||||
|
手机发 INFO_QUERY,设备回一帧 INFO_RSP,payload 为请求的各信息项的 TLV 序列
|
||||||
|
(每项 {id u8, len u8, value},数值均小端)。设备不认识的 id 直接跳过、不出现在应答中。
|
||||||
|
|
||||||
|
| item_id | 名称 | 类型 | 说明 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| 0x01 | FW_VERSION | u32 | 固件版本号,如 0x00010001 = V1.00.01 |
|
||||||
|
| 0x02 | CHIP_TEMP | i16 | 芯片温度,单位 0.1°C(ADC 内置温度传感器 CH7,出厂 trim 校准) |
|
||||||
|
| 0x03 | FAN_RPM | u16 | 风扇转速 rpm;0xFFFF = 无此硬件/未接入 |
|
||||||
|
| 0x04 | VDD_MV | u16 | 电源电压,单位 mV(ADC CH6) |
|
||||||
|
| 0x05 | UPTIME_S | u32 | 系统运行时间,单位 s |
|
||||||
|
| 0x06 | FREE_HEAP | u32 | FreeRTOS 堆剩余,单位 B |
|
||||||
|
|
||||||
|
示例:查询温度+风扇 = INFO_QUERY payload `02 03`;
|
||||||
|
应答 INFO_RSP payload 形如 `02 02 0A 01 03 02 FF FF`(温度 26.6°C,风扇无硬件)。
|
||||||
|
|
||||||
|
数据来源约定:温度/电压由设备固件直接采 ADC;风扇转速由应用层注册的
|
||||||
|
数据源提供(`app_fan_get_rpm()`,弱符号默认返回 0xFFFF),产品板接上风扇
|
||||||
|
转速检测电路后重写该函数即可,协议不变。
|
||||||
|
|
||||||
|
## 6. OTA 升级流程(双 bank 直写,无中转区)
|
||||||
|
|
||||||
|
Flash 布局(512KB,官方 256KB DFU 布局每区加倍):
|
||||||
|
|
||||||
|
| 区域 | 地址 | 大小 |
|
||||||
|
|---|---|---|
|
||||||
|
| Bootloader | 0x01000000 | 16KB |
|
||||||
|
| bootsetting | 0x01004000 | 8KB(用 1 个 4KB 扇区) |
|
||||||
|
| APP_DATA(预留) | 0x01006000 | 8KB |
|
||||||
|
| APP1 | 0x01008000 | 224KB |
|
||||||
|
| APP2 | 0x01040000 | 224KB |
|
||||||
|
|
||||||
|
设备当前运行 APP1 则新固件写入 APP2,反之亦然。bank 上限 224KB(0x38000)。
|
||||||
|
镜像 = Keil 产物 bin(裸二进制,从 bank 基址开始的镜像)。
|
||||||
|
flash 擦除单位 = 4KB 扇区。设备侧**直写 flash,不做扇区级 RAM 缓存**:
|
||||||
|
数据首次落入某个未擦除的扇区时先擦除该扇区(惰性擦除),收到的数据立即编程写入,
|
||||||
|
仅保留 4 字节对齐暂存(Qflash 写要求 4 字节对齐),**不经过任何 flash 中转区**。
|
||||||
|
|
||||||
1. **OTA_BEGIN**:手机发送 {total_size, image_crc32, version}。
|
1. **OTA_BEGIN**:手机发送 {total_size, image_crc32, version}。
|
||||||
- image_crc32 = IEEE CRC32(poly 0xEDB88320,初值/异或出 0xFFFFFFFF,即 zlib crc32)
|
- image_crc32 = IEEE CRC32(poly 0xEDB88320,初值/异或出 0xFFFFFFFF,即 zlib crc32)
|
||||||
对整个镜像 bin 文件的校验值。
|
对整个镜像 bin 文件的校验值。
|
||||||
- version:u32,如 0x010001 表示 V1.00.01。
|
- version:u32,如 0x00010001 表示 V1.00.01。
|
||||||
- 设备回 OTA_RSP(0x10, ok, 0) 后开始接收。
|
- 设备回 OTA_RSP(0x10, ok, 0) 后开始接收。
|
||||||
2. **OTA_DATA**:从 offset=0 起严格顺序发送,每帧 {offset, data}。
|
2. **OTA_DATA**:从 offset=0 起严格顺序发送,每帧 {offset, data}。
|
||||||
- 设备侧用 **4KB 扇区缓冲** 攒数据,攒满一个 flash 扇区(4KB)后擦除并写入,
|
- 单帧 data 建议 ≤ 233B(MTU 247 时一次写入 244B = 帧开销 7 + offset 4 + data 233);
|
||||||
然后回 OTA_RSP(0x11, ok, 已写 offset)——兼作流控与进度显示。
|
MTU 23 时单帧总长度不得超过 20B。
|
||||||
|
- 设备收到即写入 flash;每写满一个 4KB 扇区回一帧 OTA_RSP(0x11, ok, 已写 offset)
|
||||||
|
——兼作流控与进度显示。
|
||||||
- 手机端节奏:可按扇区等 ack 发送,也可连续发送;若收到 status=2 的应答,
|
- 手机端节奏:可按扇区等 ack 发送,也可连续发送;若收到 status=2 的应答,
|
||||||
从应答中的 offset 处重发即可重新同步。
|
从应答中的 offset 处重发即可重新同步。
|
||||||
3. **OTA_END**:{crc32}。设备 flush 尾部(0xFF 补齐到 4 字节对齐后写最后一个扇区),
|
3. **OTA_END**:{crc32}。设备 flush 尾部(0xFF 补齐到 4 字节对齐后写最后一个扇区),
|
||||||
从 flash 回读整镜像复算 CRC32,与手机端比对:
|
从 flash 回读整镜像复算 CRC32,与手机端比对:
|
||||||
- 失败 → OTA_RSP(0x12, crc_fail),会话中止,不复位;
|
- 失败 → OTA_RSP(0x12, crc_fail),会话中止,不复位;
|
||||||
- 成功 → 更新 bootsetting(active bank 指向新 bank)→ OTA_RSP(0x12, ok) →
|
- 成功 → 更新 bootsetting(active bank 指向新 bank,记录 size/crc32/version)
|
||||||
200ms 后自动复位,bootloader 校验并跳转到新固件。
|
→ OTA_RSP(0x12, ok) → 200ms 后自动复位,bootloader 直接跳转到新固件
|
||||||
|
(跳转不做校验,校验已在 OTA 过程完成)。
|
||||||
4. 任何时刻 BLE 断连,OTA 会话中止,对侧 bank 数据作废(可重新 OTA_BEGIN 重来)。
|
4. 任何时刻 BLE 断连,OTA 会话中止,对侧 bank 数据作废(可重新 OTA_BEGIN 重来)。
|
||||||
|
|
||||||
注意:flash 擦写期间设备关中断数十 ms/扇区,BLE 链路靠 5s supervision timeout 维持,
|
注意:flash 擦写期间设备关中断数十 ms/扇区(Qflash 算法在 RAM 执行),BLE 链路靠
|
||||||
属正常现象;但请避免在 OTA 期间主动断开。
|
5s supervision timeout 维持,属正常现象;但请避免在 OTA 期间主动断开。
|
||||||
|
|
||||||
## 6. 首次烧录与恢复
|
## 7. 首次烧录与恢复
|
||||||
|
|
||||||
- 出厂/首次:SWD 分别烧录 bootloader(`Boot/MDK-ARM` 工程,0x01000000)和 APP1
|
- 出厂/首次:SWD 烧录整包(bootloader + bootsetting 缺省配置 + APP1),
|
||||||
(mcm-ddc-04 工程,0x01008000)。bootsetting 空白时 bootloader 做向量合法性检查后
|
由 `tools\merge_image.py` / `make_package.bat` 生成。
|
||||||
直接跳 APP1。
|
|
||||||
- OTA 失败变砖恢复:SWD 重烧即可(bootloader 不做串口 DFU)。
|
- OTA 失败变砖恢复:SWD 重烧即可(bootloader 不做串口 DFU)。
|
||||||
- 调试用 `bankinfo` 命令查看当前运行 bank 与 bootsetting 记录。
|
- Keil 调试下载必须用**扇区擦除**,整片擦除会删掉 bootloader。
|
||||||
|
|||||||
@ -607,3 +607,77 @@ mcm-ddc-04 在 Boot 跳转路径下仍有问题期间,新建 `mcm-ddc-ble/`
|
|||||||
- 整包:`tools\out\caiic_ble_full.{hex,bin}`(Boot + 缺省 bootsetting + 本工程 APP1)。
|
- 整包:`tools\out\caiic_ble_full.{hex,bin}`(Boot + 缺省 bootsetting + 本工程 APP1)。
|
||||||
- 串口(115200):banner + `caiic->`;BLE:`CAIIC-MCM-20260902`,订阅 `...E0002`
|
- 串口(115200):banner + `caiic->`;BLE:`CAIIC-MCM-20260902`,订阅 `...E0002`
|
||||||
notify 后往 `...E0001` 写 CLI_REQ 帧即可对话。
|
notify 后往 `...E0001` 写 CLI_REQ 帧即可对话。
|
||||||
|
|
||||||
|
## 23. BLE 三业务补齐:OTA + 设备信息查询 + CLI 透传(2026-09-03)
|
||||||
|
|
||||||
|
mcm-ddc-04 目录已由用户删除,mcm-ddc-ble 成为唯一应用工程。本轮把 BLE 通道
|
||||||
|
从"仅 CLI 透传"补齐为协议 V1.1 的三业务:CLI 透传(已有)、设备信息查询
|
||||||
|
(新增)、双 bank 直写 OTA(从 04 git 历史 3135722 移植 app_ota.c/h)。
|
||||||
|
|
||||||
|
### 23.1 协议升级 V1.1(docs/ble_protocol.md 重写)
|
||||||
|
|
||||||
|
- 适配本工程实际:rdtss 服务(`...E0001` 下行写 / `...E0002` 上行 notify)、
|
||||||
|
广播名 `CAIIC-MCM-20260902`。
|
||||||
|
- 新增信息查询帧:INFO_QUERY(0x20, {item_id}*n,空/0xFF=查全部) /
|
||||||
|
INFO_RSP(0x21, TLV {id,len,value}*n)。信息项:0x01 固件版本 u32、
|
||||||
|
0x02 芯片温度 i16(0.1°C)、0x03 风扇转速 u16(0xFFFF=无硬件)、
|
||||||
|
0x04 电源电压 u16(mV)、0x05 运行时长 u32(s)、0x06 剩余堆 u32(B)。
|
||||||
|
- OTA 帧 0x10~0x12/0x1F 从"保留"变为实现,流程与 04 一致(扇区级 ack 流控、
|
||||||
|
END 时整镜像 CRC32 校验 + 更新 bootsetting + 200ms 后复位)。
|
||||||
|
|
||||||
|
### 23.2 OTA 移植(app_ota.c/h,368 行原样搬入)
|
||||||
|
|
||||||
|
- 4KB 扇区 RAM 缓存攒满即擦写对侧 bank,无 flash 中转区;`Image$$ER_IROM1$$Base`
|
||||||
|
判定当前 bank(本工程链接 0x01008000 = APP1,OTA 写 APP2 0x01040000)。
|
||||||
|
- `app_ble_proto_send_frame()` 由 static 改为导出供 OTA/INFO 应答;
|
||||||
|
OTA 状态码 BLE_OTA_ST_* 移入 app_ble_proto.h。
|
||||||
|
- 断连即 `app_ota_abort()`(挂在 app_ble_proto_on_disconnect)。
|
||||||
|
- uvprojx:USER 组加 app_ota.c / app_info.c / `..\..\Boot\src\boot_crc32.c`,
|
||||||
|
IncludePath 追加 `..\..\Boot\src`(dfu_layout.h / boot_crc32.h)。
|
||||||
|
与 app_ble_proto.c 一样只加 target "N32WB03x"。
|
||||||
|
|
||||||
|
### 23.3 设备信息查询(新模块 app_info.c/h)
|
||||||
|
|
||||||
|
- 温度:ADC CH7 内置温度传感器(`ADC_EnableTS` + 单发轮询 + 超时保护,
|
||||||
|
`ADC_ConverValueToTemperature` 用出厂 trim),参考 SDK 例程
|
||||||
|
`peripheral/ADC/ADC_Temperature`。
|
||||||
|
- 电压:ADC CH6(VCC),`ADC_ConverValueToVoltage`(600~3600mV 档 trim)。
|
||||||
|
- ADC 懒初始化(AUDIOPLL 时钟源 + bypass filter + 过采样 3),首次查询时配好。
|
||||||
|
- 风扇转速:`__weak app_fan_get_rpm()` 默认返回 0xFFFF(本板无测速电路),
|
||||||
|
产品代码重写该函数即可,协议不变。
|
||||||
|
- CLI 新增 `devinfo` 命令打印同组数据(方便无手机时串口验证)。
|
||||||
|
|
||||||
|
### 23.4 MTU 协商
|
||||||
|
|
||||||
|
- `app_ble_connected()` 里设备主动 `ns_ble_mtu_set(247)`(ns_ble 库提供,
|
||||||
|
官方 DFU 的 OTA_CMD_MTU_UPDATE 同款调用)。MTU 247 时一次写入 244B,
|
||||||
|
OTA_DATA 单帧可带 233B 数据;MTU 协商失败则退化为 20B/写(协议按字节流
|
||||||
|
重组,两种情形都正确)。上行 notify 仍固定 20B 块,兼容任意对端。
|
||||||
|
|
||||||
|
### 23.5 产物
|
||||||
|
|
||||||
|
- 构建 0E/0W:`Code=34488 RO-data=3592 RW-data=2004 ZI-data=31012`
|
||||||
|
(含 4KB OTA 扇区缓存;用户 RAM 48KB 占用 33016B)。
|
||||||
|
- APP bin = 39616B(≈38.7KB,bank 上限 224KB)。
|
||||||
|
- 整包:`tools\out\caiic_ble_full.{hex,bin}`(Boot + 缺省 bootsetting + 本工程
|
||||||
|
APP1,bootsetting crc32=0x69A005D5)。
|
||||||
|
- 待上板验证:BLE 连接后 MTU 交换、INFO_QUERY 应答、OTA 全流程(写 APP2 →
|
||||||
|
复位 → Boot 跳 APP2)。
|
||||||
|
|
||||||
|
## 24. OTA 去 4KB 扇区缓存,改直写(2026-09-03)
|
||||||
|
|
||||||
|
- 背景:23 节版本整包烧录后不运行。静态校验发现该包 APP1 向量表初始 SP 仍停在
|
||||||
|
旧版栈顶 0x2000B0D0,而新增 4KB OTA 缓存已把 ZI 顶到 0x2000B8F8——栈顶落在
|
||||||
|
ZI/堆区域内,启动即崩(增量构建产物不一致所致;教训:出包一律 `UV4 -r`
|
||||||
|
全量重建,并核对向量表 SP 与 map 的 `__initial_sp` 一致)。
|
||||||
|
- 应用户要求去掉 4KB 扇区 RAM 缓存设计,app_ota.c 重写为**直写**:
|
||||||
|
- 惰性擦除:数据首次落入某扇区时先擦该扇区(`ota_erase_up_to`);
|
||||||
|
- 收到 OTA_DATA 立即 `Qflash_Write` 写入(bulk 对齐部分直接用帧 payload,
|
||||||
|
不再经过大缓冲);
|
||||||
|
- 仅保留 4 字节对齐暂存(Qflash 写要求 4B 对齐,尾部 OTA_END 时 0xFF 补齐);
|
||||||
|
- 流控/进度不变:每写满一个 4KB 扇区回一帧 OTA_RSP(ok, offset)。
|
||||||
|
- 效果:ZI 从 31012 降回 26912(-4KB),本版 `Code=34564 RO=3592 RW=2016
|
||||||
|
ZI=26912`,APP bin 39692B,栈顶 0x2000B100 与 map `__initial_sp` 一致。
|
||||||
|
- 整包:`tools\out\caiic_ble_full.{hex,bin}`(bootsetting crc32=0xF15790D8)。
|
||||||
|
- 协议文档 §6 已同步直写描述(对外流程与帧格式不变)。
|
||||||
|
- 上板验证:整包烧录后正常启动,串口 banner + `caiic->` 正常(2026-09-03 确认)。
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* @file app_ble_proto.h
|
* @file app_ble_proto.h
|
||||||
* @brief BLE frame protocol frontend (over the rdtss write/notify
|
* @brief BLE frame protocol frontend (over the rdtss write/notify
|
||||||
* characteristics): frame reassembly and CLI request/response
|
* characteristics): frame reassembly, CLI request/response transport,
|
||||||
* transport. OTA frame types are reserved but not handled in
|
* device info query and OTA frame dispatch (see docs/ble_protocol.md).
|
||||||
* this project (no flash OTA here).
|
|
||||||
*
|
*
|
||||||
* Frame format (little endian):
|
* Frame format (little endian):
|
||||||
* [0] SOF = 0xCA
|
* [0] SOF = 0xCA
|
||||||
@ -28,16 +27,33 @@ extern "C" {
|
|||||||
#define BLE_FRAME_CLI_REQ 0x01 /* phone -> device: one command line */
|
#define BLE_FRAME_CLI_REQ 0x01 /* phone -> device: one command line */
|
||||||
#define BLE_FRAME_CLI_RSP 0x02 /* device -> phone: response text chunk */
|
#define BLE_FRAME_CLI_RSP 0x02 /* device -> phone: response text chunk */
|
||||||
#define BLE_FRAME_CLI_RSP_END 0x03 /* device -> phone: {status u8} */
|
#define BLE_FRAME_CLI_RSP_END 0x03 /* device -> phone: {status u8} */
|
||||||
#define BLE_FRAME_OTA_BEGIN 0x10 /* reserved (not supported here) */
|
#define BLE_FRAME_OTA_BEGIN 0x10 /* phone -> device: {size, crc32, version} */
|
||||||
#define BLE_FRAME_OTA_DATA 0x11 /* reserved */
|
#define BLE_FRAME_OTA_DATA 0x11 /* phone -> device: {offset, data...} */
|
||||||
#define BLE_FRAME_OTA_END 0x12 /* reserved */
|
#define BLE_FRAME_OTA_END 0x12 /* phone -> device: {crc32} */
|
||||||
#define BLE_FRAME_OTA_RSP 0x1F /* reserved */
|
#define BLE_FRAME_OTA_RSP 0x1F /* device -> phone: {cmd, status, offset} */
|
||||||
|
#define BLE_FRAME_INFO_QUERY 0x20 /* phone -> device: {item_id}*n (empty/0xFF = all) */
|
||||||
|
#define BLE_FRAME_INFO_RSP 0x21 /* device -> phone: TLV {id, len, value}*n */
|
||||||
|
|
||||||
|
/* OTA_RSP / generic status codes */
|
||||||
|
#define BLE_OTA_ST_OK 0
|
||||||
|
#define BLE_OTA_ST_BAD_FRAME 1
|
||||||
|
#define BLE_OTA_ST_BAD_STATE 2 /* bad state / bad offset sequence */
|
||||||
|
#define BLE_OTA_ST_SIZE_TOO_BIG 3
|
||||||
|
#define BLE_OTA_ST_CRC_FAIL 4
|
||||||
|
#define BLE_OTA_ST_FLASH_FAIL 5
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Reset the protocol state machine.
|
* @brief Reset the protocol state machine.
|
||||||
*/
|
*/
|
||||||
void app_ble_proto_init(void);
|
void app_ble_proto_init(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Build one frame and push it into the ble_up uplink ring.
|
||||||
|
* Used by the CLI frontend and by the OTA/INFO handlers to answer.
|
||||||
|
* @return 0 on success, -1 when the frame exceeds the max frame size.
|
||||||
|
*/
|
||||||
|
int app_ble_proto_send_frame(uint8_t type, uint8_t seq, const uint8_t* payload, uint16_t len);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Feed a received BLE write chunk into the frame reassembler.
|
* @brief Feed a received BLE write chunk into the frame reassembler.
|
||||||
* Called from the rdtss write indication handler (BLE task context).
|
* Called from the rdtss write indication handler (BLE task context).
|
||||||
|
|||||||
53
mcm-ddc-ble/inc/app_info.h
Normal file
53
mcm-ddc-ble/inc/app_info.h
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
/**
|
||||||
|
* @file app_info.h
|
||||||
|
* @brief Device information query over the BLE frame protocol
|
||||||
|
* (BLE_FRAME_INFO_QUERY / BLE_FRAME_INFO_RSP), plus the data sources
|
||||||
|
* behind it (chip temperature, VDD, fan rpm, uptime, heap).
|
||||||
|
*
|
||||||
|
* See docs/ble_protocol.md section 5 for the item ids and the TLV encoding.
|
||||||
|
*/
|
||||||
|
#ifndef __APP_INFO_H__
|
||||||
|
#define __APP_INFO_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
/* Info item ids */
|
||||||
|
#define BLE_INFO_FW_VERSION 0x01 /* u32, e.g. 0x00010001 = V1.00.01 */
|
||||||
|
#define BLE_INFO_CHIP_TEMP 0x02 /* i16, 0.1 degC (ADC internal sensor) */
|
||||||
|
#define BLE_INFO_FAN_RPM 0x03 /* u16 rpm, 0xFFFF = not present */
|
||||||
|
#define BLE_INFO_VDD_MV 0x04 /* u16, mV (ADC CH6) */
|
||||||
|
#define BLE_INFO_UPTIME_S 0x05 /* u32, seconds */
|
||||||
|
#define BLE_INFO_FREE_HEAP 0x06 /* u32, bytes */
|
||||||
|
|
||||||
|
#define APP_FAN_RPM_INVALID 0xFFFFu
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Handle one INFO_QUERY frame: payload = item id list (empty or a
|
||||||
|
* single 0xFF queries all items). Answers with one INFO_RSP frame.
|
||||||
|
* BLE schedule task context only.
|
||||||
|
*/
|
||||||
|
void app_info_handle_query(uint8_t seq, const uint8_t* ids, uint16_t n);
|
||||||
|
|
||||||
|
/* Data sources (also usable from the CLI) */
|
||||||
|
|
||||||
|
/** Chip temperature in 0.1 degC; 0x7FFF when the ADC read timed out. */
|
||||||
|
int16_t app_info_chip_temp_c10(void);
|
||||||
|
|
||||||
|
/** VDD voltage in mV; 0 when the ADC read timed out. */
|
||||||
|
uint16_t app_info_vdd_mv(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Fan speed in rpm. Weak default returns APP_FAN_RPM_INVALID;
|
||||||
|
* product code overrides this once the fan tachometer is hooked up.
|
||||||
|
*/
|
||||||
|
uint16_t app_fan_get_rpm(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __APP_INFO_H__ */
|
||||||
40
mcm-ddc-ble/inc/app_ota.h
Normal file
40
mcm-ddc-ble/inc/app_ota.h
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* @file app_ota.h
|
||||||
|
* @brief BLE OTA receiver: writes an incoming image into the opposite flash
|
||||||
|
* bank directly (lazy per-sector erase, only a 4-byte word staging
|
||||||
|
* buffer), verifies CRC32 and updates the bootloader's bootsetting
|
||||||
|
* record, then resets.
|
||||||
|
*
|
||||||
|
* Runs in the BLE schedule task context (invoked from app_ble_proto.c).
|
||||||
|
*/
|
||||||
|
#ifndef __APP_OTA_H__
|
||||||
|
#define __APP_OTA_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Handle one OTA frame (BLE_FRAME_OTA_BEGIN / OTA_DATA / OTA_END).
|
||||||
|
* Sends OTA_RSP frames through app_ble_proto_send_frame().
|
||||||
|
*/
|
||||||
|
void app_ota_handle_frame(uint8_t type, uint8_t seq, const uint8_t* payload, uint16_t len);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Abort any on-going OTA session (on BLE disconnect or fatal error).
|
||||||
|
*/
|
||||||
|
void app_ota_abort(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Flash base of the bank this firmware is running from
|
||||||
|
* (CAIIC_APP1_BASE / CAIIC_APP2_BASE), or 0 when unknown.
|
||||||
|
*/
|
||||||
|
uint32_t app_ota_current_bank_base(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __APP_OTA_H__ */
|
||||||
@ -6,5 +6,7 @@
|
|||||||
#define __APP_VERSION_H__
|
#define __APP_VERSION_H__
|
||||||
|
|
||||||
#define APP_FW_VERSION "V1.00.01"
|
#define APP_FW_VERSION "V1.00.01"
|
||||||
|
/* Numeric form used by the BLE info query / OTA records: 0x00MMmmpp */
|
||||||
|
#define APP_FW_VERSION_NUM 0x00010001u
|
||||||
|
|
||||||
#endif /* __APP_VERSION_H__ */
|
#endif /* __APP_VERSION_H__ */
|
||||||
|
|||||||
@ -315,6 +315,9 @@ void app_ble_connected(void)
|
|||||||
{
|
{
|
||||||
LedOn(LED2_PORT,LED2_PIN);
|
LedOn(LED2_PORT,LED2_PIN);
|
||||||
notify_en = 0;
|
notify_en = 0;
|
||||||
|
/* Raise the ATT MTU so OTA_DATA frames can carry ~233B per write
|
||||||
|
* (device-initiated exchange; the phone may accept a smaller value) */
|
||||||
|
ns_ble_mtu_set(247);
|
||||||
#if (BLE_APP_BATT)
|
#if (BLE_APP_BATT)
|
||||||
// Enable Battery Service
|
// Enable Battery Service
|
||||||
app_batt_enable_prf(app_env.conidx);
|
app_batt_enable_prf(app_env.conidx);
|
||||||
|
|||||||
@ -16,6 +16,8 @@
|
|||||||
#include "app_ble_proto.h"
|
#include "app_ble_proto.h"
|
||||||
#include "cli_core.h"
|
#include "cli_core.h"
|
||||||
#include "ble_up.h"
|
#include "ble_up.h"
|
||||||
|
#include "app_ota.h"
|
||||||
|
#include "app_info.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@ -80,7 +82,7 @@ static uint16_t proto_crc16(const uint8_t* data, uint16_t len)
|
|||||||
/**
|
/**
|
||||||
* @brief Build one frame and push it into the ble_up uplink ring.
|
* @brief Build one frame and push it into the ble_up uplink ring.
|
||||||
*/
|
*/
|
||||||
static int proto_send_frame(uint8_t type, uint8_t seq, const uint8_t* payload, uint16_t len)
|
int app_ble_proto_send_frame(uint8_t type, uint8_t seq, const uint8_t* payload, uint16_t len)
|
||||||
{
|
{
|
||||||
uint16_t crc;
|
uint16_t crc;
|
||||||
uint16_t frameLen = (uint16_t)(BLE_FRAME_OVERHEAD + len);
|
uint16_t frameLen = (uint16_t)(BLE_FRAME_OVERHEAD + len);
|
||||||
@ -120,7 +122,7 @@ static void proto_cli_out(const char* str)
|
|||||||
{
|
{
|
||||||
n = BLE_PROTO_CLI_CHUNK;
|
n = BLE_PROTO_CLI_CHUNK;
|
||||||
}
|
}
|
||||||
(void)proto_send_frame(BLE_FRAME_CLI_RSP, s_txSeq++, (const uint8_t*)str, n);
|
(void)app_ble_proto_send_frame(BLE_FRAME_CLI_RSP, s_txSeq++, (const uint8_t*)str, n);
|
||||||
str += n;
|
str += n;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -155,13 +157,23 @@ static void proto_dispatch_frame(uint8_t type, uint8_t seq, const uint8_t* paylo
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
uint8_t st = (uint8_t)status;
|
uint8_t st = (uint8_t)status;
|
||||||
(void)proto_send_frame(BLE_FRAME_CLI_RSP_END, seq, &st, 1);
|
(void)app_ble_proto_send_frame(BLE_FRAME_CLI_RSP_END, seq, &st, 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case BLE_FRAME_OTA_BEGIN:
|
||||||
|
case BLE_FRAME_OTA_DATA:
|
||||||
|
case BLE_FRAME_OTA_END:
|
||||||
|
app_ota_handle_frame(type, seq, payload, len);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case BLE_FRAME_INFO_QUERY:
|
||||||
|
app_info_handle_query(seq, payload, len);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* OTA frame types are reserved, unknown types: drop */
|
/* unknown types: drop */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -249,4 +261,5 @@ void app_ble_proto_on_disconnect(void)
|
|||||||
s_rxState = RX_WAIT_SOF; /* drop a half-received frame */
|
s_rxState = RX_WAIT_SOF; /* drop a half-received frame */
|
||||||
s_rxHave = 0;
|
s_rxHave = 0;
|
||||||
ble_up_reset();
|
ble_up_reset();
|
||||||
|
app_ota_abort(); /* abort any on-going OTA session */
|
||||||
}
|
}
|
||||||
|
|||||||
192
mcm-ddc-ble/src/app_info.c
Normal file
192
mcm-ddc-ble/src/app_info.c
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
/**
|
||||||
|
* @file app_info.c
|
||||||
|
* @brief Device information query implementation (INFO_QUERY -> INFO_RSP TLV).
|
||||||
|
*
|
||||||
|
* Temperature / VDD come from the on-chip ADC (single-shot, polled, with a
|
||||||
|
* loop timeout so the BLE schedule task can never hang). The ADC block is
|
||||||
|
* initialized lazily on the first read.
|
||||||
|
*
|
||||||
|
* Runs in the BLE schedule task context (invoked from app_ble_proto.c);
|
||||||
|
* the getters are also called from the CLI "devinfo" command (any context).
|
||||||
|
*/
|
||||||
|
#include "app_info.h"
|
||||||
|
#include "app_ble_proto.h"
|
||||||
|
#include "app_version.h"
|
||||||
|
|
||||||
|
#include "n32wb03x.h"
|
||||||
|
#include "n32wb03x_adc.h"
|
||||||
|
#include "n32wb03x_rcc.h"
|
||||||
|
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
#include "task.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#define INFO_ADC_TIMEOUT 100000u /* ADC_DONE poll loop limit */
|
||||||
|
|
||||||
|
static uint8_t s_adc_ready;
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------ */
|
||||||
|
/* ADC data sources */
|
||||||
|
/* ------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
static void info_adc_init(void)
|
||||||
|
{
|
||||||
|
if (s_adc_ready)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RCC_EnableAHBPeriphClk(RCC_AHB_PERIPH_ADC, ENABLE);
|
||||||
|
RCC_ConfigAdcClk(RCC_ADCCLK_SRC_AUDIOPLL);
|
||||||
|
RCC_Enable_ADC_CLK_SRC_AUDIOPLL(ENABLE);
|
||||||
|
|
||||||
|
ADC_DeInit(ADC);
|
||||||
|
ADC_SetOverSampleCounter(ADC, 3);
|
||||||
|
ADC_EnableBypassFilter(ADC, ENABLE);
|
||||||
|
s_adc_ready = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief One polled single-shot conversion on the given channel.
|
||||||
|
* @return raw ADC value, or 0xFFFF on timeout.
|
||||||
|
*/
|
||||||
|
static uint16_t info_adc_read(uint16_t channel)
|
||||||
|
{
|
||||||
|
uint32_t timeout = INFO_ADC_TIMEOUT;
|
||||||
|
|
||||||
|
info_adc_init();
|
||||||
|
ADC_ConfigChannel(ADC, channel);
|
||||||
|
ADC_Enable(ADC, ENABLE);
|
||||||
|
while (ADC_GetFlagStatus(ADC, ADC_FLAG_DONE) == RESET)
|
||||||
|
{
|
||||||
|
if (--timeout == 0)
|
||||||
|
{
|
||||||
|
ADC_Enable(ADC, DISABLE);
|
||||||
|
return 0xFFFFu;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ADC_ClearFlag(ADC, ADC_FLAG_DONE);
|
||||||
|
{
|
||||||
|
uint16_t v = ADC_GetDat(ADC);
|
||||||
|
ADC_Enable(ADC, DISABLE);
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int16_t app_info_chip_temp_c10(void)
|
||||||
|
{
|
||||||
|
uint16_t raw;
|
||||||
|
|
||||||
|
ADC_EnableTS(ADC, ENABLE);
|
||||||
|
raw = info_adc_read(ADC_CTRL_CH_7);
|
||||||
|
ADC_EnableTS(ADC, DISABLE);
|
||||||
|
if (raw == 0xFFFFu)
|
||||||
|
{
|
||||||
|
return 0x7FFF;
|
||||||
|
}
|
||||||
|
return (int16_t)(ADC_ConverValueToTemperature(raw) * 10.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t app_info_vdd_mv(void)
|
||||||
|
{
|
||||||
|
uint16_t raw = info_adc_read(ADC_CTRL_CH_6);
|
||||||
|
|
||||||
|
if (raw == 0xFFFFu)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return (uint16_t)ADC_ConverValueToVoltage(raw, ADC_CTRL_CH_6);
|
||||||
|
}
|
||||||
|
|
||||||
|
__weak uint16_t app_fan_get_rpm(void)
|
||||||
|
{
|
||||||
|
return APP_FAN_RPM_INVALID; /* no fan tachometer on this board yet */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------ */
|
||||||
|
/* INFO_QUERY handler */
|
||||||
|
/* ------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Append one TLV item {id, len, value(LE)} to the response buffer.
|
||||||
|
* @return new buffer fill level.
|
||||||
|
*/
|
||||||
|
static uint16_t info_put_tlv(uint8_t* buf, uint16_t fill, uint8_t id,
|
||||||
|
const void* value, uint8_t len)
|
||||||
|
{
|
||||||
|
uint8_t i;
|
||||||
|
|
||||||
|
buf[fill++] = id;
|
||||||
|
buf[fill++] = len;
|
||||||
|
for (i = 0; i < len; i++)
|
||||||
|
{
|
||||||
|
buf[fill++] = ((const uint8_t*)value)[i];
|
||||||
|
}
|
||||||
|
return fill;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serialize one item into the response buffer.
|
||||||
|
* @return new fill level; unchanged when the id is unknown.
|
||||||
|
*/
|
||||||
|
static uint16_t info_fill_item(uint8_t* buf, uint16_t fill, uint8_t id)
|
||||||
|
{
|
||||||
|
uint32_t v32;
|
||||||
|
uint16_t v16;
|
||||||
|
int16_t t;
|
||||||
|
|
||||||
|
switch (id)
|
||||||
|
{
|
||||||
|
case BLE_INFO_FW_VERSION:
|
||||||
|
v32 = APP_FW_VERSION_NUM;
|
||||||
|
return info_put_tlv(buf, fill, id, &v32, 4);
|
||||||
|
|
||||||
|
case BLE_INFO_CHIP_TEMP:
|
||||||
|
t = app_info_chip_temp_c10();
|
||||||
|
return info_put_tlv(buf, fill, id, &t, 2);
|
||||||
|
|
||||||
|
case BLE_INFO_FAN_RPM:
|
||||||
|
v16 = app_fan_get_rpm();
|
||||||
|
return info_put_tlv(buf, fill, id, &v16, 2);
|
||||||
|
|
||||||
|
case BLE_INFO_VDD_MV:
|
||||||
|
v16 = app_info_vdd_mv();
|
||||||
|
return info_put_tlv(buf, fill, id, &v16, 2);
|
||||||
|
|
||||||
|
case BLE_INFO_UPTIME_S:
|
||||||
|
v32 = (uint32_t)xTaskGetTickCount() / configTICK_RATE_HZ;
|
||||||
|
return info_put_tlv(buf, fill, id, &v32, 4);
|
||||||
|
|
||||||
|
case BLE_INFO_FREE_HEAP:
|
||||||
|
v32 = (uint32_t)xPortGetFreeHeapSize();
|
||||||
|
return info_put_tlv(buf, fill, id, &v32, 4);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return fill; /* unknown id: skip */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void app_info_handle_query(uint8_t seq, const uint8_t* ids, uint16_t n)
|
||||||
|
{
|
||||||
|
/* worst case: 6 items x (2B header + 4B value) = 36B */
|
||||||
|
uint8_t rsp[40];
|
||||||
|
uint16_t fill = 0;
|
||||||
|
uint16_t i;
|
||||||
|
|
||||||
|
static const uint8_t s_all[] = {
|
||||||
|
BLE_INFO_FW_VERSION, BLE_INFO_CHIP_TEMP, BLE_INFO_FAN_RPM,
|
||||||
|
BLE_INFO_VDD_MV, BLE_INFO_UPTIME_S, BLE_INFO_FREE_HEAP,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (n == 0 || (n == 1 && ids[0] == 0xFFu))
|
||||||
|
{
|
||||||
|
ids = s_all;
|
||||||
|
n = sizeof(s_all);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
fill = info_fill_item(rsp, fill, ids[i]);
|
||||||
|
}
|
||||||
|
(void)app_ble_proto_send_frame(BLE_FRAME_INFO_RSP, seq, rsp, fill);
|
||||||
|
}
|
||||||
413
mcm-ddc-ble/src/app_ota.c
Normal file
413
mcm-ddc-ble/src/app_ota.c
Normal file
@ -0,0 +1,413 @@
|
|||||||
|
/**
|
||||||
|
* @file app_ota.c
|
||||||
|
* @brief BLE OTA receiver implementation.
|
||||||
|
*
|
||||||
|
* Flow: OTA_BEGIN (size/crc/version) -> OTA_DATA* (strictly sequential
|
||||||
|
* offsets, acked per completed 4KB flash sector) -> OTA_END (flush the
|
||||||
|
* sub-word tail, verify whole-image CRC32 against flash, update bootsetting,
|
||||||
|
* reset).
|
||||||
|
*
|
||||||
|
* Direct-write design (no 4KB staging buffer):
|
||||||
|
* - Sectors of the target bank are erased lazily: the first received byte
|
||||||
|
* falling into a not-yet-erased sector triggers that sector's erase.
|
||||||
|
* - Received payload bytes are programmed to flash immediately; only a
|
||||||
|
* 4-byte word staging buffer is kept because Qflash_Write() requires a
|
||||||
|
* 4-byte aligned length (tail bytes are padded with 0xFF at OTA_END).
|
||||||
|
*
|
||||||
|
* Notes:
|
||||||
|
* - Runs in the BLE schedule task context; vTaskDelay() is available.
|
||||||
|
* - Qflash erase/write disable interrupts for tens of ms per sector (SDK
|
||||||
|
* driver behavior, the flash algorithm executes from RAM). The BLE link
|
||||||
|
* survives this via the 5 s connection supervision timeout.
|
||||||
|
*/
|
||||||
|
#include "app_ota.h"
|
||||||
|
#include "app_ble_proto.h"
|
||||||
|
#include "dfu_layout.h"
|
||||||
|
#include "boot_crc32.h"
|
||||||
|
#include "n32wb03x.h"
|
||||||
|
#include "n32wb03x_qflash.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
#include "task.h"
|
||||||
|
|
||||||
|
/* armlink execution-region base symbol: address of this running image */
|
||||||
|
extern uint32_t Image$$ER_IROM1$$Base;
|
||||||
|
|
||||||
|
#define OTA_MIN_IMAGE_SIZE 4u
|
||||||
|
#define OTA_RESET_DELAY_MS 200u
|
||||||
|
|
||||||
|
/* OTA session state */
|
||||||
|
static uint8_t s_active; /* session in progress */
|
||||||
|
static uint32_t s_target_base; /* opposite bank base */
|
||||||
|
static uint32_t s_total_size;
|
||||||
|
static uint32_t s_image_crc32;
|
||||||
|
static uint32_t s_version;
|
||||||
|
static uint32_t s_offset; /* bytes received so far */
|
||||||
|
static uint32_t s_prog; /* bytes programmed to flash */
|
||||||
|
static uint32_t s_erased; /* bytes erased (sector granularity) */
|
||||||
|
static uint32_t s_ack_sector; /* last acked sector index */
|
||||||
|
static uint8_t s_word_buf[4]; /* sub-word alignment staging */
|
||||||
|
static uint32_t s_word_fill;
|
||||||
|
static uint8_t s_qflash_ready;
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------ */
|
||||||
|
/* Helpers */
|
||||||
|
/* ------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
static uint32_t ota_rd32(const uint8_t* p)
|
||||||
|
{
|
||||||
|
return (uint32_t)p[0] | ((uint32_t)p[1] << 8) |
|
||||||
|
((uint32_t)p[2] << 16) | ((uint32_t)p[3] << 24);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Send an OTA_RSP frame: {cmd_echo, status, offset(LE)}.
|
||||||
|
*/
|
||||||
|
static void ota_respond(uint8_t seq, uint8_t cmd_echo, uint8_t status, uint32_t offset)
|
||||||
|
{
|
||||||
|
uint8_t p[6];
|
||||||
|
|
||||||
|
p[0] = cmd_echo;
|
||||||
|
p[1] = status;
|
||||||
|
p[2] = (uint8_t)(offset & 0xFFu);
|
||||||
|
p[3] = (uint8_t)((offset >> 8) & 0xFFu);
|
||||||
|
p[4] = (uint8_t)((offset >> 16) & 0xFFu);
|
||||||
|
p[5] = (uint8_t)((offset >> 24) & 0xFFu);
|
||||||
|
(void)app_ble_proto_send_frame(BLE_FRAME_OTA_RSP, seq, p, sizeof(p));
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t app_ota_current_bank_base(void)
|
||||||
|
{
|
||||||
|
return (uint32_t)&Image$$ER_IROM1$$Base;
|
||||||
|
}
|
||||||
|
|
||||||
|
void app_ota_abort(void)
|
||||||
|
{
|
||||||
|
s_active = 0;
|
||||||
|
s_offset = 0;
|
||||||
|
s_prog = 0;
|
||||||
|
s_erased = 0;
|
||||||
|
s_ack_sector = 0;
|
||||||
|
s_word_fill = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Erase every sector of the target bank that [s_erased, end) touches.
|
||||||
|
* @return 0 on success, BLE_OTA_ST_FLASH_FAIL on error.
|
||||||
|
*/
|
||||||
|
static uint8_t ota_erase_up_to(uint32_t end)
|
||||||
|
{
|
||||||
|
while (s_erased < end)
|
||||||
|
{
|
||||||
|
if (Qflash_Erase_Sector(s_target_base + s_erased) != 0)
|
||||||
|
{
|
||||||
|
return BLE_OTA_ST_FLASH_FAIL;
|
||||||
|
}
|
||||||
|
s_erased += CAIIC_FLASH_SECTOR_SIZE;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Program one chunk to flash at the current program pointer.
|
||||||
|
* @return 0 on success, BLE_OTA_ST_FLASH_FAIL on error.
|
||||||
|
*/
|
||||||
|
static uint8_t ota_program(const uint8_t* data, uint32_t len)
|
||||||
|
{
|
||||||
|
if (Qflash_Write(s_target_base + s_prog, (uint8_t*)data, len) != 0)
|
||||||
|
{
|
||||||
|
return BLE_OTA_ST_FLASH_FAIL;
|
||||||
|
}
|
||||||
|
s_prog += len;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sector-level flow control: ack once per completed 4KB sector.
|
||||||
|
*/
|
||||||
|
static void ota_sector_ack(uint8_t seq)
|
||||||
|
{
|
||||||
|
if (s_prog / CAIIC_FLASH_SECTOR_SIZE > s_ack_sector)
|
||||||
|
{
|
||||||
|
s_ack_sector = s_prog / CAIIC_FLASH_SECTOR_SIZE;
|
||||||
|
ota_respond(seq, BLE_FRAME_OTA_DATA, BLE_OTA_ST_OK, s_prog);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------ */
|
||||||
|
/* Frame handlers */
|
||||||
|
/* ------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OTA_BEGIN: {total_size u32, image_crc32 u32, version u32}.
|
||||||
|
*/
|
||||||
|
static void ota_on_begin(uint8_t seq, const uint8_t* p, uint16_t len)
|
||||||
|
{
|
||||||
|
uint32_t total, crc, version;
|
||||||
|
uint32_t self, target;
|
||||||
|
|
||||||
|
if (len != 12u)
|
||||||
|
{
|
||||||
|
ota_respond(seq, BLE_FRAME_OTA_BEGIN, BLE_OTA_ST_BAD_FRAME, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
total = ota_rd32(p);
|
||||||
|
crc = ota_rd32(p + 4);
|
||||||
|
version = ota_rd32(p + 8);
|
||||||
|
|
||||||
|
/* Pick the opposite bank as the update target */
|
||||||
|
self = app_ota_current_bank_base();
|
||||||
|
if (self == CAIIC_APP1_BASE)
|
||||||
|
{
|
||||||
|
target = CAIIC_APP2_BASE;
|
||||||
|
}
|
||||||
|
else if (self == CAIIC_APP2_BASE)
|
||||||
|
{
|
||||||
|
target = CAIIC_APP1_BASE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ota_respond(seq, BLE_FRAME_OTA_BEGIN, BLE_OTA_ST_BAD_STATE, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (total < OTA_MIN_IMAGE_SIZE || total > CAIIC_APP_BANK_SIZE)
|
||||||
|
{
|
||||||
|
ota_respond(seq, BLE_FRAME_OTA_BEGIN, BLE_OTA_ST_SIZE_TOO_BIG, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!s_qflash_ready)
|
||||||
|
{
|
||||||
|
Qflash_Init(); /* copy the flash algorithm to RAM (once) */
|
||||||
|
s_qflash_ready = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
s_active = 1;
|
||||||
|
s_target_base = target;
|
||||||
|
s_total_size = total;
|
||||||
|
s_image_crc32 = crc;
|
||||||
|
s_version = version;
|
||||||
|
s_offset = 0;
|
||||||
|
s_prog = 0;
|
||||||
|
s_erased = 0;
|
||||||
|
s_ack_sector = 0;
|
||||||
|
s_word_fill = 0;
|
||||||
|
|
||||||
|
ota_respond(seq, BLE_FRAME_OTA_BEGIN, BLE_OTA_ST_OK, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OTA_DATA: {offset u32 + data}. Data must arrive strictly in order.
|
||||||
|
* Payload is programmed to flash immediately (sectors are erased
|
||||||
|
* lazily); an OTA_RSP(ok) is sent per completed 4KB sector (flow
|
||||||
|
* control / progress). Errors are acked immediately and the state is
|
||||||
|
* kept so the peer can resend.
|
||||||
|
*/
|
||||||
|
static void ota_on_data(uint8_t seq, const uint8_t* p, uint16_t len)
|
||||||
|
{
|
||||||
|
uint32_t off;
|
||||||
|
const uint8_t* data;
|
||||||
|
uint32_t dlen;
|
||||||
|
uint8_t err;
|
||||||
|
|
||||||
|
if (!s_active)
|
||||||
|
{
|
||||||
|
ota_respond(seq, BLE_FRAME_OTA_DATA, BLE_OTA_ST_BAD_STATE, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (len < 4u)
|
||||||
|
{
|
||||||
|
ota_respond(seq, BLE_FRAME_OTA_DATA, BLE_OTA_ST_BAD_FRAME, s_offset);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
off = ota_rd32(p);
|
||||||
|
data = p + 4;
|
||||||
|
dlen = (uint32_t)len - 4u;
|
||||||
|
|
||||||
|
if (off != s_offset)
|
||||||
|
{
|
||||||
|
/* out-of-order: report the expected offset, keep the session */
|
||||||
|
ota_respond(seq, BLE_FRAME_OTA_DATA, BLE_OTA_ST_BAD_STATE, s_offset);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (s_offset + dlen > s_total_size)
|
||||||
|
{
|
||||||
|
ota_respond(seq, BLE_FRAME_OTA_DATA, BLE_OTA_ST_SIZE_TOO_BIG, s_offset);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
s_offset += dlen;
|
||||||
|
|
||||||
|
/* Lazily erase every sector this chunk touches */
|
||||||
|
err = ota_erase_up_to(s_offset);
|
||||||
|
|
||||||
|
if (err == 0 && s_word_fill != 0)
|
||||||
|
{
|
||||||
|
/* Complete the staged partial word first */
|
||||||
|
while (s_word_fill < 4u && dlen != 0)
|
||||||
|
{
|
||||||
|
s_word_buf[s_word_fill++] = *data++;
|
||||||
|
dlen--;
|
||||||
|
}
|
||||||
|
if (s_word_fill == 4u)
|
||||||
|
{
|
||||||
|
err = ota_program(s_word_buf, 4u);
|
||||||
|
s_word_fill = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (err == 0 && dlen >= 4u)
|
||||||
|
{
|
||||||
|
/* Bulk aligned part goes straight from the frame payload to flash */
|
||||||
|
uint32_t n4 = dlen & ~3u;
|
||||||
|
err = ota_program(data, n4);
|
||||||
|
data += n4;
|
||||||
|
dlen -= n4;
|
||||||
|
}
|
||||||
|
if (err == 0 && dlen != 0)
|
||||||
|
{
|
||||||
|
/* Sub-word tail: stage until the next chunk or OTA_END */
|
||||||
|
memcpy(s_word_buf, data, dlen);
|
||||||
|
s_word_fill = dlen;
|
||||||
|
}
|
||||||
|
if (err != 0)
|
||||||
|
{
|
||||||
|
ota_respond(seq, BLE_FRAME_OTA_DATA, err, s_offset);
|
||||||
|
app_ota_abort();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ota_sector_ack(seq);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Program the bootsetting record and verify by read-back.
|
||||||
|
* @return 0 on success, BLE_OTA_ST_FLASH_FAIL on error.
|
||||||
|
*/
|
||||||
|
static uint8_t ota_update_bootsetting(void)
|
||||||
|
{
|
||||||
|
caiic_bootsetting_t bs;
|
||||||
|
caiic_bank_t* bank;
|
||||||
|
|
||||||
|
memcpy(&bs, (const void*)CAIIC_BOOTSETTING_ADDR, sizeof(bs));
|
||||||
|
|
||||||
|
/* Validate the existing record; rebuild from scratch when invalid */
|
||||||
|
if (bs.magic != CAIIC_BOOT_MAGIC ||
|
||||||
|
bs.crc32 != caiic_crc32((const uint8_t*)CAIIC_BOOTSETTING_ADDR,
|
||||||
|
(uint32_t)offsetof(caiic_bootsetting_t, crc32)))
|
||||||
|
{
|
||||||
|
memset(&bs, 0, sizeof(bs));
|
||||||
|
}
|
||||||
|
|
||||||
|
bs.magic = CAIIC_BOOT_MAGIC;
|
||||||
|
bs.active_bank = (s_target_base == CAIIC_APP1_BASE) ? CAIIC_ACTIVE_BANK1
|
||||||
|
: CAIIC_ACTIVE_BANK2;
|
||||||
|
bank = (s_target_base == CAIIC_APP1_BASE) ? &bs.bank1 : &bs.bank2;
|
||||||
|
bank->start_address = s_target_base;
|
||||||
|
bank->size = s_total_size;
|
||||||
|
bank->crc32 = s_image_crc32;
|
||||||
|
bank->version = s_version;
|
||||||
|
|
||||||
|
bs.crc32 = caiic_crc32((const uint8_t*)&bs, (uint32_t)offsetof(caiic_bootsetting_t, crc32));
|
||||||
|
|
||||||
|
if (Qflash_Erase_Sector(CAIIC_BOOTSETTING_ADDR) != 0)
|
||||||
|
{
|
||||||
|
return BLE_OTA_ST_FLASH_FAIL;
|
||||||
|
}
|
||||||
|
/* sizeof(caiic_bootsetting_t) = 44, already 4-byte aligned */
|
||||||
|
if (Qflash_Write(CAIIC_BOOTSETTING_ADDR, (uint8_t*)&bs, sizeof(bs)) != 0)
|
||||||
|
{
|
||||||
|
return BLE_OTA_ST_FLASH_FAIL;
|
||||||
|
}
|
||||||
|
if (memcmp(&bs, (const void*)CAIIC_BOOTSETTING_ADDR, sizeof(bs)) != 0)
|
||||||
|
{
|
||||||
|
return BLE_OTA_ST_FLASH_FAIL;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OTA_END: {crc32 u32}. Flush the staged tail, verify, switch bank,
|
||||||
|
* reset.
|
||||||
|
*/
|
||||||
|
static void ota_on_end(uint8_t seq, const uint8_t* p, uint16_t len)
|
||||||
|
{
|
||||||
|
uint32_t crc_end, crc_calc;
|
||||||
|
|
||||||
|
if (!s_active)
|
||||||
|
{
|
||||||
|
ota_respond(seq, BLE_FRAME_OTA_END, BLE_OTA_ST_BAD_STATE, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (len != 4u)
|
||||||
|
{
|
||||||
|
ota_respond(seq, BLE_FRAME_OTA_END, BLE_OTA_ST_BAD_FRAME, s_offset);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
crc_end = ota_rd32(p);
|
||||||
|
|
||||||
|
if (s_offset != s_total_size)
|
||||||
|
{
|
||||||
|
ota_respond(seq, BLE_FRAME_OTA_END, BLE_OTA_ST_BAD_STATE, s_offset);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Flush the staged sub-word tail, padded with 0xFF */
|
||||||
|
if (s_word_fill != 0)
|
||||||
|
{
|
||||||
|
while (s_word_fill < 4u)
|
||||||
|
{
|
||||||
|
s_word_buf[s_word_fill++] = 0xFFu;
|
||||||
|
}
|
||||||
|
if (ota_program(s_word_buf, 4u) != 0)
|
||||||
|
{
|
||||||
|
ota_respond(seq, BLE_FRAME_OTA_END, BLE_OTA_ST_FLASH_FAIL, s_offset);
|
||||||
|
app_ota_abort();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
s_word_fill = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Whole-image CRC32 read back from flash */
|
||||||
|
crc_calc = caiic_crc32((const uint8_t*)s_target_base, s_total_size);
|
||||||
|
if (crc_calc != crc_end || crc_calc != s_image_crc32)
|
||||||
|
{
|
||||||
|
ota_respond(seq, BLE_FRAME_OTA_END, BLE_OTA_ST_CRC_FAIL, s_offset);
|
||||||
|
app_ota_abort();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ota_update_bootsetting() != 0)
|
||||||
|
{
|
||||||
|
ota_respond(seq, BLE_FRAME_OTA_END, BLE_OTA_ST_FLASH_FAIL, s_offset);
|
||||||
|
app_ota_abort();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ota_respond(seq, BLE_FRAME_OTA_END, BLE_OTA_ST_OK, s_total_size);
|
||||||
|
|
||||||
|
/* Give the notify time to go out, then reset into the new bank */
|
||||||
|
vTaskDelay(pdMS_TO_TICKS(OTA_RESET_DELAY_MS));
|
||||||
|
NVIC_SystemReset();
|
||||||
|
}
|
||||||
|
|
||||||
|
void app_ota_handle_frame(uint8_t type, uint8_t seq, const uint8_t* payload, uint16_t len)
|
||||||
|
{
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case BLE_FRAME_OTA_BEGIN:
|
||||||
|
ota_on_begin(seq, payload, len);
|
||||||
|
break;
|
||||||
|
case BLE_FRAME_OTA_DATA:
|
||||||
|
ota_on_data(seq, payload, len);
|
||||||
|
break;
|
||||||
|
case BLE_FRAME_OTA_END:
|
||||||
|
ota_on_end(seq, payload, len);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -10,6 +10,7 @@
|
|||||||
#include "app_version.h"
|
#include "app_version.h"
|
||||||
#include "bsp_usart.h"
|
#include "bsp_usart.h"
|
||||||
#include "app_gpio.h"
|
#include "app_gpio.h"
|
||||||
|
#include "app_info.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -171,11 +172,46 @@ static void CmdLed(int argc, char* argv[])
|
|||||||
cli_printf("led %s %s done\r\n", argv[1], argv[2]);
|
cli_printf("led %s %s done\r\n", argv[1], argv[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief "devinfo": show the same items the BLE INFO_QUERY(all) reports.
|
||||||
|
*/
|
||||||
|
static void CmdDevInfo(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
int16_t temp = app_info_chip_temp_c10();
|
||||||
|
uint16_t fan = app_fan_get_rpm();
|
||||||
|
(void)argc;
|
||||||
|
(void)argv;
|
||||||
|
|
||||||
|
cli_printf("firmware: %s (0x%08lX)\r\n", APP_FW_VERSION,
|
||||||
|
(unsigned long)APP_FW_VERSION_NUM);
|
||||||
|
if (temp == 0x7FFF)
|
||||||
|
{
|
||||||
|
cli_write("chip temp: ADC read timeout\r\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cli_printf("chip temp: %d.%d C\r\n", (int)(temp / 10), (int)(temp % 10));
|
||||||
|
}
|
||||||
|
cli_printf("vdd: %u mV\r\n", (unsigned int)app_info_vdd_mv());
|
||||||
|
if (fan == APP_FAN_RPM_INVALID)
|
||||||
|
{
|
||||||
|
cli_write("fan rpm: n/a (no tachometer)\r\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cli_printf("fan rpm: %u\r\n", (unsigned int)fan);
|
||||||
|
}
|
||||||
|
cli_printf("uptime: %lu s\r\n",
|
||||||
|
(unsigned long)((uint32_t)xTaskGetTickCount() / configTICK_RATE_HZ));
|
||||||
|
cli_printf("free heap: %u B\r\n", (unsigned int)xPortGetFreeHeapSize());
|
||||||
|
}
|
||||||
|
|
||||||
/* Command table; add new commands here */
|
/* Command table; add new commands here */
|
||||||
static const CliCmd_t s_cmds[] = {
|
static const CliCmd_t s_cmds[] = {
|
||||||
{"help", "list all commands", CmdHelp},
|
{"help", "list all commands", CmdHelp},
|
||||||
{"version", "show firmware version", CmdVersion},
|
{"version", "show firmware version", CmdVersion},
|
||||||
{"sysinfo", "show FreeRTOS runtime info (uptime/tasks/heap/task list)", CmdSysInfo},
|
{"sysinfo", "show FreeRTOS runtime info (uptime/tasks/heap/task list)", CmdSysInfo},
|
||||||
|
{"devinfo", "show device info (temp/vdd/fan, same as BLE INFO_QUERY all)", CmdDevInfo},
|
||||||
{"led", "led <1|2> <on|off|toggle>: control board LED", CmdLed},
|
{"led", "led <1|2> <on|off|toggle>: control board LED", CmdLed},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user