Programming :: Build An Object Code For ARM At91rm9200 Board From A Makefile Using A Crosscompiler?
Apr 17, 2011I want to build an object code for ARM at91rm9200 board from a Makefile using a crosscompiler.
View 4 RepliesI want to build an object code for ARM at91rm9200 board from a Makefile using a crosscompiler.
View 4 RepliesI am new to the whole concept of makefiles, and I'm trying to compile and build my program using a makefile template I have found. My project consists of three directories: "source", where my .cpp files are (source1.cpp, source2.cpp, source3.cpp), "include", where my .h files are (header1.h, header2.h, header3.h), and "obj", where the object files are to be stored (obj1.o, obj2.o, obj3.o). In the project root directory is my makefile, which is as follows:
Code:
EXEC = myexe
CC = g++
IDIR = include
SDIR = source
ODIR = obj
[Code]..
I'd like to write a Makefile for my CUDA/C++ code but I didn't know how things work with CUDA, I mean there is a nvcc compiler but I don't know what I've got to do with this.
Do I have to firstly run nvcc and then g++ or only nvcc to compile my CUDA/C++ code ? I found nothing on the web explaining such basic things .
I've been trying to work out a way to stop chunks of code being compiled using a variable in my makefile but can't work it out. What I mean is for example in my code I might have.
/****output comms portdata********/
printf("
debug comms port %d",ReadPort("ttys1);
I only wish this code to be compiled when I'm debugging. What I've tried is using #ifdef with
#ifdef COMM_PORT_DEBUG
printf("
debug comms port %d",ReadPort("ttys1);
#endif
Then in my make file I set COMM_PORT_DEBUG to 1 so
DEBUG_DEFS = COMM_PORT_DEBUG=1
I then thought I could put it into my in my link line
all: $(CC) $(CPFLAGS) $(DEBUG_DEFS) $(INC_PATHS) $(SOURCE) -o $(PROGRAM) $(LIB_DIRS) $(GAME_LIBS)
but this gives a
gcc: COMM_PORT_DEBUG=1: No such file or directory
is there a way to do this sort of thing? Or am I barking up the wrong tree?
I am dealing with one FORTRAN 90 code, have made small changes.
milenko@milenkons:~/mt4$ make mt4
make: 'mt4' is up to date.
milenko@milenkons:~/mt4$ ifort -c MT2DDIB1.FOR
milenko@milenkons:~/mt4$ make mt4
make: 'mt4' is up to date.
milenko@milenkons:~/mt4$ make mt4
make: 'mt4' is up to date.
milenko@milenkons:~/mt4$ make mt4
make: 'mt4' is up to date.
I go for make command but it does not see that the source code has been modified.Than I do compilation from command line,try make again but no use.
F95=ifort
FFLAFGS= -O1
mt3: driver_mt2ddi.o constants.o settings.o params.o mt2dmod.o fdsystem.o mt2ddat.o mt2dsens.o
$(F95) -o $(FFLAGS) mt3 constants.o settings.o params.o mt2dmod.o fdsystem.o mt2ddat.o mt2dsens.o driver_mt2ddi.o
driver_mt2ddi.o: driver_mt2ddi.for constants.o settings.o params.o mt2dmod.o fdsystem.o mt2ddat.o mt2dsens.o
$(F95) -c $(FFLAGS) driver_mt2ddi.for
I have created an application that has a executable program that loads in a shared object
the shared object loads in another shared object
both of these shared object I have created
For debugging I have been printf'in data to determine what is going on
I now have some odd memory issue, and need a bit more control over debugging...
I have one workspace set up and under my exectuable(will call maintest from now on) I have two items in my link libraries under project build options being soA and soB (so A is the shared object that maintest uses, soB is the SO that soA uses) I also have linker options pthread and ldl
At the beginning of my maintest I do my dlsym and load in each function that I will be using
I always run my program using maintest, because when I have one of the SO as the startup project(turns bold) and try to run it gives me "You must select a host application to run a library"
I tried to set up this host library, i Go to Menu->Project->SetProgramArguments and change the Host Application to the debug version of my maintest
I then hit OK and try to run again but I get the same error: "You must select a host application to run a library"
If I get this part working - which I need help doing, is tehre other steps that need to be taken to debug the so's? or will this make it so when i hit f8 it will run.
1. I need to use clock_gettime(), in <time.h> it is: extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW; and in a successful build .so it is unsolved. In final app to lonk to this .so it is also unsolved. which lib missed in .so or app build?
2. libc include several libs, which are liked by default? say stdc++, rt? rt1/rt2 what does they do?
3. How to find which libc is used or linked?
I don't know whether this is happening because my machine is behind an HTTP proxy, or for some other reason. When I enter my Ubuntu One account name and pass into "Connect to Ubuntu One" and click Connect, I get this code error instantly:
Code: 'NoneType' object has no attribute 'makefile' If I enter nothing or invalid data into these fields, a red icon is displayed immediately, but the error above appears with valid and accurate data in the fields. If this is a proxy issue, why doesn't the application honor the system-wide proxy settings?
Only ones I can think of seem overly complex, and I'm sure there is a simple solution I am overlooking. I have a class, it has a member who is an object. This object needs to be able to represent an object of different types.
[code]...
Where "surface" could be several different types, which will be set during execution. Hope this is clear enough. I have tried using templates but am getting "data member cannot be a member template". Either I have incorrect syntax, or am not implementing it right. another solution would have one class containing definitions of all possible shapes, But this would take up extra memory. Other solutions I thought of seem too round-about, and seems there is a simpler solution that I have overlooked.
So I've been trying to get GIMP 2.7 installed on my Slackware64 13.0, but I'm having some issues. After some extensive finagling and dependence findings, I got it to configure correctly, however, the make fails with libtool trying to find libgdk_pixbuf-2.0.la:
libtool: link: cannot find the library '..//usr/lib64/pkgconfig/gdk-pixbuf/libgdk_pixbuf-2.0.la' or unhandled argument '..//usr/lib64/pkgconfig/gdk-pixbuf/libgdk_pixbuf-2.0.la'
libgdk_pixbuf-2.0.la is in /usr/lib64/pkgconfig/, but for whatever reason, editing the makefile doesn't change this. (Yes I have the right permissions to edit it). First of all, why is it searching for /usr in the top build directory, and second, why doesn't an edit of the makefile work?
I've been trying to use tracepoints on a newly installed Centos5.5 download, and crash when I call register_trace_sched_switch, which maps to tracepoint_probe_register(sched_switch, my_func) in tracepoint. h/DO_TRACE, where my_func is the function I want called back on a thread switch. I'm trying to do this from an installable module.So I downloaded the sources for 5.5 (current, 2.6.18-194), with the intention of kprinting my way through the above problem.Unlike the downloaded kernel, which is an "ELF 64-bit LSB shared object" (I'm building for an Intel Atom), when I build using "make" in my rpmbuild/BUILD/kernel-26..18/linux-2.6.18.x86-64/ directory, I get an "ELF 64-bit LSB executable". When I try to boot it, I get the complaint "Error 13: Invalid or unsupported executable format".
The closest thing I could find on the web, was a suggestion, for some powerpc system, to use the "ELF executable" format instead of "ELF shared object", the opposite of my issue, and that such could be forced by using a CONFIG-RELOCATABLE manifest.I couldn't find any .config manifest that looked likely to produce the result I want.
get phpMyAdmin work on LAMP installed on OpenSuse 10.1 !!
running: "rpm -q" command result:
apache2-2.2.0-21.7
php5-5.1.2-29.25.3
MySQL5.0.18
phpMyAdmin-2.9.1.1-2.3
webmin-1.360-1
My problem is when trying to connect to: "hxxp://www.m-y-d-o-m-a-i-n.com/phpMyAdmin" I reported Error 404: PHP Code: Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again. If you think this is a server error, please contact the webmaster. Error 404
[Code].....
I am tiring to install bluez into AT91rm9200 board. Please would anybody help with what switches i should provide with ./configure.
I tried this /configure --host=armarm-unknown-linux-gnu configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane. configure: error: newly created file is older than distributed files!Check your system clock
Groovy is an object-oriented programming language for the Java platform. I do not have experience in Java, only perl and shell scripts. Recently I have been asked to maintain a software written in groovy (also to make enhancements). So can I learn groovy without knowing java language. or isit I have to learn java before venturing into groovy.
View 1 Replies View RelatedI just downloaded slackware 13.1(x86) and i'm trying to compile ndiswrapper-1.56 using the slackbuild from slackbuils.org and i'm getting this error:
Code:
Makefile:535: /usr/src/linux-2.6.33.4/arch/i486/Makefile: No such file or directory
make[2]: *** No rule to make target `/usr/src/linux-2.6.33.4/arch/i486/Makefile'. Stop.
make[1]: *** [modules] Error 2
make: *** [all] Error 2
looks like the folder i486 doesn't exist
I need to rewrite the selenium java code into its equivalent php code.
View 5 Replies View RelatedThe problem emerged when I started to make the internal microphone and external speakers work [URL]. In either kernel 2.6.32-24 or 2.6.35-15 - cannot install any package with apt-get. Here is the error I get when installing just anything [URL]. Basically, here is it:
Code:
ERROR: Build failed. Please review the build log at /tmp/alsa-driver-linuxant.3620.log
dpkg: error processing alsa-driver-linuxant (--configure):
subprocess installed post-installation script returned error exit status 2
Setting up libxslt1-dev (1.1.26-1ubuntu1) ...
Errors were encountered while processing:
alsa-driver-linuxant
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have problems with linking object files.
This is what I get:
I want to define _LINUX in my makefile which I would be using in my source code like #if _Linux. I do not want to #define _Linux __linux__ in my source code.
View 2 Replies View Relatedat present I compile the same code for different systems (cross compilers)I need to call libs and include paths for the different processors. At present I simply comment out the paths not needed
eg
#INCDIR = -I/cross1/.......
#INCDIR = -I/cross2/.......
[code]....
I am not sure which thread this fits in, I am facing a strange problem. There is a code tarball that I cross-compile on a Fedora Core 9 machine and it builds fine. But when I do the same thing on a (heavily used) Fedora Core 7 machine, the build keeps failing in the gnuapp folders grep, coreutils etc. I have tried 'make distclean', and clearing the config.cache but no impact.
Note: I export the PATH variable (to the local cross-compiler) before starting the build. The cross compilation is for the MIPS processor and GNU makefiles are used.
I am a beginner in Linux. Never did any kernel programming in Linux/Windows before. I am now on a project and I am supposed to understand a Linux Device Driver Code. It contains 6 .c files and 1 Makefile.
The make file goes as this:
I have a.c b.c c.c d.c d.c e.c f.c in the director along with the Makefile mentioned.
I am using Fedora Red Hat Linux 32 bit.
How to compile the Makefile.
How to create a simple Makefile using C....
View 3 Replies View RelatedI'm trying to figure out how Make handles directories.
How can I modify this makefile so it will put all of the .o files in a separate build directory?
Code:
But make ignores this and still puts main.o in the base directory. And if I refer to the build directory in the dependencies for bandit, make complains about "no rule ..."
I want to keep main.cpp in the base directory, all other sources in the src directory, and all object files in the build directory.
When I put a "test" target in my Makefile containing
Code:
@echo "CXX= $(CXX)"
it tells me "CXX= g++".
But I have nothing in the Makefile assigning any value to CXX, and as far as I can tell I have no CXX environment variable (no "CXX" appears when I run the shell command "env", and "echo $CXX" returns a blank line. So where's the g++ value coming from. Is this just built into Gnu Make, or is there a configuration file for make somewhere?
I am trying to run a script to setup environment variables and then run other commands in a make file. But the source or the dot operator (shell is bash) does not seem to take any effect as the subsequent command didn't pick the environment up. Do I have to put every lines of the environment setup in the first script into the makefile instead?
sample setenv.sh
#!/bin/sh
export MYDIR=/somedir
sample makefile:
all: source ./setenv.sh
echo $(MYDIR)
I'm learning about how to write Makefiles, and am a bit lost at how to run a command in a target depending on the value of a variable.
What I'm trying to do, is run "strip" only if the user is running a given version of a C compiler.
Here's the code:
Code:
$(LUA_T): $(LUA_O) $(LUA_A)
$(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
#FDPIC ELF binaries can be stripped, but not FLAT binaries
$(if($(CROSS),bfin-linux-uclibc-),
$(STRIP) $@
;)
Does someone know the correct way to do this?
I am new to automake. When running automake command, there is an error "cannot open > py/Makefile.in: No such file or directory". How to create that file? And, what is that file for?
View 1 Replies View RelatedIf I would normal compile using the following line:
Code:
Where should those library flags go in a makefile? Say I having the following makefile:
Code:
all: ${PROGS}
clean:
I am trying to use a software package written in ANSI C. It has a makefile which has to be executed first.
As soon as I execute it I get messages like: line i: command not found.
Commands for which I am getting errors :
CC = /usr/bin/gcc
GCCFLAGS = -c -Wall
ROOTDIR = .
My gcc compiler is located in the above directory only. In ROOTDIR also I tried giving the path in which all the required files & folders are present but still I get the command not found error in all the lines.