Skip to content

Commit c7d334e

Browse files
committed
Merge tag 'v1.9.2' into parse-bytecode
Double precision math library and support on pyboard, and improved ussl This release brings general improvements and bug fixes to the core and various ports, as well as documentation additions, clean-ups and better consistency. And effort has been made to clean up the source code to make it more consistent across the core and all ports. There is a new tool "mpy_bin2res.py" to convert arbitrary (binary) files to Python resources for inclusion in source code (frozen or otherwise). The ussl module has seen improvements, including implementation of server_hostname (for axtls) and server_side mode (for mbedtls). There is now a double-precision float math library and stmhal has support to build firmware with software or hardware double-precision. A detailed list of changes follows. py core: - formatfloat: fix number of digits and exponent sign when rounding - modthread: raise RuntimeError in release() if lock is not acquired - compile: raise SyntaxError if positional args are given after */** - objint: support "big" byte-order in int.to_bytes() - objint: in to_bytes(), allow length arg to be any int and check sign - compile: fix bug with break/continue in else of optimised for-range - compile: optimise emitter label indices to save a word of heap - builtinimport: remove unreachable code for relative imports - objnamedtuple: simplify and remove use of alloca building namedtuple - mpprint: remove unreachable check for neg return of mp_format_float - binary: add missing "break" statements - runtime: mark m_malloc_fail() as NORETURN - objstr: remove unnecessary "sign" variable in formatting code - vm: make "if" control flow more obvious in YIELD_FROM opcode - modmath: check for zero division in log with 2 args - makeversionhdr.py: update to parse new release line in docs/conf.py - objdict: factorise dict accessor helper to reduce code size - change mp_uint_t to size_t in builtins code - repl: change mp_uint_t to size_t in repl helpers - compile: combine arith and bit-shift ops into 1 compile routine - compile: use switch-case to match token and operator - objgenerator: allow to hash generators and generator instances - gc: refactor assertions in gc_free function - vm: make n_state variable local to just set-up part of VM - asmx64: support moving a 64-bit immediate to one of top 8 registers - modmicropython: cast stack_limit value so it prints correctly - builtinevex: add typechecking of globals/locals args to eval/exec - py.mk: make berkeley-db C-defs apply only to relevant source files - mperrno: allow mperrno.h to be correctly included before other hdrs - mpz: make mpz_is_zero() an inline function - implement raising a big-int to a negative power - mkrules.mk: show frozen modules sizes together with executable size - objtuple: allow to use inplace-multiplication operator on tuples - objstr: raise an exception for wrong type on RHS of str binary op - modsys: initial implementation of sys.getsizeof() - binary.c: fix bug when packing big-endian 'Q' values - add verbose debug compile-time flag MICROPY_DEBUG_VERBOSE - binary: change internal bytearray typecode from 0 to 1 - objstringio: prevent offset wraparound for io.BytesIO objects - objstringio: fix regression with handling SEEK_SET - stream: seek: Consistently handle negative offset for SEEK_SET - mkrules.mk: use "find -path" when searching for frozen obj files - compile: remove unused pn_colon code when compiling func params - objcomplex: remove unnecessary assignment of variable - formatfloat: don't post-increment variable that won't be used again - use "static inline" for funcs that should be inline - asmthumb: use existing macro to properly clear the D-cache extmod: - modussl_axtls: update for axTLS 2.1.3 - modussl_axtls: implement server_hostname arg to wrap_socket() - move modonewire.c from esp8266 to extmod directory - modure: if input string is bytes, return bytes results too - modubinascii: add check for empty buffer passed to hexlify - modussl_axtls: allow to close ssl stream multiple times - modussl_mbedtls: support server_side mode - modussl_mbedtls: when reading and peer wants to close, return 0 - modframebuf: fix invalid stride for odd widths in GS4_HMSB fmt - modussl_mbedtls: make socket.close() free all TLS resources - modframebuf: consistently use "col" as name for colour variables - modussl_mbedtls: implement non-blocking SSL sockets - machine_signal: fix parsing of invert arg when Pin is first arg - modframebuf: use correct initialization for .locals_dict - modlwip: implement setsockopt(IP_ADD_MEMBERSHIP) - modussl_mbedtls.c: add ussl.getpeercert() method - modubinascii: rewrite mod_binascii_a2b_base64 - modubinascii: don't post-increment variable that won't be used - modonewire: rename public module to mp_module_onewire - for uos.stat interpret st_size member as an unsigned int - use "static inline" for funcs that should be inline lib: - axtls: upgrade to axTLS 2.1.3 + MicroPython patchset - libm/math: remove implementations of float conversion functions - add libm_dbl, a double-precision math library, from musl-1.1.16 drivers: - onewire: move onewire.py, ds18x20.py from esp8266 to drivers - onewire: enable pull-up when init'ing the 1-wire pin tools: - gen-cpydiff: use case description as 3rd-level heading - pyboard: add license header - mpy_bin2res: tools to convert binary resources to Python module - mpy-tool.py: don't generate const_table if it's empty - mpy-tool.py: fix missing argument in dump() function tests: - net_inet/test_tls_sites.py: integration test for SSL connections - net_inet: add tests for accept and connect in nonblocking mode - basics: add tests for for-else statement - net_inet: move tests which don't require full Internet to net_hosted - connect_nonblock: refactor towards real net_hosted test - auto detect floating point capabilites of the target - import: add a test for the builtin __import__ function - import: update comment now that uPy raises correct exception - basics/namedtuple1: add test for creating with pos and kw args - unix/extra_coverage: add test for mp_vprintf with bad fmt spec - basics: add tests for arithmetic operators precedence - cpydiff/modules_deque: elaborate workaround - cpydiff/core_class_mro: move under Classes, add workaround - cpydiff/core_arguments: move under Functions subsection - cpydiff/core_class_supermultiple: same cause as core_class_mro - cpydiff: improve wording, add more workarounds - cpydiff: add case for str.ljust/rjust - rename exec1.py to builtin_exec.py - basics/builtin_exec: test various globals/locals args to exec() minimal port: - Makefile: enable gc-sections to remove unused code - remove unused stmhal include from Makefile - use size_t for mp_builtin_open argument unix port: - modtime: replace strftime() with localtime() - mpconfigport.mk: update descriptions of readline and TLS options - Makefile: disable assertions in the standard unix executable - modjni: convert to mp_rom_map_elem_t - for uos.stat interpret st_size member as an unsigned int stmhal port: - mpconfigport.h: remove config of PY_THREAD_GIL to use default - make error messages more consistent across peripherals - add initial implementation of Pin.irq() method - add .value() method to Switch object, to mirror Pin and Signal - move pybstdio.c to lib/utils/sys_stdio_mphal.c for common use - add "quiet timing" enter/exit functions - make available the _onewire module, for low-level bus control - modules: provide sym-link to onewire.py driver - boards/stm32f405.ld: increase FLASH_TEXT to end of 1MiB flash - sdcard: allow a board to customise the SDIO pins - add possibility to build with double-precision floating point - boards: enable double-prec FP on F76x boards - Makefile: use hardware double-prec FP for MCUs that support it - Makefile: rename FLOAT_IMPL to MICROPY_FLOAT_IMPL to match C name - Makefile: add CFLAGS_EXTRA to CFLAGS so cmdline can add options - mpconfigport.h: allow MICROPY_PY_THREAD to be overridden - boards: add configuration files for NUCLEO_F429ZI - boards/NUCLEO_F429ZI: change USB config from HS to FS peripheral - reduce size of ESPRUINO_PICO build so it fits in flash - servo: make pyb.Servo(n) map to Pin('Xn') on all MCUs - servo: don't compile servo code when it's not enabled - use "static inline" for funcs that should be inline cc3200 port: - modusocket: simplify socket.makefile() function - make non-zero socket timeout work with connect/accept/send - modusocket: fix connect() when in non-blocking or timeout mode - use the name MicroPython consistently in code esp8266 port: - Makefile: bump axTLS TLS record buffer size to 5K - Makefile: allow FROZEN_DIR,FROZEN_MPY_DIR to be overridden - Makefile: add LIB_SRC_C variable to qstr auto-extraction list - make onewire module and support code usable by other ports - modonewire: move low-level 1-wire bus code to modonewire.c - modonewire: make timings static and remove onewire.timings func - reinstate 1-wire scripts by sym-linking to drivers/onewire/ - move mp_hal_pin_open_drain from esp_mphal.c to machine_pin.c - enable MICROPY_ENABLE_FINALISER - README: make "Documentation" a top-level section - machine_rtc: use correct arithmetic for aligning RTC mem len - mpconfigport_512k: use terse error messages to get 512k to fit - mpconfigport.h: make socket a weak link - modesp: remove unused constants: STA_MODE, etc - general: add known issue of WiFi RX buffers overflow - use size_t for mp_builtin_open argument - fix UART stop bit constants zephyr port: - Makefile: rework dependencies and "clean" target - Makefile: revert prj.conf construction rule to the previous state - remove long-obsolete machine_ptr_t typedef's - Makefile: explicitly define default target as "all" - modusocket: allow to use socketized net_context in upstream - modusocket: socket, close: switch to native Zephyr socket calls - modusocket: bind, connect, listen, accept: Swtich to native sockets - modusocket: send: switch to native sockets - modusocket: recv: switch to native sockets - modusocket: fully switch to native Zephyr sockets - modzephyr: add current_tid() and stacks_analyze() functions - prj_base.conf: enable CONFIG_INIT_STACKS - modusocket: update struct sockaddr family field name - prj_96b_carbon.conf: re-enable networking on Carbon - modzephyr: add shell_net_iface() function docs: - btree: add hints about opening db file and need to flush db - select: rename to uselect, to match the actual module name - license: update copyright year - esp8266/tutorial/intro: discourage use of 512kb firmwares - esp8266/tutorial/intro: Sphinx requires blank lines around literal blocks - conf.py: include 3 levels of ToC in latexpdf output - gc: mark mem_alloc()/mem_free() as uPy-specific - gc: document gc.threshold() function - builtins: list builtin exceptions - conf.py: set default_role = 'any' - lcd160cr: group related constants together and use full sentences - ref/speed_python: update and make more hardware-neutral - library/gc: fix grammar and improve readability of gc.threshold() - move all ports docs to the single ToC - topindex.html: remove link to wipy.io, it's no longer available - conf.py: add .venv dir to exclude_patterns - move topindex.html to templates/ subdir - differences/index_template: use consistent heading casing - builtins: add AssertionError, SyntaxError, ZeroDivisionError - add glossary - conf.py: switch to "new" format of intersphinx_mapping - conf.py: add file for global replacements definition - library: add CPython docs xref to each pertinent module - replace.inc: add |see_cpython|, to xref individual symbols from CPython - conf.py: set "version" and "release" to the same value - *_index: drop "Indices and tables" pseudo-section - pyboard: move hardware info into General Info chapter - uerrno: document "uerrno" module - esp8266/general.rst: fix name of NTP module - pyboard: move info about using Windows from topindex to general - uzlib: update description of decompress() and mention DecompIO - pyboard/tutorial/amp_skin: add example for playing large WAV files - library/ubinascii: update base64 docs - library/usocket: move socket.error to its own section - library/usocket: describe complete information on address formats - glossary: elaborate on possible MicroPython port differences - glossary: fix typos in micropython-lib paragraph - index: rewrite introduction paragraph to avoid confusion - use the name MicroPython consistently in documentation - consistently link to micropython-lib in glossary all: - make more use of mp_raise_{msg,TypeError,ValueError} helpers - unify header guard usage - remove trailing spaces, per coding conventions - don't include system errno.h when it's not needed - use the name MicroPython consistently in comments - make use of $(TOP) variable in Makefiles, instead of ".." - raise exceptions via mp_raise_XXX - make static dicts use mp_rom_map_elem_t type and MP_ROM_xxx macros README: - mention support for bytecode and frozen bytecode - improve description of precompiled bytecode; mention mpy-cross CODECONVENTIONS: - clarify MicroPython changes sign-off process - start to describe docs conventions - describe docs use of markup for None/True/False travis: - build STM32F769DISC board instead of F7DISC to test dbl-prec FP - pin cpp-coveralls at 0.3.12
2 parents 25e24b2 + 1f78e7a commit c7d334e

File tree

748 files changed

+9476
-4436
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

748 files changed

+9476
-4436
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*.dis
1010
*.exe
1111

12-
# Packages
12+
# Packages
1313
############
1414

1515
# Logs and Databases

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ before_script:
2020
# For teensy build
2121
- sudo apt-get install realpath
2222
# For coverage testing
23-
- sudo pip install cpp-coveralls
23+
# cpp-coveralls 0.4 conflicts with urllib3 preinstalled in Travis VM
24+
- sudo pip install cpp-coveralls==0.3.12
2425
- gcc --version
2526
- arm-none-eabi-gcc --version
2627
- python3 --version
@@ -40,7 +41,7 @@ script:
4041
- make -C qemu-arm test
4142
- make -C stmhal
4243
- make -C stmhal BOARD=PYBV11 MICROPY_PY_WIZNET5K=1 MICROPY_PY_CC3K=1
43-
- make -C stmhal BOARD=STM32F7DISC
44+
- make -C stmhal BOARD=STM32F769DISC
4445
- make -C stmhal BOARD=STM32L476DISC
4546
- make -C teensy
4647
- make -C cc3200 BTARGET=application BTYPE=release

CODECONVENTIONS.md

Lines changed: 95 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,27 @@ require such detailed description.
2626
To get good practical examples of good commits and their messages, browse
2727
the `git log` of the project.
2828

29+
MicroPython doesn't require explicit sign-off for patches ("Signed-off-by"
30+
lines and similar). Instead, the commit message, and your name and email
31+
address on it construes your sign-off of the following:
32+
33+
* That you wrote the change yourself, or took it from a project with
34+
a compatible license (in the latter case the commit message, and possibly
35+
source code should provide reference where the implementation was taken
36+
from and give credit to the original author, as required by the license).
37+
* That you are allowed to release these changes to an open-source project
38+
(for example, changes done during paid work for a third party may require
39+
explicit approval from that third party).
40+
* That you (or your employer) agree to release the changes under
41+
MicroPython's license, which is the MIT license. Note that you retain
42+
copyright for your changes (for smaller changes, the commit message
43+
conveys your copyright; if you make significant changes to a particular
44+
source module, you're welcome to add your name to the file header).
45+
* Your signature for all of the above, which is the 'Author' line in
46+
the commit message, and which should include your full real name and
47+
a valid and active email address by which you can be contacted in the
48+
foreseeable future.
49+
2950
Python code conventions
3051
=======================
3152

@@ -52,7 +73,7 @@ White space:
5273
keyword and the opening parenthesis.
5374
- Put 1 space after a comma, and 1 space around operators.
5475

55-
Braces:
76+
Braces:
5677
- Use braces for all blocks, even no-line and single-line pieces of
5778
code.
5879
- Put opening braces on the end of the line it belongs to, not on
@@ -114,3 +135,76 @@ Type declarations:
114135
int member;
115136
void *data;
116137
} my_struct_t;
138+
139+
Documentation conventions
140+
=========================
141+
142+
MicroPython generally follows CPython in documentation process and
143+
conventions. reStructuredText syntax is used for the documention.
144+
145+
Specific conventions/suggestions:
146+
147+
* Use `*` markup to refer to arguments of a function, e.g.:
148+
149+
```
150+
.. method:: poll.unregister(obj)
151+
152+
Unregister *obj* from polling.
153+
```
154+
155+
* Use following syntax for cross-references/cross-links:
156+
157+
```
158+
:func:`foo` - function foo in current module
159+
:func:`module1.foo` - function foo in module "module1"
160+
(similarly for other referent types)
161+
:class:`Foo` - class Foo
162+
:meth:`Class.method1` - method1 in Class
163+
:meth:`~Class.method1` - method1 in Class, but rendered just as "method1()",
164+
not "Class.method1()"
165+
:meth:`title <method1>` - reference method1, but render as "title" (use only
166+
if really needed)
167+
:mod:`module1` - module module1
168+
169+
`symbol` - generic xref syntax which can replace any of the above in case
170+
the xref is unambiguous. If there's ambiguity, there will be a warning
171+
during docs generation, which need to be fixed using one of the syntaxes
172+
above
173+
```
174+
175+
* Cross-referencing arbitrary locations
176+
~~~
177+
.. _xref_target:
178+
179+
Normal non-indented text.
180+
181+
This is :ref:`reference <xref_target>`.
182+
183+
(If xref target is followed by section title, can be just
184+
:ref:`xref_target`).
185+
~~~
186+
187+
* Linking to external URL:
188+
```
189+
`link text <http://foo.com/...>`_
190+
```
191+
192+
* Referencing builtin singleton objects:
193+
```
194+
``None``, ``True``, ``False``
195+
```
196+
197+
* Use following syntax to create common description for more than one element:
198+
~~~
199+
.. function:: foo(x)
200+
bar(y)
201+
202+
Description common to foo() and bar().
203+
~~~
204+
205+
206+
More detailed guides and quickrefs:
207+
208+
* http://www.sphinx-doc.org/en/stable/rest.html
209+
* http://www.sphinx-doc.org/en/stable/markup/inline.html
210+
* http://docutils.sourceforge.net/docs/user/rst/quickref.html

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,18 @@ Builtin modules include `sys`, `time`, and `struct`, etc. Select ports have
2222
support for `_thread` module (multithreading). Note that only a subset of
2323
Python 3 functionality is implemented for the data types and modules.
2424

25-
See the repository www.github.com/micropython/pyboard for the MicroPython
25+
MicroPython can execute scripts in textual source form or from precompiled
26+
bytecode, in both cases either from an on-device filesystem or "frozen" into
27+
the MicroPython executable.
28+
29+
See the repository http://github.com/micropython/pyboard for the MicroPython
2630
board (PyBoard), the officially supported reference electronic circuit board.
2731

2832
Major components in this repository:
2933
- py/ -- the core Python implementation, including compiler, runtime, and
3034
core library.
35+
- mpy-cross/ -- the MicroPython cross-compiler which is used to turn scripts
36+
into precompiled bytecode.
3137
- unix/ -- a version of MicroPython that runs on Unix.
3238
- stmhal/ -- a version of MicroPython that runs on the PyBoard and similar
3339
STM32 boards (using ST's Cube HAL drivers).

bare-arm/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ include ../py/mkenv.mk
44
QSTR_DEFS = qstrdefsport.h
55

66
# include py core make definitions
7-
include ../py/py.mk
7+
include $(TOP)/py/py.mk
88

99
CROSS_COMPILE = arm-none-eabi-
1010

1111
INC += -I.
12-
INC += -I..
12+
INC += -I$(TOP)
1313
INC += -I$(BUILD)
1414

1515
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion
@@ -45,4 +45,4 @@ $(BUILD)/firmware.elf: $(OBJ)
4545
$(Q)$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
4646
$(Q)$(SIZE) $@
4747

48-
include ../py/mkrules.mk
48+
include $(TOP)/py/mkrules.mk

bare-arm/mpconfigport.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <stdint.h>
22

3-
// options to control how Micro Python is built
3+
// options to control how MicroPython is built
44

55
#define MICROPY_QSTR_BYTES_IN_HASH (1)
66
#define MICROPY_ALLOC_PATH_MAX (512)
@@ -60,7 +60,7 @@ typedef long mp_off_t;
6060

6161
// extra built in names to add to the global namespace
6262
#define MICROPY_PORT_BUILTINS \
63-
{ MP_OBJ_NEW_QSTR(MP_QSTR_open), (mp_obj_t)&mp_builtin_open_obj },
63+
{ MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) },
6464

6565
// We need to provide a declaration/definition of alloca()
6666
#include <alloca.h>

bare-arm/stm32f405.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ MEMORY
1111
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 0x010000 /* 64 KiB */
1212
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 0x020000 /* 128 KiB */
1313
}
14-
14+
1515
/* top end of the stack */
1616
_estack = ORIGIN(RAM) + LENGTH(RAM);
1717

@@ -30,7 +30,7 @@ SECTIONS
3030

3131
. = ALIGN(4);
3232
} >FLASH_ISR
33-
33+
3434
/* The program code and other data goes into FLASH */
3535
.text :
3636
{
@@ -46,7 +46,7 @@ SECTIONS
4646
_etext = .; /* define a global symbol at end of code */
4747
_sidata = _etext; /* This is used by the startup in order to initialize the .data secion */
4848
} >FLASH_TEXT
49-
49+
5050
/*
5151
.ARM.extab :
5252
{
@@ -60,7 +60,7 @@ SECTIONS
6060
__exidx_end = .;
6161
} >FLASH
6262
*/
63-
63+
6464
/* This is the initialized data section
6565
The program executes knowing that the data is in the RAM
6666
but the loader puts the initial values in the FLASH (inidata).
@@ -76,7 +76,7 @@ SECTIONS
7676
. = ALIGN(4);
7777
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */
7878
} >RAM
79-
79+
8080
/* Uninitialized data section */
8181
.bss :
8282
{

cc3200/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ifeq ($(BTARGET), application)
3434
# qstr definitions (must come before including py.mk)
3535
QSTR_DEFS = qstrdefsport.h $(BUILD)/pins_qstr.h
3636
# include MicroPython make definitions
37-
include ../py/py.mk
37+
include $(TOP)/py/py.mk
3838
include application.mk
3939
else
4040
ifeq ($(BTARGET), bootloader)
@@ -45,7 +45,7 @@ endif
4545
endif
4646

4747
# always include MicroPython make rules
48-
include ../py/mkrules.mk
48+
include $(TOP)/py/mkrules.mk
4949

5050
erase:
5151
cc3200tool -p $(PORT) format_flash --size $(FLASH_SIZE_$(BOARD))

cc3200/application.lds

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* This file is part of the Micro Python project, http://micropython.org/
2+
* This file is part of the MicroPython project, http://micropython.org/
33
*
44
* The MIT License (MIT)
55
*
@@ -37,7 +37,7 @@ ENTRY(ResetISR)
3737

3838
SECTIONS
3939
{
40-
/* place the FreeRTOS heap (the micropython stack will live here) */
40+
/* place the FreeRTOS heap (the MicroPython stack will live here) */
4141
.rtos_heap (NOLOAD) :
4242
{
4343
. = ALIGN(8);
@@ -83,7 +83,7 @@ SECTIONS
8383
} > SRAM
8484

8585
/* place here functions that are only called during boot up, */
86-
/* that way, we can re-use this area for the micropython heap */
86+
/* that way, we can re-use this area for the MicroPython heap */
8787
.boot :
8888
{
8989
. = ALIGN(8);
@@ -93,7 +93,7 @@ SECTIONS
9393
_eboot = .;
9494
} > SRAM
9595

96-
/* allocate the micropython heap */
96+
/* allocate the MicroPython heap */
9797
.heap :
9898
{
9999
. = ALIGN(8);

cc3200/application.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
APP_INC = -I.
2-
APP_INC += -I..
2+
APP_INC += -I$(TOP)
33
APP_INC += -Ifatfs/src
44
APP_INC += -Ifatfs/src/drivers
55
APP_INC += -IFreeRTOS
@@ -10,15 +10,15 @@ APP_INC += -Ihal
1010
APP_INC += -Ihal/inc
1111
APP_INC += -Imisc
1212
APP_INC += -Imods
13-
APP_INC += -I../drivers/cc3100/inc
13+
APP_INC += -I$(TOP)/drivers/cc3100/inc
1414
APP_INC += -Isimplelink
1515
APP_INC += -Isimplelink/oslib
1616
APP_INC += -Itelnet
1717
APP_INC += -Iutil
1818
APP_INC += -Ibootmgr
1919
APP_INC += -I$(BUILD)
2020
APP_INC += -I$(BUILD)/genhdr
21-
APP_INC += -I../stmhal
21+
APP_INC += -I$(TOP)/stmhal
2222

2323
APP_CPPDEFINES = -Dgcc -DTARGET_IS_CC3200 -DSL_FULL -DUSE_FREERTOS
2424

@@ -147,12 +147,12 @@ APP_LIB_SRC_C = $(addprefix lib/,\
147147
netutils/netutils.c \
148148
timeutils/timeutils.c \
149149
utils/pyexec.c \
150+
utils/sys_stdio_mphal.c \
150151
)
151152

152153
APP_STM_SRC_C = $(addprefix stmhal/,\
153154
bufhelper.c \
154155
irq.c \
155-
pybstdio.c \
156156
)
157157

158158
OBJ = $(PY_O) $(addprefix $(BUILD)/, $(APP_FATFS_SRC_C:.c=.o) $(APP_RTOS_SRC_C:.c=.o) $(APP_FTP_SRC_C:.c=.o) $(APP_HAL_SRC_C:.c=.o) $(APP_MISC_SRC_C:.c=.o))

cc3200/boards/LAUNCHXL/mpconfigboard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* This file is part of the Micro Python project, http://micropython.org/
2+
* This file is part of the MicroPython project, http://micropython.org/
33
*
44
* The MIT License (MIT)
55
*

cc3200/boards/WIPY/mpconfigboard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* This file is part of the Micro Python project, http://micropython.org/
2+
* This file is part of the MicroPython project, http://micropython.org/
33
*
44
* The MIT License (MIT)
55
*

cc3200/boards/cc3200_prefix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* This file is part of the Micro Python project, http://micropython.org/
2+
* This file is part of the MicroPython project, http://micropython.org/
33
*
44
* The MIT License (MIT)
55
*

cc3200/boards/make-pins.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ def parse_board_file(self, filename, cpu_pin_col):
133133

134134
def print_named(self, label, pins):
135135
print('')
136-
print('STATIC const mp_map_elem_t pin_{:s}_pins_locals_dict_table[] = {{'.format(label))
136+
print('STATIC const mp_rom_map_elem_t pin_{:s}_pins_locals_dict_table[] = {{'.format(label))
137137
for pin in pins:
138138
if pin.board_pin:
139-
print(' {{ MP_OBJ_NEW_QSTR(MP_QSTR_{:6s}), (mp_obj_t)&pin_{:6s} }},'.format(pin.name, pin.name))
139+
print(' {{ MP_ROM_QSTR(MP_QSTR_{:6s}), MP_ROM_PTR(&pin_{:6s}) }},'.format(pin.name, pin.name))
140140
print('};')
141141
print('MP_DEFINE_CONST_DICT(pin_{:s}_pins_locals_dict, pin_{:s}_pins_locals_dict_table);'.format(label, label));
142142

cc3200/bootmgr/bootloader.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ BOOT_INC = -Ibootmgr
44
BOOT_INC += -Ibootmgr/sl
55
BOOT_INC += -Ihal
66
BOOT_INC += -Ihal/inc
7-
BOOT_INC += -I../drivers/cc3100/inc
7+
BOOT_INC += -I$(TOP)/drivers/cc3100/inc
88
BOOT_INC += -Imisc
99
BOOT_INC += -Imods
1010
BOOT_INC += -Isimplelink
1111
BOOT_INC += -Isimplelink/oslib
1212
BOOT_INC += -Iutil
13-
BOOT_INC += -I..
13+
BOOT_INC += -I$(TOP)
1414
BOOT_INC += -I.
1515
BOOT_INC += -I$(BUILD)
1616

0 commit comments

Comments
 (0)