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>
pull/7801/head
Jim Mussared 2021-09-15 11:07:43 +10:00 zatwierdzone przez Damien George
rodzic 9e2423e730
commit e3eebc329f
3 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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"

Wyświetl plik

@ -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"