User forums > Using Code::Blocks

How to get a elf-file?? -> Now: Debuging for dummies

(1/3) > >>

starkeeper:
Hi,
I want to use Codeblocks for my ARM projects. I have chosen the GNU ARM GCC compiler, but the output file is called ARMTest.exe and not usable ARMTest.elf!

The output file ist really big, around 150kb, the same source compiled in eclipse has a 30Kb ".elf" file.

Finnaly I got theese questions on how to start with Codeblocks and ARM:

1. Which type of project should I use? Is a "Console application" correct?
2. How can I persuade the compiler to make a usable elf-file?
3. Which Debugger initialization commands should I use?

mariocup:
Hi starkeeper,

just have a look at the project properties.

Select Build targets and set:
Output filename e.g.: obj\name.elf

Activate Auto-generate filename prefix
Disable Auto-generate filename extension.

Thats all.

Bye,

Mario

starkeeper:
Well now I got a elf-file but it is still 150kB big.

You can see my project option on the screenshot. I wonder that there is still Windows,Unix,Mac selected as target! Shouldn't this be something like ARM?


[attachment deleted by admin]

mandrav:

--- Quote ---Well now I got a elf-file but it is still 150kB big.
--- End quote ---

Click the "Build options" button and in the "compiler flags" list make sure you put a checkmark on the "Strip all symbols from binary (minimizes size) [-s]" flag. Then rebuild your project.

mariocup:
Hi starkeeper,

you have select Debug as Build Target. This target normally contains debug information. So just check the compiler flag in your build options. Select the category Debugging and deselect "Produce debugging symbols".

Bye,

Mario

Navigation

[0] Message Index

[#] Next page

Go to full version