Rename "Micro Python" to "MicroPython" in REPL, help, readme's and misc.
This commit is contained in:
parent
6206f431cf
commit
0334058fa4
|
@ -1,4 +1,4 @@
|
||||||
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.
|
||||||
|
|
|
@ -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.
|
||||||
|
|
24
README.md
24
README.md
|
@ -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.
|
||||||
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.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# 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
|
||||||
```
|
```
|
||||||
|
|
||||||
## 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
|
||||||
|
|
|
@ -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";
|
||||||
|
|
||||||
|
|
|
@ -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\nInvalid credentials, try again.\r\n";
|
static const char* telnet_invalid_loggin = "\r\nInvalid credentials, try again.\r\n";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
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
|
||||||
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
|
||||||
```
|
```
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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) {
|
||||||
#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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# 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>.
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Micro Python \.\+ version
|
MicroPython \.\+ version
|
||||||
>>> # basic REPL tests
|
>>> # basic REPL tests
|
||||||
>>> print(1)
|
>>> print(1)
|
||||||
1
|
1
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Micro Python \.\+ version
|
MicroPython \.\+ version
|
||||||
>>> # check REPL allows to continue input
|
>>> # check REPL allows to continue input
|
||||||
>>> 1 \\\\
|
>>> 1 \\\\
|
||||||
... + 2
|
... + 2
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
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
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Micro Python \.\+ version
|
MicroPython \.\+ version
|
||||||
>>> # Check for emacs keys in REPL
|
>>> # Check for emacs keys in REPL
|
||||||
>>> t = \.\+
|
>>> t = \.\+
|
||||||
>>> t == 2
|
>>> t == 2
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -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():
|
||||||
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()
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
echo "Micro Python change log"
|
echo "MicroPython change log"
|
||||||
|
|
||||||
for t in $(git tag | grep -v v1.0-rc1 | sort -rV); do
|
for t in $(git tag | grep -v v1.0-rc1 | sort -rV); do
|
||||||
echo ''
|
echo ''
|
||||||
|
|
|
@ -153,7 +153,7 @@ STATIC char *strjoin(const char *s1, int sep_char, const char *s2) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
STATIC int do_repl(void) {
|
STATIC int do_repl(void) {
|
||||||
mp_hal_stdout_tx_str("Micro Python " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE "; " MICROPY_PY_SYS_PLATFORM " version\n");
|
mp_hal_stdout_tx_str("MicroPython " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE "; " MICROPY_PY_SYS_PLATFORM " version\n");
|
||||||
|
|
||||||
#if MICROPY_USE_READLINE == 1
|
#if MICROPY_USE_READLINE == 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue