AnsweredAssumed Answered

ADUcm360_CN0359 - makefile for *.elf debugging eclipse@fedora22

Question asked by jklemm on Aug 25, 2016
Latest reply on Sep 7, 2016 by R.L

Dear Sir and Madam,

I want to generate the symbol+binary object file *.elf for Eclipse development environment with the C++ project ADUcm360CN0359 to get running the Debugger in eclipse.

 

System Info:

<uname -a>
>> Linux TIMEX 4.4.14-200.fc22.x86_64 #1 SMP Fri Jun 24 21:19:33 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

<arm-none-eabi-gcc --version>
>> arm-none-eabi-gcc (Fedora 5.2.0-3.fc22) 5.2.0 Copyright (C) 2015 Free Software Foundation, Inc.

 

I've successfully created the template-project 'm360_demo_blink' and here are the last lines of console output after the build process, where the debugger has generated the object file in ELF-Format <*.elf> containing symbols and debugging information.

----------------------------------------------------------------------------------------

Building target: m360_demo_blink.elf
Invoking: Cross ARM C++ Linker
arm-none-eabi-g++ -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra  -g3 -T mem.ld -T libs.ld -T sections.ld -nostartfiles -Xlinker --gc-sections -L"../ldscripts" -Wl,-Map,"m360_demo_blink.map" --specs=nano.specs -o "m360_demo_blink.elf"  ./system/src/newlib/_cxx.o ./system/src/newlib/_exit.o ./system/src/newlib/_sbrk.o ./system/src/newlib/_startup.o ./system/src/newlib/_syscalls.o ./system/src/newlib/_write.o ./system/src/newlib/assert.o  ./system/src/diag/Trace.o ./system/src/diag/trace_impl.o  ./system/src/cortexm/_initialize_hardware.o ./system/src/cortexm/_reset_hardware.o ./system/src/cortexm/exception_handlers.o  ./system/src/CMSIS/system_ADuCM360.o ./system/src/CMSIS/vectors_ADuCM360.o  ./src/Timer.o ./src/main.o   
Finished building target: m360_demo_blink.elf
 
Invoking: Cross ARM GNU Create Flash Image
arm-none-eabi-objcopy -O ihex "m360_demo_blink.elf"  "m360_demo_blink.hex"
Finished building: m360_demo_blink.hex
 
Invoking: Cross ARM GNU Print Size
arm-none-eabi-size --format=berkeley "m360_demo_blink.elf"
   text       data        bss        dec        hex    filename
    700         20        272        992        3e0    m360_demo_blink.elf
Finished building: m360_demo_blink.siz

 

12:06:17 Build Finished (took 1s.222ms)

----------------------------------------------------------------------------------------

Which compiler directive in the makefile do I have to use for generating the *.elf file instead of *.axf file, which is required by the ARM-RealViewDebugger?
I'm thinking that I have to generate the object file format *.elf to get eclipse debugger running !?!?

 

Here are the last lines of console output from the build process of my project 'aducmCN0359',

which generates the object file *.afx .

----------------------------------------------------------------------------------------

12:27:58 **** Build of configuration Output for project aducmCN0359 ****
make all

...

/usr/bin/arm-none-eabi-ld output/startup_ADuCM360.o output/system_ADuCM360.o output/Initial.o output/Retarget.o output/Interrupts.o output/DMA.o output/SysTick.o output/Exceptions.o output/RTD.o output/Conductivity.o output/Metric.o output/Sampling.o output/Cursor.o output/AD8253Driver.o output/FlashDriver.o output/Fonts.o output/BuzzerDriver.o output/ADCDriver.o output/Reverse.o output/PWMDriver.o output/LCDDriver.o output/main.o output/Message.o output/Dialog.o output/VoltageDialog.o output/TemperatureCoefficientDialog.o output/SettingDialog.o output/HomeDialog.o output/CellConstantDialog.o output/FrequencyDialog.o /usr/arm-none-eabi/lib/armv7-m/crt0.o /usr/lib/gcc/arm-none-eabi/5.2.0/armv7-m/crtbegin.o /usr/lib/gcc/arm-none-eabi/5.2.0/armv7-m/crtend.o /usr/lib/gcc/arm-none-eabi/5.2.0/armv7-m/crti.o /usr/lib/gcc/arm-none-eabi/5.2.0/armv7-m/crtn.o -T aduCN0359.ld -Map=output/aduCN0359.map --gc-sections   -L /usr/arm-none-eabi/include/c++/5.2.0/arm-none-eabi/armv7-m -L /usr/arm-none-eabi/lib/armv7-m -L /usr/lib/gcc/arm-none-eabi/5.2.0/armv7-m -L /usr/arm-none-eabi/include/c++/5.2.0/arm-none-eabi/armv7-m -L /usr/arm-none-eabi/lib/armv7-m -L /usr/lib/gcc/arm-none-eabi/5.2.0/armv7-m  -nostdlib -u _printf_float -lstdc++_nano  -lm -lg_nano  -lc_nano  -lgcov -lgcc -lnosys -o output/aduCN0359.axf

 

12:28:04 Build Finished (took 5s.681ms)

----------------------------------------------------------------------------------------

 

Please give me any help for getting the makfile-directive to generate the *.elf file,

which is required by Eclipse-CDT with GDB-debugger connected via JLink to aducm360-board.

 

Thanks,

Regards Jan

Outcomes