core.zerynth.stdlib and core.zerynth.compiler r1.0.2


a quick update is out. Update the compiler and it will bring in the new stdlib and all the new virtual machines.

Here is the list of features/bugfixes:

  • DAC for Sam3X mcus
  • Threading lib fixes (queue, conditions and threads now work as expected)
  • Debounce time for onPinRise and onPinFall. This should fix the problem with noisy signals on pins triggering interrupts (check the documentation and the examples)
  • Better handling of lists and tuples: now you are not limited to 256 elements when declaring a list in code.
  • Byte literals: no need to create bytes or bytearrays from tuples/lists. You can now write things like x = b’\xff\xff’ 
  • Inline if: support for expressions like x = 0 if y else 1
  • Added documentation for builtin methods of sequences and maps: here
  • String formatting with modulo operator (%)
  • Documentation of internal flash layout for each board (check the supported board docs), so you can choose where to write with the flash module
  • new Spi module approach: it is now suggested to inherit from spi.Spi for each driver using Spi. When selecting and unselecting slaves, the Spi class takes care of also unselecting the CS pins of all instances sharing the same bus. .start() and .stop() methods are now deprecated and have been left there just to ease the switch to the new Spi.
  • renamed lib.broadcom.bcm43362 to the correct namespace (thanks @kenr)

After this update if I import mcu I get this:

“in env\core\official\stdlib\ at line 35: SyntaxError: Unknown name -> __mcuuid"

This is my file:

… module:: mcu


This module enables the access to low level microcontroller functionalities like:

* unique identifiers
* flash layout
* watchdogs
* eeprom
* soft reset

The current version supports soft reset only.


def reset():
… function:: reset()

Restart the microcontroller.

… function:: uid()

Return a bytes object containing the unique id of the mcu


uid = __mcuuid


Hello matrix866, which board are using? This issue could be related to an outdated VM.