Damien George
46239413d0
stm: Implement mp_import_stat.
To follow up pull request #309 .
11 years ago
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!
11 years ago
Damien George
2abbae3419
stm: Rename mma -> accel.
11 years ago
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.
11 years ago
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.
11 years ago
Damien George
780ba22bb8
stm: Copy COPT style from unix port.
11 years ago
Paul Sokolovsky
287d9620fc
Enable link map file generation.
11 years ago
Damien George
23177088d2
stm: Mount SD card on 1:/ if present.
If SD card is present on (soft) reset then it's mounted on 1:/ and files
can be openned using, eg, open('1:/test.txt', 'r'), or 'w' for writing.
11 years ago
Damien George
01156d510c
stm: Add support for ctrl-C to interrupt running Python.
Using PendSV interrupt at lowest priority, code can now raise an
exception during an interrupt by calling pendsv_nlr_jump. The exception
will be raised when all interrupts are finished. This is used to trap
ctrl-C from the USB VCP to break out of running Python code.
11 years ago
Damien George
39631bc312
Fix Makefiles: -O3 option was not being applied; mkdir for STM.
11 years ago
Damien George
75abee206d
stm: USB host mode working! Restructure stm library directories.
11 years ago
Damien George
449dd0a69e
stm: Put gc_collect code in separate file; define _ram_start in .ld.
To partly address Issue #220 .
11 years ago
Dave Hylands
c89c681a9f
Rework makefiles. Add proper dependency checking.
11 years ago
mux
40048adabc
Move file obj to separate module
11 years ago
Damien George
3257d3543b
stm: Remove unnecessary #includes; small other changes.
11 years ago
mux
638179fb9c
Move RTC to Separate Module
* Move RTC code from main to a separate module.
11 years ago
Damien George
b5d13c309f
stm: Fix USART3 init. Small edits to Makefile and other things.
11 years ago
Damien George
2c30256382
stm: Clean up main.c; disable libgcc by default.
f2d and d2f functions from libgcc does not work correctly, most likely
due to the ABI being incorrect. libgcc disabled for now.
11 years ago
Damien George
d51cfd155c
stm: Put HSE_VALUE and other defines in mpconfigport.h.
mpconfigport.h is now included by stm32f4xx.h so that all STM files have
access to these defines.
11 years ago
Damien George
eb380d7261
stm: Put TARGET in mpconfigport.h; support PYBv4.
11 years ago
Damien George
55baff4c9b
Revamp qstrs: they now include length and hash.
Can now have null bytes in strings. Can define ROM qstrs per port using
qstrdefsport.h
11 years ago
mux
4578ced209
Add OSC_VALUE to Makefile
* Add the option to pass OSC frequency on command line.
11 years ago
Damien George
b2ebb161d4
stm: Upgrade ST peripheral library from 1.1.0 to 1.3.0.
11 years ago
Damien George
1277753812
stm: Upgrade to latest CMSIS libraries.
CMSIS V3.01 -> V3.20. Now in stm/cmsis to keep separate from ST
libraries.
11 years ago
Damien George
0367ad6214
stm: Include libgcc for __aeabi_d2f and __aeabi_f2d functions.
Thanks to Dave Hylands for this.
11 years ago
mux
3591285091
Implement initial ADC support
* Add simple ADC driver, with support for ADC1 and all channels.
* Export MicroPython ADC object with read_channel function.
* Add stm32f4xx_adc.c and adc.c to Makefile.
11 years ago
Damien George
328708eb25
stm: Re-instate C debugging USART port (disabled by default).
See pyb_usart_global_debug variable.
Also did some work on USB OTG, but nothing working yet.
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
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
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
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
d3ebe4829d
Factor and simplify Makefile's and mpconfig, part 2.
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
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
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
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
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
Hagen Kaye
07590c2739
changes to Makefile and main.c to add i2c.c
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