1. 21 Aug, 2020 3 commits
    • Zenix27's avatar
      docs: Change `\*` to `*` in argument lists. · e76c7466
      Zenix27 authored
      Latest versions of Sphinx (at least 3.1.0) do not need the `*` escaped and
      will render the `\` in the output if it is there, so remove it.
      
      Fixes issue #6209.
      e76c7466
    • Maureen Helm's avatar
      travis: Add zephyr build to CI. · 17689a71
      Maureen Helm authored
      Adds a job to build the zephyr port in CI using the same docker container
      that the zephyr project uses for its own CI.
      
      Always make clean zephyr builds to ensure we don't just rebuild C code, but
      we also rebuild Kconfig and dts.  This is required when switching between
      boards, which have different Kconfigs and device trees.
      
      Uses the tagged zephyr 2.3.0 release.
      Signed-off-by: default avatarMaureen Helm <maureen.helm@nxp.com>
      17689a71
    • Maureen Helm's avatar
      zephyr: Include storage/flash_map.h unconditionally. · ac94e06f
      Maureen Helm authored
      Include storage/flash_map.h unconditionally so we always have access to the
      FLASH_AREA_LABEL_EXISTS macro, even if CONFIG_FLASH_MAP is not defined.
      
      This fixes a build error for the qemu_x86 board:
      
      main.c:108:63: error: missing binary operator before token "("
        108 |     #elif defined(CONFIG_FLASH_MAP) && FLASH_AREA_LABEL_EXISTS(storage)
            |                                                               ^
      ../../py/mkrules.mk:88: recipe for target 'build/genhdr/qstr.i.last' failed
      Signed-off-by: default avatarMaureen Helm <maureen.helm@nxp.com>
      ac94e06f
  2. 12 Aug, 2020 1 commit
    • Damien George's avatar
      extmod/vfs_reader: Fix mp_reader_new_file to open file in "rb" mode. · 60f5b941
      Damien George authored
      mp_reader_new_file() is used to read in files for importing, either .py or
      .mpy files, for the lexer and persistent code loader respectively.  In both
      cases the file should be opened in raw bytes mode: the lexer handles
      unicode characters itself, and .mpy files contain 8-bit bytes by nature.
      
      Before this commit importing was working correctly because, although the
      file was opened in text mode, all native filesystem implementations (POSIX,
      FAT, LFS) would access the file in raw bytes mode via mp_stream_rw()
      calling mp_stream_p_t.read().  So it was only an issue for non-native
      filesystems, such as those implemented in Python.  For Python-based
      filesystem implementations, a call to mp_stream_rw() would go via IOBase
      and then to readinto() at the Python level, and readinto() is only defined
      on files opened in raw bytes mode.
      Signed-off-by: default avatarDamien George <damien@micropython.org>
      60f5b941
  3. 08 Aug, 2020 1 commit
  4. 02 Aug, 2020 1 commit
    • Damien George's avatar
      py/persistentcode: Maintain root ptr list of imported native .mpy code. · 9883d8e8
      Damien George authored
      On ports where normal heap memory can contain executable code (eg ARM-based
      ports such as stm32), native code loaded from an .mpy file may be reclaimed
      by the GC because there's no reference to the very start of the native
      machine code block that is reachable from root pointers (only pointers to
      internal parts of the machine code block are reachable, but that doesn't
      help the GC find the memory).
      
      This commit fixes this issue by maintaining an explicit list of root
      pointers pointing to native code that is loaded from an .mpy file.  This
      is not needed for all ports so is selectable by the new configuration
      option MICROPY_PERSISTENT_CODE_TRACK_RELOC_CODE.  It's enabled by default
      if a port does not specify any special functions to allocate or commit
      executable memory.
      
      A test is included to test that native code loaded from an .mpy file does
      not get reclaimed by the GC.
      
      Fixes #6045.
      Signed-off-by: default avatarDamien George <damien@micropython.org>
      9883d8e8
  5. 26 Jul, 2020 3 commits
  6. 25 Jul, 2020 1 commit
  7. 24 Jul, 2020 6 commits
  8. 22 Jul, 2020 3 commits
  9. 21 Jul, 2020 1 commit
    • Zoltán Vörös's avatar
      lib/libm_dbl: Add round.c source code. · 27767aaf
      Zoltán Vörös authored
      This code is imported from musl, to match existing code in libm_dbl.
      
      The file is also added to the build in stm32/Makefile.  It's not needed by
      the core code but, similar to c5cc6417,
      allows round() to be used by user C modules or board extensions.
      27767aaf
  10. 20 Jul, 2020 14 commits
  11. 18 Jul, 2020 5 commits
  12. 17 Jul, 2020 1 commit