2008-11-12 01:46:27 File format not recognized
P SENTHIL KUMAR (INDIA)
Message: 65076
Hi all
I am using 2008R1.5 distribution, uboot and toolchain.
I had created sample application and try to dump it using below command,
bfin-uclinux-objdump
but i cant able to dump it.
I am getting below display in command prompt
psenthil> bfin-uclinux-objdump -D test> dump
bfin-uclinux-objdump: test: File format not recognized
Let me know some suggestion to solve the above issue.
Regards, Senthil
QuoteReplyEditDelete
2008-11-12 05:06:14 Re: File format not recognized
Yi Li (CHINA)
Message: 65140
Did you build "test" using bfin-uclinux-gcc? What is the output if you run "file test"?
-Yi
QuoteReplyEditDelete
2008-11-12 06:25:09 Re: File format not recognized
Mike Frysinger (UNITED STATES)
Message: 65145
you cannot objdump a FLAT binary by default. do it on the .gdb file.
QuoteReplyEditDelete
2008-11-12 06:56:49 Re: File format not recognized
P SENTHIL KUMAR (INDIA)
Message: 65148
Hi Mike
Thanks for the suggestion,
You are right mike, its a FLAT binary file only.
I will try on .gdb file.
Regards, Senthil
QuoteReplyEditDelete
2008-11-14 05:01:58 Re: File format not recognized
P SENTHIL KUMAR (INDIA)
Message: 65282
Hi Mike,
I tried to dump a flat binary .gdb file using below command, but i am gettng the below
> bfin-uclinux-objdump -d NetFrame.gdb
bfin-uclinux-objdump: NetFrame.gdb: File format not recognized
Let me know some suggestion for the above issue
Regards,Senthil
QuoteReplyEditDelete
2008-11-14 05:09:39 Re: File format not recognized
Mike Frysinger (UNITED STATES)
Message: 65283
show the exact commands you used to create NetFrame
QuoteReplyEditDelete
2008-11-14 05:29:40 Re: File format not recognized
P SENTHIL KUMAR (INDIA)
Message: 65288
Hi Mike,
Below is the command prompt display used to create the Netframe
PF> make -f makefile-DPF all
for dir in /home/psenthil/DPF/uclDPF/GUI /home/psenthil/DPF/uclDPF/JI_Task ; do\
echo Making in $dir...;\
(cd $dir; make all) || exit 1 ; cd ..;\
done
Making in /home/psenthil/DPF/uclDPF/GUI...
make[1]: Entering directory `/home/psenthil/DPF/uclDPF/GUI'
Building Lib /home/psenthil/DPF/uclDPF/lib/libFWGUI.a
bfin-uclinux-ar -rc /home/psenthil/DPF/uclDPF/lib/libFWGUI.a ./GUI_PMP/source/FontInfoInit.o ./PMP03Specific/PMP03_gui.o ./GUI_Data/source/gui_datafiles.o ./GUI_PMP/source/GUISupportAPI.o
cp include/Browser.h include/Display_Kernel_Definitions.h include/FileExtension.h include/GUIIcons.h include/PlayBackGUI.h GUI_PMP/include/Basic_GUI_API.h GUI_PMP/include/Font.h GUI_PMP/include/FontInfoInit.h GUI_PMP/include/GUIAPIs.h GUI_PMP/include/GUIDataType.h GUI_PMP/include/GUI.h GUI_PMP/include/GUIUtils.h GUI_PMP/include/InitGUI.h /home/psenthil/DPF/uclDPF/include
make[1]: Leaving directory `/home/psenthil/DPF/uclDPF/GUI'
Making in /home/psenthil/DPF/uclDPF/JI_Task...
make[1]: Entering directory `/home/psenthil/DPF/uclDPF/JI_Task'
Building Lib /home/psenthil/DPF/uclDPF/lib/libJITask.a
bfin-uclinux-ar -rc /home/psenthil/DPF/uclDPF/lib/libJITask.a ./source/Application_Manager.o
make[1]: Leaving directory `/home/psenthil/DPF/uclDPF/JI_Task'
Compiling C file DPFApp/DPFMain.c
bfin-uclinux-gcc -c -Wl, -elf2flt -g -O2 DPFApp/DPFMain.c -o DPFApp/DPFMain.o
DPFApp/DPFMain.c:48: warning: conflicting types for âLoadLoadablesâ
DPFApp/DPFMain.c:30: warning: previous implicit declaration of âLoadLoadablesâ was here
Compiling C file DPFApp/Initialization.c
bfin-uclinux-gcc -c -Wl, -elf2flt -g -O2 App/Initialization.c -o DPFApp/Initialization.o
bfin-uclinux-gcc -o ./NetFrame ./DPFApp/DPFMain.o ./DPFApp/Initialization.o -Wl,-elf2flt -ladiOSA -lJITask -lpthread -lFWGUI -L/home/psenthil/DPF/uclDPF/lib
PF>
Regards,Senthil
QuoteReplyEditDelete
2008-11-14 05:39:24 Re: File format not recognized
Mike Frysinger (UNITED STATES)
Message: 65289
and you then ran `bfin-uclinux-objdump -d NetFrame.gdb` ? your build code doesnt move files around right ?
run `file NetFrame.gdb` and post the output
doing this works fine for me:
$ echo 'int main(){}' > test.c
$ bfin-uclinux-gcc -elf2flt test.c -o test
$ file test test.gdb
test: BFLT executable - version 4 ram
test.gdb: ELF 32-bit LSB executable, Analog Devices Blackfin, version 1 (SYSV), statically linked, not stripped
$ bfin-uclinux-objdump -d test.gdb
test.gdb: file format elf32-bfin
Disassembly of section .text:
00000000 <__start-0x4>:
0: 00 00 NOP;
..........
QuoteReplyEditDelete
2008-11-14 05:54:50 Re: File format not recognized
P SENTHIL KUMAR (INDIA)
Message: 65292
Hi Mike,
My exe name is NetFrame.
below are the output of File NetFrame NetFrame.gdb from the command prompt
PF> file NetFrame NetFrame.gdb
NetFrame: BFLT executable - version 4 ram
NetFrame.gdb: BFLT executable - version 4 ram
PF>
For both exe and gdb file i am getting the same abbrevation.
Let me know how to solve the issue.
Regards,Senthil
QuoteReplyEditDelete
2008-11-14 06:04:11 Re: File format not recognized
Mike Frysinger (UNITED STATES)
Message: 65293
run the simple test i showed to make sure your toolchain is behaving correctly
QuoteReplyEditDelete
2008-11-14 06:34:15 Re: File format not recognized
P SENTHIL KUMAR (INDIA)
Message: 65295
Hi Mike,
As per your suggestion, i had tested my toolchain using the simple application.
PF> echo $PATH
/opt/uClinux/bfin-uclinux/bin:/opt/uClinux/bfin-linux-uclibc/bin:/opt/uClinux/bfin-uclinux/bin:/opt/uClinux/bfin-linux-uclibc/bin:/opt/uClinux/bfin-uclinux/bin:/opt/uClinux/bfin-linux-uclibc/bin:/home/psenthil/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/lib/qt3/bin
PF> bfin-uclinux-gcc -elf2flt testcase.c -o ToolchainTest
below are the display of the test applciation.
PF> file ToolchainTest ToolchainTest.gdb
ToolchainTest: BFLT executable - version 4 ram
ToolchainTest.gdb: ELF 32-bit LSB executable, version 1 (SYSV), statically linked, not stripped
PF>
So, from the above testing we will confirm that toolchain is installed properly.
Regards,Senthil
QuoteReplyEditDelete
2008-11-14 06:44:01 Re: File format not recognized
Mike Frysinger (UNITED STATES)
Message: 65296
so run the single command by hand:
bfin-uclinux-gcc -o ./NetFrame ./DPFApp/DPFMain.o ./DPFApp/Initialization.o -Wl,-elf2flt -ladiOSA -lJITask -lpthread -lFWGUI -L/home/psenthil/DPF/uclDPF/lib
QuoteReplyEditDelete
2008-11-14 08:49:47 Re: File format not recognized
P SENTHIL KUMAR (INDIA)
Message: 65301
Hi Mike,
Thanks for your support.
As per your suggestion, i had done the execution by hand an finally able to dump.
Regards, Senthil
QuoteReplyEditDelete
2008-11-14 13:14:37 Re: File format not recognized
Mike Frysinger (UNITED STATES)
Message: 65317
then you might want to check your build system to make sure it isnt renaming files and thus clobbering the .gdb