From podonoghue at swin.edu.au Tue Feb 15 02:57:55 2011 From: podonoghue at swin.edu.au (Peter O'Donoghue) Date: Tue, 15 Feb 2011 13:57:55 +1100 Subject: USBDM support in Codesourcery Sprite Message-ID: <4D59EBB3.3050405@swin.edu.au> Hi, I've added basic support for Codesourcery to USBDM (http://sourceforge.net/projects/usbdm/) through a "OSBDM-JM60" pretend DLL but its a bit crude due to the differences in how they operate. It would be considerably easier if it were possible to pass parameters to the DLL to select options. Is there any chance to provide this support for USBDM? This would involve minimal work I hope. A few other minor comments: With a Coldfire V1 target the sprite tries to write to non-existent registers such as 0x80F (which is PC on CFV2 etc). OSBDM quietly truncates to 8-bits so it accesses register 0x0F which (fortunately) is the PC on CFV1. With Coldfire V2 targets the sprite tries to do a software reset of the target. This is only available on CFV1 targets. It appears OSBDM-JM60 ignores the parameters. The OSBDM-JM60 firmware is target device specific i.e. a given OSBDM-JM60 BDM only supports CFV1 or CFV2-3. USBDM supports multiple target types but there is no convenient way to select the target device type when 'pretending' to be a OSBDM-JM60. bye -- pgo From cameos at gmail.com Thu Feb 24 21:57:44 2011 From: cameos at gmail.com (El Topo) Date: Thu, 24 Feb 2011 13:57:44 -0800 Subject: m68k-linux-gnu-gcc/php-5.3.5 cross compiling problem Message-ID: Hi, I am using codesourcery's Sourcery G++ Lite 2010.09-40 for ColdFire GNU/Linux (build system: i686-pc-linux-gnu, host system: m68k-linux-gnu): =================== m68k-linux-gnu-gcc version ==================== # m68k-linux-gnu-gcc --version m68k-linux-gnu-gcc (Sourcery G++ Lite 2010.09-40) 4.5.1 Copyright (C) 2010 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. # m68k-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=m68k-linux-gnu-gcc COLLECT_LTO_WRAPPER=/home/lxl/freescale-coldfire-2010.09/bin/../libexec/gcc/m68k-linux-gnu/4.5.1/lto-wrapper Target: m68k-linux-gnu Configured with: /scratch/sandra/cf-linux-lite/src/gcc-4.5-2010.09/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=m68k-linux-gnu --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-arch=cf --with-gnu-as --with-gnu-ld --with-specs='%{save-temps: -fverbose-asm} -D__CS_SOURCERYGXX_MAJ__=2010 -D__CS_SOURCERYGXX_MIN__=9 -D__CS_SOURCERYGXX_REV__=40 %{O2:%{!fno-remove-local-statics: -fremove-local-statics}} %{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics: -fremove-local-statics}}}' --enable-languages=c,c++ --enable-shared --enable-lto --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2010.09-40' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/freescale/usr/local/gcc-4.5.40-eglibc-2.11.40/m68k-linux --with-sysroot=/opt/freescale/usr/local/gcc-4.5.40-eglibc-2.11.40/m68k-linux/m68k-linux-gnu/libc --with-build-sysroot=/scratch/sandra/cf-linux-lite/install/m68k-linux-gnu/libc --with-gmp=/scratch/sandra/cf-linux-lite/obj/host-libs-2010.09-40-m68k-linux-gnu-i686-pc-linux-gnu/usr --with-mpfr=/scratch/sandra/cf-linux-lite/obj/host-libs-2010.09-40-m68k-linux-gnu-i686-pc-linux-gnu/usr --with-mpc=/scratch/sandra/cf-linux-lite/obj/host-libs-2010.09-40-m68k-linux-gnu-i686-pc-linux-gnu/usr --with-ppl=/scratch/sandra/cf-linux-lite/obj/host-libs-2010.09-40-m68k-linux-gnu-i686-pc-linux-gnu/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-cloog=/scratch/sandra/cf-linux-lite/obj/host-libs-2010.09-40-m68k-linux-gnu-i686-pc-linux-gnu/usr --with-libelf=/scratch/sandra/cf-linux-lite/obj/host-libs-2010.09-40-m68k-linux-gnu-i686-pc-linux-gnu/usr --enable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/sandra/cf-linux-lite/install/m68k-linux-gnu/bin --with-build-time-tools=/scratch/sandra/cf-linux-lite/install/m68k-linux-gnu/bin Thread model: posix gcc version 4.5.1 (Sourcery G++ Lite 2010.09-40) =================== m68k-linux-gnu-gcc version ==================== When try to compile php-5.3.5, I have got the following error: ============== php 5.3.5 cross compiling error ====================== # make ...... /bin/sh /home/lxl/php-5.3.5/cpibuild/libtool --silent --preserve-dup-deps --mode=compile m68k-linux-gnu-gcc -Iext/date/lib -Iext/date/ -I/home/lxl/php-5.3.5/ext/date/ -DPHP_ATOM_INC -I/home/lxl/php-5.3.5/cpibuild/include -I/home/lxl/php-5.3.5/cpibuild/main -I/home/lxl/php-5.3.5 -I/home/lxl/php-5.3.5/cpibuild/ext/date/lib -I/home/lxl/php-5.3.5/ext/date/lib -I/home/lxl/php-5.3.5/ext/ereg/regex -I/usr/local/include/libxml2 -I/home/lxl/php-5.3.5/ext/sqlite3/libsqlite -I/home/lxl/php-5.3.5/cpibuild/TSRM -I/home/lxl/php-5.3.5/cpibuild/Zend -I/home/lxl/php-5.3.5/main -I/home/lxl/php-5.3.5/Zend -I/home/lxl/php-5.3.5/TSRM -I/home/lxl/php-5.3.5/cpibuild/ -mcpu=54418 -c /home/lxl/php-5.3.5/ext/date/lib/parse_date.c -o ext/date/lib/parse_date.lo /tmp/cc4YYDBL.s: Assembler messages: /tmp/cc4YYDBL.s:102080: Fatal error: Tried to convert PC relative branch to absolute jump make: *** [ext/date/lib/parse_date.lo] Error 1 make: Leaving directory `/home/lxl/php-5.3.5/cpibuild' failed to make! ============== php 5.3.5 cross compiling error ====================== the file ext/date/lib/parse_date.c has a huge function scan() (23793 lines!), which causes "Fatal error: Tried to convert PC relative branch to absolute jump". Here's my configure settings for php-5.3.5: =================== my php configure & make script ===================== #!/bin/sh export CROSS_COMPILE=m68k-linux-gnu- export CONFIG_GUESS=`sh config.guess` export CC=${CROSS_COMPILE}gcc export CXX=${CROSS_COMPILE}g++ export CFLAGS="-mcpu=54418 -fPIC" BUILDDIR=cpibuild # clean up rm -rf $BUILDDIR mkdir -p $BUILDDIR cd $BUILDDIR ../configure -build=${CONFIG_GUESS} --host=m68k-linux-gnu --prefix=/usr/local --without-aolserver --without-apache --disable-mod-charset --without-apxs2 --without-apache-hooks --without-apache-hooks-static --without-caudium --without-continuity --enable-embed=shared --disable-fpm --without-isapi --without-litespeed --without-nsapi --without-phttpd --without-pi3web --without-roxen --disable-roxen-zts --without-thttpd --without-tux --without-webjames --enable-cgi --disable-gcov --disable-debug --enable-ipv6 --without-iconv --with-libxml-dir=/home/lxl/libxml2/usr/local make =================== my php configure & make script ===================== Here are my questions: 1. are there any options of m68k-linux-gnu-gcc/-as that can get around of the problem? I know that scan() should not be that big but it's fine with i686-pc-linux-gnu-gcc; 2. has anyone successfully cross compiled php-5.3.5 for m68k-linux-gnu-gcc? Thanks, cameos From carlos at codesourcery.com Fri Feb 25 00:38:53 2011 From: carlos at codesourcery.com (Carlos O'Donell) Date: Thu, 24 Feb 2011 19:38:53 -0500 Subject: [coldfire-gnu-discuss] m68k-linux-gnu-gcc/php-5.3.5 cross compiling problem In-Reply-To: References: Message-ID: <4D66FA1D.2020505@codesourcery.com> On 2/24/2011 4:57 PM, El Topo wrote: > /bin/sh /home/lxl/php-5.3.5/cpibuild/libtool --silent > --preserve-dup-deps --mode=compile m68k-linux-gnu-gcc -Iext/date/lib > -Iext/date/ -I/home/lxl/php-5.3.5/ext/date/ -DPHP_ATOM_INC > -I/home/lxl/php-5.3.5/cpibuild/include > -I/home/lxl/php-5.3.5/cpibuild/main -I/home/lxl/php-5.3.5 > -I/home/lxl/php-5.3.5/cpibuild/ext/date/lib > -I/home/lxl/php-5.3.5/ext/date/lib > -I/home/lxl/php-5.3.5/ext/ereg/regex -I/usr/local/include/libxml2 > -I/home/lxl/php-5.3.5/ext/sqlite3/libsqlite > -I/home/lxl/php-5.3.5/cpibuild/TSRM > -I/home/lxl/php-5.3.5/cpibuild/Zend -I/home/lxl/php-5.3.5/main > -I/home/lxl/php-5.3.5/Zend -I/home/lxl/php-5.3.5/TSRM > -I/home/lxl/php-5.3.5/cpibuild/ -mcpu=54418 -c > /home/lxl/php-5.3.5/ext/date/lib/parse_date.c -o > ext/date/lib/parse_date.lo > /tmp/cc4YYDBL.s: Assembler messages: > /tmp/cc4YYDBL.s:102080: Fatal error: Tried to convert PC relative > branch to absolute jump > make: *** [ext/date/lib/parse_date.lo] Error 1 > make: Leaving directory `/home/lxl/php-5.3.5/cpibuild' > failed to make! In order to recreate the problem on our end we need you to provide us with the following information: 1. The compiler command line that causes the failure (not the libtool line, you may need to run libtool without --silent to see what's it's doing). e.g. gcc -O2 -g -o test.o test.c 2. The output of running the compiler but with "-v" added. e.g. gcc -v -O2 -g -o test.o test.c 2>&1 compiler.log 3. The pre-processed source output by the compiler. This is done by adding '-save-temps' to the compiler command line. This produces a "*.i" file. e.g. gcc -save-temps -v -O2 -g -o test.o test.cc Can you send the information from step one, the "compiler.log" and the "*.i" file? Thanks! Cheers, Carlos. -- Carlos O'Donell Mentor Graphics / CodeSourcery carlos at codesourcery.com +1 (650) 331-3385 x716 From cameos at gmail.com Fri Feb 25 01:23:29 2011 From: cameos at gmail.com (El Topo) Date: Thu, 24 Feb 2011 17:23:29 -0800 Subject: [coldfire-gnu-discuss] m68k-linux-gnu-gcc/php-5.3.5 cross compiling problem In-Reply-To: <4D66FA1D.2020505@codesourcery.com> References: <4D66FA1D.2020505@codesourcery.com> Message-ID: Hi Carlos, Thanks for the reply. I have a zip file attached with 3 files: parse_date_err.txt: compiling error with libtool without --silent, m68k-linux-gnu-gcc with -save-temps -v parse_date.s, parse_date.i: temp files. my cross compiler was installed at /home/lxl/freescale-coldfire-2010.09/. By the way, I tried to compile php statically-linked (m68k-linux-gnu-gcc without -fPIC, php configured with --enable-static --disable-shared), parse_datea.c was compiled OK. Thanks, cameos On Thu, Feb 24, 2011 at 4:38 PM, Carlos O'Donell wrote: > On 2/24/2011 4:57 PM, El Topo wrote: >> /bin/sh /home/lxl/php-5.3.5/cpibuild/libtool --silent >> --preserve-dup-deps --mode=compile m68k-linux-gnu-gcc -Iext/date/lib >> -Iext/date/ -I/home/lxl/php-5.3.5/ext/date/ -DPHP_ATOM_INC >> -I/home/lxl/php-5.3.5/cpibuild/include >> -I/home/lxl/php-5.3.5/cpibuild/main -I/home/lxl/php-5.3.5 >> -I/home/lxl/php-5.3.5/cpibuild/ext/date/lib >> -I/home/lxl/php-5.3.5/ext/date/lib >> -I/home/lxl/php-5.3.5/ext/ereg/regex -I/usr/local/include/libxml2 >> -I/home/lxl/php-5.3.5/ext/sqlite3/libsqlite >> -I/home/lxl/php-5.3.5/cpibuild/TSRM >> -I/home/lxl/php-5.3.5/cpibuild/Zend -I/home/lxl/php-5.3.5/main >> -I/home/lxl/php-5.3.5/Zend -I/home/lxl/php-5.3.5/TSRM >> -I/home/lxl/php-5.3.5/cpibuild/ ? ?-mcpu=54418 ?-c >> /home/lxl/php-5.3.5/ext/date/lib/parse_date.c -o >> ext/date/lib/parse_date.lo >> /tmp/cc4YYDBL.s: Assembler messages: >> /tmp/cc4YYDBL.s:102080: Fatal error: Tried to convert PC relative >> branch to absolute jump >> make: *** [ext/date/lib/parse_date.lo] Error 1 >> make: Leaving directory `/home/lxl/php-5.3.5/cpibuild' >> failed to make! > > In order to recreate the problem on our end we need you to provide us > with the following information: > > 1. The compiler command line that causes the failure (not the libtool > line, you may need to run libtool without --silent to see what's it's > doing). > > e.g. gcc -O2 -g -o test.o test.c > > 2. The output of running the compiler but with "-v" added. > > e.g. gcc -v -O2 -g -o test.o test.c 2>&1 compiler.log > > 3. The pre-processed source output by the compiler. This is done by > adding '-save-temps' to the compiler command line. This produces a "*.i" > file. > > e.g. gcc -save-temps -v -O2 -g -o test.o test.cc > > Can you send the information from step one, the "compiler.log" and the > "*.i" file? > > Thanks! > > Cheers, > Carlos. > -- > Carlos O'Donell > Mentor Graphics / CodeSourcery > carlos at codesourcery.com > +1 (650) 331-3385 x716 > -------------- next part -------------- A non-text attachment was scrubbed... Name: parse_date_err.zip Type: application/zip Size: 344937 bytes Desc: not available URL: From carlos at codesourcery.com Fri Feb 25 04:23:52 2011 From: carlos at codesourcery.com (Carlos O'Donell) Date: Thu, 24 Feb 2011 23:23:52 -0500 Subject: [coldfire-gnu-discuss] m68k-linux-gnu-gcc/php-5.3.5 cross compiling problem In-Reply-To: References: <4D66FA1D.2020505@codesourcery.com> Message-ID: <4D672ED8.4050509@codesourcery.com> On 2/24/2011 8:23 PM, El Topo wrote: > Hi Carlos, > > Thanks for the reply. > > I have a zip file attached with 3 files: > parse_date_err.txt: compiling error with libtool without --silent, > m68k-linux-gnu-gcc with -save-temps -v > parse_date.s, parse_date.i: temp files. Thank you very much! I have filed this issue with our development team. > my cross compiler was installed at /home/lxl/freescale-coldfire-2010.09/. > > By the way, I tried to compile php statically-linked > (m68k-linux-gnu-gcc without -fPIC, php configured with --enable-static > --disable-shared), parse_datea.c was compiled OK. OK, then it sounds like you have a workaround. Thank you again for helping. Cheers, Carlos. -- Carlos O'Donell Mentor Graphics / CodeSourcery carlos at codesourcery.com +1 (650) 331-3385 x716