How to find interface/ftdi/esp32_devkitj_v1.cfg in procedure 'script'? - debugging

I'm trying to debug esp32 with ft2232d debugger , however at the openocd running script i'm getting this below mentioned error.
./openocd -s share/openocd/scripts -f ../interface/ftdi/esp32_devkitj_v1.cfg -f board/esp-wroom-32.cfg
Open On-Chip Debugger 0.10.0+dev-00703-g21687eb (2019-03-04-16:30)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
embedded:startup.tcl:63: Error: Can't find ../interface/ftdi/esp32_devkitj_v1.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 63
Now, i understand that my interface directory is not finding the esp32 cfg file but i searched and there is no such file.
Also Building openocd from the scatch has let to no bin files present in the main directory but these files are found in src folder.
Thanks for your help.

If you're using Eclipse, try wrapping the file path of your config in double quotes. I had a similar error, and changing the argument to -f "interface/stm32f429.cfg" seemed to fix that error for me.

Related

OpenDDS - Solution builds fine, examples run, but IDL exes crash

I have successfully built OpenDDS 3.13.2 from source. Here is my environment:
Windows 10
Visual Studio 2017 (re-targeted Solution to SDK 10.0.17763.0)
Tried all Configuration/Platform combinations
I successfully used the configure script from the VS command prompt, built everything by opening the generated solution in the same command prompt, and finally ran the Messenger example (publisher and subscriber), and even configured it to use RTPS successfully.
However, when I try to create my own IDL and use the tao_idl, it crashes. Here's my test (using the proper environment from setenv.cmd):
> tao_idl (no args)
IDL: No input files
Second test:
> tao_idl Test.idl (crashes)
I get no error message, and am unable to locate logs or any indication of what went wrong. The same thing happens when I used opendds_idl.
What is the best approach to debug this, and/or are there pre-built binaries available for the IDL compiler(s) (both TAO and OpenDDS)?
After about a day of troubleshooting, I have determined a solution. Despite being able to call tao_idl and opendds_idl yourself, you should basically never do it. There are a good amount of command-line arguments needed to get both to work, and if they're not present, each exe will crash without the proper reasoning why.
I will add my steps below to create a new basic two-exe pub/sub project using OpenDDS:
Create your own IDL file.
Starting with the DCPS Messenger example, modify the .mpc file, replacing Messenger.idl with your IDL file name.
Create a new file called <your project>.mwc, and add the following contents:
workspace {
// the -relative and -include cmdlines make it so this workspace
// does not have to be in the $DDS_ROOT directory tree.
// tell MPC to substitute our DDS_ROOT environment variables for relative paths
cmdline += -relative DDS_ROOT=$DDS_ROOT
// tell the projects where to find the DDS base projects (*.mpb)
cmdline += -include $DDS_ROOT/MPC/config
}
Open a new VS command-line terminal and run $DDS_ROOT/setenv.cmd, or open a regular terminal if you have those environment variables set via Windows settings.
Navigate to your project directory and call: mwc.pl -type vs2017, replacing "vs2017" as needed for your build tool/IDE.
Open up the generated solution, and retarget it as necessary for your Windows SDK version.
Build the <your project>_IDL project first. If you notice in the output window, it is invoking the tao_idl and opendds_idl commands automatically. You can view the .vcxproj files to see the full command-line arguments that were the original problem.
Modify the publisher.cpp, subscriber.cpp, and DataReaderListenerImpl.cpp files to match your new IDL. Run the example as usual and ta-da!
For completeness, the full commands for both tao_idl and opendds_idl are as follows:
> opendds_idl -Sa -St "<your file>.idl"
> tao_idl -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) -Sa -St -I$(DDS_ROOT) "<your file>.idl"
> tao_idl -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) -Sa -St -I$(DDS_ROOT) "<your file>TypeSupport.idl"

--grpc_out: protoc-gen-grpc: Plugin failed with status code 1 on osx. (Java)

I am following a tutorial about using grpc and I am supposed to use a plugin to generate source code but I am stuck on how to use the --grpc_out and --plugin flag.
Below are the current challenges.
The protocol generator downloaded from https://search.maven.org/ as in the tutorial is an executable file for osx operating system https://search.maven.org/search?q=a:protoc-gen-grpc-java. This is the first confusion.
If I dont use these plugin flags (--plugin,--grpc_out) my code is generated okay with this command
protoc -I /proto --java_out /hello/grpc/grpc/revamp/services
/proto/messages.proto
This above works okay
Adding the flags, with the downloaded plugin from confusion 1 throws this error with this command;
protoc -I /proto --java_out /hello/grpc/grpc/revamp/services /proto/messages.proto --grpc_out /hello/grpc/grpc/revamp/services --plugin=protoc-gen-grpc=/proto/lib/protoc-gen-grpc-java-1.19.0-osx-x86_64.exe
--grpc_out: protoc-gen-grpc: Plugin failed with status code 1.
Has anyone used this plugin on osx?, can anyone help see what I am doing wrong.
Thanks in advance
To resolve this, first I removed the .exe extension from the file downloaded from maven,
then allow the file to be executable by running the following command
chmod +x protoc-gen-grpc-java
After this the query worked okay. (Special thanks from the #author of the Course
Michael Van Sickle)

Building RXTX with --disable-locks

I need to build RXTX (http://rxtx.qbang.org/wiki/index.php/Main_Page) for a 64 bit platform with --disable-locks. ( the target platform is a Ubuntu Snappy platform so there is a problem with the permissions and lock files).
The .configure --disable-locks and make seemed to run ok.
I got a new .jar file and librxtxSerial.so as a result.
However when I installed them, I get the following error :
java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCommDriver
java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver
Is there something else I need to do?
Are there other object files I need to copy over.
Thanks in advance.
I solved the problem myself.
The problem was that the configure script was not expecting a java version higher than 1.5 as shown here in t he extract :
case $JAVA_VERSION in
1.2*|1.3*|1.4*|1.5*)
#fix_parameters $JPATH/jre/lib/javax.comm.properties
CLASSPATH=".:\$(TOP):\$(TOP)/src:"find $JPATH/ -name RXTXcomm.jar |head -n1
RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)"
JHOME=$JPATH/"jre/lib/ext"
So the paths were not being set up correctly for me.
I changed it to
case $JAVA_VERSION in
1.2*|1.3*|1.4*|1.5*|1.7*)
Then it worked ok.

Qt 5.3.1: macdeployqt tries to include everything on my hard drive; how to fix?

I'm running Qt 5.3.1 on Mac OS X 10.8 and 10.9 I'm trying to use the macdeployqt tool to bundle libraries and plugins with my executable, but it's apparently trying to include everything on my hard drive.
I invoke it with:
/Applications/Qt/5.3.1/5.3/clang_64/bin/macdeployqt /Users/adamwilt/Desktop/temp/DesktopPixie.app -verbose=2
-qmldir=/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/DesktopPixie
and get lots of normal, expected log messages like:
Log: copy: "/Applications/Qt/5.3.1/5.3/clang_64/qml/QtQuick/Controls/Styles/Base/images" "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/QtQuick/Controls/Styles/Base/images"
...and all runs fine until I start getting messages like:
Log: copy: "" "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums"
ERROR: file copy failed from "/do-gst"
ERROR: to "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums/do-gst"
ERROR: file copy failed from "/rescuepro.properties"
ERROR: to "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums/rescuepro.properties"
ERROR: file copy failed from "/rescuepro34act.lic"
and then the fun begins:
Log: copy: "/Applications" "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums/Applications"
Log: copied: "/Applications/License.rtf"
Log: to "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums/Applications/License.rtf"
Log: copy: "/Applications/0xED-1.0.7.app" "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums/Applications/0xED-1.0.7.app"
It appears it's trying to copy everything (that is, "") into the app, but I ^C out of it while I still have disk space left!
It didn't do this at first; then it did so for a week; then it stopped; now it's back. This is a distributed development project; I'm doing the QML stuff and folks elsewhere are doing the C++. It's possible the other folks are changing a configuration somewhere that's causing this to occur, but I'm the only one doing Mac deployments, so I'm the only one who sees this.
Is there a config file of some sort for macdeployqt where this might be getting triggered? Or is it more likely a problem related to the C++ object MessageBoxUI, which defines several Q_ENUMs (apparently correctly, as it compiles without warnings or errors, and appears to run properly), since that's the target directory when it starts going mad?
Sussed it (well enough that I can go on):
The Qt app I'm trying to deploy lives in ~/Desktop/temp. If I set my current directory to ~/Desktop or ~/Desktop/temp before I run macdeployqt, it runs as expected.
If I run it from from my home directory ~, or ~/Documents, macdeployqt tries to pull in everything it finds in /Applications, /opt, and/or other directories unassociated with the app.
Setting cwd to most other paths, including ~/Downloads, /Applications, subdirectories of ~/Documents, etc. also seems to work; it's only running macdeployqt from ~ and ~/Documents that causes the problem.
No proper explanation as to why this is happening, but just a warning in case someone else sees this sort of weird behavior: try changing to the apps's location before running macdeployqt.

Code::Blocks debugger shows some other path which isn't included in the project

I'm trying to use code::blocks debugger. I followed this basic tutorial on how to do it. I also watched two videos on you tube. I was actually trying it on a bigger file which had its declaration & implementation in separate files (one was header file tree.h, one had its implementation tree.cpp & the last one had implementation_tree.cpp main function to check the header file) but it didn't work so I tried it on a very simple program. But now debugger shows this error
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: F:\Coding\test\test\
Adding source dir: F:\Coding\test\test\
Adding file: F:\Coding\test\test\bin\Debug\test.exe
Changing directory to: F:/Coding/test/test/.
Set variable: PATH=.;C:\Program Files\CodeBlocks\bin;C:\Program Files\CodeBlocks;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0
[debug]Command-line: F:\Coding\Data Structures\tree.h -nx -fullname -quiet -args F:/Coding/test/test/bin/Debug/test.exe
[debug]Working dir : F:\Coding\test\test
Starting debugger: F:\Coding\Data Structures\tree.h -nx -fullname -quiet -args F:/Coding/test/test/bin/Debug/test.exe
failed
Whatever is in this line [debug]Command-line: is the address of my tree.h file which I was trying to debug earlier. But now I've removed all the breakpoints & everything related to that file from Code::Blocks & even changed that file's location but it still shows that same address in Starting debugger:. I've also rebuilt my test program after deleting everything related to it several times but I'm still getting the same error. I'm using GDB.
I'm so sorry if this question sounds very silly as I'm trying this for the first time & not being able to proceed through any tutorials or any other forum or anything else. I've also seen other related questions on stackoverflow but none of them works for me. So, please help. Thanks.
Settings -> Compiler -> Search Directories.. Delete all paths from there.

Resources