Matrisberäkningar med för STM32?

PIC, AVR, Arduino, Raspberry Pi, Basic Stamp, PLC mm.
Användarvisningsbild
Al_Bundy
Inlägg: 2889
Blev medlem: 11 september 2012, 23:59:50
Ort: The U.S - Chicago
Kontakt:

Re: Matrisberäkningar med för STM32?

Inlägg av Al_Bundy »

Inkompetens? Om inte någon annan klarar av detta, varför ska jag då klara utav det? Så fort jag komplimerar detta för ARM så får jag massa mystiska errors så som att det är fel symbol på filerna eller att någon flagga ej kan godkännas, trots att den inte ens finns.
bearing
Inlägg: 11265
Blev medlem: 2 mars 2006, 01:01:45
Ort: Ängelholm

Re: Matrisberäkningar med för STM32?

Inlägg av bearing »

grep -rnw * -e '-meabi=5'
Texten borde finnas i byggskriptet/make-filen, eller vad du kallar det.

-meabi är en växel (option) till kompilatorn, på exakt samma sätt som -wall är det, som du kanske minns att du använde tidigare.

Testa att köra en grep på endast meabi, så borde den rimligtvis hittas i byggskriptet/makefilen.
Användarvisningsbild
Al_Bundy
Inlägg: 2889
Blev medlem: 11 september 2012, 23:59:50
Ort: The U.S - Chicago
Kontakt:

Re: Matrisberäkningar med för STM32?

Inlägg av Al_Bundy »

Finns inget, tyvärr.

Kod: Markera allt

dell@dell-Precision-M6400:~/Program/CLAPACK-3.2.1-ARM$ grep -rnw * -e 'meabi'
dell@dell-Precision-M6400:~/Program/CLAPACK-3.2.1-ARM$ 
Shimonu
Inlägg: 295
Blev medlem: 21 oktober 2015, 22:44:33

Re: Matrisberäkningar med för STM32?

Inlägg av Shimonu »

Tycker din grep ser konstig ut, testa

Kod: Markera allt

grep -eRinH 'meabi' *
Så hade jag gjort.
Användarvisningsbild
Al_Bundy
Inlägg: 2889
Blev medlem: 11 september 2012, 23:59:50
Ort: The U.S - Chicago
Kontakt:

Re: Matrisberäkningar med för STM32?

Inlägg av Al_Bundy »

Fungerar inte det heller.

Kod: Markera allt

dell@dell-Precision-M6400:~/Program/CLAPACK-3.2.1-ARM$ grep -eRinH 'meabi' *
grep: meabi: Filen eller katalogen finns inte
grep: BLAS: Är en katalog
grep: F2CLIBS: Är en katalog
grep: INCLUDE: Är en katalog
grep: INSTALL: Är en katalog
grep: SRC: Är en katalog
grep: TESTING: Är en katalog
dell@dell-Precision-M6400:~/Program/CLAPACK-3.2.1-ARM$ 
Undra hur det skulle vara om man klipper in själva C-koden i STM32 projektet och kompilerar där?
Shimonu
Inlägg: 295
Blev medlem: 21 oktober 2015, 22:44:33

Re: Matrisberäkningar med för STM32?

Inlägg av Shimonu »

Vi kör nog olika versioner då. Testa att köra utan -w iaf. Det känns som ett krav där du kan begränsa dig för mycket.
Användarvisningsbild
Al_Bundy
Inlägg: 2889
Blev medlem: 11 september 2012, 23:59:50
Ort: The U.S - Chicago
Kontakt:

Re: Matrisberäkningar med för STM32?

Inlägg av Al_Bundy »

Hittar inte. Tyvärr.
Mr Andersson
Inlägg: 1397
Blev medlem: 29 januari 2011, 21:06:30
Ort: Lapplandet

Re: Matrisberäkningar med för STM32?

Inlägg av Mr Andersson »

Jag kanske var lite otydlig, ber om ursäkt för det.

Du kör ARM-versionen av gcc (arm-atollic-eabi-prefix) men system(x86)-versioner av as & ld (dvs inget prefix).
Du måste ändra makefilen så att alla plattformsberoende verktyg är ARM-varianten.
Användarvisningsbild
Al_Bundy
Inlägg: 2889
Blev medlem: 11 september 2012, 23:59:50
Ort: The U.S - Chicago
Kontakt:

Re: Matrisberäkningar med för STM32?

Inlägg av Al_Bundy »

Jag postar make.inc filen. Som vi ser här så är gcc angivet som standard, om jag inte ändrar den.

Kod: Markera allt

# -*- Makefile -*-
####################################################################
#  LAPACK make include file.                                       #
#  LAPACK, Version 3.2.1                                           #
#  June 2009		                                               #
####################################################################
#
# See the INSTALL/ directory for more examples.
#
SHELL = /bin/sh
#
#  The machine (platform) identifier to append to the library names
#
PLAT = _LINUX
#  
#  Modify the FORTRAN and OPTS definitions to refer to the
#  compiler and desired compiler options for your machine.  NOOPT
#  refers to the compiler options desired when NO OPTIMIZATION is
#  selected.  Define LOADER and LOADOPTS to refer to the loader
#  and desired load options for your machine.
#
#######################################################
# This is used to compile C libary
CC        = gcc
# if no wrapping of the blas library is needed, uncomment next line
#CC        = gcc -DNO_BLAS_WRAP
CFLAGS    = -O3 -I$(TOPDIR)/INCLUDE
LOADER    = gcc
LOADOPTS  =
NOOPT     = -O0 -I$(TOPDIR)/INCLUDE
DRVCFLAGS = $(CFLAGS)
F2CCFLAGS = $(CFLAGS)
#######################################################################

#
# Timer for the SECOND and DSECND routines
#
# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
# TIMER    = EXT_ETIME
# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
# TIMER    = EXT_ETIME_
# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
# TIMER    = INT_ETIME
# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
# SECOND and DSECND will use a call to the Fortran standard INTERNAL FUNCTION CPU_TIME 
TIMER    = INT_CPU_TIME
# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
# TIMER     = NONE
#
#  The archiver and the flag(s) to use when building archive (library)
#  If you system has no ranlib, set RANLIB = echo.
#
ARCH     = ar
ARCHFLAGS= cr
RANLIB   = ranlib
#
#  The location of BLAS library for linking the testing programs.
#  The target's machine-specific, optimized BLAS library should be
#  used whenever possible.
#
BLASLIB      = ../../blas$(PLAT).a
#
#  Location of the extended-precision BLAS (XBLAS) Fortran library
#  used for building and testing extended-precision routines.  The
#  relevant routines will be compiled and XBLAS will be linked only if
#  USEXBLAS is defined.
#
# USEXBLAS    = Yes
XBLASLIB     =
# XBLASLIB    = -lxblas
#
#  Names of generated libraries.
#
LAPACKLIB    = lapack$(PLAT).a
F2CLIB       = ../../F2CLIBS/libf2c.a
TMGLIB       = tmglib$(PLAT).a
EIGSRCLIB    = eigsrc$(PLAT).a
LINSRCLIB    = linsrc$(PLAT).a
F2CLIB		 = ../../F2CLIBS/libf2c.a
Här är makefile filen.

Kod: Markera allt

#
#  Top Level Makefile for LAPACK
#  Version 3.2.1
#  June 2009
#

include make.inc

all: f2clib lapack_install lib lapack_testing blas_testing
#all: f2clib lapack_install lib lapack_testing blas_testing variants_testing

#lib: lapacklib tmglib
#lib: f2clib lapacklib tmglib
lib: f2clib blaslib variants lapacklib tmglib

clean: cleanlib cleantesting cleanblas_testing 

lapack_install:
	( cd INSTALL; $(MAKE); ./testlsame; ./testslamch; \
	  ./testdlamch; ./testsecond; ./testdsecnd; ./testversion )

blaslib:
	( cd BLAS/SRC; $(MAKE) )

cblaswrap: 
	( cd BLAS/WRAP; $(MAKE) libcblaswr.a; cp libcblaswr.a ../.. )

fblaswrap: 
	( cd BLAS/WRAP; $(MAKE) libfblaswr.a; cp libfblaswr.a ../.. )

lapacklib:	lapack_install
	( cd SRC; $(MAKE) )

variants:
	( cd SRC/VARIANTS ; $(MAKE))
	
tmglib:
	( cd TESTING/MATGEN; $(MAKE) )

f2clib:
	    ( cd F2CLIBS/libf2c; $(MAKE) )

lapack_testing:	lib
	( cd TESTING ; $(MAKE) )

variants_testing: lib
	( cd TESTING ; rm -f xlintst* ; $(MAKE)  VARLIB='SRC/VARIANTS/LIB/cholrl.a' ; \
	mv stest.out stest_cholrl.out ; mv dtest.out dtest_cholrl.out ; mv ctest.out ctest_cholrl.out ; mv ztest.out ztest_cholrl.out )
	( cd TESTING ; rm -f xlintst* ; $(MAKE)  VARLIB='SRC/VARIANTS/LIB/choltop.a' ; \
	mv stest.out stest_choltop.out ; mv dtest.out dtest_choltop.out ; mv ctest.out ctest_choltop.out ; mv ztest.out ztest_choltop.out )
	( cd TESTING ; rm -f xlintst* ; $(MAKE)  VARLIB='SRC/VARIANTS/LIB/lucr.a' ; \
	mv stest.out stest_lucr.out ; mv dtest.out dtest_lucr.out ; mv ctest.out ctest_lucr.out ; mv ztest.out ztest_lucr.out )
	( cd TESTING ;  rm -f xlintst* ; $(MAKE)  VARLIB='SRC/VARIANTS/LIB/lull.a' ; \
	mv stest.out stest_lull.out ; mv dtest.out dtest_lull.out ; mv ctest.out ctest_lull.out ; mv ztest.out ztest_lull.out )
	( cd TESTING ;  rm -f xlintst* ; $(MAKE)  VARLIB='SRC/VARIANTS/LIB/lurec.a' ; \
	mv stest.out stest_lurec.out ; mv dtest.out dtest_lurec.out ; mv ctest.out ctest_lurec.out ; mv ztest.out ztest_lurec.out )
	( cd TESTING ;  rm -f xlintst* ; $(MAKE)  VARLIB='SRC/VARIANTS/LIB/qrll.a' ; \
	mv stest.out stest_qrll.out ; mv dtest.out dtest_qrll.out ; mv ctest.out ctest_qrll.out ; mv ztest.out ztest_qrll.out )
		
blas_testing:
	( cd BLAS/TESTING; $(MAKE) -f Makeblat1 )
	( cd BLAS; ./xblat1s > sblat1.out    ; \
	           ./xblat1d > dblat1.out    ; \
	           ./xblat1c > cblat1.out    ; \
	           ./xblat1z > zblat1.out    ) 
	( cd BLAS/TESTING; $(MAKE) -f Makeblat2 )
	( cd BLAS; ./xblat2s < sblat2.in     ; \
	           ./xblat2d < dblat2.in     ; \
	           ./xblat2c < cblat2.in     ; \
	           ./xblat2z < zblat2.in     )
	( cd BLAS/TESTING; $(MAKE) -f Makeblat3 )
	( cd BLAS; ./xblat3s < sblat3.in     ; \
	           ./xblat3d < dblat3.in     ; \
	           ./xblat3c < cblat3.in     ; \
	           ./xblat3z < zblat3.in     ) 

cleanlib:
	( cd INSTALL; $(MAKE) clean )
	( cd BLAS/SRC; $(MAKE) clean )
	( cd SRC; $(MAKE) clean )
	( cd SRC/VARIANTS; $(MAKE) clean )
	( cd TESTING/MATGEN; $(MAKE) clean )
	( cd F2CLIBS/libf2c; $(MAKE) clean )
	( cd F2CLIBS; rm -f *.a)

cleanblas_testing:	
	( cd BLAS/TESTING; $(MAKE) -f Makeblat1 clean )
	( cd BLAS/TESTING; $(MAKE) -f Makeblat2 clean )
	( cd BLAS/TESTING; $(MAKE) -f Makeblat3 clean )
	( cd BLAS; rm -f xblat* )

cleantesting:
	( cd TESTING/LIN; $(MAKE) clean )
	( cd TESTING/EIG; $(MAKE) clean )
	( cd TESTING; rm -f xlin* xeig* )

cleanall: cleanlib cleanblas_testing cleantesting 
	rm -f *.a TESTING/*.out INSTALL/test*  BLAS/*.out
Mr Andersson
Inlägg: 1397
Blev medlem: 29 januari 2011, 21:06:30
Ort: Lapplandet

Re: Matrisberäkningar med för STM32?

Inlägg av Mr Andersson »

Den där makefilen säger inte mycket. Den går bara igenom projektmapparna och kör make. Du måste kolla de makefilerna.
Användarvisningsbild
Al_Bundy
Inlägg: 2889
Blev medlem: 11 september 2012, 23:59:50
Ort: The U.S - Chicago
Kontakt:

Re: Matrisberäkningar med för STM32?

Inlägg av Al_Bundy »

Här hittade jag en intressant makefil.

Kod: Markera allt

# compile, then strip unnecessary symbols
.c.o:
	$(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
	ld -r -x -o $*.xxx $*.o
	mv $*.xxx $*.o
## Under Solaris (and other systems that do not understand ld -x),
## omit -x in the ld line above.
## If your system does not have the ld command, comment out
## or remove both the ld and mv lines above.
När jag körde arm-linux-egnulb-gcc eller vad det nu hette, så klagade den på symboler. Men när jag körde med atollic's GNU GCC så klagade den på en liten flagga, som jag inte hittar.

Kod: Markera allt

TOPDIR=../..
include $(TOPDIR)/make.inc

# Unix makefile: see README.
# For C++, first "make hadd".
# If your compiler does not recognize ANSI C, add
#	-DKR_headers
# to the CFLAGS = line below.
# On Sun and other BSD systems that do not provide an ANSI sprintf, add
#	-DUSE_STRLEN
# to the CFLAGS = line below.
# On Linux systems, add
#	-DNON_UNIX_STDIO
# to the CFLAGS = line below.  For libf2c.so under Linux, also add
#	-fPIC
# to the CFLAGS = line below.

.SUFFIXES: .c .o

# compile, then strip unnecessary symbols
.c.o:
	$(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
	ld -r -x -o $*.xxx $*.o
	mv $*.xxx $*.o
## Under Solaris (and other systems that do not understand ld -x),
## omit -x in the ld line above.
## If your system does not have the ld command, comment out
## or remove both the ld and mv lines above.

MISC =	f77vers.o i77vers.o main.o s_rnge.o abort_.o exit_.o getarg_.o iargc_.o\
	getenv_.o signal_.o s_stop.o s_paus.o system_.o cabs.o ctype.o\
	derf_.o derfc_.o erf_.o erfc_.o sig_die.o uninit.o
POW =	pow_ci.o pow_dd.o pow_di.o pow_hh.o pow_ii.o pow_ri.o pow_zi.o pow_zz.o
CX =	c_abs.o c_cos.o c_div.o c_exp.o c_log.o c_sin.o c_sqrt.o
DCX =	z_abs.o z_cos.o z_div.o z_exp.o z_log.o z_sin.o z_sqrt.o
REAL =	r_abs.o r_acos.o r_asin.o r_atan.o r_atn2.o r_cnjg.o r_cos.o\
	r_cosh.o r_dim.o r_exp.o r_imag.o r_int.o\
	r_lg10.o r_log.o r_mod.o r_nint.o r_sign.o\
	r_sin.o r_sinh.o r_sqrt.o r_tan.o r_tanh.o
DBL =	d_abs.o d_acos.o d_asin.o d_atan.o d_atn2.o\
	d_cnjg.o d_cos.o d_cosh.o d_dim.o d_exp.o\
	d_imag.o d_int.o d_lg10.o d_log.o d_mod.o\
	d_nint.o d_prod.o d_sign.o d_sin.o d_sinh.o\
	d_sqrt.o d_tan.o d_tanh.o
INT =	i_abs.o i_dim.o i_dnnt.o i_indx.o i_len.o i_len_trim.o i_mod.o i_nint.o i_sign.o\
	lbitbits.o lbitshft.o i_ceiling.o
HALF =	h_abs.o h_dim.o h_dnnt.o h_indx.o h_len.o h_mod.o h_nint.o h_sign.o
CMP =	l_ge.o l_gt.o l_le.o l_lt.o hl_ge.o hl_gt.o hl_le.o hl_lt.o
EFL =	ef1asc_.o ef1cmc_.o
CHAR =	f77_aloc.o s_cat.o s_cmp.o s_copy.o
I77 =	backspac.o close.o dfe.o dolio.o due.o endfile.o err.o\
	fmt.o fmtlib.o ftell_.o iio.o ilnw.o inquire.o lread.o lwrite.o\
	open.o rdfmt.o rewind.o rsfe.o rsli.o rsne.o sfe.o sue.o\
	typesize.o uio.o util.o wref.o wrtfmt.o wsfe.o wsle.o wsne.o xwsne.o
QINT =	pow_qq.o qbitbits.o qbitshft.o ftell64_.o
TIME =	dtime_.o etime_.o

# If you get an error compiling dtime_.c or etime_.c, try adding
# -DUSE_CLOCK to the CFLAGS assignment above; if that does not work,
# omit $(TIME) from OFILES = assignment below.

# To get signed zeros in write statements on IEEE-arithmetic systems,
# add -DSIGNED_ZEROS to the CFLAGS assignment below and add signbit.o
# to the end of the OFILES = assignment below.

# For INTEGER*8 support (which requires system-dependent adjustments to
# f2c.h), add $(QINT) to the OFILES = assignment below...

OFILES = $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
	$(HALF) $(CMP) $(EFL) $(CHAR) $(I77) $(TIME)

all: f2c.h signal1.h sysdep1.h libf2c.a clapack_install

libf2c.a: $(OFILES)
	ar r libf2c.a $?
	-ranlib libf2c.a

## Shared-library variant: the following rule works on Linux
## systems.  Details are system-dependent.  Under Linux, -fPIC
## must appear in the CFLAGS assignment when making libf2c.so.
## Under Solaris, use -Kpic in CFLAGS and use "ld -G" instead
## of "cc -shared".

libf2c.so: $(OFILES)
	cc -shared -o libf2c.so $(OFILES)

### If your system lacks ranlib, you don't need it; see README.

f77vers.o: f77vers.c
	$(CC) -c f77vers.c

i77vers.o: i77vers.c
	$(CC) -c i77vers.c

# To get an "f2c.h" for use with "f2c -C++", first "make hadd"
hadd: f2c.h0 f2ch.add
	cat f2c.h0 f2ch.add >f2c.h

# For use with "f2c" and "f2c -A":
f2c.h: f2c.h0
	cp f2c.h0 f2c.h

# You may need to adjust signal1.h and sysdep1.h suitably for your system...
signal1.h: signal1.h0
	cp signal1.h0 signal1.h

sysdep1.h: sysdep1.h0
	cp sysdep1.h0 sysdep1.h

# If your system lacks onexit() and you are not using an
# ANSI C compiler, then you should uncomment the following
# two lines (for compiling main.o):
#main.o: main.c
#	$(CC) -c -DNO_ONEXIT -DSkip_f2c_Undefs main.c
# On at least some Sun systems, it is more appropriate to
# uncomment the following two lines:
#main.o: main.c
#	$(CC) -c -Donexit=on_exit -DSkip_f2c_Undefs main.c

install: libf2c.a
	cp libf2c.a $(LIBDIR)
	-ranlib $(LIBDIR)/libf2c.a

clapack_install: libf2c.a
	mv libf2c.a ..

clean:
	rm -f libf2c.a *.o arith.h signal1.h sysdep1.h

backspac.o:	fio.h
close.o:	fio.h
dfe.o:		fio.h
dfe.o:		fmt.h
due.o:		fio.h
endfile.o:	fio.h rawio.h
err.o:		fio.h rawio.h
fmt.o:		fio.h
fmt.o:		fmt.h
iio.o:		fio.h
iio.o:		fmt.h
ilnw.o:		fio.h
ilnw.o:		lio.h
inquire.o:	fio.h
lread.o:	fio.h
lread.o:	fmt.h
lread.o:	lio.h
lread.o:	fp.h
lwrite.o:	fio.h
lwrite.o:	fmt.h
lwrite.o:	lio.h
open.o:		fio.h rawio.h
rdfmt.o:	fio.h
rdfmt.o:	fmt.h
rdfmt.o:	fp.h
rewind.o:	fio.h
rsfe.o:		fio.h
rsfe.o:		fmt.h
rsli.o:		fio.h
rsli.o:		lio.h
rsne.o:		fio.h
rsne.o:		lio.h
sfe.o:		fio.h
signbit.o:	arith.h
sue.o:		fio.h
uio.o:		fio.h
uninit.o:	arith.h
util.o:		fio.h
wref.o:		fio.h
wref.o:		fmt.h
wref.o:		fp.h
wrtfmt.o:	fio.h
wrtfmt.o:	fmt.h
wsfe.o:		fio.h
wsfe.o:		fmt.h
wsle.o:		fio.h
wsle.o:		fmt.h
wsle.o:		lio.h
wsne.o:		fio.h
wsne.o:		lio.h
xwsne.o:	fio.h
xwsne.o:	lio.h
xwsne.o:	fmt.h

arith.h: arithchk.c
	$(CC) $(CFLAGS) -DNO_FPINIT arithchk.c -lm ||\
	 $(CC) -DNO_LONG_LONG $(CFLAGS) -DNO_FPINIT arithchk.c -lm
	./a.out >arith.h
	rm -f a.out arithchk.o

check:
	xsum Notice README abort_.c arithchk.c backspac.c c_abs.c c_cos.c \
	c_div.c c_exp.c c_log.c c_sin.c c_sqrt.c cabs.c close.c comptry.bat \
	ctype.c ctype.h \
	d_abs.c d_acos.c d_asin.c d_atan.c d_atn2.c d_cnjg.c d_cos.c d_cosh.c \
	d_dim.c d_exp.c d_imag.c d_int.c d_lg10.c d_log.c d_mod.c \
	d_nint.c d_prod.c d_sign.c d_sin.c d_sinh.c d_sqrt.c d_tan.c \
	d_tanh.c derf_.c derfc_.c dfe.c dolio.c dtime_.c due.c ef1asc_.c \
	ef1cmc_.c endfile.c erf_.c erfc_.c err.c etime_.c exit_.c f2c.h0 \
	f2ch.add f77_aloc.c f77vers.c fio.h fmt.c fmt.h fmtlib.c \
	fp.h ftell_.c ftell64_.c i_ceiling.c \
	getarg_.c getenv_.c h_abs.c h_dim.c h_dnnt.c h_indx.c h_len.c \
	h_mod.c h_nint.c h_sign.c hl_ge.c hl_gt.c hl_le.c hl_lt.c \
	i77vers.c i_abs.c i_dim.c i_dnnt.c i_indx.c i_len.c i_len_trim.c i_mod.c \
	i_nint.c i_sign.c iargc_.c iio.c ilnw.c inquire.c l_ge.c l_gt.c \
	l_le.c l_lt.c lbitbits.c lbitshft.c libf2c.lbc libf2c.sy lio.h \
	lread.c lwrite.c main.c makefile.sy makefile.u makefile.vc \
	makefile.wat math.hvc mkfile.plan9 open.c pow_ci.c pow_dd.c \
	pow_di.c pow_hh.c pow_ii.c pow_qq.c pow_ri.c pow_zi.c pow_zz.c \
	qbitbits.c qbitshft.c r_abs.c r_acos.c r_asin.c r_atan.c r_atn2.c \
	r_cnjg.c r_cos.c r_cosh.c r_dim.c r_exp.c r_imag.c r_int.c r_lg10.c \
	r_log.c r_mod.c r_nint.c r_sign.c r_sin.c r_sinh.c r_sqrt.c \
	r_tan.c r_tanh.c rawio.h rdfmt.c rewind.c rsfe.c rsli.c rsne.c \
	s_cat.c s_cmp.c s_copy.c s_paus.c s_rnge.c s_stop.c scomptry.bat sfe.c \
	sig_die.c signal1.h0 signal_.c signbit.c sue.c sysdep1.h0 system_.c \
	typesize.c \
	uio.c uninit.c util.c wref.c wrtfmt.c wsfe.c wsle.c wsne.c xwsne.c \
	z_abs.c z_cos.c z_div.c z_exp.c z_log.c z_sin.c z_sqrt.c >xsum1.out
	cmp xsum0.out xsum1.out && mv xsum1.out xsum.out || diff xsum[01].out
Användarvisningsbild
Al_Bundy
Inlägg: 2889
Blev medlem: 11 september 2012, 23:59:50
Ort: The U.S - Chicago
Kontakt:

Re: Matrisberäkningar med för STM32?

Inlägg av Al_Bundy »

Kod: Markera allt

dell@dell-Precision-M6400:~/Program/CLAPACK-3.2.1-ARM$ arm-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/arm-linux-gnueabi/7/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 7.3.0-27ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --with-target-system-zlib --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv5t --with-float=soft --disable-werror --enable-multilib --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabi --program-prefix=arm-linux-gnueabi- --includedir=/usr/arm-linux-gnueabi/include
Thread model: posix
gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04) 
dell@dell-Precision-M6400:~/Program/CLAPACK-3.2.1-ARM$ arm-atollic-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-atollic-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/bin/../lib/gcc/arm-atollic-eabi/6.3.1/lto-wrapper
Target: arm-atollic-eabi
Configured with: /home/build/gcc-arm-none-eabi-6-2017-q1-update/src/gcc/configure --target=arm-atollic-eabi --prefix=/home/build/gcc-arm-none-eabi-6-2017-q1-update/install-native --libexecdir=/home/build/gcc-arm-none-eabi-6-2017-q1-update/install-native/lib --infodir=/home/build/gcc-arm-none-eabi-6-2017-q1-update/install-native/share/doc/gcc-arm-atollic-eabi/info --mandir=/home/build/gcc-arm-none-eabi-6-2017-q1-update/install-native/share/doc/gcc-arm-atollic-eabi/man --htmldir=/home/build/gcc-arm-none-eabi-6-2017-q1-update/install-native/share/doc/gcc-arm-atollic-eabi/html --pdfdir=/home/build/gcc-arm-none-eabi-6-2017-q1-update/install-native/share/doc/gcc-arm-atollic-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-atollic-eabi --with-sysroot=/home/build/gcc-arm-none-eabi-6-2017-q1-update/install-native/arm-atollic-eabi --build=x86_64-linux-gnu --host=x86_64-linux-gnu --with-gmp=/home/build/gcc-arm-none-eabi-6-2017-q1-update/build-native/host-libs/usr --with-mpfr=/home/build/gcc-arm-none-eabi-6-2017-q1-update/build-native/host-libs/usr --with-mpc=/home/build/gcc-arm-none-eabi-6-2017-q1-update/build-native/host-libs/usr --with-isl=/home/build/gcc-arm-none-eabi-6-2017-q1-update/build-native/host-libs/usr --with-libelf=/home/build/gcc-arm-none-eabi-6-2017-q1-update/build-native/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors (Build 17.03)' --with-multilib-list=atollicprofile
Thread model: single
gcc version 6.3.1 20170215 (release) [ARM/embedded-6-branch revision 245512] (GNU Tools for ARM Embedded Processors (Build 17.03)) 
dell@dell-Precision-M6400:~/Program/CLAPACK-3.2.1-ARM$ 

När jag tog bort

Kod: Markera allt

ld -r -x -o $*.xxx $*.o
	mv $*.xxx $*.o
Så kunde jag kompilera med arm-linux-gnueabi-gcc. Frågan om det räcker för STM32?

Kod: Markera allt

dell@dell-Precision-M6400:~/Program/CLAPACK-3.2.1-ARM$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-none-eabi/6.3.1/lto-wrapper
Target: arm-none-eabi
Configured with: ../src/configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/lib/include' --mandir='/usr/lib/share/man' --infodir='/usr/lib/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir='/usr/lib/lib/x86_64-linux-gnu' --libexecdir='/usr/lib/lib/x86_64-linux-gnu' --disable-maintainer-mode --disable-dependency-tracking --mandir=/usr/share/man --enable-languages=c,c++,lto --enable-multilib --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --build=x86_64-linux-gnu --target=arm-none-eabi --with-system-zlib --with-gnu-as --with-gnu-ld --with-pkgversion=15:6.3.1+svn253039-1build1 --without-included-gettext --prefix=/usr/lib --infodir=/usr/share/doc/gcc-arm-none-eabi/info --htmldir=/usr/share/doc/gcc-arm-none-eabi/html --pdfdir=/usr/share/doc/gcc-arm-none-eabi/pdf --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --disable-libstdc++-v3 --host=x86_64-linux-gnu --with-headers=no --without-newlib --with-multilib-list=rmprofile CFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-iopiMw/gcc-arm-none-eabi-6.3.1+svn253039=. -fstack-protector-strong' CPPFLAGS='-Wdate-time -D_FORTIFY_SOURCE=2' CXXFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-iopiMw/gcc-arm-none-eabi-6.3.1+svn253039=. -fstack-protector-strong' FCFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-iopiMw/gcc-arm-none-eabi-6.3.1+svn253039=. -fstack-protector-strong' FFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-iopiMw/gcc-arm-none-eabi-6.3.1+svn253039=. -fstack-protector-strong' GCJFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-iopiMw/gcc-arm-none-eabi-6.3.1+svn253039=. -fstack-protector-strong' LDFLAGS='-Wl,-Bsymbolic-functions -Wl,-z,relro' OBJCFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-iopiMw/gcc-arm-none-eabi-6.3.1+svn253039=. -fstack-protector-strong' OBJCXXFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-iopiMw/gcc-arm-none-eabi-6.3.1+svn253039=. -fstack-protector-strong' INHIBIT_LIBC_CFLAGS=-DUSE_TM_CLONE_REGISTRY=0 AR_FOR_TARGET=arm-none-eabi-ar AS_FOR_TARGET=arm-none-eabi-as LD_FOR_TARGET=arm-none-eabi-ld NM_FOR_TARGET=arm-none-eabi-nm OBJDUMP_FOR_TARGET=arm-none-eabi-objdump RANLIB_FOR_TARGET=arm-none-eabi-ranlib READELF_FOR_TARGET=arm-none-eabi-readelf STRIP_FOR_TARGET=arm-none-eabi-strip
Thread model: single
gcc version 6.3.1 20170620 (15:6.3.1+svn253039-1build1) 
dell@dell-Precision-M6400:~/Program/CLAPACK-3.2.1-ARM$
Vad tror ni om arm-arm-eabi-gcc då?
Senast redigerad av Al_Bundy 14 februari 2019, 17:12:30, redigerad totalt 1 gång.
bearing
Inlägg: 11265
Blev medlem: 2 mars 2006, 01:01:45
Ort: Ängelholm

Re: Matrisberäkningar med för STM32?

Inlägg av bearing »

Har du länk till just den version av lapack du använder?
Jag tror inte jag fick hem samma.

Här har du lite grejer att ändra iaf. I min version heter filen makefile.system

Kod: Markera allt

ARFLAGS	=
CPP	= $(COMPILER) -E
AR	= $(CROSS_SUFFIX)ar
AS	= $(CROSS_SUFFIX)as
LD	= $(CROSS_SUFFIX)ld
RANLIB	= $(CROSS_SUFFIX)ranlib
NM	= $(CROSS_SUFFIX)nm
DLLWRAP = $(CROSS_SUFFIX)dllwrap
OBJCOPY = $(CROSS_SUFFIX)objcopy
OBJCONV = $(CROSS_SUFFIX)objconv
Jag hittade dock inte själva kompilatorn. (Hittar inte definitionen av CC.)
Användarvisningsbild
mankan
EF Sponsor
Inlägg: 908
Blev medlem: 18 juli 2015, 11:23:22
Ort: Linköping

Re: Matrisberäkningar med för STM32?

Inlägg av mankan »

Al, om du läste på och tog till dig de råd du fått tidigare i tråden, istället för att byta riktning så fort du stöter på ett problem likt en flipperkula så skulle det säkert gå mycket enklare. Du verkar fortfarande sakna basala kunskaper om korskompilering, t.o.m. om länkning osv.

Vad jag kan se och som andra redan sagt så är inte Makefilerna i det projekt du försöker bygga anpassade för korskompilering. Så jag ser två möjliga alternativ. 1. Fixa Makefilerna. 2. Knuffa in alla inblandade källkodsfiler inklusive din användning av biblioteket i ett projekt i Eclipse och pilla med lite include-pathar så kanske du får ihop något.
Användarvisningsbild
Al_Bundy
Inlägg: 2889
Blev medlem: 11 september 2012, 23:59:50
Ort: The U.S - Chicago
Kontakt:

Re: Matrisberäkningar med för STM32?

Inlägg av Al_Bundy »

bearing skrev:Har du länk till just den version av lapack du använder?
Jag tror inte jag fick hem samma.

Här har du lite grejer att ändra iaf. I min version heter filen makefile.system

Kod: Markera allt

ARFLAGS	=
CPP	= $(COMPILER) -E
AR	= $(CROSS_SUFFIX)ar
AS	= $(CROSS_SUFFIX)as
LD	= $(CROSS_SUFFIX)ld
RANLIB	= $(CROSS_SUFFIX)ranlib
NM	= $(CROSS_SUFFIX)nm
DLLWRAP = $(CROSS_SUFFIX)dllwrap
OBJCOPY = $(CROSS_SUFFIX)objcopy
OBJCONV = $(CROSS_SUFFIX)objconv
Jag hittade dock inte själva kompilatorn. (Hittar inte definitionen av CC.)
Här:
http://www.netlib.org/clapack/

Tanka ned tgz filen.
Skriv svar