I’m a newbie and this is my first post.
I just got started with building my first HelloWorld style app to test the cross-compile capabilities of Eclipse/CDT, The app compiles successfully and generate the expected HelloBeagle.elf executable. However, when I transfer it to my beagle and attempt to run, I get an “Illegal instruction” error.
I’ve watched every video I could find (Thanks Derek Malloy) and I still can’t find the reason for the error. Obviously it’s not generating the right code base, but the build output does show that it it aimed for the cortex-a8 processor which I believe is correct for the beaglebone black.
I would appreciate any suggestions or ideas!!
Thanks
Here is my environment info and build output:
Build Environment:
Windows 7
Eclipse Kepler SR2
CDT
GNU ARM Eclipse Plug-in
MinGW
Beaglebone Black: (Angstrom Distro)
Linux beaglebone 3.8.13 #1 SMP Wed Sep 4 09:09:32 CEST 2013 armv7l GNU/Linux
Build output:
16:11:12 **** Build of configuration Debug for project HelloBeagle ****
make pre-build main-build
arm-none-eabi-gcc --version
arm-none-eabi-gcc.exe (GNU Tools for ARM Embedded Processors) 4.8.3 20140228 (release) [ARM/embedded-4_8-branch revision 208322]
Copyright © 2013 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.
Building file: …/src/HelloBeagle.cpp
Invoking: Cross ARM C++ Compiler
arm-none-eabi-g++ -mcpu=cortex-a8 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -g3 -MMD -MP -MF"src/HelloBeagle.d" -MT"src/HelloBeagle.d" -c -o “src/HelloBeagle.o” “…/src/HelloBeagle.cpp”
Finished building: …/src/HelloBeagle.cpp
Building target: HelloBeagle.elf
Invoking: Cross ARM C++ Linker
arm-none-eabi-g++ -mcpu=cortex-a8 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -g3 -Xlinker --gc-sections -Wl,-Map,“HelloBeagle.map” --specs=rdimon.specs -Wl,–start-group -lgcc -lc -lc -lm -lrdimon -Wl,–end-group -o “HelloBeagle.elf” ./src/HelloBeagle.o
Finished building target: HelloBeagle.elf
Invoking: Cross ARM GNU Create Flash Image
arm-none-eabi-objcopy -O ihex “HelloBeagle.elf” “HelloBeagle.hex”
Finished building: HelloBeagle.hex
Invoking: Cross ARM GNU Print Size
arm-none-eabi-size --format=berkeley “HelloBeagle.elf”
text data bss dec hex filename
211304 2732 7776 221812 36274 HelloBeagle.elf
Finished building: HelloBeagle.siz
16:11:28 Build Finished (took 16s.236ms)