Hallo Forum, ich versuche gerade ein kleines Projekt mit Rowleys Crossworks 3.3.1 zu debuggen. Dabei kommt gleich beim öffnen der Fehler: "Error disassembling : truncated ELF file". Ich habe das Projekt extern bauen lassen und ein "externally built executable for STMicroelectronics STM32" angelegt. Ist das ELF-File wirklich kaputt? Zumindest die Tools (z.B. size) laufen problemlos drüber. Oder ist das eine falsche Fehlermeldung? Hier mal das Build: j:\SW\trunk>cs-make.exe all COMSPEC detected C:\WINDOWS\system32\cmd.exe SHELL is C:/WINDOWS/system32/cmd.exe, REMOVE_CMD is cs-rm -------- begin, mode: FLASH_RUN -------- ./src/main.c arm-none-eabi-gcc (Sourcery CodeBench Lite 2012.03-56) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .; thumb;@mthumb armv6-m;@mthumb@march=armv6-m thumb2;@mthumb@march=armv7@mfix-cortex-m3-ldrd ---- Assembling: src/startup_stm32f407xx.s to FLASH_RUN/startup_stm32f407xx.o "e:/ARM/CodeSourcery/v_4_6_3\bin/arm-none-eabi-gcc" -c -mthumb -mcpu=cortex-m4 -mthumb -mthumb-interwork -x assembler-with-cpp -D__ASSEMBLY__ -DVECT_TAB_FLASH -DFLASH_RUN -DSTM32F407VGTx -DSTM32F4DISCOVERY -Wa,-adhlns=FLASH_RUN/startup_stm32f407xx.lst -Wa,-ggdb -I. -I./inc src/startup_stm32f407xx.s -o FLASH_RUN/startup_stm32f407xx.o ---- Compiling C: src/main.c to FLASH_RUN/main.o "e:/ARM/CodeSourcery/v_4_6_3\bin/arm-none-eabi-gcc" -c -mthumb -ggdb -Os -mcpu=cortex-m4 -mthumb-interwork -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DHSE_VALUE=8000000UL -DUSE_USB_FS -DUSE_STM32F4_DISCOVERY -DMOD_MTHOMAS_STMLIB -DVECT_TAB_FLASH -DFLASH_RUN -DSTM32F407VGTx -DSTM32F4DISCOVERY -I./inc -I. -mapcs-frame -ffunction-sections -fdata-sections -Wall -Wextra -Wcast-align -Wpointer-arith -Wredundant-decls -Wshadow -Wcast-qual -Wcast-align -Wa,-adhlns=FLASH_RUN/main.lst -MMD -MP -MF FLASH_RUN/dep/main.o.d -Wno-unused-parameter -Wnested-externs -std=gnu99 src/main.c -o FLASH_RUN/main.o ---- Linking: FLASH_RUN/kha.elf "e:/ARM/CodeSourcery/v_4_6_3\bin/arm-none-eabi-gcc" -mthumb -ggdb -Os -mcpu=cortex-m4 -mthumb-interwork -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DHSE_VALUE=8000000UL -DUSE_USB_FS -DUSE_STM32F4_DISCOVERY -DMOD_MTHOMAS_STMLIB -DVECT_TAB_FLASH -DFLASH_RUN -DSTM32F407VGTx -DSTM32F4DISCOVERY -I./inc -I. -mapcs-frame -ffunction-sections -fdata-sections -Wall -Wextra -Wcast-align -Wpointer-arith -Wredundant-decls -Wshadow -Wcast-qual -Wcast-align -Wa,-adhlns=FLASH_RUN/startup_stm32f407xx.lst -MMD -MP -MF FLASH_RUN/dep/kha.elf.d -Wno-unused-parameter FLASH_RUN/startup_stm32f407xx.o FLASH_RUN/main.o --output FLASH_RUN/kha.elf -nostartfiles -Wl,-Map=FLASH_RUN/kha.map,--cref,--gc-sections -Wl,--start-group -lgcc -lc -lm -Wl,--end-group -L. -T./STM32F407VGTx_flash.ld Creating Extended Listing/Disassembly: FLASH_RUN/kha.lss "e:/ARM/CodeSourcery/v_4_6_3\bin/arm-none-eabi-objdump" -h -S -C -r FLASH_RUN/kha.elf >FLASH_RUN/kha.lss Creating Symbol Table: FLASH_RUN/kha.sym "e:/ARM/CodeSourcery/v_4_6_3\bin/arm-none-eabi-nm" -n FLASH_RUN/kha.elf >FLASH_RUN/kha.sym Creating load file: FLASH_RUN/kha.hex "e:/ARM/CodeSourcery/v_4_6_3\bin/arm-none-eabi-objcopy" -O ihex FLASH_RUN/kha.elf FLASH_RUN/kha.hex Creating load file: FLASH_RUN/kha.bin "e:/ARM/CodeSourcery/v_4_6_3\bin/arm-none-eabi-objcopy" -O binary FLASH_RUN/kha.elf FLASH_RUN/kha.bin Size after build: "e:/ARM/CodeSourcery/v_4_6_3\bin/arm-none-eabi-size" -A FLASH_RUN/kha.elf FLASH_RUN/kha.elf : section size addr .isr_vector 392 134217728 .text 244 134218120 ._user_heap_stack 1536 536870912 .ARM.attributes 47 0 .debug_line 277 0 .debug_info 1250 0 .debug_abbrev 224 0 .debug_aranges 88 0 .debug_ranges 64 0 .debug_str 509 0 .comment 48 0 .debug_frame 108 0 Total 4787 -------- end --------
Antwort schreiben
Bitte melde dich an, um einen Beitrag zu schreiben.