Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
0334058f
Commit
0334058f
authored
Oct 12, 2015
by
Damien George
Browse files
Rename "Micro Python" to "MicroPython" in REPL, help, readme's and misc.
parent
6206f431
Changes
22
Hide whitespace changes
Inline
Side-by-side
ACKNOWLEDGEMENTS
View file @
0334058f
The Micro
Python project was proudly and successfully crowdfunded
The MicroPython project was proudly and successfully crowdfunded
via a Kickstarter campaign which ended on 13th December 2013. The
via a Kickstarter campaign which ended on 13th December 2013. The
project was supported by 1923 very generous backers, who pledged
project was supported by 1923 very generous backers, who pledged
for a total of 2320 pyboards.
for a total of 2320 pyboards.
...
...
CODECONVENTIONS.md
View file @
0334058f
...
@@ -41,12 +41,12 @@ Names:
...
@@ -41,12 +41,12 @@ Names:
-
Use CAPS_WITH_UNDERSCORE for enums and macros.
-
Use CAPS_WITH_UNDERSCORE for enums and macros.
-
When defining a type use underscore_case and put '_t' after it.
-
When defining a type use underscore_case and put '_t' after it.
Integer types: Micro
Python runs on 16, 32, and 64 bit machines, so it's
Integer types: MicroPython runs on 16, 32, and 64 bit machines, so it's
important to use the correctly-sized (and signed) integer types. The
important to use the correctly-sized (and signed) integer types. The
general guidelines are:
general guidelines are:
-
For most cases use mp_int_t for signed and mp_uint_t for unsigned
-
For most cases use mp_int_t for signed and mp_uint_t for unsigned
integer values. These are guaranteed to be machine-word sized and
integer values. These are guaranteed to be machine-word sized and
therefore big enough to hold the value from a Micro
Python small-int
therefore big enough to hold the value from a MicroPython small-int
object.
object.
-
Use size_t for things that count bytes / sizes of objects.
-
Use size_t for things that count bytes / sizes of objects.
-
You can use int/uint, but remember that they may be 16-bits wide.
-
You can use int/uint, but remember that they may be 16-bits wide.
...
...
README.md
View file @
0334058f
...
@@ -8,19 +8,19 @@
...
@@ -8,19 +8,19 @@
[
istats-issue-img
]:
http://issuestats.com/github/micropython/micropython/badge/issue
[
istats-issue-img
]:
http://issuestats.com/github/micropython/micropython/badge/issue
[
istats-issue-repo
]:
http://issuestats.com/github/micropython/micropython
[
istats-issue-repo
]:
http://issuestats.com/github/micropython/micropython
The Micro
Python project
The MicroPython project
=======================
=
=======================
<p
align=
"center"
>
<p
align=
"center"
>
<img
src=
"https://raw.githubusercontent.com/micropython/micropython/master/logo/upython-with-micro.jpg"
alt=
"MicroPython Logo"
/>
<img
src=
"https://raw.githubusercontent.com/micropython/micropython/master/logo/upython-with-micro.jpg"
alt=
"MicroPython Logo"
/>
</p>
</p>
This is the Micro
Python project, which aims to put an implementation
This is the MicroPython project, which aims to put an implementation
of Python 3.x on microcontrollers and small embedded systems.
of Python 3.x on microcontrollers and small embedded systems.
WARNING: this project is in beta stage and is subject to changes of the
WARNING: this project is in beta stage and is subject to changes of the
code-base, including project-wide name changes and API changes.
code-base, including project-wide name changes and API changes.
Micro
Python implements the entire Python 3.4 syntax (including exceptions,
MicroPython implements the entire Python 3.4 syntax (including exceptions,
"with", "yield from", etc.). The following core datatypes are provided:
"with", "yield from", etc.). The following core datatypes are provided:
str (including basic Unicode support), bytes, bytearray, tuple, list, dict,
str (including basic Unicode support), bytes, bytearray, tuple, list, dict,
set, frozenset, array.array, collections.namedtuple, classes and instances.
set, frozenset, array.array, collections.namedtuple, classes and instances.
...
@@ -33,19 +33,19 @@ Python board, the officially supported reference electronic circuit board.
...
@@ -33,19 +33,19 @@ Python board, the officially supported reference electronic circuit board.
Major components in this repository:
Major components in this repository:
-
py/ -- the core Python implementation, including compiler, runtime, and
-
py/ -- the core Python implementation, including compiler, runtime, and
core library.
core library.
-
unix/ -- a version of Micro
Python that runs on Unix.
-
unix/ -- a version of MicroPython that runs on Unix.
-
stmhal/ -- a version of Micro
Python that runs on the Micro
Python board
-
stmhal/ -- a version of MicroPython that runs on the MicroPython board
with an STM32F405RG (using ST's Cube HAL drivers).
with an STM32F405RG (using ST's Cube HAL drivers).
-
minimal/ -- a minimal Micro
Python port. Start with this if you want
-
minimal/ -- a minimal MicroPython port. Start with this if you want
to port Micro
Python to another microcontroller.
to port MicroPython to another microcontroller.
Additional components:
Additional components:
-
bare-arm/ -- a bare minimum version of Micro
Python for ARM MCUs. Used
-
bare-arm/ -- a bare minimum version of MicroPython for ARM MCUs. Used
mostly to control code size.
mostly to control code size.
-
teensy/ -- a version of Micro
Python that runs on the Teensy 3.1
-
teensy/ -- a version of MicroPython that runs on the Teensy 3.1
(preliminary but functional).
(preliminary but functional).
-
pic16bit/ -- a version of Micro
Python for 16-bit PIC microcontrollers.
-
pic16bit/ -- a version of MicroPython for 16-bit PIC microcontrollers.
-
cc3200/ -- a version of Micro
Python that runs on the CC3200 from TI.
-
cc3200/ -- a version of MicroPython that runs on the CC3200 from TI.
-
esp8266/ -- an experimental port for ESP8266 WiFi modules.
-
esp8266/ -- an experimental port for ESP8266 WiFi modules.
-
tests/ -- test framework and test scripts.
-
tests/ -- test framework and test scripts.
-
tools/ -- various tools, including the pyboard.py module.
-
tools/ -- various tools, including the pyboard.py module.
...
...
cc3200/README.md
View file @
0334058f
# Build Instructions for the CC3200
# Build Instructions for the CC3200
Currently the CC3200 port of Micro
Python builds under Linux and OSX
**but not under Windows**
.
Currently the CC3200 port of MicroPython builds under Linux and OSX
**but not under Windows**
.
The tool chain required for the build can be found at
<https://launchpad.net/gcc-arm-embedded>
.
The tool chain required for the build can be found at
<https://launchpad.net/gcc-arm-embedded>
.
...
@@ -25,7 +25,7 @@ make BTARGET=bootloader BTYPE=release BOARD=LAUNCHXL
...
@@ -25,7 +25,7 @@ make BTARGET=bootloader BTYPE=release BOARD=LAUNCHXL
```
```
## Regarding old revisions of the CC3200-LAUNCHXL
## Regarding old revisions of the CC3200-LAUNCHXL
First silicon (pre-release) revisions of the CC3200 had issues with the ram blocks, and Micro
Python cannot run
First silicon (pre-release) revisions of the CC3200 had issues with the ram blocks, and MicroPython cannot run
there. Make sure to use a
**v4.1 (or higer) LAUNCHXL board**
when trying this port, otherwise it won't work.
there. Make sure to use a
**v4.1 (or higer) LAUNCHXL board**
when trying this port, otherwise it won't work.
## Flashing the CC3200
## Flashing the CC3200
...
...
cc3200/misc/help.c
View file @
0334058f
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#include
"py/mpconfig.h"
#include
"py/mpconfig.h"
#include
"py/obj.h"
#include
"py/obj.h"
STATIC
const
char
help_text
[]
=
"Welcome to Micro
Python!
\n
"
STATIC
const
char
help_text
[]
=
"Welcome to MicroPython!
\n
"
"For online help please visit http://micropython.org/help/.
\n
"
"For online help please visit http://micropython.org/help/.
\n
"
"For further help on a specific object, type help(obj)
\n
"
;
"For further help on a specific object, type help(obj)
\n
"
;
...
...
cc3200/telnet/telnet.c
View file @
0334058f
...
@@ -108,7 +108,7 @@ typedef struct {
...
@@ -108,7 +108,7 @@ typedef struct {
DECLARE PRIVATE DATA
DECLARE PRIVATE DATA
******************************************************************************/
******************************************************************************/
static
telnet_data_t
telnet_data
;
static
telnet_data_t
telnet_data
;
static
const
char
*
telnet_welcome_msg
=
"Micro
Python "
MICROPY_GIT_TAG
" on "
MICROPY_BUILD_DATE
"; "
MICROPY_HW_BOARD_NAME
" with "
MICROPY_HW_MCU_NAME
"
\r\n
"
;
static
const
char
*
telnet_welcome_msg
=
"MicroPython "
MICROPY_GIT_TAG
" on "
MICROPY_BUILD_DATE
"; "
MICROPY_HW_BOARD_NAME
" with "
MICROPY_HW_MCU_NAME
"
\r\n
"
;
static
const
char
*
telnet_request_user
=
"Login as: "
;
static
const
char
*
telnet_request_user
=
"Login as: "
;
static
const
char
*
telnet_request_password
=
"Password: "
;
static
const
char
*
telnet_request_password
=
"Password: "
;
static
const
char
*
telnet_invalid_loggin
=
"
\r\n
Invalid credentials, try again.
\r\n
"
;
static
const
char
*
telnet_invalid_loggin
=
"
\r\n
Invalid credentials, try again.
\r\n
"
;
...
...
esp8266/README.md
View file @
0334058f
Micro
Python port to ESP8266
MicroPython port to ESP8266
===========================
=
===========================
This is a highly experimental port of MicroPython for the WiFi modules based
This is a highly experimental port of MicroPython for the WiFi modules based
on Espressif ESP8266 chip.
on Espressif ESP8266 chip.
...
@@ -31,7 +31,7 @@ The tool chain required for the build is the OpenSource ESP SDK, which can be
...
@@ -31,7 +31,7 @@ The tool chain required for the build is the OpenSource ESP SDK, which can be
found at
<https://github.com/pfalcon/esp-open-sdk>
. Clone this repository and
found at
<https://github.com/pfalcon/esp-open-sdk>
. Clone this repository and
run
`make`
in its directory to build and install the SDK locally.
run
`make`
in its directory to build and install the SDK locally.
Then, to build Micro
Python for the ESP8266, just run:
Then, to build MicroPython for the ESP8266, just run:
```
bash
```
bash
$
make
$
make
```
```
...
...
stmhal/help.c
View file @
0334058f
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#include
"py/obj.h"
#include
"py/obj.h"
STATIC
const
char
*
help_text
=
STATIC
const
char
*
help_text
=
"Welcome to Micro
Python!
\n
"
"Welcome to MicroPython!
\n
"
"
\n
"
"
\n
"
"For online help please visit http://micropython.org/help/.
\n
"
"For online help please visit http://micropython.org/help/.
\n
"
"
\n
"
"
\n
"
...
...
stmhal/main.c
View file @
0334058f
...
@@ -150,7 +150,7 @@ static const char fresh_pybcdc_inf[] =
...
@@ -150,7 +150,7 @@ static const char fresh_pybcdc_inf[] =
;
;
static
const
char
fresh_readme_txt
[]
=
static
const
char
fresh_readme_txt
[]
=
"This is a Micro
Python board
\r\n
"
"This is a MicroPython board
\r\n
"
"
\r\n
"
"
\r\n
"
"You can get started right away by writing your Python code in 'main.py'.
\r\n
"
"You can get started right away by writing your Python code in 'main.py'.
\r\n
"
"
\r\n
"
"
\r\n
"
...
...
stmhal/pybcdc.inf_template
View file @
0334058f
...
@@ -87,6 +87,6 @@ ServiceBinary=%12%\usbser.sys
...
@@ -87,6 +87,6 @@ ServiceBinary=%12%\usbser.sys
[Strings]
[Strings]
MFGFILENAME="pybcdc"
MFGFILENAME="pybcdc"
MFGNAME="Micro
Python"
MFGNAME="MicroPython"
DESCRIPTION="Pyboard USB Comm Port"
DESCRIPTION="Pyboard USB Comm Port"
SERVICE="USB Serial Driver"
SERVICE="USB Serial Driver"
stmhal/pyexec.c
View file @
0334058f
...
@@ -206,7 +206,7 @@ STATIC int pyexec_friendly_repl_process_char(int c) {
...
@@ -206,7 +206,7 @@ STATIC int pyexec_friendly_repl_process_char(int c) {
}
else
if
(
ret
==
CHAR_CTRL_B
)
{
}
else
if
(
ret
==
CHAR_CTRL_B
)
{
// reset friendly REPL
// reset friendly REPL
mp_hal_stdout_tx_str
(
"
\r\n
"
);
mp_hal_stdout_tx_str
(
"
\r\n
"
);
mp_hal_stdout_tx_str
(
"Micro
Python "
MICROPY_GIT_TAG
" on "
MICROPY_BUILD_DATE
"; "
MICROPY_HW_BOARD_NAME
" with "
MICROPY_HW_MCU_NAME
"
\r\n
"
);
mp_hal_stdout_tx_str
(
"MicroPython "
MICROPY_GIT_TAG
" on "
MICROPY_BUILD_DATE
"; "
MICROPY_HW_BOARD_NAME
" with "
MICROPY_HW_MCU_NAME
"
\r\n
"
);
mp_hal_stdout_tx_str
(
"Type
\"
help()
\"
for more information.
\r\n
"
);
mp_hal_stdout_tx_str
(
"Type
\"
help()
\"
for more information.
\r\n
"
);
goto
input_restart
;
goto
input_restart
;
}
else
if
(
ret
==
CHAR_CTRL_C
)
{
}
else
if
(
ret
==
CHAR_CTRL_C
)
{
...
@@ -350,7 +350,7 @@ int pyexec_friendly_repl(void) {
...
@@ -350,7 +350,7 @@ int pyexec_friendly_repl(void) {
#endif
#endif
friendly_repl_reset:
friendly_repl_reset:
mp_hal_stdout_tx_str
(
"Micro
Python "
MICROPY_GIT_TAG
" on "
MICROPY_BUILD_DATE
"; "
MICROPY_HW_BOARD_NAME
" with "
MICROPY_HW_MCU_NAME
"
\r\n
"
);
mp_hal_stdout_tx_str
(
"MicroPython "
MICROPY_GIT_TAG
" on "
MICROPY_BUILD_DATE
"; "
MICROPY_HW_BOARD_NAME
" with "
MICROPY_HW_MCU_NAME
"
\r\n
"
);
mp_hal_stdout_tx_str
(
"Type
\"
help()
\"
for more information.
\r\n
"
);
mp_hal_stdout_tx_str
(
"Type
\"
help()
\"
for more information.
\r\n
"
);
// to test ctrl-C
// to test ctrl-C
...
...
stmhal/usbd_desc.c
View file @
0334058f
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
#define USBD_VID 0xf055
#define USBD_VID 0xf055
#define USBD_PID 0x9800
#define USBD_PID 0x9800
#define USBD_LANGID_STRING 0x409
#define USBD_LANGID_STRING 0x409
#define USBD_MANUFACTURER_STRING "Micro
Python"
#define USBD_MANUFACTURER_STRING "MicroPython"
#define USBD_PRODUCT_HS_STRING "Pyboard Virtual Comm Port in HS Mode"
#define USBD_PRODUCT_HS_STRING "Pyboard Virtual Comm Port in HS Mode"
#define USBD_SERIALNUMBER_HS_STRING "000000000010"
#define USBD_SERIALNUMBER_HS_STRING "000000000010"
#define USBD_PRODUCT_FS_STRING "Pyboard Virtual Comm Port in FS Mode"
#define USBD_PRODUCT_FS_STRING "Pyboard Virtual Comm Port in FS Mode"
...
...
teensy/README.md
View file @
0334058f
# Build Instructions for Teensy 3.1
# Build Instructions for Teensy 3.1
Currently the Teensy 3.1 port of Micro
Python builds under Linux and not under Windows.
Currently the Teensy 3.1 port of MicroPython builds under Linux and not under Windows.
The tool chain required for the build can be found at
<https://launchpad.net/gcc-arm-embedded>
.
The tool chain required for the build can be found at
<https://launchpad.net/gcc-arm-embedded>
.
...
...
teensy/help.c
View file @
0334058f
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#include
"py/obj.h"
#include
"py/obj.h"
STATIC
const
char
*
help_text
=
STATIC
const
char
*
help_text
=
"Welcome to Micro
Python!
\n
"
"Welcome to MicroPython!
\n
"
"
\n
"
"
\n
"
"For online help please visit http://micropython.org/help/.
\n
"
"For online help please visit http://micropython.org/help/.
\n
"
"
\n
"
"
\n
"
...
...
tests/cmdline/repl_basic.py.exp
View file @
0334058f
Micro
Python \.\+ version
MicroPython \.\+ version
>>> # basic REPL tests
>>> # basic REPL tests
>>> print(1)
>>> print(1)
1
1
...
...
tests/cmdline/repl_cont.py.exp
View file @
0334058f
Micro
Python \.\+ version
MicroPython \.\+ version
>>> # check REPL allows to continue input
>>> # check REPL allows to continue input
>>> 1 \\\\
>>> 1 \\\\
... + 2
... + 2
...
...
tests/cmdline/repl_emacs_keys.py.exp
View file @
0334058f
Micro
Python \.\+ version
MicroPython \.\+ version
>>> # REPL tests of GNU-ish readline navigation
>>> # REPL tests of GNU-ish readline navigation
>>> # history buffer navigation
>>> # history buffer navigation
>>> 1
>>> 1
...
...
tests/feature_check/repl_emacs_check.py.exp
View file @
0334058f
Micro
Python \.\+ version
MicroPython \.\+ version
>>> # Check for emacs keys in REPL
>>> # Check for emacs keys in REPL
>>> t = \.\+
>>> t = \.\+
>>> t == 2
>>> t == 2
...
...
tests/run-bench-tests
View file @
0334058f
...
@@ -58,7 +58,7 @@ def run_tests(pyb, test_dict):
...
@@ -58,7 +58,7 @@ def run_tests(pyb, test_dict):
return
True
return
True
def
main
():
def
main
():
cmd_parser
=
argparse
.
ArgumentParser
(
description
=
'Run tests for Micro
Python.'
)
cmd_parser
=
argparse
.
ArgumentParser
(
description
=
'Run tests for MicroPython.'
)
cmd_parser
.
add_argument
(
'--pyboard'
,
action
=
'store_true'
,
help
=
'run the tests on the pyboard'
)
cmd_parser
.
add_argument
(
'--pyboard'
,
action
=
'store_true'
,
help
=
'run the tests on the pyboard'
)
cmd_parser
.
add_argument
(
'files'
,
nargs
=
'*'
,
help
=
'input test files'
)
cmd_parser
.
add_argument
(
'files'
,
nargs
=
'*'
,
help
=
'input test files'
)
args
=
cmd_parser
.
parse_args
()
args
=
cmd_parser
.
parse_args
()
...
...
tests/run-tests
View file @
0334058f
...
@@ -311,7 +311,7 @@ def run_tests(pyb, tests, args):
...
@@ -311,7 +311,7 @@ def run_tests(pyb, tests, args):
return
True
return
True
def
main
():
def
main
():
cmd_parser
=
argparse
.
ArgumentParser
(
description
=
'Run tests for Micro
Python.'
)
cmd_parser
=
argparse
.
ArgumentParser
(
description
=
'Run tests for MicroPython.'
)
cmd_parser
.
add_argument
(
'--target'
,
default
=
'unix'
,
help
=
'the target platform'
)
cmd_parser
.
add_argument
(
'--target'
,
default
=
'unix'
,
help
=
'the target platform'
)
cmd_parser
.
add_argument
(
'--device'
,
default
=
'/dev/ttyACM0'
,
help
=
'the serial device or the IP address of the pyboard'
)
cmd_parser
.
add_argument
(
'--device'
,
default
=
'/dev/ttyACM0'
,
help
=
'the serial device or the IP address of the pyboard'
)
cmd_parser
.
add_argument
(
'-b'
,
'--baudrate'
,
default
=
115200
,
help
=
'the baud rate of the serial device'
)
cmd_parser
.
add_argument
(
'-b'
,
'--baudrate'
,
default
=
115200
,
help
=
'the baud rate of the serial device'
)
...
@@ -319,7 +319,7 @@ def main():
...
@@ -319,7 +319,7 @@ def main():
cmd_parser
.
add_argument
(
'-p'
,
'--password'
,
default
=
'python'
,
help
=
'the telnet login password'
)
cmd_parser
.
add_argument
(
'-p'
,
'--password'
,
default
=
'python'
,
help
=
'the telnet login password'
)
cmd_parser
.
add_argument
(
'-d'
,
'--test-dirs'
,
nargs
=
'*'
,
help
=
'input test directories (if no files given)'
)
cmd_parser
.
add_argument
(
'-d'
,
'--test-dirs'
,
nargs
=
'*'
,
help
=
'input test directories (if no files given)'
)
cmd_parser
.
add_argument
(
'--write-exp'
,
action
=
'store_true'
,
help
=
'save .exp files to run tests w/o CPython'
)
cmd_parser
.
add_argument
(
'--write-exp'
,
action
=
'store_true'
,
help
=
'save .exp files to run tests w/o CPython'
)
cmd_parser
.
add_argument
(
'--emit'
,
default
=
'bytecode'
,
help
=
'Micro
Python emitter to use (bytecode or native)'
)
cmd_parser
.
add_argument
(
'--emit'
,
default
=
'bytecode'
,
help
=
'MicroPython emitter to use (bytecode or native)'
)
cmd_parser
.
add_argument
(
'files'
,
nargs
=
'*'
,
help
=
'input test files'
)
cmd_parser
.
add_argument
(
'files'
,
nargs
=
'*'
,
help
=
'input test files'
)
args
=
cmd_parser
.
parse_args
()
args
=
cmd_parser
.
parse_args
()
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment