Damien George
6c9c7bc75a
stmhal: Implement generic select.select and select.poll.
10 years ago
Damien George
c8c44a4c2e
py: Add ioctl method to stream protocol; add initial modselect.
10 years ago
Damien George
8105736982
py: Clean up x86-64 native assembler; allow use of extended regs.
Native x86-64 now has 3 locals in registers.
10 years ago
Damien George
25d904105c
py: Adjust regs for x86 so that 1 more local can live in a reg.
10 years ago
Damien George
91fe0d4880
unix: Fix modffi to be able to return double on x86 machines.
10 years ago
Damien George
03281b3850
py: Allow x86 native functions to take arguments.
Fix some bugs with x86 stack and saving registers correctly.
10 years ago
Damien George
c90f59ec3a
py: Add support for emitting native x86 machine code.
10 years ago
Damien George
33b50a0217
Merge branch 'master' of github.com:micropython/micropython
10 years ago
Damien George
c7a79284bb
tests: Enable misc tests on pyboard; output 4 sig figs in rge_sm.
10 years ago
Damien George
e6ce10a3e7
py: Native emitter now supports delete name & global, and end finally.
10 years ago
Paul Sokolovsky
78fde4819c
modstruct: Implement 'O', 'P', 's' types for packed structs.
This is required to deal with, well, packed C structs containing pointers.
10 years ago
Paul Sokolovsky
722e562736
py: Correctly set sys.maxsize value for 64-bit.
Type representing signed size doesn't have to be int, so use special value
which defaults to SSIZE_MAX, but as it's not defined by C standard (but rather
by POSIX), allow ports to set it.
10 years ago
Damien George
17598d49e1
unix: Don't use -Wno-error=cpp or #warning; fix strict alias warning.
For the sake of older versions of gcc (and other compilers), don't use
the #warning CPP directive, nor the -Wno-error=cpp option.
Also, fix a strict alias warning in modffi.c for older compilers, and
add a test for ffi module.
Addresses issue #847 .
10 years ago
Damien George
8002d5d2b9
py: Fix definition of sys.maxsize with mpz changes.
10 years ago
Damien George
9a21d2e070
py: Make mpz able to use 16 bits per digit; and 32 on 64-bit arch.
Previously, mpz was restricted to using at most 15 bits in each digit,
where a digit was a uint16_t.
With this patch, mpz can use all 16 bits in the uint16_t (improvement
to mpn_div was required). This gives small inprovements in speed and
RAM usage. It also yields savings in ROM code size because all of the
digit masking operations become no-ops.
Also, mpz can now use a uint32_t as the digit type, and hence use 32
bits per digit. This will give decent improvements in mpz speed on
64-bit machines.
Test for big integer division added.
10 years ago
Damien George
afb1cf75dd
py: Convert (u)int to mp_(u)int_t in mpz, and remove unused function.
10 years ago
Damien George
e191d42188
py: Use % str formatting instead of {} in makeqstrdata.py.
Script is equivalent, but now also runs under ancient Python 2.6.
Goes part way to addressing issue #847 .
10 years ago
Damien George
b534e1b9f1
py: Use variable length encoded uints in more places in bytecode.
Code-info size, block name, source name, n_state and n_exc_stack now use
variable length encoded uints. This saves 7-9 bytes per bytecode
function for most functions.
10 years ago
Damien George
dda46460ff
Code style/whitespace cleanup; remove obsolete headers.
And move the MAP_ANON redefinition from py/asmx64.c to unix/alloc.c.
10 years ago
Damien George
a669cbc690
unix: Auto-detect MICROPY_EMIT_X64 and MICROPY_GCREGS_SETJMP.
If not set, MICROPY_EMIT_X64 is set only if on x86-64 machine.
If not set, MICROPY_GCREGS_SETJMP is set when on MIPS.
10 years ago
Damien George
91fbea2c1e
Merge pull request #845 from Vogtinator/master
Add allocation macros (per platform) and ARM cache flush
10 years ago
Fabian Vogt
b7235b8412
Add cache flush in py/asmarm.c and add new MP_PLAT_ALLOC_EXEC and MP_PLAT_FREE_EXEC macros
Fixes issue #840
10 years ago
Damien George
fc54250d31
Merge pull request #844 from chrisdearman/do_str
Declare do_str() function before the implementation
10 years ago
Damien George
27dd910c44
Merge branch 'stinos-msvc-extmod'
10 years ago
Damien George
e875e3882d
extmod: Fix type-punned-ptr error.
10 years ago
Damien George
bc9f34860b
Merge branch 'msvc-extmod' of github.com:stinos/micropython into stinos-msvc-extmod
10 years ago
stijn
759138caee
msvc: Exclude modtermios, include extmod and fix compilation error
10 years ago
Chris Dearman
8c56241c82
Declare do_str() function before the implementation
This ensures that GCC does not discard the do_str implementation in
some cases eg when compiling tests with debug enabled:
make RUN_TESTS=1 DEBUG=1
10 years ago
Damien George
bad2df3e95
stmhal, modwiznet5k: Add very minimal documentation.
10 years ago
Damien George
bcf041f1a3
stmhal: Add wiznet5k module, to control WIZnet ethernet adaptor.
Allows to create socket objects that support TCP and UDP in server and
client mode. Interface is very close to standard Python socket class,
except bind and accept do not work the same (due to hardware not
supporting them in the usual way).
Not compiled by default. To compile this module, use:
make MICROPY_PY_WIZNET5K=1
10 years ago
Damien George
cdd40f149a
drivers, wiznet5k: Make DNS service use HAL sys tick.
10 years ago
Damien George
9091e84454
drivers, wiznet5k: Add HAL_Delay(1) to "infinite" loops.
10 years ago
Damien George
7da9145e47
drivers, wiznet5k: Properly fix ARP bug with W5200 chipset.
10 years ago
Damien George
0c0550bff0
drivers, wiznet5k: Add W5200 support.
10 years ago
Damien George
79d17e3e7d
drivers, wiznet5k: Change SPI interface to read/write multiple bytes.
10 years ago
Damien George
812cf62f43
drivers, wiznet5k: Fix IP addr verification.
10 years ago
Damien George
71224cb8db
drivers: Initial import of WIZnet5x000 driver.
10 years ago
Damien George
e07737d202
Added 'drivers' directory, intended to hold code for specific hardware.
10 years ago
Damien George
90fad65d2f
Merge pull request #841 from dhylands/teensy-README
Update teensy README.md file
10 years ago
Dave Hylands
76dd7e180f
Update teensy README.md file
Thanks to Artur Wroblewski for some suggested changes.
I also added the TIPs section at the end while I was updating.
10 years ago
Damien George
ca6d75f16d
py: Small simplifications in tuple and list accessors.
10 years ago
Damien George
4abff7500f
py: Change uint to mp_uint_t in runtime.h, stackctrl.h, binary.h.
Part of code cleanup, working towards resolving issue #50 .
10 years ago
Damien George
4d91723587
py: Remove use of int type in obj.h.
Part of code cleanup, working towards resolving issue #50 .
10 years ago
Damien George
d182b98a37
py: Change all uint to mp_uint_t in obj.h.
Part of code cleanup, working towards resolving issue #50 .
10 years ago
Damien George
9c4cbe2ac0
py: Make tuple and list use mp_int_t/mp_uint_t.
Part of code cleanup, to resolve issue #50 .
10 years ago
Damien George
93965e726f
py: Make map, dict, set use mp_int_t/mp_uint_t exclusively.
Part of code cleanup, towards resolving issue #50 .
10 years ago
Damien George
1c70cbf151
py: Save about 200 bytes of ROM by using smaller type for static table.
10 years ago
Damien George
ecc88e949c
Change some parts of the core API to use mp_uint_t instead of uint/int.
Addressing issue #50 , still some way to go yet.
10 years ago
Damien George
4d3fc46326
lib, libm: Add back dummy definition of tanf.
10 years ago
Damien George
8707ea3421
lib: Add lib and libm, moving current files from stmhal.
Top-level lib directory is for standard C libraries that we want to
provide our own versions of (for efficiency and stand-alone reasons).
It currently has libm in it for math functions.
Also add atanf and atan2f, which addresses issue #837 .
10 years ago