SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I having problem getting working a tool chain for STM32F4 for whom dont know this is an ARM processor.
I did have to spend some time getting some packed in. I had to install some package from 13.xxsomething for my 14 current version using. (I will add details later to review this installation due to is not what I am asking now)
I know what is wrong but I dont know how to fix it.
The problem is that when I try to compile it does not see the files:
What I have done:
I looked for arm-none-eabi-gcc I know where is:
it storage on roo/sat/bin
if I called in a terminal I get:
Code:
bash-4.2# ./arm-none-eabi-gcc --version
arm-none-eabi-gcc (Linaro GCC 4.7-2013.01) 4.7.3 20130102 (prerelease)
Copyright (C) 2012 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.
I have created a link to bin folder and added to the project but it can not see it.
I cloned on a folder and then run in a terminal
./bootstrap
then
./configure --enable-ft2232_libftdi --enable-usbprog
then make
but I am getting this error:
Code:
rm -rf $backupdir; exit $rc
openocd.texi:12: @include `version.texi': No such file or directory.
openocd.texi:37: warning: undefined flag: VERSION.
openocd.texi:38: warning: undefined flag: UPDATED.
openocd.texi:58: warning: undefined flag: VERSION.
openocd.texi:59: warning: undefined flag: UPDATED.
makeinfo: Removing output file `openocd.info' due to errors; use --force to preserve.
make[2]: *** [openocd.info] Error 1
make[2]: Leaving directory `/home/..bla bla bla../openOCD/openocd-code/doc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/..bla bla bla../openOCD/openocd-code'
make: *** [all] Error 2
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME stm32f4x
}
if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
set _ENDIAN little
}
# Work-area is a space in RAM used for flash programming
# By default use 64kB
if { [info exists WORKAREASIZE] } {
set _WORKAREASIZE $WORKAREASIZE
} else {
set _WORKAREASIZE 0x10000
}
# JTAG speed should be <= F_CPU/6. F_CPU after reset is 8MHz, so use F_JTAG = 1MHz
#
# Since we may be running of an RC oscilator, we crank down the speed a
# bit more to be on the safe side. Perhaps superstition, but if are
# running off a crystal, we can run closer to the limit. Note
# that there can be a pretty wide band where things are more or less stable.
adapter_khz 1000
adapter_nsrst_delay 100
jtag_ntrst_delay 100
#jtag scan chain
if { [info exists CPUTAPID] } {
set _CPUTAPID $CPUTAPID
} else {
# See STM Document RM0090
# Section 32.6.2 - corresponds to Cortex-M4 r0p1
set _CPUTAPID 0x4ba00477
}
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
if { [info exists BSTAPID] } {
set _BSTAPID $BSTAPID
} else {
# See STM Document RM0090
# Section 32.6.3
set _BSTAPID 0x06413041
}
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID
Peter, I'm up to my neck in my own project. Yours looks interesting, but . . .
BTW, Fedora do an Electronic Spin. I have it, and it has all sorts of arm goodies compiled and sitting there ready to be used. FC-18 is a right royal bitch to install, but the Electronic spin is good.Comment 33 on this shows how I finally got going. I ended up booting on a slackware-huge kernel to remake the initrd so the thing would boot. I wish you better luck.
Peter, I'm up to my neck in my own project. Yours looks interesting, but . . .
BTW, Fedora do an Electronic Spin. I have it, and it has all sorts of arm goodies compiled and sitting there ready to be used. FC-18 is a right royal bitch to install, but the Electronic spin is good.Comment 33 on this shows how I finally got going. I ended up booting on a slackware-huge kernel to remake the initrd so the thing would boot. I wish you better luck.
Hi1 Business_kid thank for looking anyway! ;-).
For the rest which have some knowledge of what I am doing feel free to comment :-/ .
I though I give an Update here, last night after getting stuck on no being able to talk to the board through Openocd I use a VM and lest than 5 minutes I can talk to the board and programe it through the stlink Utility software, I have to say that I did also try with 11.xxsomething ubuntu machine and that is one of the thing I have to say bad about slackware it should have a faster way to get the package in. I just type openocd in, and done, use Synaptic to look for depended folder and and files and in lest than 5 minutes I was trying to connect to the board at to the point where I did in Slackware which I spent hours to get to the same point.
After all that jut to say the hardware is working so for sure is a system/driver problem. Now I have something working through the VM I am going to get back and try to play with the files I could not install the latest to see if that fix this problem..
in a terminal, and in top source, try (presuming bash)
export PATH=/root/sat/bin:$PATH;
export CC=/root/sat/bin/arm-none-eabi-gcc
make
If you use another shell, adjust accordingly, but you get the idea.
Sorry if I asked you about this, the reason this add the path in the terminal, but what about if I want this to be able from any terminal I open. If there a file which it can be added and always be available from any terminal? Thanks
UPDATE:
I've manage to connect through the USB cable to ARM board. I had to review openocd option because that interface mention before (hla) was not up. and I had to change some cfg files path too.
bash-4.2# ./openocd --file /tcl/board/stm32f4discovery.cfg -c init -c reset
Open On-Chip Debugger 0.7.0-rc1-dev-00002-ge12989a (2013-04-27-11:36)
Licensed under GNU GPL v2
For bug reports, read http://openocd.sourceforge.net/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v14 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : Target voltage: 2.888758
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
But still not there .... :-(
When I try to send something now
I get:
Quote:
bash-4.2# arm-none-eabi-gdb main.elf
GNU gdb (Linaro GDB) 7.5-2012.12-1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-none-eabi".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/bla bla bla/stm32f4-discovery/main.elf...done.
(gdb)
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-none-eabi".
Go back to building gdb. At the configure stage there is --host(=the box it's going to be running on) --target(= the box it's going to be debugging, I imagine)
You need to configure it --host=arm-none-eabi --target=arm-none-eabi along with your other options
and rewinstall it completely, before you can debug on the arm.
Go back to building gdb. At the configure stage there is --host(=the box it's going to be running on) --target(= the box it's going to be debugging, I imagine)
You need to configure it --host=arm-none-eabi --target=arm-none-eabi along with your other options
and rewinstall it completely, before you can debug on the arm.
I dont think I even configure gdb I looked there is installed gdb-7.5-i486-1 but that was there I didnt installed.
Go back to building gdb. At the configure stage there is --host(=the box it's going to be running on) --target(= the box it's going to be debugging, I imagine)
You need to configure it --host=arm-none-eabi --target=arm-none-eabi along with your other options
and rewinstall it completely, before you can debug on the arm.
Do you actually mean openocd? I cannot see anything about on the tool chain for arm-none-eabi
But in openocd said something about the host but I try to reconfig with:
and if fails for compiling issues, if I leave out:
CC=/root/sat/bin/arm-none-eabi-gcc CPP=/root/sat/bin/arm-none-eabi-gcc
its give error earlier.
without CC and CPP
Quote:
ost System...arm-none-eabi
Build System...i686-pc-linux-gnu
Error: Could not find a C compiler. Tried: arm-none-eabi-cc, arm-none-eabi-gcc
Try: 'configure --help' for options
and with CC and CCP trying to force the compiler:
Quote:
checking whether the C compiler works... no
configure: error: in `/opt/openocd-codepress':
configure: error: C compiler cannot create executables
I am not sure know how to force all the flags manually. :-(
That bit is wrong. If you're running on arm --build = --host. The --build=i686-pc-linux-gnu builds a debugger to run on x86 to debug arm
I did play with different configuration to the ./config file, but I cannot get it running. The problem is that it cannot see the compiler which is on /root/sat/bin/arm-none-eabi-gcc if I leave out that option it does:
Quote:
bash-4.2# ./configure --enable-maintainer-mode --enable-stlink --enable-ft2232_libftdi --enable-ftdi --enable-usbprog --host=arm-none-eabi
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for arm-none-eabi-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for arm-none-eabi-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking whether gcc -std=gnu99 and cc understand -c and -o together... yes
checking for arm-none-eabi-ranlib... no
checking for ranlib... ranlib
checking build system type... i686-pc-linux-gnu
checking host system type... arm-none-eabi
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc -std=gnu99... /usr/i486-slackware-linux/bin/ld
checking if the linker (/usr/i486-slackware-linux/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... no
checking for arm-none-eabi-dumpbin... no
checking for arm-none-eabi-link... no
checking for dumpbin... no
checking for link... link -dump
checking the name lister (nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-linux-gnu file names to arm-none-eabi format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/i486-slackware-linux/bin/ld option to reload object files... -r
checking for arm-none-eabi-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... unknown
checking for arm-none-eabi-dlltool... no
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for arm-none-eabi-ar... no
checking for ar... ar
checking for archiver @FILE support... @
checking for arm-none-eabi-strip... strip
checking for arm-none-eabi-ranlib... ranlib
checking command to parse nm output from gcc -std=gnu99 object... ok
checking for sysroot... no
checking for arm-none-eabi-mt... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC
checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes
checking if gcc -std=gnu99 static flag -static works... yes
checking if gcc -std=gnu99 supports -c -o file.o... yes
checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes
checking whether the gcc -std=gnu99 linker (/usr/i486-slackware-linux/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for an ANSI C-conforming const... yes
checking for long long int... yes
checking for library containing ioperm... none required
checking for library containing dlopen... -ldl
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for arpa/inet.h... yes
checking elf.h usability... yes
checking elf.h presence... yes
checking for elf.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for ifaddrs.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for netinet/in.h... yes
checking for netinet/tcp.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for strings.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/stat.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking for net/if.h... yes
checking whether to enable assertions... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether byte ordering is bigendian... no
checking for strndup... yes
checking for strnlen... yes
checking for gettimeofday... yes
checking for usleep... yes
checking for vasprintf... yes
checking whether to build a release... no
checking whether to build Doxygen as HTML... yes
checking whether to build Doxygen as PDF... no
checking whether to enable verbose JTAG I/O messages... no
checking whether to enable verbose USB I/O messages... no
checking whether to enable verbose USB communication messages... no
checking whether to enable malloc free space logging... no
checking whether to enable ZY1000 minidriver... no
checking whether to enable dummy minidriver... no
checking whether standard drivers can be built... yes
checking Build & Link with libftdi...... Success
checking for libftdi highspeed device support... yes
checking for libftdi FT232H device support... no
configure: WARNING: You need a newer libftdi version (0.20 or later).
checking libusb-1.0/libusb.h usability... yes
checking libusb-1.0/libusb.h presence... yes
checking for libusb-1.0/libusb.h... yes
checking usb.h usability... yes
checking usb.h presence... yes
checking for usb.h... yes
checking for environ in unistd.h and stdlib.h... yes
checking for a C compiler for build tools... gcc -std=gnu99
checking for suffix of executable build tools...
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/helper/Makefile
config.status: creating src/jtag/Makefile
config.status: creating src/jtag/drivers/Makefile
config.status: creating src/jtag/hla/Makefile
config.status: creating src/transport/Makefile
config.status: creating src/xsvf/Makefile
config.status: creating src/svf/Makefile
config.status: creating src/target/Makefile
config.status: creating src/rtos/Makefile
config.status: creating src/server/Makefile
config.status: creating src/flash/Makefile
config.status: creating src/flash/nor/Makefile
config.status: creating src/flash/nand/Makefile
config.status: creating src/pld/Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
=== configuring in jimtcl (/opt/openocd-codepress/jimtcl)
configure: running /bin/sh ./configure.gnu --disable-option-checking '--prefix=/usr/local' '--enable-maintainer-mode' '--enable-stlink' '--enable-ft2232_libftdi' '--enable-ftdi' '--enable-usbprog' '--host=arm-none-eabi' 'host_alias=arm-none-eabi' --cache-file=/dev/null --srcdir=.
Host System...arm-none-eabi
Build System...i686-pc-linux-gnu
Error: Could not find a C compiler. Tried: arm-none-eabi-cc, arm-none-eabi-gcc
Try: 'configure --help' for options
configure: error: ./configure.gnu failed for jimtcl
If I added it fail much earlier:
Quote:
bash-4.2# ./configure --enable-maintainer-mode --enable-stlink --enable-ft2232_libftdi --enable-ftdi --enable-usbprog --host=arm-none-eabi CC=/root/sat/bin/
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for arm-none-eabi-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for arm-none-eabi-gcc... /root/sat/bin/
checking whether the C compiler works... no
configure: error: in `/opt/openocd-codepress':
configure: error: C compiler cannot create executables
See `config.log' for more details
./configure --enable-maintainer-mode --enable-stlink --enable-ft2232_libftdi --enable-ftdi --enable-usbprog --host=arm-none-eabi
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for arm-none-eabi-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for arm-none-eabi-gcc... /root/sat/bin
checking whether the C compiler works... no
configure: error: in `/tmp/Install/stlink_from0/openocd/openocd-codepress':
configure: error: C compiler cannot create executables
See `config.log' for more details
Stop in the compiling checks I looks a makefile was before adding the path and looking a CC I see:
Code:
CC = gcc -std=gnu99
CCDEPMODE = depmode=gcc3
CC_FOR_BUILD = gcc -std=gnu99
CPP = gcc -std=gnu99 -E
ac_ct_CC = gcc
# make sure we pass the correct jimtcl flags to distcheck
DISTCHECK_CONFIGURE_FLAGS = --disable-install-jim
nobase_dist_pkgdata_DATA = \
contrib/libdcc/dcc_stdio.c \
contrib/libdcc/dcc_stdio.h \
contrib/libdcc/example.c \
contrib/libdcc/README \
contrib/openocd.udev
But this is the makefile, Should we be looking at config files?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.