This is a TMK based keyboard firmware for nRF52 series, now support both nRF52810 and nRF52832. Firmware for nRF51822 see here.
If you want to use this project in your major keyboard, please see the Release page.
Currently we support both nRF52810 and nRF52832. See keyboard directory for more information.
Firstly, you should download nRF5 SDK 17.1.0, decompress it and put it into the SDK folder. The structure of SDK folder will be SDK/components
, ...
And then, install gcc-arm-none-eabi-9-2019-q4-update
. Copy the Makefile.posix.template
or Makefile.windows.template
to Makefile.posix
or Makefile.windows
(depending your OS), then modify the toolchain path in the file to your gcc installed path.
Install SDCC to compile code for CH554. Note: This project require SDCC 4.0 to compile, older version in ubuntu 18.04 and debian 10 will not work.
If you want to compile the bootloader, you should firstly complie the uECC library. See this article.
Then,
cd keyboard/lot60-ble
make # Compile main program and the USB program
make bootloader # Compile bootloader
We also provide Docker image for you to compile, this image contains toolchain and sdk.
docker run lotlab/nrf52-keyboard
It's recommend to use DAP-Link to flashing nrf52 chip. If you want to do so, please install pyocd. If you want to generate DFU package, you should install nrfutil.
For ch554, you could use the official flasing utility in windows, or third-party usbisp in linux.
Type make help
for all flashing command.
这是一个基于nrf52蓝牙键盘的固件,使用了nRF SDK 17.1.0作为底层硬件驱动,并使用TMK键盘库作为键盘功能的上部实现。
若想要日常使用,建议使用Release版本
当前支持nrf52810和nrf52832两种主控硬件,此固件支持的键盘列表见Keyboard目录。
首先下载 nRF5 SDK 17.1.0, 解压并放入SDK文件夹。(本分支已经包含SDK,可略过此步)
然后安装 gcc-arm-none-eabi-9-2019-q4-update,将template目录中对应平台的配置文件模板复制一份,重命名为Makefile.posix
或Makefile.windows
,修改里面工具路径为你的安装目录。
然后安装 SDCC 用于编译CH554相关代码。注意:需要 SDCC 4.0 及以上版本才可编译,部分操作系统(如ubuntu 18.04, debian 10)内的 SDCC 版本无法满足要求。
我们也提供了Docker镜像方便编译,请使用
docker run lotlab/nrf52-keyboard
参见这篇文章,先编译uECC库,然后再编译Bootloader
现在蓝牙和USB控制器程序的Makefile都放在一起了。进入对应的硬件目录,直接make即可。
cd keyboard/lot60-ble
make # 编译主程序和USB控制程序
make bootloader # 编译bootloader
Windows下可直接下载我们制作的烧录工具烧录nrf52及ch554
对于nrf52,若要通过JLink直接写入,则需要安装JLink的驱动;若使用DAP-Link写入,则需要安装pyocd;若使用蓝牙DFU进行升级,则需要安装nrfutil
对于ch554,你可以使用官方的windows烧写工具,或三方的usbisp烧写。
请使用make help
查看所有的烧写和打包指令。
如果对上面的固件编译流程有问题,可参考Lotlab Wiki上的这篇文章,或查看.travis.yml
作为参考。
请参考Keyboard目录下的template移植模板,并查看doc目录下的对应说明。
如果你觉得这个工程有帮助到你,为何不请我喝一杯奶茶呢?
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。