Damien George
ff8dd3f486
py, unix: Allow to compile with -Wunused-parameter.
See issue #699 .
10 years ago
Damien George
cd34207409
py: Can compile with -Wmissing-declarations and -Wmissing-prototypes.
10 years ago
Damien George
51dfcb4bb7
py: Move to guarded includes, everywhere in py/ core.
Addresses issue #1022 .
10 years ago
Damien George
7eb2317fa2
py: Remove static from definition of pfenv_printf.
It's used by stmhal, but not unix.
10 years ago
Damien George
969a6b37bf
py: Make functions static where appropriate.
10 years ago
Paul Sokolovsky
df732bb01b
pfenv_printf: Properly implement %p format specifier.
Previously, it truncated pointer value to 32 bits on 64-bit systems.
10 years ago
Paul Sokolovsky
cb66f41ebc
py: Make print() accept "file" argument, and actually print to stream.
And not system printf(), like it was before. For this, move pfenv_printf()
from stmhal port to py/.
10 years ago
Paul Sokolovsky
8139494e54
stmhal: Include mpconfig.h before all other includes.
It defines types used by all other headers.
Fixes #691 .
11 years ago
Damien George
e79c6696c5
stmhal: Fix file print methods to use print instead of printf.
Also make stdout_print_strn static (ultimately this function needs to be
merged with stdout_tx_strn).
11 years ago
Damien George
34ab8dd6dd
stmhal: Update and improve LCD driver.
Still some method names to iron out, and funtionality to add, but this
will do for the first, basic version.
11 years ago
Damien George
fb510b3bf9
Rename bultins config variables to MICROPY_PY_BUILTINS_*.
This renames:
MICROPY_PY_FROZENSET -> MICROPY_PY_BUILTINS_FROZENSET
MICROPY_PY_PROPERTY -> MICROPY_PY_BUILTINS_PROPERTY
MICROPY_PY_SLICE -> MICROPY_PY_BUILTINS_SLICE
MICROPY_ENABLE_FLOAT -> MICROPY_PY_BUILTINS_FLOAT
See issue #35 for discussion.
11 years ago
Damien George
04b9147e15
Add license header to (almost) all files.
Blanket wide to all .c and .h files. Some files originating from ST are
difficult to deal with (license wise) so it was left out of those.
Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
11 years ago
Damien George
7533700393
stmhal: Rename USART to UART.
It's really a UART because there is no external clock line (and hence no
synchronous ability, at least in the implementation of this module).
USART should be reserved for a module that has "S"ynchronous capabilities.
Also, UART is shorter and easier to type :)
11 years ago
Damien George
d0f9f6cd3f
py: Fix pfenv_print_strn to return correct number of chars printed.
With this fix, all tests in tests/basics pass on pyboard.
11 years ago
Dave Hylands
baf6f14deb
Enhance str.format support
This adds support for almost everything (the comma isn't currently
supported).
The "unspecified" type with floats also doesn't behave exactly like
python.
Tested under unix with float and double
Spot tested on stmhal
11 years ago
Damien George
781687c772
stmhal: Remove unnecessary include.
11 years ago
Dave Hylands
9c122029ec
stmhal - Add usart support
11 years ago
Damien George
e285511a23
stmhal: Get USB CDC REPL working.
New USB HAL is quite a bit improved over previous one. Now has better
callbacks and flow control.
REPL over USB CDC now works as before, except for soft-reset (since USB
driver uses malloc...).
11 years ago
Dave Hylands
f14b92b9e1
REPl working on UART6 with STMHAL
11 years ago
Damien George
8bfec2b538
Rename formatfloat file; remove MICROPY_ENABLE_FLOAT from mpconfigport.h.
MICROPY_ENABLE_FLOAT is automatically set in mpconfig.h if MICROPY_FLOAT_IMPL
is set to a non-zero value.
11 years ago
Dave Hylands
ca5a241e48
Add proper floating point printing support.
11 years ago
Damien George
01d50d0d58
stm: Wrap some functions in MICROPY_ENABLE_FLOAT.
11 years ago
Dave Hylands
49b5533000
Fix floating point printing of negative numbers in the range (0, -1.0)
11 years ago
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).
11 years ago
Damien George
42647e64db
stm: Remove unneccesary include of mpconfigport (already in mpconfig).
11 years ago
mux
8d3b0a9f74
Add LCD check to stdout_print_strn
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
Damien George
2300537c79
Cleanup built-ins, and fix some compiler warnings/errors.
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
Dave Hylands
b5f458278c
Added a hacky implementation for %g
11 years ago
Dave Hylands
d80ee8bbfd
Added memzip filesystem support for teensy
You can now append a zipfile (containining uncomressed python sources)
to the micropython.hex file.
Use MEMZIP_DIR=directory when you call make, or set that in your
environment to include a different tree of source files.
Added sample /boot.py, /src/main.py, /test.py and /src/test.py files.
Added run command so that you can execute scripts from REPL (until import is implemented).
Added build directory to .gitignore
11 years ago
Damien George
2d45429122
Use memcpy instead of strncpy; add usart.status to stm.
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
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
Damien
e8674399f1
Add vprintf, vsnprintf to STM code.
11 years ago
Damien
8f7491a109
Add USART support, connected to stdio for REPL.
11 years ago
Damien
58a1b4c6cf
Add USB HID support. Runs as an alternative to VCP+MSC.
11 years ago
Damien
0c5827fc65
stm: improved GC, and cooked output for VCP.
11 years ago
Damien
3f69aca2e2
Make stm use garbage collector.
11 years ago
Damien
f48cf67108
Implement crude but working REPL for board.
11 years ago
Damien
4b6e85ca26
Try to get REPL working, but bug with CDC VCP...
11 years ago
Damien
d7a7a30a4f
Make pfenv's const so they go in .text section.
11 years ago
Damien
4a175e1f11
Fix up linker script; improve startup code; printf to USB.
11 years ago
Damien
ed65605edc
Inital commit of stm32f4xx framework.
11 years ago