From: smerry <seb...@gm...> - 2008-04-22 21:31:39
|
That worked! Thanks for the help, I now have the i2c-io.hex file on the Robostix, and the red led is flashing. I tried to put on one of the applications I made previously for my other gumstix/robostix (which has build-root on it). It utilized the UARTS and ADC on the robostix, and it worked great when I had my build-root version. However now, when I try to run the app it complains that it cannot find my file, simply called "main." I am not very skilled with Linux but I tried changing the permissions on the file to 755, then I tried to run it by typing "main", "./main", "source main", and I even moved it to my /usr/bin. However every time it complained that it couldn't find "main." "-sh: ./main: not found" Does this have anything to do with the fact that I moved over to OE? Do I need to rebuild my executable? If so how? I had all my files in the /robostix/gumstix/<myDir> before, but now in OE that is all gone it seems. This is the make file I had for my build-root version: ############################################################################# # # Makefile for building SMART autonomous vehicles # Put this makefile is the directory above the src dir. # Created by: Sebastian Merry # Date: 01/25/08 # ############################################################################# ifeq ($(DEBUG),y) CFLAGS += -O -g # -O is need to expand inlines else CFLAGS += -O2 endif # Put the name of the main program here (That contains the main() function) TARGET = main # Here are our files C_SRCS = CPP_SRCS = \ $(TARGET).cpp \ Motor.cpp \ USART.cpp \ ADC.cpp \ LVMaxSonar.cpp \ ATmega128.cpp \ Drivetrain.cpp \ XBeePro.cpp \ Message.cpp \ IRSensors.cpp # Set some basic variables including locations for the compiler and include files PWD := $(shell pwd) GUMSTIX_BUILDROOT = $(PWD)/../../../gumstix-buildroot BUILD_ARM = $(GUMSTIX_BUILDROOT)/build_arm_nofpu CROSS_COMPILE = $(BUILD_ARM)/staging_dir/bin/arm-linux- COMMON = ../Common SHARED = ../../Shared # Update the path variable vpath %.c $(COMMON) $(SHARED) # Set the macros for the compiler options LDFLAGS += -lm -lpthread CPPFLAGS += -I . -I $(COMMON) -I $(SHARED) CFLAGS += -Wall TARGET_ARCH=-Os -march=armv5te -mtune=xscale -Wa,-mcpu=xscale CC = $(CROSS_COMPILE)g++ CXX = $(CROSS_COMPILE)g++ # Update the linker to use the correct c++ libraries LINK.o = $(CXX) $(LDFLAGS) $(TARGET_ARCH) # Here are the common object files that are needed for I2C communication I2CFILES = \ i2c-api.o \ i2c-io-api.o \ AvrInfo.o \ BootLoader-api.o \ Crc8.o \ DumpMem.o \ Log.o # Create the list of object files from our source files SSDOBJS = $(CPP_SRCS:.cpp=.o) $(C_SRCS:.c=.o) # Combine the lists of object files OBJS = \ $(SSDOBJS) \ $(I2CFILES) # Here is the main label (called when "make" is issued in the root directory) all: $(TARGET) $(TARGET): svn-version.h $(OBJS) # Clean up the files clean: @echo "Cleaning files ..." rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions $(TARGET) depend .depend dep: svn-version.h @echo "Creating dependencies ..." $(CXX) $(CFLAGS) $(CPPFLAGS) -M *.c $(COMMON)/*.c > .depend FORCE: .PHONY: FORCE PREPROCESS.c = $(CXX) $(CPPFLAGS) $(TARGET_ARCH) -E -Wp,-C,-dD,-dI %.pp : %.c FORCE @echo "Preprocess ..." $(PREPROCESS.c) $< > $@ include ../../svn-version.mk ifeq ($(strip $(filter clean, $(MAKECMDGOALS))),) -include .depend endif ---------------------------------------------- END MAKEFILE That make file would generate the executable, then I would send that over to my gumstix and I could run it with "./main". What do I need to do to compile my code now the the Common and Shared dirs have disappeared? I tried to make my own bitbake .bb file however it complained about tons of things being unreferenced so obviously it isn't finding the other files it needs. All I did was set its DEPENDS variables to "robostix-module i2c" -- View this message in context: http://www.nabble.com/Gumstix--w-OE-and-Robostix---How-do-I-get-them-to-work--tp16802798p16826250.html Sent from the Gumstix mailing list archive at Nabble.com. |