Generating a .hex file in debug configuration

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

cross mob
User12223
Level 2
Level 2
First solution authored
Hi,

I have successfully written and built a program that builds and compiles on an XMC4800 processor. However, no .hex (or binary) file is created.

I require this file to add a bootloader onto my project though have no idea where the file has gone or what I have changed to get rid of it?!

The .hex file used to be created during the early days of the project and now seems to have gone. As far as I know, I have maintained the same project setting throughout...

5025.attach

I have been trolling around the internet for a while now, trying all sorts of things but to no avail.
I have tried various binary parsers, configuration settings and build settings.
I have tried different debug configurations and compared the project settings to a new Dave CE project, that does create a .hex file, out of desperation.

I am not sure where to go from here, does anyone have any ideas?

Thanks in advanced,

Steven
0 Likes
1 Solution
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi,

Could you please share your build setting and settings regarding Create hex file as shown in image.

5087.attach
Work Aorund: Starting from scratch to create a new project could be a crude workaround

Best Regards,
Vasanth

View solution in original post

0 Likes
12 Replies
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted
Hello,

The binary files usually gets created inside the "Debug" folder in the project directory. With the default configuration in Dave, both .elf and .hex files will get generated.
Could you please attach your project to this forum thread? We can check it and let you know if there is a problem.

Thanks and Regards,
Sudheesh
0 Likes
User12223
Level 2
Level 2
First solution authored
Hi Sudheesh,

Thanks for getting back to me.

Unfortunately, due to the nature of my work, I am unable to post my project onto an open forum.
I am happy to send any Dave generated files or take screenshots if you require them.

I have tried resetting all, I think, settings back to default and still no .hex file generated. An .elf file exists in the debug folder but no .hex (or .bin)

As I use uint64 and float variables for math, 'printf' and ''scanf, I have changed my runtime library to Standard. However, as far as I know, this is the only change from default.

I'm sorry I cant post the project but let me know if there is any other way I can help

Thanks,

Steven
0 Likes
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted
Hello Steven,

Did you set the output file format to "ihex" in Dave project properties? Could you please double check this?
5026.attach

To get a better idea about this issue, could you please provide the log messages from Dave for build operation?

Thanks and Regards,
Sudheesh
0 Likes
lock attach
Attachments are accessible only for community members.
User12223
Level 2
Level 2
First solution authored
Hi Sudheesh,

Yes. I ensured that the output was set to ihex before building. I have actually tried binary also, to create a .bin file, but neither were created.

I have attached the log from the console window, if this is what you meant by log messages from Dave for build operation. I hope you can find something

Thanks,

0 Likes
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted
Hello,

I checked the log messages that you provided. I compared it with a test project that I created in Dave. I could not find the log messages corresponding to generating .hex files in the file that you provided.
example:
'Invoking: ARM-GCC Create Flash Image'
"C:/Dave/DAVE-IDE-4.4.2-64Bit/eclipse/ARM-GCC-49/bin/arm-none-eabi-objcopy" -O ihex "test.elf" "test.hex"
'Finished building: test.hex'

Corresponding lines from makefiles are as below.
test.hex: test.elf
@echo 'Invoking: ARM-GCC Create Flash Image'
"$(TOOLCHAIN_ROOT)/bin/arm-none-eabi-objcopy" -O ihex "test.elf" "test.hex"
@echo 'Finished building: $@'
@echo.

Could you please attach the makefile of your project to this thread? We can review it and let you know, if there are any issues.

Thanks and Regards,
Sudheesh
0 Likes
User12223
Level 2
Level 2
First solution authored
Hi Sudheesh,

Sorry for the late reply, I have been out for a week.

I am unable to upload the makefiles to the thread, I am stopped by an 'Invalid File' error from the forum. I have copy and pasted an snippet of the make file of relevance, hopefully this will be enough for you to go on.

The corresponding text found in the make file makes no reference to any hex output;
# Each subdirectory must supply rules for building sources it contributes
%.o: ../%.c
@echo 'Building file: $<'
@echo 'Invoking: ARM-GCC C Compiler'
"$(TOOLCHAIN_ROOT)/bin/arm-none-eabi-gcc" -MMD -MT "$@" -DXMC4800_E196x2048 -I"$(PROJECT_LOC)/Third-Party/FreeRTOS/org/Source/include" -I"$(PROJECT_LOC)/Third-Party/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"$(PROJECT_LOC)/Third-Party/FreeRTOS/org/Source" -I"$(PROJECT_LOC)/Libraries/XMCLib/inc" -I"$(PROJECT_LOC)/Config" -I"$(PROJECT_LOC)/Libraries/CMSIS/Include" -I"$(PROJECT_LOC)/Libraries/CMSIS/Infineon/XMC4800_series/Include" -I"$(PROJECT_LOC)" -I"$(PROJECT_LOC)/Dave/Generated" -I"$(PROJECT_LOC)/Libraries" -O0 -ffunction-sections -fdata-sections -Wall -std=gnu99 -mfloat-abi=softfp -Wa,-adhlns="$@.lst" -pipe -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d) $@" -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mthumb -g -gdwarf-2 -o "$@" "$<"
@echo 'Finished building: $<'
@echo.

Could the problem be with my include paths?

Thanks,

Steven
0 Likes
lock attach
Attachments are accessible only for community members.
User12223
Level 2
Level 2
First solution authored
Hi,

After a little more digging and comparing the makefile generated to one in a working project, I found the following line missing...

Extract from makefile, where project is NOT generating .hex file;
# Add inputs and outputs from these tool invocations to the build variables
SECONDARY_FLASH += \
<------ Missing output
SECONDARY_FLASH += \
A318A902.lst

SECONDARY_SIZE += \
A318A902.siz

Extract from makefile, where project IS generating .hex file;
# Add inputs and outputs from these tool invocations to the build variables
SECONDARY_FLASH += \
Heartbeat.hex \ <------ Output exists

SECONDARY_LIST += \
Heartbeat.lst \

SECONDARY_SIZE += \
Heartbeat.siz \

I am unsure where this is defined, I have compared project settings and everything looks in order. As previously mentioned, the project settings have remained untouched for a while and are largely default.

I have now managed to attach the makefile for the project in question

Hope you can help me out

Thanks,

Steven
0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi,

Could you please share your build setting and settings regarding Create hex file as shown in image.

5087.attach
Work Aorund: Starting from scratch to create a new project could be a crude workaround

Best Regards,
Vasanth

0 Likes
User12223
Level 2
Level 2
First solution authored
Hi Vasanth,

Thanks for getting back to me.
Here are my build settings as required...

Thanks,

Steven
0 Likes
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked
Hello,

You have provided the logs when GCC Compiler is invoked. Can you provide information when the ARM-GCC flash image creation process is invoked? It will start with the following text - "Invoking: ARM-GCC Create Flash Image".

I'm not sure why your makefile has the hex line missing. I'm checking which setting is affecting that line. I'll get back to you. Meanwhile please give us the log for the above.

Regards,
Dheeraj
0 Likes
User17492
Level 1
Level 1
10 sign-ins 5 sign-ins First like given
I am having the same problem of no .hex file created, only .elf generated.
How do you fix this problem?
Thanks,
Tac.
User15589
Level 1
Level 1
First like given 5 replies posted Welcome!

Recently this issue appears here.

My Release doesn't have the corresponding .HEX file, only the .ELF.

What have I do? I need the .HEX file

0 Likes