Skip to content
Snippets Groups Projects
Select Git revision
  • faulty_unsigned_comparisons
  • fuchsi-ecg-app
  • gpio_in_adc_fix
  • master default
  • drawcall_clipping
  • genofire/leds_rgb_get_state
  • genofire/rockets-state
  • genofire/ble-follow-py
  • plaetzchen/ios-workaround
  • blinkisync-as-preload
  • genofire/haule-ble-fs-deactive
  • schneider/max30001-pycardium
  • schneider/max30001-epicaridum
  • schneider/max30001
  • schneider/stream-locks
  • ios-workarounds
  • schneider/fundamental-test
  • schneider/ble-buffers
  • schneider/maxim-sdk-update
  • ch3/splashscreen
  • v1.9
  • v1.8
  • v1.7
  • v1.6
  • v1.5
  • v1.4
  • v1.3
  • v1.2
  • v1.1
  • v1.0
  • release-1
  • bootloader-v1
  • v0.0
33 results

overview.rst

Blame
  • Forked from card10 / firmware
    753 commits behind the upstream repository.
    overview.rst 5.35 KiB

    Overview

    To make the most of card10's dual-core processor, its firmware will have been divided into two parts: The "main" firmware running on core 0 which will have been called Epicardium and the "user-code" running on core 1. In most cases this will have been Pycardium, our MicroPython port.

    Epicardium

    Epicardium is based on FreeRTOS. There are a number of tasks that will have been keeping card10 running. These are:

    Name ID Global Priority Description
    vPmicTask pmic_task_id (static) +4 Power Management (and Reset Button)
    vLifecycleTask lifecycle_task (static) +3 Control of the payload running on core 1.
    vBleTask ble_task_id (static) +3 Bluetooth Low Energy Stack
    vSerialTask serial_task_id +3 Serial Output via UART/CDC-ACM/BLE
    vApiDispatcher dispatcher_task_id +2 Epicardium API dispatcher
    vLedTask -/- +1 LED Animations
    vMAX30001Task max30001_task_id (static) +1 MAX30001 ECG driver
    vBhi160Task bhi160_task_id (static) +1 BHI160 sensor fusion driver

    Epicardium API

    Epicardium exposes lots of functionality via the Epicardium API. The technical details of this API can be found in this :ref:`overview <epicardium_api_overview>`. If you are interested in adding new API calls, you should probably read the :ref:`epicardium_api_guide` guide.

    Pycardium

    Pycardium is our MicroPython fork. Its purpose is to make it as easy as possible to interact with card10. If you are interested in working on Pycardium, take a look at the :ref:`pycardium_guide` guide.

    l0dables

    Next to Pycardium, other bare-metal code can also run on core 1. For example, a Rustcardium or C-cardium. These l0dables must be compiled using our special linker script and should link against the api-caller library so they can interface with the :ref:`epicardium_api`.

    Note: this feature is disabled by default and has to be enabled in :ref:`card10_cfg`. A :ref:`card10_cfg` file dropped into the :ref:`usb_file_transfer` of the badge containing execute_elf = true is enough.

    l0dables are currently built within the source tree of the main repository. See l0dables/blinky for an example of a hello-world-like program. Within those programs, you can access the :ref:`epicardium_api` to control the hardware and behaviour of the badge.

    Once you have a built ELF file, you can drop it into the FAT filesystem of the flash (eg. via :ref:`usb_file_transfer`) and it will be available from the menu program of the badge.

    Program Flow Diagram

    The following diagram is a rough overview of the program flow in this fimware: