User forums > Help

Not compiling before linking

<< < (2/2)

Miguel Gimenez:
Can you attach the CBP file?

urt:
The extension is not allowed, this is the file's contents:

--- Code: ---<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="TESDTS" />
<Option pch_mode="2" />
<Option compiler="avr-gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/TESDTS.elf" prefix_auto="1" extension_auto="0" />
<Option working_dir="" />
<Option object_output="obj/Debug/" />
<Option type="5" />
<Option compiler="avr-gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
<Target title="Release">
<Option output="bin/Release/TESDTS.elf" prefix_auto="1" extension_auto="0" />
<Option working_dir="" />
<Option object_output="obj/Release/" />
<Option type="5" />
<Option compiler="avr-gcc" />
<Compiler>
<Add option="-Os" />
</Compiler>
</Target>
<Environment>
<Variable name="MCU" value="atmega328p" />
</Environment>
</Build>
<Compiler>
<Add option="-Wall" />
<Add option="-mmcu=atmega328p" />
<Add option="-DF_CPU=16000000UL" />
</Compiler>
<Linker>
<Add option="-mmcu=atmega328p" />
<Add option="-Wl,-Map=$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).map,--cref" />
</Linker>
<ExtraCommands>
<Add after="avr-size --mcu=atmega328p --format=avr $(TARGET_OUTPUT_FILE)" />
<Add after='cmd /c &quot;avr-objdump -h -S $(TARGET_OUTPUT_FILE) &gt; $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).lss&quot;' />
<Add after="avr-objcopy -R .eeprom -R .fuse -R .lock -R .signature -O ihex $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).hex" />
<Add after="avr-objcopy --no-change-warnings -j .eeprom --change-section-lma .eeprom=0 -O ihex $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).eep" />
<Add after="avr-objcopy --no-change-warnings -j .lock --change-section-lma .lock=0 -O ihex $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).lock" />
<Add after="avr-objcopy --no-change-warnings -j .signature --change-section-lma .signature=0 -O ihex $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).sig" />
<Add after="avr-objcopy --no-change-warnings -j .fuse --change-section-lma .fuse=0 -O ihex $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).fuse" />
<Add after="srec_cat $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).fuse -Intel -crop 0x00 0x01 -offset  0x00 -O $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).lfs -Intel" />
<Add after="srec_cat $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).fuse -Intel -crop 0x01 0x02 -offset -0x01 -O $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).hfs -Intel" />
<Add after="srec_cat $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).fuse -Intel -crop 0x02 0x03 -offset -0x02 -O $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).efs -Intel" />
</ExtraCommands>
<Unit filename="fuse.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="main.c">
<Option compilerVar="CC" />
</Unit>
<Extensions>
<lib_finder disable_auto="1" />
</Extensions>
</Project>
</CodeBlocks_project_file>

--- End code ---

I think that the compiler is not working because there are no *.o files at the directory at all

Miguel Gimenez:
This looks right to me, although I use Atmel Studio 7 for AVR developing instead of C::B.

Can you attach a screen capture of the Settings->Compiler->GCC compiler for AVR->Toolchain executables tab?

Navigation

[0] Message Index

[*] Previous page

Go to full version