From e3eebc329f06983dd1fe304e1ceddbafb814f1e6 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Wed, 15 Sep 2021 11:07:43 +1000 Subject: [PATCH] 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 --- docs/pyboard/tutorial/usb_mouse.rst | 4 ++-- ports/cc3200/mptask.c | 4 ++-- ports/stm32/factoryreset.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/pyboard/tutorial/usb_mouse.rst b/docs/pyboard/tutorial/usb_mouse.rst index 8166946ecd..d05b16ed5c 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 b764c4712c..599211bdfb 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 725ecd12a8..999056e726 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"