1. 18 Aug, 2019 3 commits
  2. 17 Aug, 2019 10 commits
  3. 16 Aug, 2019 10 commits
  4. 15 Aug, 2019 17 commits
    • schneider's avatar
      fix(sdk): ssec is 12 bits long · ea085187
      schneider authored
      ea085187
    • Rahix's avatar
      Merge branch 'rahix/lifecycle' · 604a5036
      Rahix authored
      
      
      This changeset implements a proper lifecycle of the core 1 payload.
      The implementation faces some difficulties because there is no way to
      properly reset just core 1.  Instead, we chose a cooperative approach:
      
      To perform a reset, core 1 jumps to a reset-stub and is then fed a new
      IVT location which it uses to "restart" with a new payload.  The jump to
      the reset-stub is either voluntary by a call to epic_exit() or epix_exec(),
      or involuntary by Epicardium issuing a "reset" interrupt.  This is a
      special API interrupt whose handler is pre-implemented in the API-caller
      lib.
      
      Additionally, this changeset contains support for defining which python
      script Pycardium should execute on startup.  This way, scripts can issue
      the start of one another using `epic_exec("script-name.py")`.
      
      Finally, this changeset also changes the power-button behavior.
      Pressing the power button will now excert the following behavior:
      
          - `<400 ms`: Return back to menu
          - `<1 s`: Reset card10
          - `>1 s`: Poweroff
      
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      604a5036
    • Hauke Mehrtens's avatar
      feat(ble): Add file transfer · 14930b38
      Hauke Mehrtens authored
      
      
      This adds basic file transfer support over BLE.
      
      The central provides a filename and then can transfer chunks of data
      which are written to the file.
      
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      14930b38
    • Rahix's avatar
      feat(pmic): Implement proper reset behavior · d3c52d1c
      Rahix authored
      
      
      Pressing the power button will now excert the following behavior:
      
      - `<400 ms`: Return back to menu
      - `<1 s`: Reset card10
      - `>1 s`: Poweroff
      
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      d3c52d1c
    • Rahix's avatar
      feat(pycardium): Return on HardFault · 0f75b615
      Rahix authored
      
      
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      0f75b615
    • Rahix's avatar
      feat(pycardium): Add a barebones "os" module · 88409854
      Rahix authored
      
      
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      88409854
    • Rahix's avatar
      feat(epicardium): Add core 1 lifecycle · b7c0b608
      Rahix authored
      
      
      This commit introduces a lifecycle for core 1.  Based on the new loading
      system, a few APIs are made available to control the payload running on
      core 1.  These are:
      
      1. From core 1 (Pycardium, L0dable):
      
          - `epic_exec(name)` API Call:  Request loading of a new payload by
            name.  If the file does not exist, the call will return with an
            error code.  Otherwise, control will go to the new payload.
          - `epic_exit(retcode)` API Call:  Return from payload
            unconditionally.  This call should be called whenever a payload is
            done or when it has hit an unrecoverable error.  On `epic_exit`,
            Epicardium will reset the core back into the menu.
      
      2. From inside Epicardium:
      
          - `epic_exec(name)`: This is **not** the same as the API call, as it
            needs a different implementation underneath.  It will load a new
            payload and wait until this load actually completed (synchroneous).
          - `return_to_menu()`: Return core 1 to the menu script no matter
            what it is currently doing.  This call is asynchroneous and will
            return immediately after scheduling the lifecycle task.  This task
            will then take care of actually performing the load.
      
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      b7c0b608
    • Rahix's avatar
      feat(epicardium): Add module for hardware init · be09c127
      Rahix authored
      
      
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      be09c127
    • Rahix's avatar
      chore(epicardium): Move dispatcher into own module · 5f794074
      Rahix authored
      
      
      Also add a mutex around API calls in preparation for future changes.
      
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      5f794074
    • Rahix's avatar
      feat(epicardium): Implement basic core 1 lifecycle · 3b9393fe
      Rahix authored
      
      
      This commit introduces a way to control core 1.  This is archieved by a
      predefined API-Interrupt:  The reset interrupt.  When triggered, it will
      bring the core back into its default state and wait for a new vector
      address from Epicardium.  Once this vector address is transferred, it
      will start the new payload.
      
      This method only works as long as core 1 is responsive to the API
      interrupts.  Cases where this might not be the case:
      
        - During times where core 1 has interrupts disabled
        - When in a higher priority exception handler
        - When core 1 has corrupted its IVT
      
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      3b9393fe
    • Rahix's avatar
      fix(api): Make reset interrupt non-maskable · bf88fd75
      Rahix authored
      
      
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      bf88fd75
    • Rahix's avatar
      fix(api): Change interrupt idle value to -1 · 941fb5c4
      Rahix authored
      
      
      Previously 0 was used but as 0 is also the ID of the reset interrupt,
      this could lead to weird behaviors.
      
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      941fb5c4
    • Rahix's avatar
      feat(api): Add initial argument passing · b8940bcd
      Rahix authored
      
      
      This allows pycardium to learn which script it should start once it
      boots.  Arguments can only be read before any API calls are made.
      Afterward they are lost.
      
      To ensure they won't collide with anything during a core 1 restart,
      they are offset by 0x20 from the start of the API buffer.
      
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      b8940bcd
    • Rahix's avatar
      feat(epicardium): Add switch for core 1 debugging · 32144f97
      Rahix authored
      
      
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      32144f97
    • Hauke Mehrtens's avatar
      change(ble): Increase MTU to 241 bytes · 77a3af48
      Hauke Mehrtens authored
      
      
      By default the MTU is set to 23 bytes, use 241 bytes instead to make the
      UART and file transfer service more efficient. The MTU also contains
      some BLE headers and is not only the usable data.
      
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      77a3af48
    • genofire's avatar
      ble: fix card10 svc uuid · dba22702
      genofire authored and schneider's avatar schneider committed
      dba22702
    • genofire's avatar
      doc(ble): add card10 to index · bf7824f7
      genofire authored and schneider's avatar schneider committed
      bf7824f7