Merge remote-tracking branch 'origin/master' into korean_trans

crypto-aes
Jeff Epler 3 years ago
commit 25273f9e87
  1. 207
      .github/workflows/build.yml
  2. 37
      .github/workflows/create_website_pr.yml
  3. 3
      .gitignore
  4. 6
      .gitmodules
  5. 135
      .travis.yml
  6. 22
      Makefile
  7. 12
      README.rst
  8. 28
      conf.py
  9. 46
      docs/c2rst.py
  10. 2
      docs/design_guide.rst
  11. 6
      docs/library/builtins.rst
  12. 1
      docs/library/network.rst
  13. 4
      docs/requirements.txt
  14. 24
      docs/rstjinja.py
  15. 289
      docs/shared_bindings_matrix.py
  16. 3
      docs/supported_ports.rst
  17. 0
      extmod/font_petme128_8x8.h
  18. 2
      extmod/modframebuf.c
  19. 2
      frozen/Adafruit_CircuitPython_BusDevice
  20. 2
      frozen/Adafruit_CircuitPython_CircuitPlayground
  21. 2
      frozen/Adafruit_CircuitPython_Crickit
  22. 2
      frozen/Adafruit_CircuitPython_HID
  23. 2
      frozen/Adafruit_CircuitPython_IRRemote
  24. 2
      frozen/Adafruit_CircuitPython_LIS3DH
  25. 2
      frozen/Adafruit_CircuitPython_Motor
  26. 2
      frozen/Adafruit_CircuitPython_NeoPixel
  27. 2
      frozen/Adafruit_CircuitPython_Thermistor
  28. 2
      frozen/Adafruit_CircuitPython_seesaw
  29. 2
      frozen/circuitpython-stage
  30. 1
      lib/stm32lib
  31. 2
      lib/tinyusb
  32. 4
      lib/utils/buffer_helper.c
  33. 3
      lib/utils/buffer_helper.h
  34. 2
      lib/utils/interrupt_char.c
  35. 4
      lib/utils/printf.c
  36. 4
      lib/utils/pyexec.c
  37. 561
      locale/ID.po
  38. 443
      locale/circuitpython.pot
  39. 673
      locale/de_DE.po
  40. 443
      locale/en_US.po
  41. 443
      locale/en_x_pirate.po
  42. 839
      locale/es.po
  43. 574
      locale/fil.po
  44. 626
      locale/fr.po
  45. 588
      locale/it_IT.po
  46. 599
      locale/pl.po
  47. 543
      locale/pt_BR.po
  48. 618
      locale/zh_Latn_pinyin.po
  49. 37
      main.c
  50. 17
      ports/atmel-samd/Makefile
  51. 17
      ports/atmel-samd/README.rst
  52. 4
      ports/atmel-samd/asf4_conf/samd51/hpl_dac_config.h
  53. 15
      ports/atmel-samd/asf4_conf/samd51/hpl_gclk_config.h
  54. 2
      ports/atmel-samd/asf4_conf/samd51/peripheral_clk_config.h
  55. 54
      ports/atmel-samd/audio_dma.c
  56. 10
      ports/atmel-samd/audio_dma.h
  57. 4
      ports/atmel-samd/background.c
  58. 7
      ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk
  59. 8
      ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk
  60. 6
      ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk
  61. 10
      ports/atmel-samd/boards/bast_pro_mini_m0/mpconfigboard.mk
  62. 27
      ports/atmel-samd/boards/capablerobot_usbhub/board.c
  63. 37
      ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.h
  64. 16
      ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk
  65. 36
      ports/atmel-samd/boards/capablerobot_usbhub/pins.c
  66. 10
      ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.mk
  67. 14
      ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk
  68. 17
      ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk
  69. 65
      ports/atmel-samd/boards/circuitplayground_express_displayio/board.c
  70. 48
      ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h
  71. 31
      ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk
  72. 63
      ports/atmel-samd/boards/circuitplayground_express_displayio/pins.c
  73. 11
      ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk
  74. 11
      ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk
  75. 0
      ports/atmel-samd/boards/datum_distance/board.c
  76. 29
      ports/atmel-samd/boards/datum_distance/mpconfigboard.h
  77. 14
      ports/atmel-samd/boards/datum_distance/mpconfigboard.mk
  78. 27
      ports/atmel-samd/boards/datum_distance/pins.c
  79. 38
      ports/atmel-samd/boards/datum_imu/board.c
  80. 29
      ports/atmel-samd/boards/datum_imu/mpconfigboard.h
  81. 14
      ports/atmel-samd/boards/datum_imu/mpconfigboard.mk
  82. 29
      ports/atmel-samd/boards/datum_imu/pins.c
  83. 38
      ports/atmel-samd/boards/datum_light/board.c
  84. 29
      ports/atmel-samd/boards/datum_light/mpconfigboard.h
  85. 14
      ports/atmel-samd/boards/datum_light/mpconfigboard.mk
  86. 27
      ports/atmel-samd/boards/datum_light/pins.c
  87. 38
      ports/atmel-samd/boards/datum_weather/board.c
  88. 29
      ports/atmel-samd/boards/datum_weather/mpconfigboard.h
  89. 14
      ports/atmel-samd/boards/datum_weather/mpconfigboard.mk
  90. 27
      ports/atmel-samd/boards/datum_weather/pins.c
  91. 17
      ports/atmel-samd/boards/escornabot_makech/board.c
  92. 34
      ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h
  93. 14
      ports/atmel-samd/boards/escornabot_makech/mpconfigboard.mk
  94. 58
      ports/atmel-samd/boards/escornabot_makech/pins.c
  95. 6
      ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.mk
  96. 6
      ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.mk
  97. 12
      ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk
  98. 10
      ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk
  99. 6
      ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk
  100. 6
      ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,207 @@
name: Build CI
on:
push:
pull_request:
release:
types: [published]
check_suite:
types: [rerequested]
jobs:
test:
runs-on: ubuntu-16.04
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Set up Python 3.5
uses: actions/setup-python@v1
with:
python-version: 3.5
- name: Install deps
run: |
sudo apt-get install -y gettext librsvg2-bin
pip install requests sh click setuptools cpp-coveralls Sphinx sphinx-rtd-theme recommonmark sphinxcontrib-svg2pdfconverter polib pyyaml
- name: Versions
run: |
gcc --version
python3 --version
- uses: actions/checkout@v1
with:
submodules: true
- name: CircuitPython version
run: git describe --dirty --always --tags
- name: Build mpy-cross
run: make -C mpy-cross -j2
- name: Build unix port
run: |
make -C ports/unix deplibs -j2
make -C ports/unix -j2
make -C ports/unix coverage -j2
- name: Test all
run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1
working-directory: tests
- name: Print failure info
run: |
for exp in *.exp;
do testbase=$(basename $exp .exp);
echo -e "\nFAILURE $testbase";
diff -u $testbase.exp $testbase.out;
done
working-directory: tests
if: failure()
- name: Native Tests
run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native
working-directory: tests
- name: mpy Tests
run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float
working-directory: tests
- name: Docs
run: sphinx-build -E -W -b html . _build/html
- name: Translations
run: make check-translate
- name: New boards check
run: python3 -u ci_new_boards_check.py
working-directory: tools
build-arm:
runs-on: ubuntu-16.04
needs: test
strategy:
fail-fast: false
matrix:
board:
- "arduino_mkr1300"
- "arduino_mkrzero"
- "arduino_nano_33_ble"
- "arduino_zero"
- "bast_pro_mini_m0"
- "capablerobot_usbhub"
- "catwan_usbstick"
- "circuitplayground_bluefruit"
- "circuitplayground_express"
- "circuitplayground_express_crickit"
- "circuitplayground_express_displayio"
- "cp32-m4"
- "datalore_ip_m4"
- "datum_distance"
- "datum_imu"
- "datum_light"
- "datum_weather"
- "electronut_labs_blip"
- "electronut_labs_papyr"
- "escornabot_makech"
- "feather_m0_adalogger"
- "feather_m0_basic"
- "feather_m0_express"
- "feather_m0_express_crickit"
- "feather_m0_rfm69"
- "feather_m0_rfm9x"
- "feather_m0_supersized"
- "feather_m4_express"
- "feather_nrf52840_express"
- "feather_radiofruit_zigbee"
- "feather_stm32f405_express"
- "gemma_m0"
- "grandcentral_m4_express"
- "hallowing_m0_express"
- "hallowing_m4_express"
- "itsybitsy_m0_express"
- "itsybitsy_m4_express"
- "itsybitsy_nrf52840_express"
- "kicksat-sprite"
- "makerdiary_nrf52840_mdk"
- "makerdiary_nrf52840_mdk_usb_dongle"
- "meowmeow"
- "metro_m0_express"
- "metro_m4_airlift_lite"
- "metro_m4_express"
- "metro_nrf52840_express"
- "mini_sam_m4"
- "monster_m4sk"
- "particle_argon"
- "particle_boron"
- "particle_xenon"
- "pca10056"
- "pca10059"
- "pewpew10"
- "pewpew_m4"
- "pirkey_m0"
- "pybadge"
- "pybadge_airlift"
- "pyboard_v11"
- "pygamer"
- "pygamer_advance"
- "pyportal"
- "pyportal_titano"
- "pyruler"
- "robohatmm1_m0"
- "robohatmm1_m4"
- "sam32"
- "serpente"
- "snekboard"
- "sparkfun_lumidrive"
- "sparkfun_nrf52840_mini"
- "sparkfun_qwiic_micro_no_flash"
- "sparkfun_qwiic_micro_with_flash"
- "sparkfun_redboard_turbo"
- "sparkfun_samd21_dev"
- "sparkfun_samd21_mini"
- "spresense"
- "stm32f411ve_discovery"
- "stm32f412zg_discovery"
- "stringcar_m0_express"
- "trellis_m4_express"
- "trinket_m0"
- "trinket_m0_haxpress"
- "uchip"
- "ugame10"
- "winterbloom_sol"
steps:
- name: Set up Python 3.5
uses: actions/setup-python@v1
with:
python-version: 3.5
- name: Install deps
run: |
sudo apt-get install -y gettext
pip install requests sh click setuptools awscli
wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~xenial1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb
- name: Versions
run: |
gcc --version
arm-none-eabi-gcc --version
python3 --version
- uses: actions/checkout@v1
with:
submodules: true
- name: mpy-cross
run: make -C mpy-cross -j2
- name: build
run: python3 -u build_release_files.py
working-directory: tools
env:
BOARDS: ${{ matrix.board }}
- uses: actions/upload-artifact@v1.0.0
with:
name: ${{ matrix.board }}
path: bin/${{ matrix.board }}
- name: Upload to S3
run: aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
- name: Install upload deps
run: |
pip install uritemplate
- name: Upload to Release
run: python3 -u upload_release_files.py
working-directory: tools
env:
UPLOAD_URL: ${{ github.event.release.upload_url }}
ADABOT_GITHUB_ACCESS_TOKEN: ${{ secrets.BLINKA_GITHUB_ACCESS_TOKEN }}
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')

@ -0,0 +1,37 @@
name: Update CircuitPython.org
on:
release:
types: [published]
jobs:
website:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Set up Python 3.5
uses: actions/setup-python@v1
with:
python-version: 3.5
- name: Install deps
run: |
pip install requests sh click
- name: Versions
run: |
gcc --version
python3 --version
- uses: actions/checkout@v1
with:
submodules: true
- name: CircuitPython version
run: git describe --dirty --always --tags
- name: Website
run: python3 build_board_info.py
working-directory: tools
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
ADABOT_GITHUB_ACCESS_TOKEN: ${{ secrets.BLINKA_GITHUB_ACCESS_TOKEN }}
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')

3
.gitignore vendored

@ -12,6 +12,8 @@
# Packages
############
dist/
*.egg-info
# Logs and Databases
######################
@ -25,6 +27,7 @@
######################
build/
bin/
circuitpython-stubs/
# Test failure outputs
######################

6
.gitmodules vendored

@ -95,3 +95,9 @@
[submodule "frozen/circuitpython-stage"]
path = frozen/circuitpython-stage
url = https://github.com/python-ugame/circuitpython-stage.git
[submodule "ports/stm32f4/stm32f4"]
path = ports/stm32f4/stm32f4
url = https://github.com/adafruit/stm32f4.git
[submodule "ports/cxd56/spresense-exported-sdk"]
path = ports/cxd56/spresense-exported-sdk
url = https://github.com/sonydevworld/spresense-exported-sdk.git

@ -1,135 +0,0 @@
sudo: required
dist: xenial
language: c
compiler:
- gcc
git:
depth: 6
# Each item under 'env' is a separate Travis job to execute.
# They run in separate environments, so each one must take the time
# to clone the repository and submodules; to download and install SDKs,
# pip packages, and so forth. By gathering activities together in optimal
# ways, the "run time" and "total time" of the travis jobs can be minimized.
#
# Since at the time of writing Travis generally starts 5 or 6 jobs, the
# builds have been organized into 5 groups of *approximately* equal durations.
# Additionally, the jobs that need extra SDKs are also organized together.
#
# When adding new boards, take a look on the travis CI page
# https://travis-ci.org/adafruit/circuitpython to which build that installs
# that SDK is shortest and add it there. In the case of major re-organizations,
# just try to make the builds "about equal in run time"
env:
- TRAVIS_TESTS="unix docs translations website" TRAVIS_BOARDS="circuitplayground_express mini_sam_m4 grandcentral_m4_express pca10056 pca10059 feather_nrf52840_express makerdiary_nrf52840_mdk makerdiary_nrf52840_mdk_usb_dongle particle_boron particle_argon particle_xenon sparkfun_nrf52840_mini electronut_labs_papyr" TRAVIS_SDK=arm:nrf
- TRAVIS_BOARDS="metro_m0_express metro_m4_express metro_m4_airlift_lite pirkey_m0 trellis_m4_express trinket_m0 sparkfun_lumidrive sparkfun_redboard_turbo bast_pro_mini_m0" TRAVIS_SDK=arm
- TRAVIS_BOARDS="feather_radiofruit_zigbee gemma_m0 hallowing_m0_express itsybitsy_m0_express itsybitsy_m4_express meowmeow sam32 uchip" TRAVIS_SDK=arm
- TRAVIS_BOARDS="feather_m0_express_crickit feather_m0_rfm69 feather_m0_rfm9x feather_m4_express arduino_zero arduino_mkr1300 arduino_mkrzero pewpew10 kicksat-sprite ugame10 robohatmm1" TRAVIS_SDK=arm
- TRAVIS_BOARDS="circuitplayground_express_crickit feather_m0_adalogger feather_m0_basic feather_m0_express catwan_usbstick pyportal sparkfun_samd21_mini sparkfun_samd21_dev pybadge" TRAVIS_SDK=arm
addons:
artifacts:
paths:
- $(ls -d1 bin/*/*/* | tr "\n" ":")
target_paths: /
deploy:
provider: releases
api_key:
secure: "jdqVFw6itRY4qwQF4ReXo0uaymT+Mob6RhYX0lw8KWFNqBgHnLVuKmKKcGMEuRvBVMPkvxF7bMuOQzSBOunqwlHFse3oMzdWvQODv1zwV7pSRXGwTdIvTPbBjKWxnBG9uSNRf2R5AMflJFUxy2CbtBpgvNzr+4VLREZDrrjEu8C1iTtXGpSm5AQ5iIp2fkMAWD85FP7CQPpkqRoxhSIFZmTdurfYRmenq1OZ/4SeD5TESKcyvqJNzVT9z210B3cg3eAkP6ukvelW4qE2zgIANqUkGqvDEnAvEII9M89kuwhCMAekdfwnUSPrry+g77i1dUZHoRN1+MFj+waYtPaqxdYo2G1sysa6enxlu4jHMR5MfMk9eKHgaNgL3PiyANusYSS44amh8QIiVaX5nw82myZDCpQOZW7YqJKE6WX70Lbs4mS+wIs+ig4KIXO1B0p9kMb0OeVjHRl+KcXsWGRu/ECG/ExpqlVIssSPU407LohMXT2cJ37CY/R/EeK2XSDsQ2M3L3EAGUjCJdBGuwsOJ+2lG+HQpAVu9vAB4kq5jy9Ye+MG+8Xlkly3XZZ5+FkXyYxKnXb26/QVv0e5sIG5OmdJCPYFaH2J1QdKo7CdhEcBtrf6DMPWaimGMldShFqzLjOz3b3qLysRxFF0aGb7ipKPa57vawNzYHoPAViOcXQ="
file_glob: true
file: "$TRAVIS_BUILD_DIR/bin/*/*/*"
skip_cleanup: true
on:
tags: true
notifications:
webhooks:
urls:
- https://rosie-ci.ngrok.io/travis
on_success: always
on_failure: always
on_start: always
on_cancel: always
on_error: always
before_script:
# Expand the git tree back to 4.0.0-alpha.1 and then fetch the latest tag.
- LAST_TAG=`git ls-remote --quiet --tags --sort=version:refname | egrep -o "refs/tags/[0-9]+.*\$" | tail -n 1`
- git fetch --depth 1 origin $LAST_TAG:$LAST_TAG
- git describe --dirty --always --tags
- function var_search () { case "$1" in *$2*) true;; *) false;; esac; }
- sudo dpkg --add-architecture i386
- (! var_search "${TRAVIS_SDK-}" arm || (wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~xenial1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb))
# For huzzah builds
- (! var_search "${TRAVIS_SDK-}" esp8266 || (wget https://github.com/jepler/esp-open-sdk/releases/download/2018-06-10/xtensa-lx106-elf-standalone.tar.gz && tar -C .. -xaf xtensa-lx106-elf-standalone.tar.gz))
- if var_search "${TRAVIS_SDK-}" esp8266 ; then PATH=$(readlink -f ../xtensa-lx106-elf/bin):$PATH; fi
# For coverage testing (upgrade is used to get latest urllib3 version)
- sudo apt-get install -y python3-pip
- pip3 install --user sh click
- ([[ -z "$TRAVIS_TESTS" ]] || sudo pip install --upgrade cpp-coveralls)
- (! var_search "${TRAVIS_TESTS-}" docs || sudo apt-get install -y librsvg2-bin)
- (! var_search "${TRAVIS_TESTS-}" docs || pip install --user Sphinx sphinx-rtd-theme recommonmark sphinxcontrib-svg2pdfconverter)
- (! var_search "${TRAVIS_TESTS-}" translations || pip3 install --user polib)
# report some good version numbers to the build
- gcc --version
- (! var_search "${TRAVIS_SDK-}" arm || arm-none-eabi-gcc --version)
- (! var_search "${TRAVIS_SDK-}" esp8266 || xtensa-lx106-elf-gcc --version)
- python3 --version
script:
# Build mpy-cross first because other builds depend on it.
- echo 'Building mpy-cross' && echo 'travis_fold:start:mpy-cross'
- make -C mpy-cross -j2 ; S=$? ; echo $S > status ; (exit $S)
- echo 'travis_fold:end:mpy-cross' && tools/print_status.py status
# Use unbuffered output because building all the releases can take a long time.
# Travis will cancel the job if it sees no output for >10 minutes.
- cd tools && python3 -u build_release_files.py
- cd ..
- echo 'Building unix' && echo 'travis_fold:start:unix'
- (! var_search "${TRAVIS_TESTS-}" unix || (make -C ports/unix deplibs -j2 && make -C ports/unix -j2 && make -C ports/unix coverage -j2)) ; S=$? ; echo $S > status ; (exit $S)
- echo 'travis_fold:end:unix' && tools/print_status.py status
# run tests without coverage info
#- (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests -j1)
#- (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests -j1 --emit native)
# run tests with coverage info
- echo 'Test all' && echo 'travis_fold:start:test_all'
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1)) ; S=$? ; echo $S > status ; (exit $S)
- echo 'travis_fold:end:test_all' && tools/print_status.py status
- echo 'Test threads' && echo 'travis_fold:start:test_threads'
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread)) ; S=$? ; echo $S > status ; (exit $S)
- echo 'travis_fold:end:test_threads' && tools/print_status.py status
- echo 'Testing with native' && echo 'travis_fold:start:test_native'
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native)) ; S=$? ; echo $S > status ; (exit $S)
- echo 'travis_fold:end:test_native' && tools/print_status.py status
- (echo 'Testing with mpy' && echo 'travis_fold:start:test_mpy')
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float)) ; S=$? ; echo $S > status ; (exit $S)
- echo 'travis_fold:end:test_mpy' && tools/print_status.py status
- (echo 'Building docs' && echo 'travis_fold:start:build_docs')
- (! var_search "${TRAVIS_TESTS-}" docs || sphinx-build -E -W -b html . _build/html) ; S=$? ; echo $S > status ; (exit $S)
- echo 'travis_fold:end:build_docs' && tools/print_status.py status
- (echo 'Building translations' && echo 'travis_fold:start:build_translations')
- (! var_search "${TRAVIS_TESTS-}" translations || make check-translate) ; S=$? ; echo $S > status ; (exit $S)
- echo 'travis_fold:end:build_translations' && tools/print_status.py status
# run coveralls coverage analysis (try to, even if some builds/tests failed)
#- (cd ports/unix && coveralls --root ../.. --build-root . --gcov $(which gcov) --gcov-options '\-o build-coverage/' --include py --include extmod)
- (! var_search "${TRAVIS_TESTS-}" website || (cd tools && python3 build_board_info.py && cd ..))
after_failure:
- (cd tests && for exp in *.exp; do testbase=$(basename $exp .exp); echo -e "\nFAILURE $testbase"; diff -u $testbase.exp $testbase.out; done)

@ -1,4 +1,4 @@
# Makefile for Sphinx documentation
# Top-level Makefile for documentation builds and miscellaneous tasks.
#
# You can set these variables from the command line.
@ -17,6 +17,13 @@ CONFDIR = .
FORCE = -E
VERBOSE = -v
# path to generated type stubs
STUBDIR = circuitpython-stubs
# Run "make VALIDATE= stubs" to avoid validating generated stub files
VALIDATE = -v
# path to pypi source distributions
DISTDIR = dist
# Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the
# full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the
# executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
@ -31,7 +38,7 @@ I18NSPHINXOPTS = $(BASEOPTS)
TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/nrf py shared-bindings shared-module supervisor
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext stubs
help:
@echo "Please use \`make <target>' where <target> is one of"
@ -60,6 +67,7 @@ help:
clean:
rm -rf $(BUILDDIR)/*
rm -rf $(STUBDIR) $(DISTDIR) *.egg-info
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@ -196,10 +204,18 @@ pseudoxml:
all-source:
locale/circuitpython.pot: all-source
find $(TRANSLATE_SOURCES) -iname "*.c" | xargs xgettext -L C -s --add-location=file --keyword=translate -o circuitpython.pot -p locale
find $(TRANSLATE_SOURCES) -iname "*.c" -print0 | (LC_ALL=C sort -z) | xargs -0 xgettext -L C -s --add-location=file --keyword=translate -o circuitpython.pot -p locale
translate: locale/circuitpython.pot
for po in $(shell ls locale/*.po); do msgmerge -U $$po -s --no-fuzzy-matching --add-location=file locale/circuitpython.pot; done
check-translate: locale/circuitpython.pot $(wildcard locale/*.po)
$(PYTHON) tools/check_translations.py $^
stubs:
rst2pyi $(VALIDATE) shared-bindings/ $(STUBDIR)
python setup.py sdist
update-frozen-libraries:
@echo "Updating all frozen libraries to latest tagged version."
cd frozen; for library in *; do cd $$library; ../../tools/git-checkout-latest-tag.sh; cd ..; done

@ -63,7 +63,7 @@ Contributors who follow the `Code of
Conduct <https://github.com/adafruit/circuitpython/blob/master/CODE_OF_CONDUCT.md>`__
are welcome to submit pull requests and they will be promptly reviewed
by project admins. Please join the
`Discord <https://discord.gg/nBQh6qu>`__ too.
`Discord <https://adafru.it/discord>`__ too.
Branding
------------
@ -78,7 +78,7 @@ If you'd like to use the term "CircuitPython" and Blinka for your product here i
* Your product is supported by the primary
`"adafruit/circuitpython" <https://github.com/adafruit/circuitpython>`_ repo. This way we can
update any custom code as we update the CircuitPython internals.
* Your product is listed on `circuitpython.org <https:/circuitpython.org>`__ (source
* Your product is listed on `circuitpython.org <https://circuitpython.org>`__ (source
`here <https://github.com/adafruit/circuitpython-org/>`_). This is to ensure that a user of your
product can always download the latest version of CircuitPython from the standard place.
* Your product has a user accessible USB plug which appears as a CIRCUITPY drive when plugged in.
@ -115,8 +115,8 @@ Behavior
output is written to ``boot_out.txt``.
- ``code.py`` (or ``main.py``) is run after every reload until it
finishes or is interrupted. After it is done running, the vm and
hardware is reinitialized. **This means you cannot read state from
``code.py`` in the REPL anymore.** CircuitPython's goal for this
hardware is reinitialized. **This means you cannot read state from**
``code.py`` **in the REPL anymore.** CircuitPython's goal for this
change includes reduce confusion about pins and memory being used.
- After ``code.py`` the REPL can be entered by pressing any key. It no
longer shares state with ``code.py`` so it is a fresh vm.
@ -131,9 +131,9 @@ Behavior
``samd.disable_autoreload()``)
- Entering the REPL after the main code is finished requires a key press which enters the REPL and
disables autoreload.
- Main is one of these: ``code.txt``, **``code.py``**, ``main.py``,
- Main is one of these: ``code.txt``, ``code.py``, ``main.py``,
``main.txt``
- Boot is one of these: ``settings.txt``, ``settings.py``, **``boot.py``**,
- Boot is one of these: ``settings.txt``, ``settings.py``, ``boot.py``,
``boot.txt``
API

@ -13,6 +13,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import json
import sys
import os
@ -24,8 +25,20 @@ from recommonmark.parser import CommonMarkParser
sys.path.insert(0, os.path.abspath('docs'))
sys.path.insert(0, os.path.abspath('.'))
import shared_bindings_matrix
master_doc = 'docs/index'
# Grab the JSON values to use while building the module support matrix
# in 'shared-bindings/index.rst'
#modules_support_matrix = shared_bindings_matrix.support_matrix_excluded_boards()
modules_support_matrix = shared_bindings_matrix.support_matrix_by_board()
html_context = {
'support_matrix': modules_support_matrix
}
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
@ -40,7 +53,9 @@ extensions = [
'sphinxcontrib.rsvgconverter',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage'
'sphinx.ext.coverage',
'rstjinja',
'c2rst'
]
# Add any paths that contain templates here, relative to this directory.
@ -49,8 +64,7 @@ templates_path = ['templates']
# The suffix of source filenames.
source_suffix = ['.rst', '.md', '.c', '.h']
source_parsers = {'.md': CommonMarkParser,
'.c': "c2rst.CStrip", '.h': "c2rst.CStrip"}
source_parsers = {'.md': CommonMarkParser}
# The encoding of source files.
#source_encoding = 'utf-8-sig'
@ -84,6 +98,7 @@ version = release = '0.0.0'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ["**/build*",
".git",
".venv",
".direnv",
"docs/README.md",
@ -110,6 +125,7 @@ exclude_patterns = ["**/build*",
"ports/cc3200",
"ports/cc3200/FreeRTOS",
"ports/cc3200/hal",
"ports/cxd56/spresense-exported-sdk",
"ports/esp32",
"ports/esp8266/boards",
"ports/esp8266/common-hal",
@ -121,6 +137,9 @@ exclude_patterns = ["**/build*",
"ports/nrf/nrfx",
"ports/nrf/peripherals",
"ports/nrf/usb",
"ports/stm32f4/stm32f4",
"ports/stm32f4/peripherals",
"ports/stm32f4/ref",
"ports/pic16bit",
"ports/qemu-arm",
"ports/stm32",
@ -350,3 +369,6 @@ texinfo_documents = [
intersphinx_mapping = {"cpython": ('https://docs.python.org/3/', None),
"bus_device": ('https://circuitpython.readthedocs.io/projects/busdevice/en/latest/', None),
"register": ('https://circuitpython.readthedocs.io/projects/register/en/latest/', None)}
def setup(app):
app.add_stylesheet("customstyle.css")

@ -1,19 +1,31 @@
import sphinx.parsers
def c2rst(app, docname, source):
""" Pre-parse '.c' & '.h' files that contain rST source.
"""
# Make sure we're outputting HTML
if app.builder.format != 'html':
return
class CStrip(sphinx.parsers.Parser):
def __init__(self):
self.rst_parser = sphinx.parsers.RSTParser()
fname = app.env.doc2path(docname)
if (not fname.endswith(".c") and
not fname.endswith(".h")):
#print("skipping:", fname)
return
def parse(self, inputstring, document):
# This setting is missing starting with Sphinx 1.7.1 so we set it ourself.
document.settings.tab_width = 4
document.settings.character_level_inline_markup = False
stripped = []
for line in inputstring.split("\n"):
line = line.strip()
if line == "//|":
stripped.append("")
elif line.startswith("//| "):
stripped.append(line[len("//| "):])
stripped = "\r\n".join(stripped)
self.rst_parser.parse(stripped, document)
src = source[0]
stripped = []
for line in src.split("\n"):
line = line.strip()
if line == "//|":
stripped.append("")
elif line.startswith("//| "):
stripped.append(line[len("//| "):])
stripped = "\r\n".join(stripped)
rendered = app.builder.templates.render_string(
stripped, app.config.html_context
)
source[0] = rendered
def setup(app):
app.connect("source-read", c2rst)

@ -60,6 +60,7 @@ For example, a user can then use ``deinit()```::
import digitalio
import board
import time
led = digitalio.DigitalInOut(board.D13)
led.direction = digitalio.Direction.OUTPUT
@ -79,6 +80,7 @@ Alternatively, using a ``with`` statement ensures that the hardware is deinitial
import digitalio
import board
import time
with digitalio.DigitalInOut(board.D13) as led:
led.direction = digitalio.Direction.OUTPUT

@ -182,7 +182,7 @@ Exceptions
.. exception:: OSError
|see_cpython| `OSError`. CircuitPython doesn't implement the ``errno``
|see_cpython| :py:class:`cpython:OSError`. CircuitPython doesn't implement the ``errno``
attribute, instead use the standard way to access exception arguments:
``exc.args[0]``.
@ -198,11 +198,11 @@ Exceptions
.. exception:: SystemExit
|see_cpython| :py:class:`python:SystemExit`.
|see_cpython| :py:class:`cpython:SystemExit`.
.. exception:: TypeError
|see_cpython| :py:class:`python:TypeError`.
|see_cpython| :py:class:`cpython:TypeError`.
.. exception:: ValueError

@ -5,6 +5,7 @@
.. include:: ../templates/unsupported_in_circuitpython.inc
.. module:: network
:noindex:
:synopsis: network configuration
This module provides network drivers and routing configuration. To use this

@ -1 +1,3 @@
sphinxcontrib-svg2pdfconverter
sphinx==1.8.5
recommonmark==0.5.0
sphinxcontrib-svg2pdfconverter==0.1.0

@ -0,0 +1,24 @@
# Derived from code on Eric Holscher's blog, found at:
# https://www.ericholscher.com/blog/2016/jul/25/integrating-jinja-rst-sphinx/
def rstjinja(app, docname, source):
"""
Render our pages as a jinja template for fancy templating goodness.
"""
# Make sure we're outputting HTML
if app.builder.format != 'html':
return
# we only want our one jinja template to run through this func
if "shared-bindings/support_matrix" not in docname:
return
src = source[0]
print(docname)
rendered = app.builder.templates.render_string(
src, app.config.html_context
)
source[0] = rendered
def setup(app):
app.connect("source-read", rstjinja)

@ -0,0 +1,289 @@
# The MIT License (MIT)
#
# Copyright (c) 2019 Michael Schroeder
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
import json
import os
import re
SUPPORTED_PORTS = ["atmel-samd", "nrf"]
def parse_port_config(contents, chip_keyword=None):
""" Compile a dictionary of port-wide module configs, which may
be categorized by chipset.
"""
chip_fam = "all"
ifeq_found = False
port_config_results = {"all": []}
chip_pattern = ""
if chip_keyword:
chip_pattern = (
re.compile("(?<=ifeq\s\(\$\({}\)\,)(\w+)".format(chip_keyword))
)
for line in contents:
if chip_keyword:
if not ifeq_found:
check_ifeq = chip_pattern.search(line)
if check_ifeq:
ifeq_found = True
chip_fam = check_ifeq.group(1)
#print("found chip:", chip_fam)
else:
ifeq_found = False
chip_fam = "all"
else:
if "endif" in line:
ifeq_found = False
chip_fam = "all"
if "CIRCUITPY_" in line:
if chip_fam in port_config_results:
port_config_results[chip_fam].append(line.rstrip("\n"))
else:
port_config_results[chip_fam] = [line.rstrip("\n")]
#print(port_config_results)
return port_config_results
def get_shared_bindings():
""" Get a list of modules in shared-bindings based on folder names
"""
return [item for item in os.listdir("./shared-bindings")]
def read_mpconfig():
""" Open 'circuitpy_mpconfig.mk' and return the contents.
"""
configs = []
with open("py/circuitpy_mpconfig.mk") as mpconfig:
configs = mpconfig.read()
return configs
def build_module_map():
""" Establish the base of the JSON file, based on the contents from
`configs`. Base will contain module names, if they're part of
the `FULL_BUILD`, or their default value (0, 1, or a list of
modules that determine default [see audiocore, audiomixer, etc.]).
"""
base = dict()
modules = get_shared_bindings()
configs = read_mpconfig()
full_build = False
for module in modules:
full_name = module
search_name = module.lstrip("_")
re_pattern = "CIRCUITPY_{}\s=\s(.+)".format(search_name.upper())
find_config = re.findall(re_pattern, configs)
if not find_config:
continue
find_config = ", ".join([x.strip("$()") for x in find_config])
full_build = int("CIRCUITPY_FULL_BUILD" in find_config)
if not full_build:
default_val = find_config
else:
default_val = "None"
base[search_name] = {
"name": full_name,
"full_build": str(full_build),
"default_value": default_val,
"excluded": {}
}
#print(base)
return base
def get_excluded_boards(base):
""" Cycles through each board's `mpconfigboard.mk` file to determine
if each module is included or not. Boards are selected by existence
in a port listed in `SUPPORTED_PORTS` (e.g. `/port/nrf/feather_52840`)
Boards are further categorized by their respective chipset (SAMD21,
SAMD51, nRF52840, etc.)
"""
modules = list(base.keys())
re_board_chip = None
chip_keyword = None
for port in SUPPORTED_PORTS:
# each port appears to use its own define for the chipset
if port in ["atmel-samd"]:
re_board_chip = re.compile("CHIP_FAMILY\s=\s(\w+)")
chip_keyword = "CHIP_FAMILY"
elif port in ["nrf"]:
re_board_chip = re.compile("MCU_VARIANT\s=\s(\w+)")
port_dir = "ports/{}".format(port)
port_config_contents = ""
with open(os.path.join(port_dir, "mpconfigport.mk")) as port_config:
port_config_contents = port_config.readlines()
port_config = parse_port_config(port_config_contents, chip_keyword)
for entry in os.scandir(os.path.join(port_dir, "boards")):
if not entry.is_dir():
continue
contents = ""
board_dir = os.path.join(entry.path, "mpconfigboard.mk")
with open(board_dir) as board:
contents = board.read()
board_chip = re_board_chip.search(contents)
#print(entry.name, board_chip.group(1))
if not board_chip:
board_chip = "Unknown Chip"
else:
board_chip = board_chip.group(1)
# add port_config results to contents
contents += "\n" + "\n".join(port_config["all"])
if board_chip in port_config:
contents += "\n" + "\n".join(port_config[board_chip])
check_dependent_modules = dict()
for module in modules:
board_is_excluded = False
# check if board uses `SMALL_BUILD`. if yes, and current
# module is marked as `FULL_BUILD`, board is excluded
small_build = re.search("CIRCUITPY_SMALL_BUILD = 1", contents)
if small_build and base[module]["full_build"] == "1":
board_is_excluded = True
# check if board uses `MINIMAL_BUILD`. if yes, and current
# module is marked as `DEFAULT_BUILD`, board is excluded
min_build = re.search("CIRCUITPY_MINIMAL_BUILD = 1", contents)
if min_build and base[module]["default_value"] == "CIRCUITPY_DEFAULT_BUILD":
board_is_excluded = True
# check if module is specifically disabled for this board
re_pattern = "CIRCUITPY_{}\s=\s(\w)".format(module.upper())
find_module = re.search(re_pattern, contents)
if not find_module:
if base[module]["default_value"].isdigit():
# check if default inclusion is off ('0'). if the board doesn't
# have it explicitly enabled, its excluded.
if base[module]["default_value"] == "0":
board_is_excluded = True
else:
# this module is dependent on another module. add it
# to the list to check after processing all other modules.
# only need to check exclusion if it isn't already excluded.
if (not board_is_excluded and
base[module]["default_value"] not in [
"None",
"CIRCUITPY_DEFAULT_BUILD"
]):
check_dependent_modules[module] = base[module]["default_value"]
else:
if (find_module.group(1) == "0" and
find_module.group(1) != base[module]["default_value"]):
board_is_excluded = True
if board_is_excluded:
if board_chip in base[module]["excluded"]:
base[module]["excluded"][board_chip].append(entry.name)
else:
base[module]["excluded"][board_chip] = [entry.name]
for module in check_dependent_modules:
depend_results = set()
parents = check_dependent_modules[module].split("CIRCUITPY_")
parents = [item.strip(", ").lower() for item in parents if item]
for parent in parents:
if parent in base:
if (board_chip in base[parent]["excluded"] and
entry.name in base[parent]["excluded"][board_chip]):
depend_results.add(False)
else:
depend_results.add(True)
# only exclude the module if there were zero parents enabled
# as determined by the 'depend_results' set.
if not any(depend_results):
if board_chip in base[module]["excluded"]:
base[module]["excluded"][board_chip].append(entry.name)
else:
base[module]["excluded"][board_chip] = [entry.name]
#print(json.dumps(base, indent=2))
return base
def support_matrix_excluded_boards():
""" Compiles a list of available modules, and which board definitions
do not include them.
"""
base = build_module_map()
return get_excluded_boards(base)
def support_matrix_by_board():
""" Compiles a list of the available core modules available for each
board.
"""
base = build_module_map()
base_with_exclusions = get_excluded_boards(base)
boards = dict()
for port in SUPPORTED_PORTS:
port_dir = "ports/{}/boards".format(port)
for entry in os.scandir(port_dir):
if not entry.is_dir():
continue
board_modules = []
board_name = entry.name
board_contents = ""
with open(os.path.join(entry.path, "mpconfigboard.h")) as get_name:
board_contents = get_name.read()
board_name_re = re.search("(?<=MICROPY_HW_BOARD_NAME)\s+(.+)",
board_contents)
if board_name_re:
board_name = board_name_re.group(1).strip('"')
for module in base_with_exclusions.keys():
#print(module)
board_has_module = True
if base_with_exclusions[module]["excluded"]:
for port in base_with_exclusions[module]["excluded"].values():
#print(port)
if entry.name in port:
board_has_module = False
if board_has_module:
board_modules.append(base_with_exclusions[module]["name"])
boards[board_name] = sorted(board_modules)
#print(json.dumps(boards, indent=2))
return boards

@ -8,5 +8,6 @@ and ESP8266.
:maxdepth: 2
../ports/atmel-samd/README
../ports/esp8266/README
../ports/nrf/README
../ports/stm32f4/README
../ports/cxd56/README

@ -31,7 +31,7 @@
#if MICROPY_PY_FRAMEBUF
#include "ports/stm32/font_petme128_8x8.h"
#include "font_petme128_8x8.h"
typedef struct _mp_obj_framebuf_t {
mp_obj_base_t base;

@ -1 +1 @@
Subproject commit 6b3402965999d068316882d63fae3ab26006477c
Subproject commit 52d87bd7e571af66ecb57ee32b5af92531134150

@ -1 +1 @@
Subproject commit 1d38fd81edd30f1bd70c0cfe77819ab610ea89a3
Subproject commit d87ea261c40ecbc6d893d72d337beefbea1cf932

@ -1 +1 @@
Subproject commit a1686803566793ec2de7e043bf6822e47cfa31d1
Subproject commit a6100fb5d867c7f4980f071119bfa7e0a76e1d47

@ -1 +1 @@
Subproject commit 836bb9843fd793683061c15150944f8897d806e9
Subproject commit 89faee0eb08a6855e14f117c514fecf2dd90769d

@ -1 +1 @@
Subproject commit aa4428f304b982aa19a5800822e78c47dc8a3b6c
Subproject commit 8b7611a2cc076a2ac1b368c70227519f69f1e3e9

@ -1 +1 @@
Subproject commit a03f9011279f9e630549432589463912831fcee1
Subproject commit 53146ab2e82c318c3c37bd76bac34035a597b311

@ -1 +1 @@
Subproject commit 98563ab65800aac6464f671c0d005df56ecaa6c6
Subproject commit ddc74844983b35b027bd45091c7b8bb3c8d7a2d1

@ -1 +1 @@
Subproject commit c0ed34813a608b64ed044826553918ddbad12f0c
Subproject commit c0bdd8b10383725ee9293f5d88fb8d47eb1272bd

@ -1 +1 @@
Subproject commit 893c5ec6a9aeef38284985074c2058e87754ad3d
Subproject commit 2e5aedf18eb417a4120d4998ac1f387a4f600730

@ -1 +1 @@
Subproject commit 1d12cfc0b729b4ae0a2f3f4e7c1933a0fbd3b166
Subproject commit ea5e445edd4441cacd207aa2d2bfd724b813a253

@ -1 +1 @@
Subproject commit 340bd688e4a9684c557e65236f203049d56a4210
Subproject commit c1d8e1d645cbc83d857e12cf4ba67549b988a4e7

@ -1 +0,0 @@
Subproject commit d2bcfda543d3b99361e44112aca929225bdcc07f

@ -1 +1 @@
Subproject commit 0848c462b3e431a9da42e96537d2b597a4579636
Subproject commit e413c9efa303d70de019a91aa415384fe80ca78f

@ -26,10 +26,10 @@
#include "lib/utils/buffer_helper.h"
void normalize_buffer_bounds(int32_t* start, int32_t end, uint32_t* length) {
void normalize_buffer_bounds(int32_t* start, int32_t end, size_t* length) {
if (end < 0) {
end += *length;
} else if (((uint32_t) end) > *length) {
} else if (((size_t) end) > *length) {
end = *length;
}
if (*start < 0) {

@ -28,7 +28,8 @@
#define MICROPY_INCLUDED_LIB_UTILS_BUFFER_HELPER_H
#include <stdint.h>
#include <string.h>
void normalize_buffer_bounds(int32_t* start, int32_t end, uint32_t* length);
void normalize_buffer_bounds(int32_t* start, int32_t end, size_t* length);
#endif // MICROPY_INCLUDED_LIB_UTILS_BUFFER_HELPER_H

@ -49,7 +49,7 @@ void mp_keyboard_interrupt(void) {
// Check to see if we've been CTRL-C'ed by autoreload or the user.
bool mp_hal_is_interrupted(void) {
return MP_STATE_VM(mp_pending_exception) == MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception));
return MP_STATE_VM(mp_pending_exception) != NULL;
}
#endif

@ -103,9 +103,11 @@ STATIC void strn_print_strn(void *data, const char *str, size_t len) {
strn_print_env->remain -= len;
}
#if defined(__GNUC__) && !defined(__clang__)
#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9
// uClibc requires this alias to be defined, or there may be link errors
// when linkings against it statically.
// GCC 9 gives a warning about missing attributes so it's excluded until
// uClibc+GCC9 support is needed.
int __GI_vsnprintf(char *str, size_t size, const char *fmt, va_list ap) __attribute__((weak, alias ("vsnprintf")));
#endif

@ -131,7 +131,9 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
// at the moment, the value of SystemExit is unused
ret = pyexec_system_exit;
} else {
mp_obj_print_exception(&mp_plat_print, (mp_obj_t)nlr.ret_val);
if ((mp_obj_t) nlr.ret_val != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception))) {
mp_obj_print_exception(&mp_plat_print, (mp_obj_t)nlr.ret_val);
}
ret = PYEXEC_EXCEPTION;
}
}

File diff suppressed because it is too large Load Diff

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-04-17 11:24-0700\n"
"POT-Creation-Date: 2019-10-21 19:50-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -52,7 +52,7 @@ msgstr ""
msgid "%q indices must be integers, not %s"
msgstr ""
#: shared-bindings/bleio/CharacteristicBuffer.c
#: shared-bindings/_bleio/CharacteristicBuffer.c
#: shared-bindings/displayio/Group.c shared-bindings/displayio/Shape.c
msgid "%q must be >= 1"
msgstr ""
@ -217,14 +217,13 @@ msgstr ""
msgid "A hardware interrupt channel is already in use"
msgstr ""
#: shared-bindings/bleio/Address.c
#: shared-bindings/_bleio/Address.c
#, c-format
msgid "Address is not %d bytes long or is in wrong format"
msgid "Address must be %d bytes long"
msgstr ""
#: shared-bindings/bleio/Address.c
#, c-format
msgid "Address must be %d bytes long"
#: shared-bindings/_bleio/Address.c
msgid "Address type out of range"
msgstr ""
#: ports/nrf/common-hal/busio/I2C.c
@ -254,11 +253,16 @@ msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c shared-bindings/pulseio/PWMOut.c
#: shared-module/_pew/PewPew.c
msgid "All timers in use"
msgstr ""
#: ports/nrf/common-hal/_bleio/Adapter.c
msgid "Already advertising."
msgstr ""
#: ports/nrf/common-hal/analogio/AnalogOut.c
msgid "AnalogOut functionality not supported"
msgstr ""
@ -297,6 +301,10 @@ msgid ""
"disable.\n"
msgstr ""
#: shared-module/displayio/Display.c
msgid "Below minimum frame rate"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must share a clock unit"
msgstr ""
@ -309,6 +317,10 @@ msgstr ""
msgid "Both pins must support hardware interrupts"
msgstr ""
#: shared-bindings/displayio/Display.c
msgid "Brightness must be 0-1.0"
msgstr ""
#: shared-bindings/supervisor/__init__.c
msgid "Brightness must be between 0 and 255"
msgstr ""
@ -317,11 +329,29 @@ msgstr ""
msgid "Brightness not adjustable"
msgstr ""
#: shared-bindings/_bleio/UUID.c
#, c-format
msgid "Buffer + offset too small %d %d %d"
msgstr ""
#: shared-module/usb_hid/Device.c
#, c-format
msgid "Buffer incorrect size. Should be %d bytes."
msgstr ""
#: shared-bindings/displayio/Display.c
msgid "Buffer is not a bytearray."
msgstr ""
#: shared-bindings/displayio/Display.c
msgid "Buffer is too small"
msgstr ""
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#, c-format
msgid "Buffer length %d too big. It must be less than %d"
msgstr ""
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr ""
@ -332,7 +362,7 @@ msgstr ""
msgid "Bus pin %d is already in use"
msgstr ""
#: shared-bindings/bleio/UUID.c
#: shared-bindings/_bleio/UUID.c
msgid "Byte buffer must be 16 bytes."