
今天分享一个开源项目:InfiniTime,它不是通用系统,而是PineTime的完整开源固件,界面、蓝牙和升级都在一颗nRF52832里。截至2026-11,最新发布版为1.16.1(2026年7月5日),采用GPL-3.0-or-later。代码、Bootloader、脚本和文档均公开,项目地址为github.com/InfiniTimeOrg/InfiniTime。
关键信息:语言与构建为C++20、C99、汇编,CMake+GCC 15.3+SDK 15.3;许可GPL-3.0-or-later;RTOS为FreeRTOS;UI为LVGL;BLE为NimBLE;硬件为PineTime、nRF52832、64KB RAM;存储为512KB内部Flash与4MB SPI资源Flash。外部Flash只存资源,上手难度三星。
核心亮点方面,FreeRTOS负责分工,系统、显示、BLE和心率各有任务,单核看似并行,实际是调度器快速切换。LVGL负责交互,表盘、列表和设置都是LVGL对象,手势与动画都要守住RAM。NimBLE负责连接,手机通过BLE发送时间、通知、音乐和天气,DFU也走对应流程。MCUBoot负责更新,新固件先进入备用区,再由Bootloader切换,下载升级包仍由应用处理。
界面层分三层:FreeRTOS管任务,DisplayApp管屏幕,具体App管内容。DisplayApp记录当前应用,接收按键和触摸,再加载界面。每个界面继承Screen,按需处理按钮与触摸,硬件能力从Controllers获取。新增用户应用还要提供AppTraits,告诉构建期列表应用ID、图标和创建函数,还要登记ID、修改CMake列表,再用ENABLE_USERAPPS选应用。它不能运行时安装第三方应用。
上手建议:第一次接触时先用InfiniSim看界面,它能模拟触摸和按键,不必先买手表。在Ubuntu或带WSLg的WSL2下安装cmake、libsdl2-dev、g++、npm、libpng-dev等依赖,git clone递归获取InfiniTimeOrg/InfiniSim,npm install lv_font_conv@1.5.2,cmake构建后运行infinisim。启动后先见表盘,左键摸屏,右键按硬件键。上滑应用列表,点击秒表,验证触摸与刷新;点击秒表开始计时,数字持续刷新,说明应用已运行。
本文来源:https://www.eet-china.com/mp/a542309.html
若有版权问题,请来信告知:13951431913#139.com 或在右方提交评论。
Today I would like to share an open-source project: InfiniTime. It is not a general-purpose system but the complete open-source firmware for the PineTime, with the UI, Bluetooth and upgrades all running on a single nRF52832. As of 2026-11, the latest release is 1.16.1 (July 5, 2026), licensed under GPL-3.0-or-later. The code, bootloader, scripts and documentation are all public, and the project is hosted at github.com/InfiniTimeOrg/InfiniTime.
Key facts: languages and build are C++20, C99 and assembly, with CMake + GCC 15.3 + SDK 15.3; license GPL-3.0-or-later; RTOS is FreeRTOS; UI is LVGL; BLE is NimBLE; hardware is PineTime with an nRF52832 and 64KB RAM; storage is 512KB internal Flash plus 4MB SPI resource Flash. The external Flash only stores resources, and the learning curve is rated three stars.
Among the core highlights, FreeRTOS handles division of labour: the system, display, BLE and heart rate each have their own tasks; a single core appears to run them in parallel, but in reality the scheduler switches rapidly. LVGL handles interaction: watch faces, lists and settings are all LVGL objects, and gestures and animations must stay within the RAM budget. NimBLE handles connectivity: the phone sends time, notifications, music and weather over BLE, and DFU follows its corresponding flow. MCUBoot handles updates: new firmware first lands in a spare slot and is then switched over by the bootloader, while downloading the upgrade package is still handled by the application.
The UI layer has three tiers: FreeRTOS manages tasks, DisplayApp manages screens, and individual apps manage content. DisplayApp keeps track of the current application, receives button and touch input, and then loads the interface. Each screen inherits from Screen, handles buttons and touches as needed, and obtains hardware capabilities from Controllers. Adding a user application also requires providing AppTraits, which tells the build-time list the application ID, icon and creation function; you must also register the ID, modify the CMake list, and then select the app with ENABLE_USERAPPS. It cannot install third-party applications at runtime.
Getting-started advice: on first contact, use InfiniSim to preview the interface — it simulates touch and buttons, so you don't need to buy a watch first. Under Ubuntu or WSL2 with WSLg, install dependencies such as cmake, libsdl2-dev, g++, npm and libpng-dev, run git clone recursively to fetch InfiniTimeOrg/InfiniSim, run npm install lv_font_conv@1.5.2, build with cmake and then run infinisim. After launch you will first see the watch face; the left button simulates a touch on the screen and the right button simulates a hardware button. Swipe up to the app list and tap the stopwatch to verify touch and refresh; tap the stopwatch to start timing, and if the digits keep refreshing, the app is running.
本文来源:https://www.eet-china.com/mp/a542309.html
若有版权问题,请来信告知:13951431913#139.com 或在右方提交评论。