1. 12 Dec, 2019 5 commits
    • Damien George's avatar
      tools/mpy_ld.py: Add new mpy_ld.py tool and associated build files. · aad79ada
      Damien George authored
      This commit adds a new tool called mpy_ld.py which is essentially a linker
      that builds .mpy files directly from .o files.  A new header file
      (dynruntime.h) and makefile fragment (dynruntime.mk) are also included
      which allow building .mpy files from C source code.  Such .mpy files can
      then be dynamically imported as though they were a normal Python module,
      even though they are implemented in C.
      
      Converting .o files directly (rather than pre-linked .elf files) allows the
      resulting .mpy to be more efficient because it has more control over the
      relocations; for example it can skip PLT indirection.  Doing it this way
      also allows supporting more architectures, such as Xtensa which has
      specific needs for position-independent code and the GOT.
      
      The tool supports targets of x86, x86-64, ARM Thumb and Xtensa (windowed
      and non-windowed).  BSS, text and rodata sections are supported, with
      relocations to all internal sections and symbols, as well as relocations to
      some external symbols (defined by dynruntime.h), and linking of qstrs.
      aad79ada
    • Damien George's avatar
      tools/mpy-tool.py: Add ability to merge multiple .mpy files into one. · 27879844
      Damien George authored
      Usage:
      
          mpy-tool.py -o merged.mpy --merge mod1.mpy mod2.mpy
      
      The constituent .mpy files are executed sequentially when the merged file
      is imported, and they all use the same global namespace.
      27879844
    • Damien George's avatar
      py/nativeglue: Add funcs/types to native glue table for dynamic runtime. · 3690f79a
      Damien George authored
      These allow discovery of symbols by native code that is loaded dynamically.
      3690f79a
    • Damien George's avatar
    • Damien George's avatar
      py/persistentcode: Add ability to relocate loaded native code. · b47e155b
      Damien George authored
      Implements text, rodata and bss generalised relocations, as well as generic
      qstr-object linking.  This allows importing dynamic native modules on all
      supported architectures in a unified way.
      b47e155b
  2. 10 Dec, 2019 2 commits
  3. 09 Dec, 2019 7 commits
  4. 05 Dec, 2019 4 commits
  5. 04 Dec, 2019 6 commits
  6. 03 Dec, 2019 1 commit
  7. 02 Dec, 2019 2 commits
    • Damien George's avatar
      extmod/modbluetooth: Remove limit on data coming from gattc data input. · 8ce69288
      Damien George authored
      This removes the limit on data coming in from a BLE.gattc_read() request,
      or a notify with payload (coming in to a central).  In both cases the data
      coming in to the BLE callback is now limited only by the available data in
      the ringbuf, whereas before it was capped at (default hard coded) 20 bytes.
      8ce69288
    • Damien George's avatar
      extmod/modbluetooth: Simplify how BLE IRQ callback is scheduled. · d6e05108
      Damien George authored
      Instead of enqueue_irq() inspecting the ringbuf to decide whether to
      schedule the IRQ callback (if ringbuf is empty), maintain a flag that knows
      if the callback is on the schedule queue or not.  This saves about 150
      bytes of code (for stm32 builds), and simplifies all uses of enqueue_irq()
      and schedule_ringbuf().
      d6e05108
  8. 28 Nov, 2019 1 commit
  9. 27 Nov, 2019 3 commits
  10. 26 Nov, 2019 4 commits
  11. 25 Nov, 2019 5 commits