需要提供OTA更新的示例代码 / Example needed for OTA update
-
您好,
能否在您的SDK[1]中添加一个基于GCC可编译运行的OTA更新示例?这将帮助我学习如何添加OTA功能。[1] https://gitee.com/freqchip/FR801xH-SDK/tree/master/examples/none_evm
目前根据中文文档的说明,我了解到需要在项目初始化时调用ota_gatt_add_service()来添加OTA服务。在该手册中...
在其他文档中我还看到这张经过翻译的示意图...
----- ENGLISH TRANSLATION BELOW FOR REFERENCE ----
Hi,
Can you please add a working and buildable example with gcc on your SDK [1] that will teach me how to add the OTA update?[1] https://gitee.com/freqchip/FR801xH-SDK/tree/master/examples/none_evm
So far looking at your documentation in Chinese I see I need to use call ota_gatt_add_service() to add the OTA service when the project is initialized. In this manual...
In some other documents I also see this graph which i translated...
-
@stallone
This can fill in your needs
-
@felix-yang unfortunately that example does not contain the "gcc" directory and proper MakeFile
@felix-yang 不幸的是,该示例不包含“gcc”目录和正确的 MakeFile
-
https://gitee.com/a18562560220/freqchip_faq.git
我简单移植了 ble_at 工程的makefile,你可以试一下
I simply ported the makefile of the ble_at project. You can give it a try.
-
Thanks! I tried but I get this error:
谢谢!我试过了,但出现以下错误:PS C:\Users\stallone\Desktop\ZIKR\FR801xH-SDK\examples\none_evm\ble_AT\gcc> make
mkdir build
cd build && mkdir AT_prj
Compiling: ../code/proj_main.c
Compiling: ../code/at_gap_event.c
../code/at_gap_event.c:25:17: error: static declaration of 'current_con_interval' follows non-static declaration
static uint16_t current_con_interval = LINK_INTERVAL_MIN;
^~~~~~~~~~~~~~~~~~~~
In file included from ../code/at_gap_event.c:15:0:
../code/at_gap_event.h:18:17: note: previous declaration of 'current_con_interval' was here
extern uint16_t current_con_interval;
^~~~~~~~~~~~~~~~~~~~
../code/at_gap_event.c: In function 'at_cb_slave_connected':
../code/at_gap_event.c:298:57: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
os_timer_init( &update_param_timer,param_timer_func,(void *)(param->conidx));
^
make: *** [../../../../components/toolchain/gcc/Makefile.common:147: build/AT_prj/at_gap_event.c.o] Error 1
-
简单来说……假设我想在 https://gitee.com/freqchip/FR801xH-SDK/blob/master/examples/none_evm/ble_simple_peripheral/code/proj_main.c 中添加 OTA 更新功能
添加这几行就够了吗?!Let's keep it simple... let's say I want to add OTA update feature to https://gitee.com/freqchip/FR801xH-SDK/blob/master/examples/none_evm/ble_simple_peripheral/code/proj_main.c
Is enough to add these lines?!