CH573F的MESH例程如何改成OTA第二種方式?

按照 https://www.cnblogs.com/debugdabiaoge/p/15975537.html 的方法,普通例程(如BLE_UART)可以成功改成OTA第二種方式。但是按照同樣的方法修改adv_vendor_self_provision_with_peripheral例程時(shí),卻提示有些庫(kù)函數(shù)找不到。

圖片.png

請(qǐng)問(wèn)如何才能修改成功?

“OTA第二種方式”是不帶庫(kù)升級(jí)嗎,操作的時(shí)候是合成了4個(gè)hex文件嗎。默認(rèn)例程就是不帶庫(kù)的方式,不用作修改,合成bin文件燒錄即可。


就是這里的方式二:

圖片.png

默認(rèn)的例程都是帶庫(kù)的吧?不是要按照 https://www.cnblogs.com/debugdabiaoge/p/15975537.html 的方法修改嗎?


現(xiàn)在還沒到合成4個(gè)文件那一步,是編譯都通不過(guò),提示錯(cuò)誤:

e:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: F:\項(xiàng)目\藍(lán)牙\CH573EVT-V2.0-2022.07.15\EXAM\BLE\MESH\MESH_LIB\libMESH.a(mesh_adapt.o): in function `k_uptime_get_32':
mesh_adapt.c:(.text.k_uptime_get_32+0x4): undefined reference to `TMOS_GetSystemClock'
e:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: F:\項(xiàng)目\藍(lán)牙\CH573EVT-V2.0-2022.07.15\EXAM\BLE\MESH\MESH_LIB\libMESH.a(mesh_adapt.o): in function `bt_mesh_gatt_get_mtu':
mesh_adapt.c:(.text.bt_mesh_gatt_get_mtu+0x4): undefined reference to `ATT_GetMTU'
e:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: F:\項(xiàng)目\藍(lán)牙\CH573EVT-V2.0-2022.07.15\EXAM\BLE\MESH\MESH_LIB\libMESH.a(mesh_adapt.o): in function `bt_mesh_gatts_disconnect':
mesh_adapt.c:(.text.bt_mesh_gatts_disconnect+0x4): undefined reference to `GAPRole_TerminateLink'
e:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: F:\項(xiàng)目\藍(lán)牙\CH573EVT-V2.0-2022.07.15\EXAM\BLE\MESH\MESH_LIB\libMESH.a(mesh_adapt.o): in function `.L0 ':
mesh_adapt.c:(.text.bt_mesh_prov_servive_cccd_close+0xc): undefined reference to `GATTServApp_InitCharCfg'
e:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: mesh_adapt.c:(.text.bt_mesh_prov_service_stop+0xe): undefined reference to `GATTServApp_DeregisterService'
e:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: mesh_adapt.c:(.text.bt_mesh_proxy_service_cccd_close+0xc): undefined reference to `GATTServApp_InitCharCfg'
e:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: mesh_adapt.c:(.text.bt_mesh_gatts_service_stop+0xe): undefined reference to `GATTServApp_DeregisterService'
e:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: F:\項(xiàng)目\藍(lán)牙\CH573EVT-V2.0-2022.07.15\EXAM\BLE\MESH\MESH_LIB\libMESH.a(mesh_adapt.o): in function `.LANCHOR5':
mesh_adapt.c:(.data.prov_attrs+0x4): undefined reference to `primaryServiceUUID'
e:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: mesh_adapt.c:(.data.prov_attrs+0x14): undefined reference to `characterUUID'
e:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: mesh_adapt.c:(.data.prov_attrs+0x34): undefined reference to `characterUUID'
e:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: mesh_adapt.c:(.data.prov_attrs+0x54): undefined reference to `clientCharCfgUUID'
e:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: F:\項(xiàng)目\藍(lán)牙\CH573EVT-V2.0-2022.07.15\EXAM\BLE\MESH\MESH_LIB\libMESH.a(mesh_adapt.o): in function `.LANCHOR7':
mesh_adapt.c:(.data.proxy_attrs+0x4): undefined reference to `primaryServiceUUID'


ld文件和.s文件有做相應(yīng)修改嗎,下面有篇博客可以參考。

CH573 CH582藍(lán)牙sdk實(shí)現(xiàn)使用固定BLE LIB - debugdabiaoge - 博客園 (cnblogs.com)

EVT中支持mesh-OTA的芯片只有582以及208,573要移植的話可以參考582那邊的默認(rèn)例程。582的例程是默認(rèn)帶有BLE功能的,但是配網(wǎng)是需要走BLE直連節(jié)點(diǎn)的,移植到573上可能會(huì)有flash或者ram不夠用的情況。


看了好像是libMESH.a庫(kù)的問(wèn)題,你看下錯(cuò)誤提示,是libMESH.a里面的函數(shù)找不到調(diào)用的函數(shù)。


e:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: F:\項(xiàng)目\藍(lán)牙\CH573EVT-V2.0-2022.07.15\EXAM\BLE\MESH\MESH_LIB\libMESH.a(mesh_adapt.o): in function `k_uptime_get_32':
mesh_adapt.c:(.text.k_uptime_get_32+0x4): undefined reference to `TMOS_GetSystemClock'


問(wèn)題可能是libMESH.a不支持CH57xBLE_ROM.h。當(dāng)我去掉庫(kù)LIBCH57xBLE.a,加上宏定義“CH57xBLE_ROM=1”后,libMESH.a就找不到函數(shù)了。


需求是想要用BLE進(jìn)行OTA升級(jí)嗎。

現(xiàn)在582的OTA升級(jí)是在mesh的基礎(chǔ)上OTA升級(jí)的,是對(duì)mesh的庫(kù)進(jìn)行固定,提供了CH58XBLE_ROM_MESH文件,用wch mesh這個(gè)app進(jìn)行升級(jí),BLE庫(kù)是和應(yīng)用層一起編譯的。

573不支持wch mesh的OTA,既要用mesh又要用ble,ram不夠用的,所以沒有提供CH57XBLE_ROM_MESH這個(gè)文件。


只有登錄才能回復(fù),可以選擇微信賬號(hào)登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频