I have a codebase that has been working fine with arm-none-eabi-gcc. I wanted to keep most of my source files in C while adding C++. I had some issues compiling this but finally seemed to successfully compile for my device (Atmel ATSAMG55).
However, when I go to flash the device in Atmel studio, I get an error
The Intel Hex file does not start with ':'
Note, I'm just programming it through an Atmel ICE programmer/debugger and Atmel studio. I'm compiling through arm-none-eabi-gcc and arm-none-eabi-g++ and a custom make file.
I opened up a hex viewer of my .hex output to find mostly 0x00000000 but a bit of "real" data at the beginning and end. Images below.
Clearly, if the compile process occurred properly, it wouldn't be mostly 0x00000000. However, without any compiler errors I'm a bit stuck on where to start. Below is an excerpt of the "core" of my make file.
all: $(TARGET)
# Create binary from object files and external libraries
$(TARGET): $(OBJECTS_C) $(OBJECTS_CXX) $(S_SRCS)
@mkdir -p $(dir $@)
$(CXX) $(CXXFLAGS) $(C_INC) -T$(LDFILE) $(LFLAGS) -o $@
$(TOOLCHAIN)-objcopy -O binary $@ $(basename $@).bin
out/$(PLATFORM_MCU)/obj/%.o: %.cpp
@mkdir -p $(dir $@)
$(CXX) $(CXXFLAGS) $(C_INC) -o $@ -c $<
-include $(DEP_CXX)
out/$(PLATFORM_MCU)/obj/%.o: %.c
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(C_INC) -o $@ -c $<
-include $(DEP_C)
.PRECIOUS: $(PRECIOUS)
.PHONY: all clean
clean:
rm -rf $(CLEAN)
Most of what is above that is variable definition and setting flags. I'm relatively confident in that as this was working fine with pure C. It was only when I added the second set of object/source dependencies that I started having issues.
Has anyone seen a compile issue like this and have any input on where to start debugging? Thank you!