Closed LPLATU closed 9 months ago
src/Makefile.am:4: error: bad characters in variable name '%C%_openocd_SOURCES'
Makefile.am:143: 'src/Makefile.am' included from here
...
...
If I recall correctly, these errors appear if automake version is insufficient. Can you please check your automake version? Automake 1.14 or newer is required:
automake --version
src/Makefile.am:4: error: bad characters in variable name '%C%_openocd_SOURCES' Makefile.am:143: 'src/Makefile.am' included from here ... ...
If I recall correctly, these errors appear if automake version is insufficient. Can you please check your automake version? Automake 1.14 or newer is required:
automake --version
Indeed my automake is version is automake (GNU automake) 1.13.4 I'm going to manually update it as yum tells me I already have the latest version.
Edit: So I updated to automake 1.16.3 and tried again.
git clone git://git.code.sf.net/p/openocd/code openocd
then
cd openocd/ git pull
also I did
git submodule init git submodule update
then I did
./bootstrap
which resulted in
/+ aclocal --warnings=all /+ libtoolize --automake --copy /+ autoconf --warnings=all configure.ac:13: error: possibly undefined macro: AC_MSG_WARN If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure.ac:37: error: possibly undefined macro: AC_DISABLE_SHARED configure.ac:207: error: possibly undefined macro: AC_DEFINE configure.ac:646: error: possibly undefined macro: AC_MSG_NOTICE
after that I tried
./configure
to see what would happen. This resulted in
configure: error: cannot find install-sh, install.sh, or shtool in . "."/.
I haven't personally run into this specific issue, so I am guessing:
The autoconf errors seem to be the trouble. Could this be due to missing pkg-config
?
BTW, when running ./configure
, you may use the following arguments (which enable the most frequently used JTAG drivers):
./configure --enable-jtag_vpi \
--enable-remote-bitbang \
--enable-ftdi \
--prefix=<path/where/to/install>
Hopefully I won't get flamed for it here like I did on the openocd mailing list recently :-) but I find using @ilg-ul's xPack Project openocd docker based build scripts much more predictable and easy to use than trying to build openocd manually/natively. Less No messing around trying to find the magic combination of packages to install to make things work and the resulting binaries are much more portable over a wide range of Linux distros/versions (as well as Windows and MacOS).
https://xpack.github.io/openocd/ https://xpack.github.io/openocd/#build-details https://github.com/xpack-dev-tools/openocd-xpack/blob/xpack/README-BUILD.md
You can edit this file to build from the SiFive RISC-V openocd fork repo:
https://github.com/xpack-dev-tools/openocd-xpack/blob/xpack/scripts/defs-source.sh#L41
Hope this helps.
Looks like you're getting some good help here.
git clone git://git.code.sf.net/p/openocd/code openocd
That is starting with upstream OpenOCD. This github is for the RISC-V fork of OpenOCD, which generally has a little bit better RISC-V support, but not all the latest OpenOCD features. The long-term goal is to make them both identical, but we're not there yet.
@LPLATU, seems like the issue is resolved. I would like to close it.
Hello,
unfortunately I couldn't find a solution to the two problems I am facing right now.
The first problem is as follows: I am working with the PULPissimo Platform and have successfully ported it to FPGA (ZedBoard) by following the guide they provide with just minor adjustments. This was fine and I was able to use OpenOCD and gdb to load an ELF file and run (and debug) the program. I have used Open On-Chip Debugger 0.8.0 (2014-04-29-12:22) as well as Open On-Chip Debugger 0.10.0+dev-00615-g5ead86ea9 (2020-08-24-15:25).
We then went on and tried using a different core (everything else is pretty much the same, just the core has been replaced). The core is a RI5CY look-alike core which implements the interrupt system as specified in the RISC-V Instruction Set Manual. We did quite some simulation on RTL and also synthesis and everything has worked fine so far. I have then created the bitstream and flashed it to the FPGA, pretty much following the guide like last time. When I am trying to launch OpenOCD with my configuration file, it takes a long time and will result in the following:
When I connect gdb it will result in the following:
This of course means that I am unable to load anything to the board.
Unfortunately I haven't had any problems like this before (sounds weird to say...) so I'm not very knowledgeable in debugging OpenOCD as it has just worked before without any major problems. What I did was run it with the -d3 option and compared it with the vanilla PULPissimo that I have used before. This showed me (or rather confirmed) that (the core?) seems to be busy for some reason:
The fact that everything works with the core provided on the PULPissimo platform makes me guess that there is a problem with the new core that we use and not with OpenOCD itself but I am not 100% certain. Maybe someone can confirm/deny?
My second problem is with getting this here OpenOCD to install.
System:
I have started by cloning
after that I switched to the directory and pulled
everything is up-to-date, so I continued with
which results in some errors
I then tried to run
which results in the following error
so I did both
no errors here, so I tried to configure again
this results in the following error
which is where I am right now. I don't know if I have to give any arguments to the configure but from what I read you don't have to (but I could be wrong about that). I also don't know if this here OpenOCD is even necessary for me or (as mentioned above) if the problem is rather with the core itself.
Unfortunately up to this point I never had any major issues with the FPGA port or OpenOCD or gdb (it really does sound weird to say this) so I'm kind of lost right now. I hope this is the right place to ask and that someone might give me some hints as to what exactly the problem is and where I should start to fix it.
Thank you for your time, LPLATU