If someone starts any programming language , The first program usually printing of “Hello World” . This is very simple but it is basically sanity check of your build tools and running environment. Similarly LED blinking example is not only a sanity check of basic program execution in hardware but sanity check of hardware itself at the time of board bring-up.
LED blinking during board bring-up ?
I have used while(1) as a breakpoint in many debugging cases where JTAG based debugging was not possible. One can use blinking of different LEDs if there is no other option like printf or other debugging tool options.
I also came across use cases where system was working under JTAG control but not independently. There also some time I tried blinking LED option and later the issue was found in Power-ON RESET circuit and system was working due to JTAG based RESET signal.
Based on this, I can conclude that Blinking LED program can be used later also for hardware debugging. That makes it more important than “Hello World” used to learn programming language.
Using Board Use LED for testing purpose
If your LED blinking program fails in first attempt , You will have opportunity to learn more around hardware. In Embedded, sometime it is good to fail -) . You may realize this after watching following video .
Lets see what it takes to blink LED in ARM based STM32 Nucleo board.
The code in the above video provides following outcome :