Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

How to debug .elf file with a code::blocks GDB/CDB debugger

(1/2) > >>

Wojtek:
Hi,
I have compiled an ARM project with gcc compiler and got .elf file.
However, I do not know how to debug this project.
Any help would be appreciated.
Thanks.

Wojtek:
I get the following error:

[debug]Error creating process D:/wj_CCode/wj_ARM_SAMA5/wj_Test1/default/wj_Test1.elf, (error 193).
[debug]Starting program: D:/wj_CCode/wj_ARM_SAMA5/wj_Test1/default/wj_Test1.elf
[debug]>>>>>>cb_gdb:

BlueHazzard:
What debugger are you using?
You can not debug arm binaries on the development machine...

Wojtek:
Thank you for reply.
What debugger do I need for working with ATMEL-ICE and code::blocks?

BlueHazzard:
this can be a bit complicated:
# You have to add the debugger to the settings:
1) Settings->Debugger->GDB/CDB->Create Config-> Enter a usefull name like ARMGDB
2) Switch to the new configuration
3) Executable path-> Set the path to the the gdb in your arm toolchain folder
4) Untick "Enable watch scripts", "Disable startup scripts"
5) Ok
# Set up the project
1) Project->Properties->Debugger->Select target:<Project> ->Remote connection:
Ip address: 127.0.0.1 Port: 2331
2) Additional GDB commands:

--- Code: ---monitor reset
load
--- End code ---
3) Ok
Now you have to start the gdb server for the ATMEL-ICE. Then you can run the debugger...

Navigation

[0] Message Index

[#] Next page

Go to full version