Go through this link
http://forums.codeblocks.org/index.php/topic,22758.0.htmladding,
CodeBlocks in current time is incapable of producing heXcode for ARM projects. i have invested my whole month to make a GUI application for my stm32f429 using codeblocks and there were some visible errors on initial steps will come up which are impossible to solve.
Common Errors:(unsolved)
1.The compiler toolchain will not be automatically detected.
2.You will wonder whether the toolchain is installed or not, if you manually install the toolchain ,code blocks will show that the toolchain is present while making project,at the time of completing the ARM project to load, it will show , no compiler present.
3.if you manage somehow to leave all the issue and make any simple project by c application selection,
the debugger wont work.
The wide detailing required for debugger(st-link or j link) on other platforms like Eclipse, its just absent in codeblocks, so basically you cannot control the speed,clock,board name or any important information required for debugging.
Suggestion:
Dont waste time, CodeBlocks is best only for C applications.