Program not running on STM32F4 after disconnect it from PC
When the chip does not start executing on power-on-reset it can have two causes:


The chip starts in bootloader mode because the boot selection pins have the wrong voltage at powerup.  
Your program is not linked correctly. In other words, it's in the wrong part of flash. (this is unlikely when building from examples)