Fixed linkcmds.

Fixed linker missing symbols.

Fixed compilation flags.

Fixed hard_reset, bsp_get_work_area, CPU_Context_Switch and CPU_Context_Restore.

Fixed console functions.