Hi there, I compiled fxload (tried with fxload-2002_04_11 and fxload-2008_10_13) to send a driver and startup my usb device. I was able to find the usb device (http://www.friendlyarm.net/forum/topic/788?lang=en) but now the problem is another: "illegal instruction". [root@FriendlyARM usb]# fxload -vvv -t fx2 -I ./[mydriver].hex -D /dev/1-1 microcontroller type: fx2 single stage: load on-chip memory open RAM hexfile image ./[mydriver].hex stop CPU ** LINE: :0A1DE30000010202030304040505D9 ** LINE: :1004D700C20DC20AC20CC20B43B58043B080E4F51B Illegal instruction [root@FriendlyARM usb]# I don't know what this error means... Any tip? Thanks in advance.
Illegal instruction using fxload
Solved just by adding some flags on compilation: -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4 -mtune=arm920t Hope it helps anybody with the same problem. But, still don't understanding "illegal error"... :/ I someone have a reasonable explanation, please share with me! :D
hi eduardo, i've seen this comment you've wrote here in several topics, i really tried to use it but i couldn't really find where to write it. i mean, in a basic Qt program, i added these lines in makefile as follows; CC = arm-none-linux-gnueabi-gcc CXX = arm-none-linux-gnueabi-g++ DEFINES = -DQT_NO_DEBUG -DQT_SCRIPT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED CFLAGS = -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4 -mtune=arm920t -pipe -fno-exceptions -O0 -Wall -W -D_REENTRANT $(DEFINES) CXXFLAGS = -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4 -mtune=arm920t -pipe -fno-exceptions -O0 -Wall -W -D_REENTRANT $(DEFINES) INCPATH = -I../../../mkspecs/qws/linux-arm-g++ -I. -I../../../include/QtCore -I../../../include/QtNetwork -I../../../include/QtGui -I../../../include/QtScript -I../../../include -I.moc/release-shared-emb-arm LINK = arm-none-linux-gnueabi-g++ LFLAGS = -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4 -mtune=arm920t -Wl,-rpath-link,/home/baris/qt-everywhere-opensource-src-4.6.2/lib -fno-exceptions -Wl,-O1 -Wl,-rpath,/usr/local/Qt/lib -Wl,-rpath,/usr/local/Qt/lib LIBS = $(SUBLIBS) -L/home/baris/qt-everywhere-opensource-src-4.6.2/lib -lQtScript -L/home/baris/qt-everywhere-opensource-src-4.6.2/lib -lQtGui -lQtNetwork -lQtCore -lpthread AR = arm-none-linux-gnueabi-ar cqs RANLIB = arm-none-linux-gnueabi-ranlib I added this command on C,CXX,L FLAGS but the problem `illegal instruction` isn't solved. If someone can help about it, i'd really appreciate. Thanks.
Hi, I also face same problem. i am really stuck here , Anybody have solution. Note: application run successfully with Qtopia Same application faile with Qt(Execute Time ) here display 'illegal instruction' Error Here in both application i am using libusb library for arm Both program compile successfully. I have already done all step that all are mention above but still same Error: I do not know how to come out from this any body have solution. Waiting for Solution.
run the tool "readelf -a <your binary>" and take a look if the compiler did the right things for your ARMv4 based Mini2440.
Tag_CPU_name: "CORTEX-A8" Tag_CPU_arch: v7 Tag_CPU_arch_profile: Application Tag_ARM_ISA_use: Yes Tag_THUMB_ISA_use: Thumb-1 Tag_ABI_PCS_wchar_t: 4 Tag_ABI_FP_denormal: Needed Tag_ABI_FP_exceptions: Needed Tag_ABI_FP_number_model: IEEE 754 Tag_ABI_align8_needed: Yes Tag_ABI_enum_size: int Tag_ABI_HardFP_use: SP and DP
I see you have -march=armv4t -mtune=arm920t which is correct. Did you modify g++.conf and qmake.conf as per http://mini2440vietnam.blogspot.com/2011/04/upgrade-qt462-in-mini2440.html I got this to work once or twice. I found that after each attempt I had to clean out some .cache files. Sorry, can't ehlp further. I gave up and switched to using the Pengutronix BSP. Good luck!
To make it more clear: cross toolchain = compiler + assembler + linker + *basic libraries* If this toolchain is configured to generate CORTEX-A8 code by default, the whole *tool*chain* is configured to do so. This includes the basic libraries! If you change the target architecture by using the '-march' command line option you only reach the compiler/assembler/linker. But the basic libraries the linker is using to link your own application are still for the default CORTEX-A8! This must fail on the Mini2440.
Hi Juergen Beisert Let me Explain. i have one application in that i am using zestcard header file and also library and also libusb . it's written on Qt platform in c++. you can see my Makefile in previous post in that i also mention -lusb and -lZestSC1 here i am using Zestcardfunction for Zestcard detect. If i do comment on Zestcardfunction after that do make then i got 'v4T' arch. but when i am using Zestcardfunction after that do make then i got 'v7' arch. i do not know where i do mistake . Note : i also write same application in Qtopia in that i am Zestcardfunction but here i got v4T arch. Here In both Application i am using same toolchain. Let me know solution