Skip to content

Commit b53b691

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 3e0d3d2 + 6c55cda commit b53b691

891 files changed

Lines changed: 8768 additions & 3869 deletions

File tree

Some content is hidden

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

.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/mpconfigport.h

Lines changed: 1 addition & 1 deletion
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)

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/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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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
*

0 commit comments

Comments
 (0)