blmorris
7a03b5f56a
remove Myriad2 board config files from master
10 years ago
blmorris
86f0b31bcf
Change boolean 'use_16bit_addr' to int 'addr_size', can be either 8 or 16 bits, default value is 8
to maintain compatibility with existing code.
10 years ago
Dave Hylands
a2e7a1315d
Allow DFU_UTIL to be overridden from the environment.
10 years ago
Damien George
951ed9d02f
stmhal: Fix REPL printing by cooking output sent to stdout_obj.
Recent changes to builtin print meant that print was printing to the
mp_sys_stdout_obj, which was sending data raw to the USB CDC device.
The data should be cooked so that \n turns into \r\n.
10 years ago
Damien George
1163cb9cb5
stmhal: Change calls to pfenv_printf to pfenv_vprintf.
Fixes printing bugs introduced by
cb66f41ebc
.
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
Damien George
1694bc733d
py: Add stream reading of n unicode chars; unicode support by default.
With unicode enabled, this patch allows reading a fixed number of
characters from text-mode streams; eg file.read(5) will read 5 unicode
chars, which can made of more than 5 bytes.
For an ASCII stream (ie no chars > 127) it only needs to do 1 read. If
there are lots of non-ASCII chars in a stream, then it needs multiple
reads of the underlying object.
Adds a new test for this case. Enables unicode support by default on
unix and stmhal ports.
10 years ago
Damien George
02bc882c3d
stmhal: Add file.flush and os.stat.
10 years ago
blmorris
ef204733d6
Initial commit of Myriad2 board-specific configuration files
10 years ago
blmorris
847a6b30b1
Incorporate stylistic changes suggested by @dhylands
10 years ago
blmorris
e687fdbcbc
Add keyword argument 'memaddr_use_16b' to i2c.mem_read and mem_write methods
to allow these methods to transmit 16 bit addresses to an i2c device
Add 'memaddr_use_16b' to qstrdefsport.h
10 years ago
Damien George
594699bc88
stmhal: Protect SD_WriteBlocks by IRQ disable/enable pair.
10 years ago
Dave Hylands
90ba80dc36
Disable IRQs around sdcard reads.
Once the code switches to using DMA, this can be removed.
10 years ago
Damien George
40f3c02682
Rename machine_(u)int_t to mp_(u)int_t.
See discussion in issue #50 .
11 years ago
Damien George
e70b5dbe58
stmhal: Some reordering of code/functions.
11 years ago
Paul Sokolovsky
caa7334141
stackctrl: Add "mp_" prefix.
11 years ago
Dave Hylands
0d81c133b3
Add timer_deinit and call it just before doing a soft-restart
This fixes #733 .
11 years ago
mux
5d44e6a92c
Add copysignf
* Fix #692
11 years ago
Paul Sokolovsky
5813efd634
stmhal: pyb.adc: Clarify that buffer with elements of any size can be used.
Based on forum post: http://forum.micropython.org/viewtopic.php?f=6&t=193
11 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
635b60e299
unix, stmhal: Add option for STR_UNICODE to mpconfigport.h.
Unicode is disabled by default for now, since FileIO.read(n) is
currently not implemented for text-mode files, and this is an
often function.
11 years ago
Paul Sokolovsky
8a96ebea75
py: Move stack_ctrl_init() to mp_init().
As stack checking is enabled by default, ports which don't call
stack_ctrl_init() are broken now (report RuntimeError on startup). Save
them trouble and just init stack control framework in interpreter init.
11 years ago
mux
a75e382a9b
Change MCU name config micro
11 years ago
Paul Sokolovsky
7a8ab5a730
stmhal: Use stackctrl framework.
11 years ago
Dave Hylands
f170735b73
Use mp_const_none to initialize mapper and map_dict
11 years ago
mux
89b38d96c9
Add NORETURN to __fatal_error
11 years ago
mux
5c8db48541
Fix asser_func warning/error
* Add while(1) to assert_func to avoid func returns warning
* Define a weak attr in mpconfig.h
11 years ago
Windel Bouwman
b6af4c8104
Added hexfile target
11 years ago
Emmanuel Blot
f6932d6506
Prefix ARRAY_SIZE with micropython prefix MP_
11 years ago
mux
fe81eea967
Add MICROPY_HW_MICRO_NAME to boards config
11 years ago
Sven Wegener
c3cabf4e33
bare-arm, stmhal, teensy: Duplicate -nostdlib to CFLAGS
As we are building with -nostdlib gcc features like the stack protector
will fail linking, because the failure handlers are in gcc's internal
libs. Such features are implicitly disabled during compilation when
-nostdlib is used in CFLAGS too.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
11 years ago
Sven Wegener
afc67c6dc5
bare-arm, stmhal: Fix --nostdlib to -nostdlib
-nostdlib is the correct option, gcc recognizes the double dash version
when in link-only mode, but not when compiling.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
11 years ago
Damien George
bcb3ab451b
stmhal: Toggle LED using ODR ^= pin_mask.
11 years ago
Dave Hylands
535b88133c
Fix problem with ADC reads and multiple channels
11 years ago
Dave Hylands
4f1b7fec9f
Updated teensy to build.
Refactored some stmhal files which are shared with teensy.
11 years ago
Damien George
2547928148
stmhal: Add Python function to set UART for REPL.
This adds a hook to get/set pyb_uart_global_debug from Python, using
pyb.repl_uart(). You can set it to an arbitrary UART object, and then
the REPL (in and out) is repeated on this UART object (as well as on USB
CDC).
Ultimately, this will be replaced with a proper Pythonic interface to
set sys.stdin and sys.stdout.
11 years ago
Damien George
c0711cbefa
stmhal: Fix type signatures on functions that take variable args.
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
mux
5f6f47a688
Make __assert_func weak
11 years ago
mux
00db5c81e1
Add __assert_func only if DEBUG=1
11 years ago
mux
34e7b67d3c
Add __assert_func
* issue #692
11 years ago
Damien George
820896746c
stmhal, file: Seek to end of file if opened in 'a' mode.
11 years ago
Damien George
b7572ad11b
stmhal, file: Implement a,x,+ open modes, seek and tell.
Also now returns correct POSIX errno when an IO operation fails.
Addresses issues #516 and #676 .
11 years ago
Damien George
57b4dfa9c9
stmhal: Fix pyb.bootloader so it works for gcc-4.9.0.
See PR #618 .
11 years ago
Damien George
4480cb3711
Provide definition of alloca() in mpconfigport.h.
11 years ago
bvernoux
c3c353d7f1
Cleanup/removed specific stuff specific to HydraBus (except board).
11 years ago
Dave Hylands
4e0573e5cf
Add missing commas to stm32f4xx-af.csv
11 years ago
bvernoux
569aa90137
micropython port for HydraBus
11 years ago
Damien George
f1dbd78b30
stmhal: Document pyb.Accel() constructor, that it takes time to start.
11 years ago