Damien George
db52fd8e4d
py: Wrap qstr defs in quotes to protect from C preprocessor.
...
This patch converts Q(abc) to "Q(abc)" to protect the abc from the
C preprocessor, then converts back after the preprocessor is finished.
So now we can safely put includes in mpconfig(port).h, and also
preprocess qstrdefsport.h (latter is now done also in this patch).
Addresses issue #1252 .
2015-05-30 23:14:34 +01:00
Damien George
0ec8cf8e80
py/parsenum.c: Rename "raise" func to "raise_exc" to avoid name clash.
...
"raise" is a common word that was found to exist in a vendor's stdlib.
2015-05-30 23:13:16 +01:00
Damien George
4e4772bb5b
py: Add further autodetection of endianess in mpconfig.h.
...
This patch was needed for gcc 4.4.
2015-05-30 23:12:30 +01:00
Damien George
26b512ea1b
py: Get makeqstrdata.py and makeversionhdr.py running under Python 2.6.
...
These scripts should run under as wide a range of Python versions as
possible.
2015-05-30 23:11:16 +01:00
Josef Gajdusek
7d8edeff4e
esp8266: Update to SDK version 1.1.0 (MIT-licensed).
...
1. Updated linker script, now user app appears to contain exception vector
table and oesn't work (faults) without it.
2. Commened out support for GPIO pulldown, which was removed in this SDK
version without clear explanation, but apparently because it was released
without proper validation, and now turns out it doesn't work as expected,
or there's a different function there.
2015-05-30 20:58:59 +03:00
Radomir Dopieralski
78ccb44a90
docs: Document esp module for ESP8266.
...
I document as much as I could guess from experiments and reading the
code for the ``esp`` module for the ESP8266 port of Micropython.
For now the tag has to be set manually with -t option when building,
when we have properly split documentation, there will be a separate
config file for esp8266 with that the tag "port_esp8266" set.
To build use:
make SPHINXOPTS="-t port_esp8266" html
2015-05-30 12:49:58 +01:00
stijn
278d22ce8f
lib/mp-readline: Allow overriding implementation of cursor functions
...
Default implementation uses VT100-style sequences which are not implemented
by all terminals out there
2015-05-30 13:38:34 +03:00
stijn
9a522dda6e
lib/mp-readline: Add implementation for deleting a character
...
xterm and others use the ESC[~3 sequence when pressing the delete key
2015-05-30 13:38:24 +03:00
stijn
100004eeaf
unix: Print an extra newline to the output on ctrl-D
...
This assures the terminal prints it's prompt on a fresh line instead of
appending it to the uPy prompt after exit.
2015-05-30 13:38:17 +03:00
Paul Sokolovsky
6a664cb114
unix: minimal: Don't use readline support.
...
After switching to builtin readline support, "minimal" no longer builds, and
minimal doesn't really need readline support.
2015-05-30 13:13:43 +03:00
Paul Sokolovsky
51726b4d43
unix: Allow to override default sys.path value.
...
Using MICROPY_PY_SYS_PATH_DEFAULT macro define. A usecase is building a
distribution package, which should not have user home path by default in
sys.path. In such case, MICROPY_PY_SYS_PATH_DEFAULT can be defined on
make command-line (using CFLAGS_EXTRA).
2015-05-30 01:07:58 +03:00
Paul Sokolovsky
c02dc8b2c9
tools/make-frozen.py: Open files in binary mode.
2015-05-30 00:39:00 +03:00
Paul Sokolovsky
a8e7c03171
tools/make-frozen.py: Preserve directory hierarchy.
...
Currently, frozen packages are not supported, but eventually they should be,
so make sure to store complete directory hierarchy.
2015-05-30 00:23:46 +03:00
Paul Sokolovsky
f5ae384d4f
bootstrap_upip.sh: Allow to install into a path given by argument.
2015-05-29 22:35:45 +03:00
Daniel Campora
84d11b5e53
cc3200: Add period set method to the Timer class.
2015-05-29 15:54:46 +02:00
Daniel Campora
417205623a
cc3200: Fix incorrect type for the wake cause variable.
2015-05-29 15:54:16 +02:00
Daniel Campora
2f2c0a13fb
cc3200: Clean up WLAN API. Make WLAN.info() an attrtuple.
2015-05-29 15:48:41 +02:00
Daniel Campora
622f241317
cc3200: Rename pyb.reset() to pyb.hard_reset() and add pyb.unique_id().
2015-05-29 10:22:20 +02:00
Josef Gajdusek
286ced4c2f
esp8266: Add a bunch of miscellaneous methods
2015-05-28 21:38:46 +03:00
Josef Gajdusek
25a8a42447
esp8266: Add pyb.ADC class
2015-05-28 21:31:37 +03:00
Josef Gajdusek
492fd5cb6b
esp8266: Enable setting CPU frequency to 160MHz
2015-05-28 21:28:29 +03:00
Damien George
a16715ac62
tests: Add special tests to test mp_printf function to improve coverage.
2015-05-28 14:25:07 +00:00
Damien George
9ede4dcfbb
tests: Add some tests for printing floats to improve coverage.
2015-05-28 14:24:47 +00:00
Damien George
79474c6b16
py: Remove unnecessary extra handling of padding of nan/inf.
...
C's printf will pad nan/inf differently to CPython. Our implementation
originally conformed to C, now it conforms to CPython's way.
Tests for this are also added in this patch.
2015-05-28 14:22:12 +00:00
Damien George
2cae0f6290
py: Reduce size of mp_printf by eliminating unnecessary code.
...
Saves around 120 bytes on Thumb2 archs.
2015-05-28 13:54:56 +00:00
Daniel Campora
78744c4f7a
cc3200: Remove WIPY-SD variant, and make the WiPy the default board.
2015-05-28 13:22:26 +02:00
Daniel Campora
2abb58d758
cc3200: Rename Pin.get_config() to Pin.info().
2015-05-28 13:10:46 +02:00
Daniel Campora
1580e331ef
cc3200: Make small changes in WLAN to improve the API.
2015-05-28 13:10:44 +02:00
Damien George
6d1ff7e966
tests: Add tests to create valid and invalid UART, I2C, SPI, CAN busses.
2015-05-28 11:06:12 +01:00
Damien George
17d9b5006d
stmhal: Fix off-by-one error when checking for valid I2C and SPI bus.
2015-05-28 11:05:44 +01:00
Damien George
5a57447a8c
ACKNOWLEDGEMENTS: Add 1 backer name to the file.
2015-05-28 08:20:36 +01:00
Dave Hylands
669dbca959
tools: Allow pyboard constructor to take a baudrate parameter.
...
This allows pyboard.py to be used over a UART interface
rather than just over a USB serial interface.
2015-05-27 23:01:28 +01:00
Damien George
70446f46c2
stmhal: Allow to name SPI busses, and give them names for pyboard.
2015-05-27 17:21:42 +01:00
Damien George
0e6f5e08e1
stmhal: Allow to name I2C busses, and give them names for pyboard.
2015-05-27 17:16:26 +01:00
Damien George
1775b65e07
stmhal: Remove PYBVxx defines and use config vars for UART/CAN names.
...
Now all stmhal-based boards can name their peripherals (if they want) to
any string.
2015-05-27 16:51:04 +01:00
Damien George
9ae3fc6523
unix: Add option to use uPy readline, and enable by default.
...
This gets uPy readline working with unix port, with tab completion and
history. GNU readline is still supported, configure using
MICROPY_USE_READLINE variable.
2015-05-27 15:59:43 +01:00
Damien George
4a10214be2
unix: Factor out stdio and ctrl-C code to unix_mphal.c file.
2015-05-27 15:52:35 +01:00
Damien George
2acfb7c002
lib/mp-readline: Export readline_push_history function.
2015-05-27 15:06:17 +01:00
Daniel Campora
c754d8011d
cc3200: Simplify SPI polarity and phase checks in constructor.
2015-05-27 09:45:32 +02:00
Daniel Campora
95104b0fbd
cc3200: Add note about old revisions of the CC3200-LAUNCHXL.
2015-05-27 09:45:30 +02:00
Daniel Campora
d07de2d307
cc3200: Move the STDIO UART pin configuration to mpconfigboard.h.
2015-05-27 09:45:29 +02:00
Daniel Campora
9414f92fa9
cc3200: Fix I2C and SPI module references.
2015-05-27 09:45:27 +02:00
Daniel Campora
8096be089e
cc3200: Add make_new method to the WDT.
2015-05-27 09:45:25 +02:00
Daniel Campora
fca3493442
cc3200: Add make_new method to the RTC, like in stmhal.
2015-05-27 09:45:24 +02:00
Daniel Campora
5a0c5f8fea
cc3200: Use the WDT stall feature in debug mode only.
2015-05-27 09:45:22 +02:00
Daniel Campora
ec1f0e7551
cc3200: Use MCU reset instead of SOC reset.
...
I have seen the CC3200 hanging a couple of times, and according to TI
itself the SOC reset is not reliable, which explains my observations.
2015-05-27 09:45:21 +02:00
Josef Gajdusek
967f3230f5
esp8266: Move initialization to system_init_done_cb
...
Initializing too early caused some of the API functions (wifi_*) to fail
when called in main.py
2015-05-26 22:22:08 +03:00
Josef Gajdusek
59610c4004
esp8266: Add uos module
...
Currently implements only .uname()
2015-05-26 22:18:07 +03:00
Daniel Campora
fabe79f7af
cc3200: Clean up exception handling.
2015-05-26 12:29:20 +02:00
Daniel Campora
124aa000af
cc3200: Use polarity and phase instead of submode in the SPI construct.
2015-05-26 11:30:48 +02:00