1000 files + 156960 − 55824 Side-by-side Compare changes Side-by-side Inline Show whitespace changes Files 1000 Some changes are not shown. For a faster browsing experience, only 78 of 1000 files are shown. Download one of the files below to see all changes. .clang +1 −1 Original line number Original line Diff line number Diff line flags = -DBOARD_CARD10=1 -D_FILE_OFFSET_BITS=64 -DTARGET=32665 -DTARGET_REV=0x4131 -target thumbv7m-none-eabi -Ibuild/epicardium -Ibuild/epicardium/366573f@@api-caller@sta -Ibuild/epicardium/366573f@@api-dispatcher@sta -Ibuild/epicardium/366573f@@epicardium.elf@exe -Ibuild/epicardium/366573f@@freertos@sta -Ibuild/lib/card10 -Ibuild/lib/card10/7eaaaa5@@card10@sta -Ibuild/lib/ff13 -Ibuild/lib/ff13/a277df3@@ff13@sta -Ibuild/lib/gfx -Ibuild/lib/gfx/2308dff@@gfx@sta -Ibuild/lib/micropython -Ibuild/lib/micropython/a57cd11@@mpy-cross-wrapper@exe -Ibuild/lib/mx25lba -Ibuild/lib/mx25lba/c7b864b@@mx25lba@sta -Ibuild/lib/sdk/Libraries/Boards/card10 -Ibuild/lib/sdk/Libraries/Boards/card10/9eeeac4@@board-card10@sta -Ibuild/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665 -Ibuild/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/a500f70@@max32665-startup-core0@sta -Ibuild/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/a500f70@@max32665-startup-core1@sta -Ibuild/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/a500f70@@max32665-startup@sta -Ibuild/lib/sdk/Libraries/MAX32665PeriphDriver -Ibuild/lib/sdk/Libraries/MAX32665PeriphDriver/0d96707@@PeriphDriver@sta -Ibuild/lib/sdk/Libraries/MAXUSB -Ibuild/lib/sdk/Libraries/MAXUSB/9a51a91@@maxusb@sta -Ibuild/lib/vendor/Bosch/BHy1 -Ibuild/lib/vendor/Bosch/BHy1/6298ab9@@bhy1@sta -Ibuild/lib/vendor/Bosch/BMA400 -Ibuild/lib/vendor/Bosch/BMA400/b6b0216@@bma400@sta -Ibuild/lib/vendor/Bosch/BME680 -Ibuild/lib/vendor/Bosch/BME680/ef6f079@@bme680@sta -Ibuild/lib/vendor/Maxim/MAX77650 -Ibuild/lib/vendor/Maxim/MAX77650/cc369b8@@max77650@sta -Ibuild/lib/vendor/Maxim/MAX86150 -Ibuild/lib/vendor/Maxim/MAX86150/21e3a66@@max86150@sta -Ibuild/pycardium -Ibuild/pycardium/1f90fd2@@micropython@sta -Ibuild/pycardium/1f90fd2@@pycardium.elf@exe -Iepicardium -Ilib/card10 -Ilib/ff13 -Ilib/ff13/Source -Ilib/ff13/util -Ilib/FreeRTOS/Source/include -Ilib/FreeRTOS/Source/portable/GCC/ARM_CM4F -Ilib/gfx -Ilib/gfx/Fonts -Ilib/gfx/GUI_DEV -Ilib/gfx/LCD -Ilib/micropython -Ilib/micropython/micropython -Ilib/micropython/micropython/extmod -Ilib/micropython/micropython/lib/utils -Ilib/mx25lba -Ilib/sdk/Libraries/Boards/card10 -Ilib/sdk/Libraries/Boards/card10/Include -Ilib/sdk/Libraries/Boards/Include -Ilib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665 -Ilib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Include -Ilib/sdk/Libraries/CMSIS/Include -Ilib/sdk/Libraries/MAX32665PeriphDriver -Ilib/sdk/Libraries/MAX32665PeriphDriver/Include -Ilib/sdk/Libraries/MAXUSB -Ilib/sdk/Libraries/MAXUSB/include/core -Ilib/sdk/Libraries/MAXUSB/include/core/musbhsfc -Ilib/sdk/Libraries/MAXUSB/include/dbg_log -Ilib/sdk/Libraries/MAXUSB/include/devclass -Ilib/sdk/Libraries/MAXUSB/include/enumerate -Ilib/sdk/Libraries/MAXUSB/include/util -Ilib/vendor/Bosch/BHy1 -Ilib/vendor/Bosch/BHy1/driver/inc -Ilib/vendor/Bosch/BHy1/examples/firmware -Ilib/vendor/Bosch/BMA400 -Ilib/vendor/Bosch/BME680 -Ilib/vendor/Maxim/MAX77650 -Ilib/vendor/Maxim/MAX86150 -Ipycardium flags = -DBOARD_CARD10=1 -D_FILE_OFFSET_BITS=64 -DTARGET=32665 -DTARGET_REV=0x4131 -target thumbv7m-none-eabi -Ibuild/epicardium -Ibuild/epicardium/366573f@@api-caller@sta -Ibuild/epicardium/366573f@@api-dispatcher@sta -Ibuild/epicardium/366573f@@epicardium.elf@exe -Ibuild/epicardium/366573f@@freertos@sta -Ibuild/lib/card10 -Ibuild/lib/card10/7eaaaa5@@card10@sta -Ibuild/lib/ff13 -Ibuild/lib/ff13/a277df3@@ff13@sta -Ibuild/lib/gfx -Ibuild/lib/gfx/2308dff@@gfx@sta -Ibuild/lib/micropython -Ibuild/lib/micropython/a57cd11@@mpy-cross-wrapper@exe -Ibuild/lib/mx25lba -Ibuild/lib/mx25lba/c7b864b@@mx25lba@sta -Ibuild/lib/sdk/Libraries/Boards/card10 -Ibuild/lib/sdk/Libraries/Boards/card10/9eeeac4@@board-card10@sta -Ibuild/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665 -Ibuild/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/a500f70@@max32665-startup-core0@sta -Ibuild/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/a500f70@@max32665-startup-core1@sta -Ibuild/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/a500f70@@max32665-startup@sta -Ibuild/lib/sdk/Libraries/MAX32665PeriphDriver -Ibuild/lib/sdk/Libraries/MAX32665PeriphDriver/0d96707@@PeriphDriver@sta -Ibuild/lib/sdk/Libraries/MAXUSB -Ibuild/lib/sdk/Libraries/MAXUSB/9a51a91@@maxusb@sta -Ibuild/lib/vendor/Bosch/BHy1 -Ibuild/lib/vendor/Bosch/BHy1/6298ab9@@bhy1@sta -Ibuild/lib/vendor/Bosch/BMA400 -Ibuild/lib/vendor/Bosch/BMA400/b6b0216@@bma400@sta -Ibuild/lib/vendor/Bosch/BME680 -Ibuild/lib/vendor/Bosch/BME680/ef6f079@@bme680@sta -Ibuild/lib/vendor/Maxim/MAX77650 -Ibuild/lib/vendor/Maxim/MAX77650/cc369b8@@max77650@sta -Ibuild/lib/vendor/Maxim/MAX86150 -Ibuild/lib/vendor/Maxim/MAX86150/21e3a66@@max86150@sta -Ibuild/pycardium -Ibuild/pycardium/1f90fd2@@micropython@sta -Ibuild/pycardium/1f90fd2@@pycardium.elf@exe -Iepicardium -Ilib/card10 -Ilib/ff13 -Ilib/ff13/Source -Ilib/ff13/util -Ilib/FreeRTOS/Source/include -Ilib/FreeRTOS/Source/portable/GCC/ARM_CM4F -Ilib/gfx -Ilib/gfx/Fonts -Ilib/gfx/GUI_DEV -Ilib/gfx/LCD -Ilib/micropython -Ilib/micropython/micropython -Ilib/micropython/micropython/extmod -Ilib/micropython/micropython/lib/utils -Ilib/mx25lba -Ilib/sdk/Libraries/Boards/card10 -Ilib/sdk/Libraries/Boards/card10/Include -Ilib/sdk/Libraries/Boards/Include -Ilib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665 -Ilib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Include -Ilib/sdk/Libraries/CMSIS/Include -Ilib/sdk/Libraries/MAX32665PeriphDriver -Ilib/sdk/Libraries/MAX32665PeriphDriver/Include -Ilib/sdk/Libraries/MAXUSB -Ilib/sdk/Libraries/MAXUSB/include/core -Ilib/sdk/Libraries/MAXUSB/include/core/musbhsfc -Ilib/sdk/Libraries/MAXUSB/include/dbg_log -Ilib/sdk/Libraries/MAXUSB/include/devclass -Ilib/sdk/Libraries/MAXUSB/include/enumerate -Ilib/sdk/Libraries/MAXUSB/include/util -Ilib/vendor/Bosch/BHy1 -Ilib/vendor/Bosch/BHy1/driver/inc -Ilib/vendor/Bosch/BHy1/examples/firmware -Ilib/vendor/Bosch/BMA400 -Ilib/vendor/Bosch/BME680 -Ilib/vendor/Maxim/MAX77650 -Ilib/vendor/Maxim/MAX86150 -Ipycardium -Ilib/ctx .gitignore +2 −1 Original line number Original line Diff line number Diff line build/ /build/ /Documentation/output/ /Documentation/output/ __pycache__/ __pycache__/ *.pyc *.pyc Loading @@ -6,3 +6,4 @@ __pycache__/ *~ *~ compile_commands.json compile_commands.json /tags /tags /release-*/ .gitlab-ci.yml +15 −4 Original line number Original line Diff line number Diff line Loading @@ -4,22 +4,33 @@ image: "derq3k/card10-build-env:20190806-195837Z-f95b541-dirty" build: build: stage: build stage: build script: script: - ./bootstrap.sh - git submodule deinit --all -f - ./bootstrap.sh --werror - ninja -C build/ - ninja -C build/ - arm-none-eabi-size build/bootloader/bootloader.elf build/epicardium/epicardium.elf build/pycardium/pycardium.elf - arm-none-eabi-size build/bootloader/bootloader.elf build/epicardium/epicardium.elf build/pycardium/pycardium.elf - cp build/pycardium/pycardium_epicardium.bin card10.bin only: only: - merge_requests - merge_requests - master - master artifacts: expose_as: Firmware Binaries expire_in: 1 week paths: - build/epicardium/epicardium.elf - build/pycardium/pycardium.elf - card10.bin release: release: stage: build stage: build script: script: - ./bootstrap.sh - git submodule deinit --all -f - ./bootstrap.sh --werror - ninja -C build/ - ninja -C build/ - arm-none-eabi-size build/bootloader/bootloader.elf build/epicardium/epicardium.elf build/pycardium/pycardium.elf - arm-none-eabi-size build/bootloader/bootloader.elf build/epicardium/epicardium.elf build/pycardium/pycardium.elf only: only: - tag - tag artifacts: artifacts: expire_in: never paths: paths: - build/bootloader/bootloader.elf - build/bootloader/bootloader.elf - build/epicardium/epicardium.elf - build/epicardium/epicardium.elf Loading @@ -36,7 +47,7 @@ lint: # If this starts failing for any reason, just remove this curl ping. # If this starts failing for any reason, just remove this curl ping. - curl --fail https://annoyatron-prod.q3k.org/ping/mr?mr=${CI_MERGE_REQUEST_IID} - curl --fail https://annoyatron-prod.q3k.org/ping/mr?mr=${CI_MERGE_REQUEST_IID} - git remote rm card10 || true # old gitlab runners might have this remote. - git remote rm card10 || true # old gitlab runners might have this remote. - git fetch https://git.card10.badge.events.ccc.de/card10/firmware.git master:card10/master - git -c http.sslVerify=false fetch https://git.card10.badge.events.ccc.de/card10/firmware.git master:card10/master - git merge-base card10/master HEAD || ( echo "Your change needs to be rebased against current master."; exit 1; ) - git merge-base card10/master HEAD || ( echo "Your change needs to be rebased against current master."; exit 1; ) - git diff --name-only --diff-filter=d card10/master...HEAD | xargs tools/code-style.sh - git diff --name-only --diff-filter=d card10/master...HEAD | xargs tools/code-style.sh - git diff --exit-code - git diff --exit-code Loading @@ -46,7 +57,7 @@ lint: pages: pages: stage: deploy stage: deploy # maintaned by q3k, build using docker/deploy-env # maintaned by q3k, build using docker/deploy-env image: "derq3k/card10-deploy-env:20190806-200743Z-f95b541-dirty" image: "registry.k0.hswaw.net/q3k/card10-deploy-env:20210403-110003Z-4d929ee0" script: script: - export LD_LIBRARY_PATH=$(llvm-config --libdir) - export LD_LIBRARY_PATH=$(llvm-config --libdir) - echo $LD_LIBRARY_PATH - echo $LD_LIBRARY_PATH Loading .gitmodules +9 −0 Original line number Original line Diff line number Diff line Loading @@ -4,3 +4,12 @@ [submodule "lib/micropython/micropython-lib"] [submodule "lib/micropython/micropython-lib"] path = lib/micropython/micropython-lib path = lib/micropython/micropython-lib url = https://github.com/micropython/micropython-lib.git url = https://github.com/micropython/micropython-lib.git [submodule "lib/crypto/tiny-AES-c"] path = lib/crypto/tiny-AES-c url = https://github.com/kokke/tiny-AES-c [submodule "lib/crypto/SHA256"] path = lib/crypto/SHA256 url = https://github.com/ilvn/SHA256 [submodule "lib/lodepng/lodepng"] path = lib/lodepng/lodepng url = https://github.com/lvandeve/lodepng CHANGELOG.md +424 −1 Original line number Original line Diff line number Diff line Loading @@ -4,19 +4,430 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] ## [Unreleased] ## [v1.18] - 2021-12-25 - [Queer Quinoa] [Queer Quinoa]: https://card10.badge.events.ccc.de/release/card10-v1.18-Queer-Quinoa.zip ### For Users - Much improved battery runtime, up to 160% more time without recharging! - Integration of the [ctx.graphics] vector graphics renderer! This means much smoother looking graphics as CTX comes with anti-aliasing! For now, CTX is only integrated as a backend (for the existing graphics API) but in future releases you will also be able to use CTX directly as well. - As part of that, we have integrated a new font. You can also use your own, by replacing `lib/ctx/fira-mono.ttf` with a font of your choice and then rebuilding the firmware. - Automatically return from USB storage mode after the host (= your computer) ejects the device. - Added ECG streaming over BLE. The latest version of the Android companion app implements the other side of this. ### For Hackers - Disable IRQs on core 1 during all Epicardium API calls. This means API calls are now always safe to use from ISRs. - Added an [`epic_sleep()`] API call which can be used as a hint to Epicardium that it can enter a deep-sleep mode. [`epic_sleep()`] will only return once either the time is up or an interrupt to core 1 is pending. Pycardium now uses this call for all delays by default. - Update MicroPython to v1.17. - With the MicroPython update, pycardium now supports f-strings! - Firmware version can now be properly read out over BLE. - Legacy app launcher scripts in the filesystem root are deleted on startup of new versions now. Newer companion app releases also no longer generate this launcher script. ### Internals - Restructured `epicardium/modules` into more sensible subdirectories. - Switched the UART peripheral to use the HIRC8 clock. - Converted the "personal state" implementation to use the workqueue. - Switched the SysTick in Pycardium to use the 32kHz clock source. - Made display backlight PWM robust against changes to the MCU's PCLK speed. - During tickless idle, lower the core-clock (PCLK) to reduce power consumption. - Rewrote the LCD driver. - Put the display to sleep when the backlight is off to save power. - Fixed a 32-bit overflow in Pycardium systick code. [ctx.graphics]: https://ctx.graphics/ [`epic_sleep()`]: https://firmware.card10.badge.events.ccc.de/epicardium/api.html#c.epic_sleep ## [v1.17] - 2021-04-04 - [R2R Rocket] [R2R Rocket]: https://card10.badge.events.ccc.de/release/card10-v1.17-R2R-Rocket.zip ### For Users #### Added - Added the Bosch BSEC library for the BME680 sensor. See the [``bme680`` module][bme680-docs] documentation for details. - Added a [BLE Environmental Sensing Service][ess-docs]. - Added a [BLE HID Service][ble-hid-docs]. - Added the ability to use the pulse-oximeter as a proximity sensor (makes it usable as a button). Additionally a demo-application was added which uses this for a push-to-talk button. - Added a [blitting][blit-docs] function to the display module. This finally allows to efficiently draw pixels! - MicroPython BLE support! - A PNG library for pycardium: [`png`][png-docs] - Two more config options to tweak menu button behavior: `long_press_ms` and ``retrigger_ms`` - Option to disable low battery checks via `card10.cfg`. This is meant for devices where the connection between the PMICs ADMUX and the CPU's ADC is broken in some way, leading to the device always reporting a low battery condition. #### Changed - Updated the BME680 demo app with BSEC support. - Upgraded to MicroPython 1.14. - Open the USB mass-storage when no apps are found. - Improved the l0dables runtime; it now handles HardFaults and app-exits properly. #### Fixed - Fixed lockup when trying to load an ELF l0dable while ELFs are disabled. - Fixed card10 not waking up from sleep when BLE is disabled (regression from 1.15 to 1.16).
.clang +1 −1 Original line number Original line Diff line number Diff line flags = -DBOARD_CARD10=1 -D_FILE_OFFSET_BITS=64 -DTARGET=32665 -DTARGET_REV=0x4131 -target thumbv7m-none-eabi -Ibuild/epicardium -Ibuild/epicardium/366573f@@api-caller@sta -Ibuild/epicardium/366573f@@api-dispatcher@sta -Ibuild/epicardium/366573f@@epicardium.elf@exe -Ibuild/epicardium/366573f@@freertos@sta -Ibuild/lib/card10 -Ibuild/lib/card10/7eaaaa5@@card10@sta -Ibuild/lib/ff13 -Ibuild/lib/ff13/a277df3@@ff13@sta -Ibuild/lib/gfx -Ibuild/lib/gfx/2308dff@@gfx@sta -Ibuild/lib/micropython -Ibuild/lib/micropython/a57cd11@@mpy-cross-wrapper@exe -Ibuild/lib/mx25lba -Ibuild/lib/mx25lba/c7b864b@@mx25lba@sta -Ibuild/lib/sdk/Libraries/Boards/card10 -Ibuild/lib/sdk/Libraries/Boards/card10/9eeeac4@@board-card10@sta -Ibuild/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665 -Ibuild/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/a500f70@@max32665-startup-core0@sta -Ibuild/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/a500f70@@max32665-startup-core1@sta -Ibuild/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/a500f70@@max32665-startup@sta -Ibuild/lib/sdk/Libraries/MAX32665PeriphDriver -Ibuild/lib/sdk/Libraries/MAX32665PeriphDriver/0d96707@@PeriphDriver@sta -Ibuild/lib/sdk/Libraries/MAXUSB -Ibuild/lib/sdk/Libraries/MAXUSB/9a51a91@@maxusb@sta -Ibuild/lib/vendor/Bosch/BHy1 -Ibuild/lib/vendor/Bosch/BHy1/6298ab9@@bhy1@sta -Ibuild/lib/vendor/Bosch/BMA400 -Ibuild/lib/vendor/Bosch/BMA400/b6b0216@@bma400@sta -Ibuild/lib/vendor/Bosch/BME680 -Ibuild/lib/vendor/Bosch/BME680/ef6f079@@bme680@sta -Ibuild/lib/vendor/Maxim/MAX77650 -Ibuild/lib/vendor/Maxim/MAX77650/cc369b8@@max77650@sta -Ibuild/lib/vendor/Maxim/MAX86150 -Ibuild/lib/vendor/Maxim/MAX86150/21e3a66@@max86150@sta -Ibuild/pycardium -Ibuild/pycardium/1f90fd2@@micropython@sta -Ibuild/pycardium/1f90fd2@@pycardium.elf@exe -Iepicardium -Ilib/card10 -Ilib/ff13 -Ilib/ff13/Source -Ilib/ff13/util -Ilib/FreeRTOS/Source/include -Ilib/FreeRTOS/Source/portable/GCC/ARM_CM4F -Ilib/gfx -Ilib/gfx/Fonts -Ilib/gfx/GUI_DEV -Ilib/gfx/LCD -Ilib/micropython -Ilib/micropython/micropython -Ilib/micropython/micropython/extmod -Ilib/micropython/micropython/lib/utils -Ilib/mx25lba -Ilib/sdk/Libraries/Boards/card10 -Ilib/sdk/Libraries/Boards/card10/Include -Ilib/sdk/Libraries/Boards/Include -Ilib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665 -Ilib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Include -Ilib/sdk/Libraries/CMSIS/Include -Ilib/sdk/Libraries/MAX32665PeriphDriver -Ilib/sdk/Libraries/MAX32665PeriphDriver/Include -Ilib/sdk/Libraries/MAXUSB -Ilib/sdk/Libraries/MAXUSB/include/core -Ilib/sdk/Libraries/MAXUSB/include/core/musbhsfc -Ilib/sdk/Libraries/MAXUSB/include/dbg_log -Ilib/sdk/Libraries/MAXUSB/include/devclass -Ilib/sdk/Libraries/MAXUSB/include/enumerate -Ilib/sdk/Libraries/MAXUSB/include/util -Ilib/vendor/Bosch/BHy1 -Ilib/vendor/Bosch/BHy1/driver/inc -Ilib/vendor/Bosch/BHy1/examples/firmware -Ilib/vendor/Bosch/BMA400 -Ilib/vendor/Bosch/BME680 -Ilib/vendor/Maxim/MAX77650 -Ilib/vendor/Maxim/MAX86150 -Ipycardium flags = -DBOARD_CARD10=1 -D_FILE_OFFSET_BITS=64 -DTARGET=32665 -DTARGET_REV=0x4131 -target thumbv7m-none-eabi -Ibuild/epicardium -Ibuild/epicardium/366573f@@api-caller@sta -Ibuild/epicardium/366573f@@api-dispatcher@sta -Ibuild/epicardium/366573f@@epicardium.elf@exe -Ibuild/epicardium/366573f@@freertos@sta -Ibuild/lib/card10 -Ibuild/lib/card10/7eaaaa5@@card10@sta -Ibuild/lib/ff13 -Ibuild/lib/ff13/a277df3@@ff13@sta -Ibuild/lib/gfx -Ibuild/lib/gfx/2308dff@@gfx@sta -Ibuild/lib/micropython -Ibuild/lib/micropython/a57cd11@@mpy-cross-wrapper@exe -Ibuild/lib/mx25lba -Ibuild/lib/mx25lba/c7b864b@@mx25lba@sta -Ibuild/lib/sdk/Libraries/Boards/card10 -Ibuild/lib/sdk/Libraries/Boards/card10/9eeeac4@@board-card10@sta -Ibuild/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665 -Ibuild/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/a500f70@@max32665-startup-core0@sta -Ibuild/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/a500f70@@max32665-startup-core1@sta -Ibuild/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/a500f70@@max32665-startup@sta -Ibuild/lib/sdk/Libraries/MAX32665PeriphDriver -Ibuild/lib/sdk/Libraries/MAX32665PeriphDriver/0d96707@@PeriphDriver@sta -Ibuild/lib/sdk/Libraries/MAXUSB -Ibuild/lib/sdk/Libraries/MAXUSB/9a51a91@@maxusb@sta -Ibuild/lib/vendor/Bosch/BHy1 -Ibuild/lib/vendor/Bosch/BHy1/6298ab9@@bhy1@sta -Ibuild/lib/vendor/Bosch/BMA400 -Ibuild/lib/vendor/Bosch/BMA400/b6b0216@@bma400@sta -Ibuild/lib/vendor/Bosch/BME680 -Ibuild/lib/vendor/Bosch/BME680/ef6f079@@bme680@sta -Ibuild/lib/vendor/Maxim/MAX77650 -Ibuild/lib/vendor/Maxim/MAX77650/cc369b8@@max77650@sta -Ibuild/lib/vendor/Maxim/MAX86150 -Ibuild/lib/vendor/Maxim/MAX86150/21e3a66@@max86150@sta -Ibuild/pycardium -Ibuild/pycardium/1f90fd2@@micropython@sta -Ibuild/pycardium/1f90fd2@@pycardium.elf@exe -Iepicardium -Ilib/card10 -Ilib/ff13 -Ilib/ff13/Source -Ilib/ff13/util -Ilib/FreeRTOS/Source/include -Ilib/FreeRTOS/Source/portable/GCC/ARM_CM4F -Ilib/gfx -Ilib/gfx/Fonts -Ilib/gfx/GUI_DEV -Ilib/gfx/LCD -Ilib/micropython -Ilib/micropython/micropython -Ilib/micropython/micropython/extmod -Ilib/micropython/micropython/lib/utils -Ilib/mx25lba -Ilib/sdk/Libraries/Boards/card10 -Ilib/sdk/Libraries/Boards/card10/Include -Ilib/sdk/Libraries/Boards/Include -Ilib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665 -Ilib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Include -Ilib/sdk/Libraries/CMSIS/Include -Ilib/sdk/Libraries/MAX32665PeriphDriver -Ilib/sdk/Libraries/MAX32665PeriphDriver/Include -Ilib/sdk/Libraries/MAXUSB -Ilib/sdk/Libraries/MAXUSB/include/core -Ilib/sdk/Libraries/MAXUSB/include/core/musbhsfc -Ilib/sdk/Libraries/MAXUSB/include/dbg_log -Ilib/sdk/Libraries/MAXUSB/include/devclass -Ilib/sdk/Libraries/MAXUSB/include/enumerate -Ilib/sdk/Libraries/MAXUSB/include/util -Ilib/vendor/Bosch/BHy1 -Ilib/vendor/Bosch/BHy1/driver/inc -Ilib/vendor/Bosch/BHy1/examples/firmware -Ilib/vendor/Bosch/BMA400 -Ilib/vendor/Bosch/BME680 -Ilib/vendor/Maxim/MAX77650 -Ilib/vendor/Maxim/MAX86150 -Ipycardium -Ilib/ctx
.gitignore +2 −1 Original line number Original line Diff line number Diff line build/ /build/ /Documentation/output/ /Documentation/output/ __pycache__/ __pycache__/ *.pyc *.pyc Loading @@ -6,3 +6,4 @@ __pycache__/ *~ *~ compile_commands.json compile_commands.json /tags /tags /release-*/
.gitlab-ci.yml +15 −4 Original line number Original line Diff line number Diff line Loading @@ -4,22 +4,33 @@ image: "derq3k/card10-build-env:20190806-195837Z-f95b541-dirty" build: build: stage: build stage: build script: script: - ./bootstrap.sh - git submodule deinit --all -f - ./bootstrap.sh --werror - ninja -C build/ - ninja -C build/ - arm-none-eabi-size build/bootloader/bootloader.elf build/epicardium/epicardium.elf build/pycardium/pycardium.elf - arm-none-eabi-size build/bootloader/bootloader.elf build/epicardium/epicardium.elf build/pycardium/pycardium.elf - cp build/pycardium/pycardium_epicardium.bin card10.bin only: only: - merge_requests - merge_requests - master - master artifacts: expose_as: Firmware Binaries expire_in: 1 week paths: - build/epicardium/epicardium.elf - build/pycardium/pycardium.elf - card10.bin release: release: stage: build stage: build script: script: - ./bootstrap.sh - git submodule deinit --all -f - ./bootstrap.sh --werror - ninja -C build/ - ninja -C build/ - arm-none-eabi-size build/bootloader/bootloader.elf build/epicardium/epicardium.elf build/pycardium/pycardium.elf - arm-none-eabi-size build/bootloader/bootloader.elf build/epicardium/epicardium.elf build/pycardium/pycardium.elf only: only: - tag - tag artifacts: artifacts: expire_in: never paths: paths: - build/bootloader/bootloader.elf - build/bootloader/bootloader.elf - build/epicardium/epicardium.elf - build/epicardium/epicardium.elf Loading @@ -36,7 +47,7 @@ lint: # If this starts failing for any reason, just remove this curl ping. # If this starts failing for any reason, just remove this curl ping. - curl --fail https://annoyatron-prod.q3k.org/ping/mr?mr=${CI_MERGE_REQUEST_IID} - curl --fail https://annoyatron-prod.q3k.org/ping/mr?mr=${CI_MERGE_REQUEST_IID} - git remote rm card10 || true # old gitlab runners might have this remote. - git remote rm card10 || true # old gitlab runners might have this remote. - git fetch https://git.card10.badge.events.ccc.de/card10/firmware.git master:card10/master - git -c http.sslVerify=false fetch https://git.card10.badge.events.ccc.de/card10/firmware.git master:card10/master - git merge-base card10/master HEAD || ( echo "Your change needs to be rebased against current master."; exit 1; ) - git merge-base card10/master HEAD || ( echo "Your change needs to be rebased against current master."; exit 1; ) - git diff --name-only --diff-filter=d card10/master...HEAD | xargs tools/code-style.sh - git diff --name-only --diff-filter=d card10/master...HEAD | xargs tools/code-style.sh - git diff --exit-code - git diff --exit-code Loading @@ -46,7 +57,7 @@ lint: pages: pages: stage: deploy stage: deploy # maintaned by q3k, build using docker/deploy-env # maintaned by q3k, build using docker/deploy-env image: "derq3k/card10-deploy-env:20190806-200743Z-f95b541-dirty" image: "registry.k0.hswaw.net/q3k/card10-deploy-env:20210403-110003Z-4d929ee0" script: script: - export LD_LIBRARY_PATH=$(llvm-config --libdir) - export LD_LIBRARY_PATH=$(llvm-config --libdir) - echo $LD_LIBRARY_PATH - echo $LD_LIBRARY_PATH Loading
.gitmodules +9 −0 Original line number Original line Diff line number Diff line Loading @@ -4,3 +4,12 @@ [submodule "lib/micropython/micropython-lib"] [submodule "lib/micropython/micropython-lib"] path = lib/micropython/micropython-lib path = lib/micropython/micropython-lib url = https://github.com/micropython/micropython-lib.git url = https://github.com/micropython/micropython-lib.git [submodule "lib/crypto/tiny-AES-c"] path = lib/crypto/tiny-AES-c url = https://github.com/kokke/tiny-AES-c [submodule "lib/crypto/SHA256"] path = lib/crypto/SHA256 url = https://github.com/ilvn/SHA256 [submodule "lib/lodepng/lodepng"] path = lib/lodepng/lodepng url = https://github.com/lvandeve/lodepng
CHANGELOG.md +424 −1 Original line number Original line Diff line number Diff line Loading @@ -4,19 +4,430 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] ## [Unreleased] ## [v1.18] - 2021-12-25 - [Queer Quinoa] [Queer Quinoa]: https://card10.badge.events.ccc.de/release/card10-v1.18-Queer-Quinoa.zip ### For Users - Much improved battery runtime, up to 160% more time without recharging! - Integration of the [ctx.graphics] vector graphics renderer! This means much smoother looking graphics as CTX comes with anti-aliasing! For now, CTX is only integrated as a backend (for the existing graphics API) but in future releases you will also be able to use CTX directly as well. - As part of that, we have integrated a new font. You can also use your own, by replacing `lib/ctx/fira-mono.ttf` with a font of your choice and then rebuilding the firmware. - Automatically return from USB storage mode after the host (= your computer) ejects the device. - Added ECG streaming over BLE. The latest version of the Android companion app implements the other side of this. ### For Hackers - Disable IRQs on core 1 during all Epicardium API calls. This means API calls are now always safe to use from ISRs. - Added an [`epic_sleep()`] API call which can be used as a hint to Epicardium that it can enter a deep-sleep mode. [`epic_sleep()`] will only return once either the time is up or an interrupt to core 1 is pending. Pycardium now uses this call for all delays by default. - Update MicroPython to v1.17. - With the MicroPython update, pycardium now supports f-strings! - Firmware version can now be properly read out over BLE. - Legacy app launcher scripts in the filesystem root are deleted on startup of new versions now. Newer companion app releases also no longer generate this launcher script. ### Internals - Restructured `epicardium/modules` into more sensible subdirectories. - Switched the UART peripheral to use the HIRC8 clock. - Converted the "personal state" implementation to use the workqueue. - Switched the SysTick in Pycardium to use the 32kHz clock source. - Made display backlight PWM robust against changes to the MCU's PCLK speed. - During tickless idle, lower the core-clock (PCLK) to reduce power consumption. - Rewrote the LCD driver. - Put the display to sleep when the backlight is off to save power. - Fixed a 32-bit overflow in Pycardium systick code. [ctx.graphics]: https://ctx.graphics/ [`epic_sleep()`]: https://firmware.card10.badge.events.ccc.de/epicardium/api.html#c.epic_sleep ## [v1.17] - 2021-04-04 - [R2R Rocket] [R2R Rocket]: https://card10.badge.events.ccc.de/release/card10-v1.17-R2R-Rocket.zip ### For Users #### Added - Added the Bosch BSEC library for the BME680 sensor. See the [``bme680`` module][bme680-docs] documentation for details. - Added a [BLE Environmental Sensing Service][ess-docs]. - Added a [BLE HID Service][ble-hid-docs]. - Added the ability to use the pulse-oximeter as a proximity sensor (makes it usable as a button). Additionally a demo-application was added which uses this for a push-to-talk button. - Added a [blitting][blit-docs] function to the display module. This finally allows to efficiently draw pixels! - MicroPython BLE support! - A PNG library for pycardium: [`png`][png-docs] - Two more config options to tweak menu button behavior: `long_press_ms` and ``retrigger_ms`` - Option to disable low battery checks via `card10.cfg`. This is meant for devices where the connection between the PMICs ADMUX and the CPU's ADC is broken in some way, leading to the device always reporting a low battery condition. #### Changed - Updated the BME680 demo app with BSEC support. - Upgraded to MicroPython 1.14. - Open the USB mass-storage when no apps are found. - Improved the l0dables runtime; it now handles HardFaults and app-exits properly. #### Fixed - Fixed lockup when trying to load an ELF l0dable while ELFs are disabled. - Fixed card10 not waking up from sleep when BLE is disabled (regression from 1.15 to 1.16).