Andrew Scheller
f78cfaf8b5
Remove exception name from inside the exception message
...
This prevents micropython printing exception messages like
ImportError: ImportError: No module named 'foo'
2014-04-09 19:56:38 +01:00
Damien George
2bf7c09222
py: Properly implement deletion of locals and derefs, and detect errors.
...
Needed to reinstate 2 delete opcodes, to specifically check that a local
is not deleted twice.
2014-04-09 15:26:46 +01:00
Damien George
11d8cd54c9
py, compiler: Turn id_info_t.param into a set of flags.
...
So we can add more flags.
2014-04-09 14:42:51 +01:00
Damien George
b140bff877
py, compile: Simplify initialisation of compiler structure.
2014-04-09 12:54:21 +01:00
Damien George
02a4c05c5f
py, compile: Reduce size of compiler structure.
2014-04-09 12:50:58 +01:00
Damien George
922ddd6415
py, compile: Combine have_star_arg, have_dbl_star_arg into star_flags.
...
Small reduction in ROM, heap and stack usage.
2014-04-09 12:43:17 +01:00
Damien George
78035b995f
py, compiler: Clean up and compress scope/compile structures.
...
Convert int types to uint where sensible, and then to uint8_t or
uint16_t where possible to reduce RAM usage.
2014-04-09 12:27:39 +01:00
Damien George
fc18c8e834
Merge branch 'master' of github.com:micropython/micropython
2014-04-09 02:32:00 +01:00
Damien George
a5c18f3285
stmhal: Update windows driver; \r\n newlines and addition USB id.
2014-04-09 02:23:24 +01:00
Paul Sokolovsky
03b9ad7b01
gc.c: Remove superfluous typedef (bute defined in misc.h).
2014-04-09 04:13:21 +03:00
Damien George
b99ca2cdde
stmhal: Add windows cdc .inf driver to flash filesystem.
2014-04-09 01:16:49 +01:00
Damien George
8e6f98b166
stmhal: Improve help() function.
2014-04-09 01:16:29 +01:00
Damien George
229347139b
stmhal: Add functionality to Servo object.
...
Can now calibrate, set pulse width, angle and speed.
2014-04-09 00:45:45 +01:00
Damien George
d9ec625d9a
Merge pull request #454 from dhylands/make-pins-multiple-named-pins
...
Fix make-pins.py to support having multiple names for a pin.
2014-04-09 00:34:41 +01:00
Dave Hylands
3bbceeaaf7
Fix make-pins.py to support having multiple names for a pin.
...
SW and X17 now both map to PB3
2014-04-08 15:45:47 -07:00
Paul Sokolovsky
2ee7304cb8
README: Python is required during build process unconditionally.
...
Fixes #449 .
2014-04-09 01:39:50 +03:00
Damien George
88d7bba961
py: Make it so that printing a small int does not allocate heap memory.
...
With the implementation of proper string formatting, code to print a
small int was delegated to mpz_as_str_inpl (after first converting the
small int to an mpz using stack memory). But mpz_as_str_inpl allocates
heap memory to do the conversion, so small ints needed heap memory just
to be printed.
This fix has a separate function to print small ints, which does not
allocate heap, and allocates less stack.
String formatting, printf and pfenv are now large beasts, with some
semi-duplicated code.
2014-04-08 23:30:46 +01:00
Damien George
803b9263ab
Merge branch 'master' of github.com:micropython/micropython
2014-04-08 23:11:51 +01:00
Damien George
eec91057b8
py: Add comment mpz function, and free memory used for string printing.
2014-04-08 23:11:00 +01:00
Paul Sokolovsky
a985b4593d
objint: Implement int.from_bytes() class method and .to_bytes() method.
...
These two are apprerently the most concise and efficient way to convert
int to/from bytes in Python. The alternatives are struct and array modules,
but methods using them are more verbose in Python code and less efficient
in memory/cycles.
2014-04-09 01:07:37 +03:00
Paul Sokolovsky
3aa8ee7c9e
py: Add mp_get_buffer(), mp_get_buffer_raise() convenience functions to API.
2014-04-09 01:07:37 +03:00
Damien George
2b0091983f
tests: Oops: fix del-attr.
2014-04-08 23:02:24 +01:00
Damien George
b04488151e
stmhal: Make USRSW re-register the EXTI callback each time it's set.
2014-04-08 22:35:42 +01:00
Damien George
348435d279
py: Reinstate old pfenv_print_int function for stmhal's printf.
2014-04-08 22:10:37 +01:00
Damien George
a9837bbf8b
py: Remove obsolete mp_delete_subscr declaration.
2014-04-08 22:06:31 +01:00