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.

See: http://www.python.org

E.g. under Windows use:

http://aspn.activestate.com/ASPN/Downloads/ActiveTcl/

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"}
${TARGET(sPROMPT)}
}
"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: Oct 23, 2024

Recently Viewed

No recently viewed articles

Did you find this article helpful?