<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openmano-mpy/py, branch master</title>
<subtitle>MicroPython source and hardware configuration for OpenMano</subtitle>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/'/>
<entry>
<title>py/dynruntime.h: Add mp_obj_get_array() function.</title>
<updated>2021-04-27T14:06:46+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-04-23T23:18:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=c5cbfd545ab436ef526e7fce7fafab89ac1b69f8'/>
<id>c5cbfd545ab436ef526e7fce7fafab89ac1b69f8</id>
<content type='text'>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>py: Add option to compile without any error messages at all.</title>
<updated>2021-04-27T13:51:52+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-04-22T02:13:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=d4b706c4d01377d42855ff1544ced77536f69caf'/>
<id>d4b706c4d01377d42855ff1544ced77536f69caf</id>
<content type='text'>
This introduces a new option, MICROPY_ERROR_REPORTING_NONE, which
completely disables all error messages.  To be used in cases where
MicroPython needs to fit in very limited systems.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This introduces a new option, MICROPY_ERROR_REPORTING_NONE, which
completely disables all error messages.  To be used in cases where
MicroPython needs to fit in very limited systems.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>py/objexcept: Support errno attribute on OSError exceptions.</title>
<updated>2021-04-23T12:03:46+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-04-20T07:11:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=3c4bfd1dec28ffbefc6379dedeaa24feaa2ef373'/>
<id>3c4bfd1dec28ffbefc6379dedeaa24feaa2ef373</id>
<content type='text'>
This commit adds the errno attribute to exceptions, so code can retrieve
errno codes from an OSError using exc.errno.

The implementation here simply lets `errno` (and the existing `value`)
attributes work on any exception instance (they both alias args[0]).  This
is for efficiency and to keep code size down.  The pros and cons of this
are:

Pros:
- more compatible with CPython, less difference to document and learn
- OSError().errno will correctly return None, whereas the current way of
  doing it via OSError().args[0] will raise an IndexError
- it reduces code size on most bare-metal ports (because they already have
  the errno qstr)
- for Python code that uses exc.errno the generated bytecode is 2 bytes
  smaller and more efficient to execute (compared with exc.args[0]); so
  bytecode loaded to RAM saves 2 bytes RAM for each use of this attribute,
  and bytecode that is frozen saves 2 bytes flash/ROM for each use
- it's easier/shorter to type, and saves 2 bytes of space in .py files that
  use it (for each use)

Cons:
- increases code size by 4-8 bytes on minimal ports that don't already have
  the `errno` qstr
- all exceptions now have .errno and .value attributes (a cpydiff test is
  added to address this)

See also #2407.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds the errno attribute to exceptions, so code can retrieve
errno codes from an OSError using exc.errno.

The implementation here simply lets `errno` (and the existing `value`)
attributes work on any exception instance (they both alias args[0]).  This
is for efficiency and to keep code size down.  The pros and cons of this
are:

Pros:
- more compatible with CPython, less difference to document and learn
- OSError().errno will correctly return None, whereas the current way of
  doing it via OSError().args[0] will raise an IndexError
- it reduces code size on most bare-metal ports (because they already have
  the errno qstr)
- for Python code that uses exc.errno the generated bytecode is 2 bytes
  smaller and more efficient to execute (compared with exc.args[0]); so
  bytecode loaded to RAM saves 2 bytes RAM for each use of this attribute,
  and bytecode that is frozen saves 2 bytes flash/ROM for each use
- it's easier/shorter to type, and saves 2 bytes of space in .py files that
  use it (for each use)

Cons:
- increases code size by 4-8 bytes on minimal ports that don't already have
  the `errno` qstr
- all exceptions now have .errno and .value attributes (a cpydiff test is
  added to address this)

See also #2407.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>all: Bump version to 1.15.</title>
<updated>2021-04-18T14:11:51+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-04-18T14:11:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=321d1897c34f16243edf2c94913d7cf877a013d1'/>
<id>321d1897c34f16243edf2c94913d7cf877a013d1</id>
<content type='text'>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>py/runtime: Make sys.modules preallocate to a configurable size.</title>
<updated>2021-04-12T12:36:16+00:00</updated>
<author>
<name>matejcik</name>
</author>
<published>2021-03-22T10:20:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=1a2ffda175bb5842617841362b2df40d7cfa97dd'/>
<id>1a2ffda175bb5842617841362b2df40d7cfa97dd</id>
<content type='text'>
This allows configuring the pre-allocated size of sys.modules dict, in
order to prevent unwanted reallocations at run-time (3 sys-modules is
really not quite enough for a larger project).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows configuring the pre-allocated size of sys.modules dict, in
order to prevent unwanted reallocations at run-time (3 sys-modules is
really not quite enough for a larger project).
</pre>
</div>
</content>
</entry>
<entry>
<title>py/profile: Resolve name collision with STATIC unset.</title>
<updated>2021-04-12T12:31:42+00:00</updated>
<author>
<name>matejcik</name>
</author>
<published>2021-04-09T13:28:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=b26def0644b7f4c01cf616a24b6fe18f0737ebb6'/>
<id>b26def0644b7f4c01cf616a24b6fe18f0737ebb6</id>
<content type='text'>
When building with STATIC undefined (e.g., -DSTATIC=), there are two
instances of mp_type_code that collide at link time: in profile.c and in
builtinevex.c.  This patch resolves the collision by renaming one of them.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When building with STATIC undefined (e.g., -DSTATIC=), there are two
instances of mp_type_code that collide at link time: in profile.c and in
builtinevex.c.  This patch resolves the collision by renaming one of them.
</pre>
</div>
</content>
</entry>
<entry>
<title>py/py.cmake: Introduce MICROPY_INC_CORE as a list with core includes.</title>
<updated>2021-04-09T03:08:35+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-04-08T14:59:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=5dcc9b3b16cf6a27acf01bdf8a7d23ae2aff56e3'/>
<id>5dcc9b3b16cf6a27acf01bdf8a7d23ae2aff56e3</id>
<content type='text'>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>py/py.cmake: Move qstr helper code to micropy_gather_target_properties.</title>
<updated>2021-04-09T03:08:35+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-04-08T13:42:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=0fabda31de33b38c6858925d9195731deba6f54a'/>
<id>0fabda31de33b38c6858925d9195731deba6f54a</id>
<content type='text'>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rp2: Add support for USER_C_MODULES to CMake build system.</title>
<updated>2021-03-30T13:26:01+00:00</updated>
<author>
<name>Phil Howard</name>
</author>
<published>2021-02-23T22:57:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=0cf12dd59c9ddddbd602d4267410033cb5a9d265'/>
<id>0cf12dd59c9ddddbd602d4267410033cb5a9d265</id>
<content type='text'>
The parts that are generic are added to py/ so they can be used by other
ports that use CMake.

py/usermod.cmake:

* Creates a usermod target to hang user C/CXX modules from.
* Gathers sources from user C/CXX modules and libs for QSTR scan.

ports/rp2/CMakeLists.txt:

* Includes py/usermod.cmake.
* Links the resulting usermod library to the MicroPython target.

py/mkrules.cmake:

Add cxxflags to qstr.i.last custom command for CXX modules:

* MICROPY_CPP_FLAGS so CXX modules will find includes.
* -DNO_QSTR to fix fatal error missing "genhdr/qstrdefs.generated.h".

Usage:

The rp2 port can be linked against user C modules by running:

make USER_C_MODULES=/path/to/module/micropython.cmake

CMake will print a list of included modules.

Co-authored-by: Graham Sanderson &lt;graham.sanderson@raspberrypi.org&gt;
Co-authored-by: Michael O'Cleirigh &lt;michael.ocleirigh@rivulet.ca&gt;
Signed-off-by: Phil Howard &lt;phil@pimoroni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The parts that are generic are added to py/ so they can be used by other
ports that use CMake.

py/usermod.cmake:

* Creates a usermod target to hang user C/CXX modules from.
* Gathers sources from user C/CXX modules and libs for QSTR scan.

ports/rp2/CMakeLists.txt:

* Includes py/usermod.cmake.
* Links the resulting usermod library to the MicroPython target.

py/mkrules.cmake:

Add cxxflags to qstr.i.last custom command for CXX modules:

* MICROPY_CPP_FLAGS so CXX modules will find includes.
* -DNO_QSTR to fix fatal error missing "genhdr/qstrdefs.generated.h".

Usage:

The rp2 port can be linked against user C modules by running:

make USER_C_MODULES=/path/to/module/micropython.cmake

CMake will print a list of included modules.

Co-authored-by: Graham Sanderson &lt;graham.sanderson@raspberrypi.org&gt;
Co-authored-by: Michael O'Cleirigh &lt;michael.ocleirigh@rivulet.ca&gt;
Signed-off-by: Phil Howard &lt;phil@pimoroni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>py: Rename remaining object types to be of the form mp_type_xxx.</title>
<updated>2021-03-26T02:48:34+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-03-26T02:48:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=9fef1c0bde2f9642d383bd56aa112447384a84ba'/>
<id>9fef1c0bde2f9642d383bd56aa112447384a84ba</id>
<content type='text'>
For consistency with all other object types in the core.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For consistency with all other object types in the core.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
