Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

DAVE™ Forum Discussions

User5581
Level 3
Level 3
Hi All,
I am finding that in Dave 3.1.10, if I go to change the compiler optimization level of a single source file in the project, that the part of the makefile that should run the -objcopy,-objdump, and -size binutils for the whole project seems to somehow get skipped over, and the .hex and .lst files for the project do not get generated from the .elf file. As well, the arm-none-eabi-size binutil does not get run. I find that I can run them myself manually from the Windows command line.

To reproduce this:
First, import the IO003_Example1 DAVE Project from the local library store. Then go ahead and build it. Notice the console output with expected normal behavior:
'Building file: ../Main.c'
'Invoking: ARM-GCC C Compiler'
"C:\DAVE-3.1.10\ARM-GCC/bin/arm-none-eabi-gcc" -DDAVE_CE -DUC_ID=4502 -I"C:\DAVE-3.1.10\eclipse\/../CMSIS/Infineon/XMC4500_series/Include" -I"C:\DAVE-3.1.10\eclipse\/../CMSIS/Include" -I"C:\DAVE-3.1.10\ARM-GCC/arm-none-eabi/include" -I"C:\DAVE-3.1.10\eclipse\/../emWin/Start/GUI/inc" -I"C:\Users\kjensen.QDUSA\Develop\DAVE 3.1.10 Workspaces\Default\IO003_Example1\Dave\Generated\inc\LIBS" -I"C:\Users\kjensen.QDUSA\Develop\DAVE 3.1.10 Workspaces\Default\IO003_Example1\Dave\Generated\inc\DAVESupport" -O0 -ffunction-sections -Wall -std=gnu99 -mfloat-abi=softfp -Wa,-adhlns="Main.o.lst" -c -fmessage-length=0 -MMD -MP -MF"Main.d" -MT"Main.d Main.o" -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mthumb -g3 -gdwarf-2 -o "Main.o" "../Main.c"
'Finished building: ../Main.c'
' '
'Building target: IO003_Example1.elf'
'Invoking: ARM-GCC C Linker'
"C:\DAVE-3.1.10\ARM-GCC/bin/arm-none-eabi-gcc" -T"../IO003_Example1.ld" -nostartfiles -L"C:\DAVE-3.1.10\eclipse\/../CMSIS/Infineon/Lib" -L"C:\DAVE-3.1.10\eclipse\/../Examples/Lib" -L"C:\DAVE-3.1.10\eclipse\/../emWin/Start/GUI" -Wl,-Map,"IO003_Example1.map" -mcpu=cortex-m4 -mthumb -g3 -gdwarf-2 -o "IO003_Example1.elf" "@makefile.rsp"
'Finished building target: IO003_Example1.elf'
' '
'Invoking: ARM-GCC Create Flash Image'
"C:\DAVE-3.1.10\ARM-GCC/bin/arm-none-eabi-objcopy" -O ihex "IO003_Example1.elf" "IO003_Example1.hex"
'Finished building: IO003_Example1.hex'
' '
'Invoking: ARM-GCC Create Listing'
"C:\DAVE-3.1.10\ARM-GCC/bin/arm-none-eabi-objdump" -h -S "IO003_Example1.elf" > "IO003_Example1.lst"
'Finished building: IO003_Example1.lst'
' '
'Invoking: ARM-GCC Print Size'
"C:\DAVE-3.1.10\ARM-GCC/bin/arm-none-eabi-size" --format=berkeley IO003_Example1.elf
text data bss dec hex filename
3392 0 2052 5444 1544 IO003_Example1.elf
'Finished building: IO003_Example1.siz'
' '

**** Build Finished ****


Then, go into the left side C/C++ Project tree view and navigate to /Dave/Generated/src/IO003/IO003.c. Right click on it and select 'Properties'. In this Properties Dialog, under C/C++Build>Settings>ToolSettings>ARM-GCC C Compiler/Optimization, Select Optimization Level (-Os). Click Apply and OK to close the dialog. Now do Project>Rebuild Active Project from the main menu.
Notice the difference in the last part of the console output:
'Finished building: ../Main.c'
' '
'Building target: IO003_Example1.elf'
'Invoking: ARM-GCC C Linker'
"C:\DAVE-3.1.10\ARM-GCC/bin/arm-none-eabi-gcc" -T"../IO003_Example1.ld" -nostartfiles -L"C:\DAVE-3.1.10\eclipse\/../CMSIS/Infineon/Lib" -L"C:\DAVE-3.1.10\eclipse\/../Examples/Lib" -L"C:\DAVE-3.1.10\eclipse\/../emWin/Start/GUI" -Wl,-Map,"IO003_Example1.map" -mcpu=cortex-m4 -mthumb -g3 -gdwarf-2 -o "IO003_Example1.elf" "@makefile.rsp"
'Finished building target: IO003_Example1.elf'
' '

**** Build Finished ****


You can then navigate into the /Debug directory using Windows explorer, and see that the .elf file was generated at the time of this last build, but not the .hex or .lst files.

Is this behavior that others are seeing too?

Best Regards,
-Kurt
0 Likes
3 Replies
Not applicable
HI,

I have just seen this problem to.
Appears that the secondary output variables in the makefile is empty.
I have lookes and searched throught the file trying to figure out where to set the secondary outputs, but no success.
Were you able to fix this problem??

Thanks
Ingar F Pedersen
0 Likes
User5581
Level 3
Level 3
Hi,
I have not found a fix. I am working without the optimization for now.
-Kurt
0 Likes
fraenky
Level 1
Level 1
5 replies posted 10 sign-ins 5 sign-ins

This problem still exists. Is there a chance we will see a fix?

It would be really usefull to complie everything on O3 and then have a few files with e.g. O0 for easy debugging. It compiles fine, but no hex file is generated.

0 Likes