Page 1 of 1

Change boot.py on firmware

Posted: Wed Jul 31, 2019 7:38 am
by lucapearce
Hello guys. How to change the boot.py file sent when giving the MAKE. I want to send a program ready at the moment of passing the firmware.

Re: Change boot.py on firmware

Posted: Wed Jul 31, 2019 9:02 am
by jimmo
The easiest way to do this is probably to make boot.py a frozen module in your firmware. I'm not sure if all ports support this though. Which board are you using?

The other option is to build a filesystem into your firmware -- see viewtopic.php?f=16&t=6677&p=38028 for some hints.

Re: Change boot.py on firmware

Posted: Wed Jul 31, 2019 9:05 am
by jimmo
I guess another even easier option is to add another target to the makefile to use "pyboard.py -f cp" to copy the file over the UART once the firmware finishes flashing.

Re: Change boot.py on firmware

Posted: Wed Jul 31, 2019 9:06 am
by jimmo
Or (sorry, last one), find the code that generates the default boot.py and modify that.