Damien George
2d45429122
Use memcpy instead of strncpy; add usart.status to stm.
11 years ago
Damien George
004cdcebfe
py: Implement base class lookup, issubclass, isinstance.
11 years ago
Damien George
062478e66d
Improved type/class/instance code; mp_obj_type_t now has load_attr, store_attr.
Creating of classes (types) and instances is much more like CPython now.
You can use "type('name', (), {...})" to create classes.
11 years ago
mux
e78e2dd305
Fix Makefile typo
11 years ago
mux
74269f86b9
Add DEBUG flag to Makefile
* Add a DEBUG flag to Makefile, enables: "-O0 -ggdb"
11 years ago
mux
c70ac7bf71
Add USART Micro Python Bindings
* Add Micro Python bindings to usart.c
* Export USART python object to namespace pyb
11 years ago
Dave Hylands
4646801181
Make build output quieter.
Use make V=1e make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
This should fix issue #117
11 years ago
Damien George
38a2da68c2
py: Stuff qstr in object pointer; keys for mp_map_t are now always mp_obj_t.
11 years ago
Dave Hylands
c1db58799d
Update stm/Makeile to use OBJCOPY and SIZE macros
While updating the teensy Makfile, I noticed that the stm Makefile
was using calling arm-none-eabi-objcopy and size rather than
$(OBJCOPY) and $(SIZE), so I added these 2 for consistency.
11 years ago
Damien George
9193f89296
Move lexerstr to main py directory (everyone uses it).
11 years ago
mux
5df3d47ee0
Use LSI OSC for RTC clock when LSE is not detected
* Fix rtc_init to use LSI for RTC clock source when LSE is not detected.
11 years ago
Dave Hylands
9b7b947b01
Updated teensy to use common code from stm directory.
Updated mconfigport.h to enable GC
11 years ago
John R. Lenton
9c83ec0eda
Merge remote-tracking branch 'upstream/master' into dict_feats
11 years ago
Damien George
e3096172c9
stm: Re-fix LED defines.
11 years ago
mux
b59fa2da28
Fix LED pin enum
* Fix LED pin enum, first one should start at 1
* Fix LED initialization typo
11 years ago
Damien George
d3ebe4829d
Factor and simplify Makefile's and mpconfig, part 2.
11 years ago
Damien George
136f67523b
Factor and simplify Makefile's and mpconfig.
11 years ago
Damien George
ff07bb3adb
stm: Re-fix LED defines.
11 years ago
ian-v
5fd8fd2c16
Revert MP_BOOL, etc. and use <stdbool.h> instead
11 years ago
ian-v
7a16fadbf8
Co-exist with C++ (issue #85 )
11 years ago
mux
7c0c28dd71
Fix LED pin enum
* Fix LED pin enum, first one should start at 1
* Fix LED initialization typo
11 years ago
Damien George
6b0b4a0cad
stm: pull-up usr switch on pyboard (fixes regression).
11 years ago
Paul Sokolovsky
860ffb0a43
Convert many object types structs to use C99 tagged initializer syntax.
11 years ago
mux
50d5420deb
Add Initial Support for STM32F4DISCOVERY Board
* Add a TARGET definition to Makefile (default PYBOARD).
* Add support for discovery LEDs in led module.
* Add support for discovery user switch in usersw
* Add EXTI interrupt handler for discovery user switch on (PA0).
* Parameterize led and usrsw modules pins and port.
* Issue #83
11 years ago
Damien George
12e2656472
stm: allow more flash for the binary.
11 years ago
Damien George
823877bce0
stm: rename sw_xx to switch_xx; change Python bindings to new version.
11 years ago
mux
de7fcc0c06
Move user switch code into a separate module
* Move user switch code from main.c into a separate module (usrsw)
* Add usrsw.c to Makefile
11 years ago
Damien George
1dd657fa87
Add fatfs readme/license.
11 years ago
Damien George
71c5181a8d
Convert Python types to proper Python type hierarchy.
Now much more inline with how CPython does types.
11 years ago
Paul Sokolovsky
5830fae26f
Don't error out if build/ directory already exists.
11 years ago
Damien George
eb7bfcb286
Split qstr into pools, and put initial pool in ROM.
Qstr's are now split into a linked-list of qstr pools. This has 2
benefits: the first pool can be in ROM (huge benefit, since we no longer
use RAM for the core qstrs), and subsequent pools use m_new for the next
pool instead of m_renew (thus avoiding a huge single table for all the
qstrs).
Still would be better to use a hash table, but this scheme takes us part
of the way (eventually convert the pools to hash tables).
Also fixed bug with import.
Also improved the way the module code is referenced (not magic number 1
anymore).
11 years ago
Damien George
2a5e6538b9
stm: Add comments for storage read from cache.
11 years ago
stevie67
2c62e262b2
Fix issue #62 : Cache loses data
Use the storage cache not only for writing but also for reading. This
avoids reading stale data and thus data loss.
11 years ago
Paul Sokolovsky
1c6de11f77
Add basic implementation of slice object.
So far, only start and stop integer indexes are supported. Step is
not supported, as well as objects of arbitrary types.
11 years ago
Paul Sokolovsky
b372bfca21
Rename default config file to mpconfig.h, and port's to mpconfigport.h.
mpconfig.h will automatically pull mpconfigport.h.
11 years ago
Damien George
1fb031744f
Change mp_compile so that it returns a function object for the module.
11 years ago
Damien George
66028ab6dc
Basic implementation of import.
import works for simple cases. Still work to do on finding the right
script, and setting globals/locals correctly when running an imported
function.
11 years ago
mux
1a1ba4d555
Change dfu.py to be Python 2/3 compatible
* Chane dfu.py to use Python 3 syntax to avoid dependency on Python 2.
* Update Makefile to call python instead of python2
* Fix #33
11 years ago
Damien George
aae7847508
Change old use of module creation to new proper use.
11 years ago
Damien George
2870862601
Add module object, to be used eventually for import.
11 years ago
Paul Sokolovsky
e1151e463d
Use rm -rf to remove build dir, so it doesn't error out if dir doesn't exist.
11 years ago
Damien George
8cc96a35e5
Put unicode functions in unicode.c, and tidy their names.
11 years ago
Damien George
212c296c0b
Make unix-cpy cross platform; remove dependency of asmx64 on mpconfig.
11 years ago
Damien
732407f1bf
Change memory allocation API to require size for free and realloc.
11 years ago
Damien
7f7636e41c
Add CODECONVENTIONS, and modify i2c module to conform.
11 years ago
Hagen Kaye
07590c2739
changes to Makefile and main.c to add i2c.c
11 years ago
Hagen Kaye
6474598c65
Added i2c python interface object
11 years ago
Damien
5bbc3cdc0e
stm: Tidy up some wlan code.
11 years ago
Damien
6f95432407
stm: fix some compiler warnings in CC3000 code.
11 years ago
Damien
d99b05282d
Change object representation from 1 big union to individual structs.
A big change. Micro Python objects are allocated as individual structs
with the first element being a pointer to the type information (which
is itself an object). This scheme follows CPython. Much more flexible,
not necessarily slower, uses same heap memory, and can allocate objects
statically.
Also change name prefix, from py_ to mp_ (mp for Micro Python).
11 years ago