STM32F769 Discovery boot.py not executed
Posted: Sat Oct 17, 2020 10:17 am
Hello,
I successfully flashed MicroPython on my STM32F769 Discovery board.
I can access REPL mode with picocom and execute multiple python commands from there, I am also able to execute the available python scripts using
I am also able to access the filesystem from my linux machine (file explorer is opened when connecting to USB-HS) and modify/create/delete python files.
But neither boot.py nor main.py will execute after reset/reboot. I tried multiple solutions i found on the Internet, but none of them worked. After i stumbled across this topic (viewtopic.php?t=6303), i simply replaced line 713 in ./micropython/ports/stm32/main.c
and now main.py is executed after system reset (but boot.py isn't).
For me it looks like the disco board is in safe mode and skips both files (respectively just boot.py now). But this is strange since safe mode is more an hardware issue (from what i learned from the multiple threads with similar problems the usr button is pulled in the wrong direction or is floating) and the disco board was probably tested successfully by the corresponding micropython developers ..
Also this fix doesn't seem to be a good solution, but works for now. I also had no time to dive deeper into main.c.
Do you have any hint what's the reason for this or have a solution to fix this permanently?
Thanks, moez
I successfully flashed MicroPython on my STM32F769 Discovery board.
I can access REPL mode with picocom and execute multiple python commands from there, I am also able to execute the available python scripts using
Code: Select all
exec(open("main.py").read())
But neither boot.py nor main.py will execute after reset/reboot. I tried multiple solutions i found on the Internet, but none of them worked. After i stumbled across this topic (viewtopic.php?t=6303), i simply replaced line 713 in ./micropython/ports/stm32/main.c
Code: Select all
// changed line 713
if ((reset_mode == 1 || reset_mode == 3) && pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL) {
// to
if (1) {
For me it looks like the disco board is in safe mode and skips both files (respectively just boot.py now). But this is strange since safe mode is more an hardware issue (from what i learned from the multiple threads with similar problems the usr button is pulled in the wrong direction or is floating) and the disco board was probably tested successfully by the corresponding micropython developers ..
Also this fix doesn't seem to be a good solution, but works for now. I also had no time to dive deeper into main.c.
Do you have any hint what's the reason for this or have a solution to fix this permanently?
Thanks, moez