Skip to content

Tags: wasp-os/micropython

Tags

wasp-os-0.4

Toggle wasp-os-0.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #2 from fgaz/adc-acqtime

Set ADC ACQTIME to 40us

zephyr-basic

Toggle zephyr-basic's commit message
zephyr: Switch to microkernel, required for network to work in backgr…

…ound.

v1.4.5

Toggle v1.4.5's commit message
Lots of additions and improvements; support for STM32F2 and F7 MCUs.

py core:
- make showbc decode UNPACK_EX, and use correct range for unop/binop
- use wrapper to check self argument of builtin methods, to prevent seg faults
- remove mp_load_const_str and replace uses with inlined version
- remove mp_load_const_bytes and instead load precreated bytes object
- improve mp_import_name() debug logging
- catch case when relative import happens without active package
- fix running package submodule with -m
- add TimeoutError exception subclassed from OSError
- allow to build with debugging and bytearray but no array
- modstruct: Raise NotImplementedError for unsupported repeat specification
- REPL: Fix case where shorter names are shadowed by longer names
- prevent many extra vstr allocations by preallocating room for null byte
- improve allocation policy of qstr data (saves RAM)
- modbuiltins: Implement round() to precision
- make qstr hash size configurable, defaults to 2 bytes
- implement memoryview slice assignment, eg m1[0:3] = m2[2:5]
- viper: allow functions to take up to 4 arguments
- vipre: issue an error when compiling functions with more than 4 args
- raise SyntaxError when str hex escape sequence is malformed
- fix handling of parsing empty input so it raises an exception
- viper: compile errors now have traceback with function and filename
- REPL: don't look inside strings for unmatched brackets/quotes
- give more precise line number for compile errors (incl viper functions)
- make list += accept all arguments and add test
- makeversionhdr.py: Fallback to using docs version if no git repo

extmod:
- ubinascii: add a2b_base64 and b2a_base64 functions
- machine: implement physical memory access using /dev/mem (Linux, etc)

lib:
- readline: add emacs control chars for cursor movement (disabled by default)

drivers:
- onewire: fix ds18x20.read_temp so it works when no rom given

tools:
- update upip to 0.5.4: recognize and handle "package not found" error
- make-frozen.py: make Python2 compatibile
- pydfu.py: fix to work with old and new versions of PyUSB
- pyboard.py: fix parsing of returned error so last chr is not lost
- pyboard.py: make enter_raw_repl stricter and more reliable
- pyboard.py: speed up reading of chars by decreasing sleep period
- pyboard.py: add telnet support
- pyboard.py: make Python2 compatible

tests:
- add testcase for open(..., "a")
- adapt basics/memoryerror.py for ports with lower heap sizes
- adapt misc/features.py tests for ports without floating point
- add support for the WiPy in run-tests script (use --target to specify it)
- split out json float tests to separate files
- add test for relative import without package context
- skip parser test if "compile" builtin is not available
- use PTY when running REPL tests
- add test for pyboard SPI in slave mode, recv with no master
- test REPL emacs keys, but only if present
- always use forward slashes for paths (for Windows tests)
- fix exceptions when running cmdline tests on Windows
- Remove over-specification of startup banner

unix port:
- add O_WRONLY | O_CREAT to open call when opening file for append ("a")
- socket.getaddrinfo: accept family & socktype arguments
- socket.getaddrinfo: port is unsigned value
- modsocket: implement sendto(), recvfrom(), inet_pton()
- set MICROPY_PY_SYS_PLATFORM to "darwin" if compiled on OSX

stmhal port:
- modify dma_init() to accept init struct as an argument, making it more generic
- add config option for storage to use second flash segment (disable by default)
- add I2S support to make-pins.py
- add qstr definition for ifconfig when building for WizNet
- move HAL Cube files to f4/ subdir, keeping only those we use
- add STM32CubeF2 version 1.1.0, in hal/f2 directory
- add CMSIS device header files for STM32F2xx series
- allow DAC.write_timed to take Timer object in place of freq
- allow ADC.read_timed to take Timer object in place of freq
- check if user block device is mounted before accessing it
- put fs_user_mount pointer in root ptr section of global state (fixes crash)
- add hal and cmsis files from STM32Cube_FW_F7_V1.1.0
- add STM32F7DISC support
- factor out USRSW boot-up code and support boards with 1 LED
- factor GPIO clock enable logic into mp_hal_gpio_clock_enable
- add capability to print out info about a hard fault (disabled by default)
- fix make-pins.py to allow Port K
- add better support for UART having Tx and Rx on different ports
- add support for USART1 and conditional pins in make-pins.py
- add STM32F7 support for USB serial and storage
- enable I2C support for F7 MCUs
- enable SPI support for F7 MCUs
- fix hardfault when configured as a SPI slave
- generate modstm constants per build

cc3200 port:
- in Timer.callback() only use value param if in edge count mode
- create tools folder and add update-wipy.py script
- add deploy target and improve robustness of update-wipy.py
- enable more features to improve compatibility with stmhal
- add `Pin.name()` method
- adapt update-wipy.py timing to improve stability
- correct socket settimeout time format
- add CA, certificate and key files to the updater list
- add socket.timeout and socket.error exceptions
- raise an exception if trying to scan for networks in AP mode
- optimize check for WLAN AP mode
- set WLAN date/time via the rtc.datetime method()
- add modussl, ssl sockets subclassed from normal sockets
- time.sleep() now receives seconds, like CPython
- fix socket recv and recvfrom return value type
- enable base64 methods from modubinascii
- increment interrupt stack size from 2K to 3K
- create /flash/sys and /flash/lib directories while booting
- translate simplelink's socket error numbers to POSIX values
- use alternative HAL_Delay also when interrupts are disabled
- correct udelay us to ticks calculation
- increment telnet Tx retry delay on every try
- add struct weak link for ustruct
- set simplelink time and date when enabling WLAN
- refactor and clean-up socket closing code
- implement new OTA mechanism with 2 firmware update slots
- create /flash/cert folder if it doesn't exist
- make socket stream methods return POSIX error codes
- add socket.sendall() (aliases to send())
- rename pins from GPIO to just GP
- add socket.makefile()
- switch to 1 byte hash for QSTRs
- on ssl.read() or ssl.readall() ignore ssl layer closed error
- append last 2 bytes of the MAC address to the default SSID
- make I2C and SPI API the same as in stmhal
- add nic.iwconfig() to set/get WLAN configuration
- improve support for WEP security
- enable bootloader safe boot on latest firmware
- fix bug in ffconf regarding '/flash' string length
- add script to program the WiPy via UniFlash (windows only...)
- add factory smoke test as part of the tools
- speed up file system checking during start-up
- on the first boot, always make AP ssid='wipy-wlan'
- make ADC API compatible with the pyboard

esp8266 port:
- move scan() from esp module to network
- update the README.md to reflect what works
- move status() from esp module to network
- make pyb.RTC a type, and pyb.RTC() constructs an RTC object
- allow to easily override programming baudrate

docs:
- add more documentation for the CC3200 in the pyb module
- add "reference" directory for putting docs about the language
- add reference for Thumb2 inline assembler
- make index link point to "index.html" irrespective of port
- fix duplicate label error for network.WLAN
- update safe boot comments to match actual behaviour
- update pyb.Accel doc to reflect changes and explain filtered_xyz
- correct nic.ifconfig() quickref example
- add i2c keywork arguments only indication

v1.4.4

Toggle v1.4.4's commit message
Unix binary gets tab completion and builtin upip, and more.

py core:
- allow to compile without needing git to extract version
- conform to CPython's way of printing nan/inf with padding
- wrap qstr defs in quotes to protect from C preprocessor
- add stack check to mp_iternext to catch nested iterators
- implement implicit cast to obj for viper load/store index/value
- implement native multiply operation in viper emitter
- expose KeyboardInterrupt in builtins module
- fallback to stack alloca for Python-stack if heap alloc fails
- support unicode (utf-8 encoded) identifiers in Python source
- implement second arg for math.log (optional value for base)
- support mpz bignums in divmod builtin

extmod:
- add ubinascii.unhexlify
- swap address and descriptor args in uctypes constructor

lib:
- fix some issues with dates prior to 1 Mar 2000
- implemente delete key in readline

tools:
- pyboard.py: allow pyboard constructor to take a baudrate parameter
- pyboard.py: change logic for when raw ">" prompt is parsed
- add codestats.sh to compute code statistics such as size, speed

unix port:
- add option to use uPy readline and enable by default (adds tab completion)
- include upip as frozen module within standard uPy executable; standard
  way to use is: micropython -m upip install <module>
- allow to cat a script into stdin from the command line
- make micropython -m <module> work for frozen modules

windows port:
- implement mp_hal_xxx functions and enable uPy readline

stmhal port:
- raise error if disk is full when writing a file
- implement sys.stdin.buffer, sys.stdout.buffer for raw byte mode
- remove all PYBVxx defines and use general config vars instead
- add support for UART5 if MCU has it
- fix slow SPI DMA transfers by removing wfi from DMA wait loop
- break immediately from USB CDC busy wait loop if IRQs disabled
- make I2C transfers use DMA when possible (when IRQs are enabled)

cc3200 port:
- add os.rename()
- add Timer module
- add uhashlib with SHA1 and SHA256
- add ubinascii module
- implement full set of wake-on-WLAN features
- remove NIC abstraction layer
- improve WDT
- make peripheral API more similar to stmhal's
- improve reliability of ftp and telnet servers
- add antenna selection feature to WLAN
- add sendbreak method to UART

esp8266 port:
- add uos module
- allow to set CPU frequency to 160MHz using pyb.freq
- add pyb.ADC class
- to esp module add: mac, phy_mode, sleep_type, deepsleep, flash_id
- update SDK to version 1.1.0 (MIT licensed)
- fix lost chars when transfering large amounts of data over UART
- add skeleton "network" module with bare WLAN() constructor
- add WLAN.connect/disconnect functions
- change esp_scan to keep the current WiFi operating mode

docs:
- document esp module
- allow to generate separate docs for each port (using ..only directive)
- add initial docs for the WiPy

v1.4.3

Toggle v1.4.3's commit message
Tab autocompletion, and various improvements and bug fixes.

py core:
- add attrtuple for space efficient tuples with attr access
- add sys.implementation, with uPy name and version number
- fix printing of "inf" and "nan" values
- native: fix stack adjustment when erroring on binary op
- mpz: fix bug with shl not truncating zero digits correctly
- modify "with" implementation so it doesn't use any heap
- add sys.exc_info()
- implement conversion of bignum to bytes
- implement struct.pack with 'q' and 'Q' args on 32-bit archs
- replace py-version.sh with makeversiohdr.py, written in Python
- implement tab autocompletion for REPL
- rename struct module to ustruct
- add NotImplemented builtin constant
- handle user instance hash based on Python adhoc rules
- fix naming of function arguments when function is a closure
- fix printing of complex numbers with nan/inf

extmod:
- add machine module, with mem8, mem16, mem32 objects

lib:
- move common mod_network_* functions to lib/netutils
- move common time functions to lib/timeutils

tools:
- pyboard.py: add "--follow" option to wait for output indefinitely
- add script to install "upip" package manager

tests:
- add more viper tests, including for ViperTypeError
- coverage at 94%

unix port:
- modffi: support passing float/double args
- add special function to coverage build to improve coverage
- print unhandled exceptions to stderr

stmhal port:
- implement os.uname()
- reset timer counter to zero after changing auto reload
- properly disable unhandled timer interrupts
- automatically reenable IRQs when code drops to the USB REPL
- allow to configure UART pins completely via mpconfigboard.h
- make raw REPL work with event-driven version of pyexec
- add rtc.calibration() method to get/set RTC fine-tuning value
- add os.rename()
- add readinto() and readlines() methods to sys.stdin and pyb.USB_VCP

cc3200 port:
- add WiPy specific info to README.md
- fix byte order in MAKE_SOCKADDR and UNPACK_SOCKADDR
- select NIC when the socket is created
- add delays to allow ftp and telnet servers to start/stop
- make telnet login work with Tera Term
- implement os.uname()
- make WLAN scan results a list of attrtuples
- make WLAN.isconnected() also work in AP mode
- implement Sleep.wake_reason()
- make WLAN.ifconfig() return an attrtuple
- enable MICROPY_MODULE_WEAK_LINKS

esp8266 port:
- export station status() constants
- add esp.socket class, with ESP-style socket functionality
- add raw REPL support and working soft reset
- fix garbage collector by hard-coding stack end address
- add socket.onsent() callback support
- add support for frozen modules
- implement time functions
- add utime and pyb.RTC
- add module weak links

docs:
- document pyb.stop, pyb.standby, pyb.RTC.wakeup
- document USB_VCP read* and write methods

v1.4.2

Toggle v1.4.2's commit message
Improved native codegen, better printf, support for F401 and F411 MCUs.

py core:
- implement delete for property and descriptors
- add option to disable "enumerate" and "reversed" builtins
- can call functions with *args in native emitter
- implement full function arg passing for native emitter
- combine load_attr and store_attr internal type methods into one
- fix formatting of floating point numbers near 1.0
- support assignment of bytes to bytearray slices
- overhaul and simplify printf/pfenv mechanism
- fix builtin ord so that it can handle bytes values >= 0x80
- inlinethumb: add support for core floating point instructions
- make viper code generator raise ViperTypeError on error

lib:
- string0.c now in lib/libc/ (was in stmhal/)
- fatfs code size reduced (by 768 bytes on Thumb2 archs)

tests:
- more tests for builtins
- tests for lexer
- coverage increased to 93%

stmhal:
- make LED object print LED(x) for consistency with constructor
- in USB HID driver, make polling interval configurable
- allow sending CAN messages with timeout=0
- add support for sending and receiving CAN RTR messages
- make board parameters more configurable (HSE PLL, LED4, TIMs, etc)
- add support for F401 and F411 MCUs
- add support for Espruino Pico board
- make raw REPL mode 8-bit clean

cc3200 port:
- enable pull-ups for stdio UART pins
- enable long filename support in fatfs
- add WLAN.config_ip(), to assign a static IP
- add IPPROTO_SEC so secure sockets can be made

tools:
- make pyboard.py 8-bit clean, so it works with unicode chars

docs:
- document pyb.main() function

v1.4.1

Toggle v1.4.1's commit message
Stackless support, new 16-bit PIC port.

py core:
- builtin round() accepts second arg
- add more special methods: __pos__, __neg__, __invert__
- support for stackless Python calls in VM, strict and non-strict
- support for object representation that suits 16-bit archs
- implement closures in native code emitter
- implement str.splitlines() method

lib:
- fatfs library upgraded to R0.11 (fixes bugs with unlink)

pic16bit port:
- new port to 16-bit PIC (reference MCU is dsPIC33J256GP506)
- heap is 4600 bytes
- implement basic pyb module with delay
- implement basic LED and Switch classes

docs:
- initial docs for micropython module
- additional example for Timer callback usage
- document instantiating struct objects in uctypes

v1.4

Toggle v1.4's commit message
More Python features, reduced code size, coverage testing at 91%.

py core:
- add builtin setattr function
- optimise exceptions for out-of-memory scenario
- add some special methods: __mul__, __floordiv__, __truediv__
- implement array slice assignment
- add support for start/stop/step attrs in range object
- make builtin abs work with bools and bignums
- add basic implementation of collections.OrderedDict
- add support for a function's __name__
- refactor compiler code to reduce code size by up to 2k
- support for descriptors __get__ and __set__

inline Thumb2 assembler:
- more robust syntax checking
- general bug fixes
- better error messages
- add "it" instructions
- add bl, bx instructions
- add bcc_n, bcc_w instructions

extmod:
- modure: bug fixes for groups
- modure: add named classes

lib:
- libm: add erf, erfc, lgamma, tgamma

drivers:
- add onewire driver in pure Python
- add ds18x20 temp sensor driver, using onewire
- cc3100 driver upgraded to v1.1.0

tests:
- lots of new tests, including many for SyntaxError
- automated covage testing using coveralls, at 91% coverage

unix port:
- support for readline history saving to file

stmhal port:
- usbdev code cleanup
- add Python-configurable USB HID mode
- add CDC only USB option
- improve USB descriptors (untested on Windows and Mac)
- add UART.sendbreak() method to send break condition
- add support for CAN rx callbacks
- raise error if UART can't do requested baudrate within 5%
- fix timing init when callback is passed as argument to init
- add support for quadrature encoder mode in TimerChannel
- fix ADC.read_timed so buffer store respects element size
- add RTC.wakeup method to set wakeup timer (preliminary)
- add compile-time config option for RTC to use LSE or LSI
- bug fix related to unhandled channel interrupts
- improved support for stop and standby mode
- expose all PYBv1.0 pins, including SD and USB pins
- optimise ADC.read_timed so it can sample at up to 750kHz
- make pybstdio code usable by other ports

cc3200 port:
- add I2C module
- add ADC module
- add SD module
- support for connecting to WEP secured networks
- add WDT support
- add low power support
- add SPi module

esp8266 port:
- add basic pyb.Pin class

miscellaneous:
- add list of Kickstarter backers in ACKNOWLEDGEMENTS file

size difference in bytes to previous version (a negative value means
binary is smaller in this version):
- bare-arm: -2448
- minimal: -3028
- unix: +574
- stmhal: +7996
- cc3200: -2984
- teensy: -10560
- esp8266: -936
- qemu-arm: -844

v1.3.10

Toggle v1.3.10's commit message
Bug fixes, CC3200 port, improved inline assembler

py core:
- big-int bug fixes
- support for floats in struct module
- vstr no longer null-terminates buff by default
- properly handle CR/LF in triple-quoted string
- list.sort now has O(log(N)) stack usage
- parse big-int/float constants directly in parser
- allow to subclass native buffer objects
- reduce stack size of VM by 8 bytes on stmhal, 16 on x86
- add ldrex, strex, push, pop, sdiv, udiv, clz, rbit to inline assembler
- make inline assembler report line numbers on error

extmod:
- uzlib: raw deflate decoding support

unix port:
- add "coverage" makefile target for coverage testing

stmhal port:
- bug fixes in ADCAll object
- bug fix in timer.deinit

esp8266 port:
- add esp module
- add connect, disconnect, status functions

cc3200 port:
- new port to the CC3200 launchxl board

v1.3.9

Toggle v1.3.9's commit message
Internal changes, RAM and ROM reductions, new minimal port

py core:
- lots of small optimisations, cleanups and code size reduction
- move away from Plan 9 headers to traditional guarded ones
- improved and optimised float to int conversion
- fix right-shifting edge cases in mpz
- namedtuple: use sequence of strings for init
- namedtuple: allow keyword arguments in constructor
- ability to issue compile/runtime warnings
- str.format now has kwargs support
- put all global state togther in a state structure
- optimisation to cache map lookup results in bytecode
- fix handling of "0" in some mpz functions
- implement equality check for all types
- add qstr cfg capability
- can now configure qstr len storage; defaults to using 1 byte
- allow code to compile with lots more warnings enabled
- add LOAD_CONST_OBJ bytecode, to directly load Python objects
- never intern data of large str/bytes objects
- fix handling of default except in compiler
- add extra pass to bytecode compiler to compute stack size
- implement very simple frozen modules support
- implement __reversed__ slot
- implement proper re-raising in native codegen's finally handler

lib:
- move readline code from stmhal to lib/mp-readline/
- readline refactored to support event-driven usage
- add frexp and modf to libm

minimal port:
- new port, intended to represent minimal working code

stmhal port:
- collect root pointers together; improves GC speed
- add MICROPY_HW_USB_VBUS_DETECT_PIN option
- add MICROPY_HW_USB_OTG_ID_PIN option
- add support for FEZ Cerb40 II board
- bug fixes in network module and usocket.accept, setsockopt

qemu-arm port:
- enable GC and native code-gen
- add working tests
- get tests running under Travis CI

esp8266 port:
- use dedicated heap allocated as static array
- implement task-based, event-driven interface with UART
- implement pyb.hard_reset()