Open fcl999 opened 3 years ago
刷签名了没
刷签名了没
是密钥嘛 新键了一个public_key.c 替换了application/bootloader/dfu_public_key.c
private.key 在make bootloader
前 make
后 放到了 _build 文件夹下
别改,直接用原厂的签名试试
别改,直接用原厂的签名试试
好的 我试试 nrf52_kbd是包含协议栈的嘛? 我烧它的时候是全清空的状态
不包,要自己刷
不包,要自己刷 sdk 15.3 使用
pyocd flash --erase chip --target nrf52 s112_nrf52_6.1.1_softdevice.hex
清空并刷了协议栈 使用官方示例 ble_app_hids_keyboard /pca10040e/s112/armgcc/ 下 make 构建 使用pyocd flash --target nrf52 nrf52810_xxaa.hex.hex
刷入固件 重启 有蓝牙信号 再次使用pyocd flash --erase chip --target nrf52 s112_nrf52_6.1.1_softdevice.hex
清空并刷了协议栈 用回官方默认的签名 使用keyboard下的项目make 了新的 kbd bootloader merge_all合并
pyocd flash --target nrf52 nrf52_kbd_sign_with_sd.hex
刷入 重启 无蓝牙信号
这个提示 里 不是说 合并了协议栈的嘛?
$ make merge_all
DONE nrf52_kbd
Setting generate _build/nrf52_settings.hex
nrfutil settings generate --family NRF52810 --application _build/nrf52_kbd.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 _build/nrf52_settings.hex
Note: Generating a DFU settings page with backup page included.
This is only required for bootloaders from nRF5 SDK 15.1 and newer.
If you want to skip backup page generation, use --no-backup option.
Generated Bootloader DFU settings .hex file and stored it in: _build/nrf52_settings.hex
Bootloader DFU Settings:
* File: _build/nrf52_settings.hex
* Family: NRF52810
* Start Address: 0x0002F000
* CRC: 0xCC3C3703
* Settings Version: 0x00000001 (1)
* App Version: 0x00000001 (1)
* Bootloader Version: 0x00000001 (1)
* Bank Layout: 0x00000000
* Current Bank: 0x00000000
* Application Size: 0x0000DD10 (56592 bytes)
* Application CRC: 0x9550678F
* Bank0 Bank Code: 0x00000001
* Softdevice Size: 0x00000000 (0 bytes)
* Boot Validation CRC: 0x00000000
* SD Boot Validation Type: 0x00000000 (0)
* App Boot Validation Type: 0x00000000 (0)
Merging program, signature and SoftDevice s112_nrf52_6.1.1_softdevice.hex to _build/nrf52_kbd_sign_with_sd.hex
mergehex -m ../../SDK/components/softdevice/s112/hex/s112_nrf52_6.1.1_softdevice.hex _build/nrf52_settings.hex _build/nrf52_kbd.hex -o _build/nrf52_kbd_sign_with_sd.hex
Parsing input hex files.
Merging files.
Storing merged file.
nrf52_kbd不包,带with_sd字样的才包
还是不行呢 nrf52_kbd_sign_with_sd 和 nrf52_settings要分开刷嘛?
不需要。请尝试刷bootloader后再刷入nrf52_kbd_sign_with_sd
尝试了 还是没有信号 QAQ“=
不需要。请尝试刷bootloader后再刷入nrf52_kbd_sign_with_sd 调试了下 发现有个NRF_FAULT_ID_SDK_ERROR 是16358 然后就结束了 err COde 11
static void storage_callback_init() { ret_code_t err_code; (void)fds_register(&storage_callback); //注册FDS err_code = fds_init(); //初始化FDS APP_ERROR_CHECK(err_code); while (!s_fds_initialized) // 等待初始化完成 { sd_app_evt_wait(); // 等待过程中待机 } }
在docker 中 lot60-ble/rev_c/ make bootloader 报错
make[1]: Entering directory '/work/application/bootloader/project' cd ../../../keyboard/lot60-ble/rev_c/_build && mkdir nrf52_bootloader Assembling file: gcc_startup_nrf52810.S Compiling file: system_nrf52810.c Compiling file: app_error_weak.c Compiling file: app_scheduler.c Compiling file: app_util_platform.c Compiling file: crc32.c Compiling file: mem_manager.c Compiling file: nrf_assert.c Compiling file: nrf_atfifo.c Compiling file: nrf_atomic.c Compiling file: nrf_balloc.c Compiling file: nrf_fstorage.c Compiling file: nrf_fstorage_nvmc.c Compiling file: nrf_fstorage_sd.c Compiling file: nrf_queue.c Compiling file: nrf_ringbuf.c Compiling file: nrf_section_iter.c Compiling file: nrf_strerror.c Compiling file: sha256.c Compiling file: micro_ecc_backend_ecc.c Compiling file: micro_ecc_backend_ecdh.c Compiling file: micro_ecc_backend_ecdsa.c Compiling file: boards.c Compiling file: nrf_nvmc.c Compiling file: nrfx_atomic.c Compiling file: nrf_crypto_ecc.c Compiling file: nrf_crypto_ecdsa.c Compiling file: nrf_crypto_hash.c Compiling file: nrf_crypto_init.c Compiling file: nrf_crypto_shared.c Compiling file: dfu_public_key.c Compiling file: main.c In file included from ../sdk_config.h:47:0, from ../../../SDK/components/libraries/util/sdk_common.h:56, from ../../../SDK/components/libraries/bootloader/dfu/nrf_dfu_types.h:53, from ../../../SDK/components/libraries/bootloader/dfu/nrf_dfu.h:56, from ../../../SDK/components/libraries/bootloader/nrf_bootloader.h:57, from ../main.c:52: ../main.c: In function 'erase_check': ../../../keyboard/lot60-ble/common/config.h:108:26: error: 'UART_RXD' undeclared (first use in this function)
^
../main.c:227:28: note: in expansion of macro 'NRF_BL_ERASE_PIN'
nrf_gpio_cfg_input(NRF_BL_ERASE_PIN, NRF_GPIO_PIN_PULLDOWN);
^~~~
../../../keyboard/lot60-ble/common/config.h:108:26: note: each undeclared identifier is reported only once for each function it appears in
^
../main.c:227:28: note: in expansion of macro 'NRF_BL_ERASE_PIN'
nrf_gpio_cfg_input(NRF_BL_ERASE_PIN, NRF_GPIO_PIN_PULLDOWN);
^~~~
make[1]: [../../../template/Makefile.common:271: ../../../keyboard/lot60-ble/rev_c/_build/nrf52_bootloader/main.c.o] Error 1
make[1]: Leaving directory '/work/application/bootloader/project'
make: [../common/../../../application/main/project/bl.mk:19: bootloader] Error 2
#
Program received signal SIGTRAP, Trace/breakpoint trap. 0x0001c752 in app_error_fault_handler (id=id@entry=16385, pc=pc@entry=0, info=info@entry=536895460) at ../common/../../../SDK/components/libraries/util/app_error_weak.c:100 100 NRF_BREAKPOINT_COND;
有支持更多蓝牙的可能吗??比如52840、52811…………
@jeromeli002 欢迎PR
不知道你还需不需要,我也不太懂但是我自己尝试了两个办法可以用。 第一个是下载SDK以后用ses刷入,位置在SDK文件夹中的\examples\dfu\secure_bootloader\pca10040_ble\ses(这个是52832的),然后你之后就可以在手机中通过nrf connect刷入你生成的zip固件包 第二种是朋友跟我说的,在格老师那边的gt-ble60中随便找一个版本来修改配置,Jim大神这边应该没有改过,然后在\gt-ble60中make,不要在e f一类的文件夹中make,然后会生成一个600多k左右的hex文件,直接jlink啥的刷入就好。
大概率52810空间不足。 解决办法二个: 1、不使用bootloader,使用make merge_softdevice 生成不带bootloader的包,然后刷入nrf52_kbd_with_sd 2、使用bootloader,但修改rules.mk,去掉一些模块,比如RGB 和COMMAND。
可以关闭了
手上有 jlink pyocd 能用jlink刷吗跟debug嘛
jlink可以用,但是不是用pyocd。具体百度。
又来了 -、-
使用template改了一份87键配置 主要是832 改成 810 灯都注释 留了大小锁定 和 滚动锁定 修改了配列 引脚号 电源监测引脚号 config.h
Makefile
使用
make
;make bootloader
;make merge_all
命令 合并出nrf52_kbd_sign_with_sd.hex 使用pyocd + cmsisdap 烧录命令pyocd flash --erase chip --target nrf52 nrf52_kbd_sign_with_sd.hex
烧录成功 重启之后 搜索不到蓝牙信号, 重新编译了nrf52_kbd.hex 和 nrf52_bootloader.hex 使用pyocd flash --erase chip --target nrf52 nrf52_bootloader.hex
和pyocd flash --target nrf52 nrf52_kbd.hex
还是没有信号 然后使用了keyboard中其他的示例 仅修改52832 为 52810 ,仅编译烧录nrf52_kbd.hex 使用pyocd flash --erase chip --target nrf52 nrf52_kbd.hex
烧录成功 重启依旧没有蓝牙信号