summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2021-09-15 11:07:43 +1000
committerDamien George <damien@micropython.org>2021-09-16 12:40:05 +1000
commite3eebc329f06983dd1fe304e1ceddbafb814f1e6 (patch)
tree5708581c280f1102a51282f01935eed4cb38e287
parent9e2423e730ae32cd82e5c06099e6a847a2020f6a (diff)
stm32: Suggest putting code in main.py not boot.py.
Don't want users to accidentally use boot.py (because recovering requires knowing how to activate safe mode). Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-rw-r--r--docs/pyboard/tutorial/usb_mouse.rst4
-rw-r--r--ports/cc3200/mptask.c4
-rw-r--r--ports/stm32/factoryreset.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/docs/pyboard/tutorial/usb_mouse.rst b/docs/pyboard/tutorial/usb_mouse.rst
index 8166946ec..d05b16ed5 100644
--- a/docs/pyboard/tutorial/usb_mouse.rst
+++ b/docs/pyboard/tutorial/usb_mouse.rst
@@ -8,8 +8,8 @@ To do this we must first edit the ``boot.py`` file to change the USB
configuration. If you have not yet touched your ``boot.py`` file then it
will look something like this::
- # boot.py -- run on boot-up
- # can run arbitrary Python, but best to keep it minimal
+ # boot.py -- run on boot to configure USB and filesystem
+ # Put app code in main.py
import pyb
#pyb.main('main.py') # main script to run after this one
diff --git a/ports/cc3200/mptask.c b/ports/cc3200/mptask.c
index b764c4712..599211bdf 100644
--- a/ports/cc3200/mptask.c
+++ b/ports/cc3200/mptask.c
@@ -99,8 +99,8 @@ OsiTaskHandle svTaskHandle;
static fs_user_mount_t *sflash_vfs_fat;
static const char fresh_main_py[] = "# main.py -- put your code here!\r\n";
-static const char fresh_boot_py[] = "# boot.py -- run on boot-up\r\n"
- "# can run arbitrary Python, but best to keep it minimal\r\n"
+static const char fresh_boot_py[] = "# boot.py -- run on boot to configure USB and filesystem\r\n"
+ "# Put app code in main.py\r\n"
#if MICROPY_STDIO_UART
"import os, machine\r\n"
"os.dupterm(machine.UART(0, " MP_STRINGIFY(MICROPY_STDIO_UART_BAUD) "))\r\n"
diff --git a/ports/stm32/factoryreset.c b/ports/stm32/factoryreset.c
index 725ecd12a..999056e72 100644
--- a/ports/stm32/factoryreset.c
+++ b/ports/stm32/factoryreset.c
@@ -37,8 +37,8 @@
#if MICROPY_VFS_FAT
static const char fresh_boot_py[] =
- "# boot.py -- run on boot-up\r\n"
- "# can run arbitrary Python, but best to keep it minimal\r\n"
+ "# boot.py -- run on boot to configure USB and filesystem\r\n"
+ "# Put app code in main.py\r\n"
"\r\n"
"import machine\r\n"
"import pyb\r\n"