Skip to content

Commit e3eebc3

Browse files
jimmodpgeorge
authored andcommitted
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>
1 parent 9e2423e commit e3eebc3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docs/pyboard/tutorial/usb_mouse.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ To do this we must first edit the ``boot.py`` file to change the USB
88
configuration. If you have not yet touched your ``boot.py`` file then it
99
will look something like this::
1010

11-
# boot.py -- run on boot-up
12-
# can run arbitrary Python, but best to keep it minimal
11+
# boot.py -- run on boot to configure USB and filesystem
12+
# Put app code in main.py
1313

1414
import pyb
1515
#pyb.main('main.py') # main script to run after this one

ports/cc3200/mptask.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ OsiTaskHandle svTaskHandle;
9999
static fs_user_mount_t *sflash_vfs_fat;
100100

101101
static const char fresh_main_py[] = "# main.py -- put your code here!\r\n";
102-
static const char fresh_boot_py[] = "# boot.py -- run on boot-up\r\n"
103-
"# can run arbitrary Python, but best to keep it minimal\r\n"
102+
static const char fresh_boot_py[] = "# boot.py -- run on boot to configure USB and filesystem\r\n"
103+
"# Put app code in main.py\r\n"
104104
#if MICROPY_STDIO_UART
105105
"import os, machine\r\n"
106106
"os.dupterm(machine.UART(0, " MP_STRINGIFY(MICROPY_STDIO_UART_BAUD) "))\r\n"

ports/stm32/factoryreset.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
#if MICROPY_VFS_FAT
3838

3939
static const char fresh_boot_py[] =
40-
"# boot.py -- run on boot-up\r\n"
41-
"# can run arbitrary Python, but best to keep it minimal\r\n"
40+
"# boot.py -- run on boot to configure USB and filesystem\r\n"
41+
"# Put app code in main.py\r\n"
4242
"\r\n"
4343
"import machine\r\n"
4444
"import pyb\r\n"

0 commit comments

Comments
 (0)