Commit Graph

14673 Commits

Author SHA1 Message Date
Damien George
ff77dc567c Merge pull request #307 from iabdalkader/master
Fix usart_obj_tx_char
2014-02-17 22:17:56 +00:00
Paul Sokolovsky
4aee119f94 stm: Initialize sys.path with ["0:/", "0:/src", "0:/lib"].
This is compatible with what search path was before sys.path refactor,
with addition of module library path ("0:/lib").
2014-02-18 00:06:37 +02:00
mux
d0ffda91cc Fix usart_obj_tx_char 2014-02-17 21:49:07 +02:00
Damien George
f34947703a Merge pull request #303 from dhylands/fix-netduino-disc
Fix build for netduino and stm32f4disc
2014-02-17 09:48:53 +00:00
Damien George
70c56acafb Merge pull request #302 from pfalcon/readme-update
Update README to current state of affairs.
2014-02-17 09:47:27 +00:00
Dave Hylands
90928f1194 Fix build for netduino and stm32f4disc 2014-02-16 23:14:49 -08:00
Damien George
402dc31aa7 stm: Factor out GPIO code to its own file. Add functions to set GPIO mode.
GPIO functions are crude, and need to be replaced with better ones!
2014-02-16 23:44:23 +00:00
Paul Sokolovsky
c839584222 Update README to current state of affairs.
1. Invite x86 (32-bit) users.
2. Update interpreter name.
3. Update dependency install instructions.
2014-02-17 01:26:39 +02:00
Damien George
2abbae3419 stm: Rename mma -> accel. 2014-02-16 21:41:57 +00:00
Damien George
754a8dd827 stm: Put REPL functions in own file; add raw REPL mode.
Raw REPL mode is activated by CTRL-A, and allows you to more easily
communicate with the pyboard over the serial channel.  In particular,
automated communication using, eg, pyserial on the PC side.
2014-02-16 21:36:03 +00:00
Damien George
e4758ad2e2 Merge pull request #301 from pfalcon/full-kwargs
Support passing positional args as keywords to bytecode functions.
2014-02-16 21:14:50 +00:00
Paul Sokolovsky
ac2e28c654 Support passing positional args as keywords to bytecode functions.
For this, record argument names along with each bytecode function. The code
still includes extensive debug logging support so far.
2014-02-16 18:36:33 +02:00
Paul Sokolovsky
44739e280e Make DEBUG_printf() a proper function, implementation is port-dependent.
In particular, unix outputs to stderr, to allow to run testsuite against
micropython built with debug output (by redirecting stderr to /dev/null).
2014-02-16 18:20:49 +02:00
Paul Sokolovsky
1b694c082e Rename fun-kwargs.py -> fun-kwvarargs.py to free up slot for simple kw test. 2014-02-16 15:55:06 +02:00
Damien George
8bb11171da stm: Only define __packed if not already defined.
Addresses issue #299.
2014-02-16 11:24:44 +00:00
Paul Sokolovsky
5fd7bc3264 Propagate scope flags refactor to emitcpy.c. 2014-02-16 03:02:47 +02:00
Paul Sokolovsky
91ba7a54c5 builtinimport: Get the basic (and only basic) package imports work. 2014-02-16 02:55:46 +02:00
Paul Sokolovsky
d3783570a4 builtinimport.c: Recognize "namespace package" and error out as unsupported.
See http://www.python.org/dev/peps/pep-0420/#specification for spec. See
https://github.com/micropython/micropython/issues/298 for the discussion
of the implemented behavior.
2014-02-16 02:55:46 +02:00
Damien George
e5d371b545 py: Pass keyword arguments to byte code. 2014-02-16 00:17:42 +00:00
Damien George
2e482cdb7b py: Implement *vargs support.
Addresses issue #295.
2014-02-16 00:01:29 +00:00
Damien George
96056a6272 py: Revent some long int configuration. 2014-02-15 23:02:00 +00:00
Damien George
91f2dbf64c Merge branch 'master' of github.com:micropython/micropython 2014-02-15 22:56:25 +00:00
Damien George
c8f78bc280 py: VM never throws an exception, instead returns a status and value.
Addresses issue #290, and hopefully sets up things to allow generators
throwing exceptions, etc.
2014-02-15 22:55:00 +00:00
Paul Sokolovsky
ff4678c5b4 objexcept: Fix thinko with args to mp_obj_new_list().
First arg is not alloc size, but real size, so if used as
mp_obj_new_list(3, NULL), need to store items, not append.
2014-02-16 00:42:56 +02:00
Damien George
36109d246f Small change to configuration of long int. 2014-02-15 22:16:33 +00:00
Damien George
22a0865d54 py: Improve exception bases, reduces ROM usage.
Thanks to @pfalcon for the tip!
2014-02-15 21:05:25 +00:00
Damien George
8725f8f7de py: Pass all scope flags through to runtime. 2014-02-15 19:33:11 +00:00
Damien George
c5966128c7 Implement proper exception type hierarchy.
Each built-in exception is now a type, with base type BaseException.
C exceptions are created by passing a pointer to the exception type to
make an instance of.  When raising an exception from the VM, an
instance is created automatically if an exception type is raised (as
opposed to an exception instance).

Exception matching (RT_BINARY_OP_EXCEPTION_MATCH) is now proper.

Handling of parse error changed to match new exceptions.

mp_const_type renamed to mp_type_type for consistency.
2014-02-15 16:10:44 +00:00
Damien George
a71c83a1d1 Change mp_obj_type_t.name from const char * to qstr.
Ultimately all static strings should be qstr.  This entry in the type
structure is only used for printing error messages (to tell the type of
the bad argument), and printing objects that don't supply a .print method.
2014-02-15 11:34:50 +00:00
Paul Sokolovsky
8ac72b9d00 Add testcase for failing namespace switch throwing exception from a module.
Issue #290. This currently fails, to draw attention to the issue.
2014-02-15 12:44:29 +02:00
Damien George
9307ef46ca Merge pull request #291 from GordonMcGregor/osx_build
OS X compatible -map syntax for LDFLAGS
2014-02-14 23:08:29 +00:00
Damien George
aa9b74fead py: Fix IMPORT_STAR, needs to pop the stack. 2014-02-14 23:06:33 +00:00
Damien George
7ef098000a Merge pull request #288 from pfalcon/port-builtins
Allow ports to define statically builtin functions.
2014-02-14 23:05:50 +00:00
Damien George
25735ba6d3 Merge pull request #282 from pfalcon/from-star
Implement "from mod import *"
2014-02-14 23:00:09 +00:00
Gordon McGregor
3890ec48e7 OS X compatible -map syntax for LDFLAGS 2014-02-14 16:38:05 -06:00
Paul Sokolovsky
76f8cedb52 mp_binary_get_val(): Fix value type. 2014-02-15 00:30:03 +02:00
Paul Sokolovsky
60a0d3f1db objexcept: Fix a case of initialized object field. 2014-02-15 00:29:50 +02:00
Paul Sokolovsky
c203324e6c objarray: Refactor to use array accessors from binary.c . 2014-02-14 20:38:46 +02:00
Paul Sokolovsky
8bc3516389 ffi: Implement ffivar.get()/set() methods.
Done by introducing another factored out helper API in binary.c. This API
can be reused also by array and struct modules.
2014-02-14 20:38:35 +02:00
Paul Sokolovsky
910843e86d Allow ports to define statically builtin functions.
Convert unix open() to such.
2014-02-14 12:13:34 +02:00
Damien George
70d7a83c74 stm: If SD card inserted on hard reset, it is the medium for USB MSD. 2014-02-13 23:21:02 +00:00
Paul Sokolovsky
e7299b5296 Add testcase for "from module import *". 2014-02-14 00:30:36 +02:00
Paul Sokolovsky
b2e8c52298 Add testcase for "from module import sym". 2014-02-14 00:30:36 +02:00
Paul Sokolovsky
da1ce93da8 Implement "from module import *" construct. 2014-02-14 00:30:36 +02:00
Damien George
a8d404e0e1 Merge branch 'master' of github.com:micropython/micropython 2014-02-12 23:02:49 +00:00
Damien George
099a9cb575 Remove mp_obj_new_exception_msg_1_arg and _2_arg. 2014-02-12 23:02:19 +00:00
Paul Sokolovsky
2aa217b974 Implement full arg handling for exec(). 2014-02-13 00:36:54 +02:00
Damien George
780ba22bb8 stm: Copy COPT style from unix port. 2014-02-12 20:55:33 +00:00
Damien George
648d9e6447 Merge pull request #279 from pfalcon/make-copt
unix Makefile: Split off optimization options to COPT variable.
2014-02-12 20:53:00 +00:00
Paul Sokolovsky
5be1b2873b unix Makefile: Split off optimization options to COPT variable.
To allow easily try different optimization and configuration options
without patching any files.
2014-02-12 20:20:39 +02:00