How do I program my customized firmware or configuration settings to embedded modules for mass production?

Use Expect/Tcl or python scripts to scan serial output and issue appropriate commands (to serial console) to program your firmware.


E.g. under Windows use:

And create scripts like:

package require Expect
open /dev/ttyS0
send -s "\r"
set timeout 20
expect {
timeout {test_error "Fxx: Timeout waiting request to stop autoboot"}
# the following case does not work, if bootdelay=0
"Hit any key to stop autoboot:" { send -s "\r"
expect {
timeout {test_error "Fxx: Wrong Target Prompt"}
"auto-negotiation timed out" {
test_error "Fxx: No ethernet connection between host and target"
"MAC: error during MII initialization" {
test_error "Fxx: No ethernet connection between host and target"
${TARGET(sPROMPT)} } send -s "update uboot tftp"

another option is to use the bootscript/autoscript feature of the pre-programmed U-Boot (if available with this feature), see: creating partitions and updating U-Boot from U-Boot bootscript / autoscript does not work due to interactive inputs required

Last updated: Jan 01, 2024

Recently Viewed

No recently viewed articles

Did you find this article helpful?