Ok I tried with USART2 enabled but still the same thing. When i checked the registers in gdb this is the out put:
usart_write_polled (minor=0, c=13 '\r') at ../../../bsps/arm/stm32f4/console/usart.c:232
232 while ((usart->sr & STM32F4_USART_SR_TXE) == 0) {
(gdb) set $RCC = 0x40023800
(gdb) p/x *(uint32_t*)($RCC + 0x40)
$4 = 0x0
(gdb) p/x (*(uint32_t*)($RCC + 0x40)) & 0x00020000
$5 = 0x0
(gdb) set $U2 = 0x40004400
(gdb) x/6wx $U2
0x40004400: 0x00000000 0x00000000 0x00000000 0x00000000
0x40004410: 0x00000000 0x00000000
What I understood here is it is not enabled?
Also I tried changing register values via gdb to expected states, still no use.