How to run OpenOCD on CLion with custom parameters? - clion

I would like to run the OpenOCD script in CLion with tcl_port enabled.
It looks like they hardcoded this into the plugin https://github.com/elmot/clion-embedded-arm/blob/master/src/xyz/elmot/clion/openocd/OpenOcdComponent.java#L79 does anyone have an idea how to override this?
Thank you

It seems like parameters in the CFG file are not overwritten. So setting tcl_port 6666 works for me.

Related

Is there any method to create a YAML file via Microsoft cmd?

I practice Kubernetes on my windows machine. I need to create a YAML file to run some objects on Kubernetes but I couldn't able to create YAML file with CLI command on windows. There are alternative ways to make it in brute force such as creating txt and then changing its extension manually but I wonder if there is any way to create a YAML file via cmd similar to Linux (touch yamlfile.yaml)
Thank you in advance.
update: #tquadrat answer helps to create yamlfile successfully but on windows cmd, when you try to edit yamlfile via default notepad, that turns out .txt again instead of .yaml
My palliative solution is to use VScode to create yamlfiles and also using terminal in VScode.
On Linux, touch yamlfile.yaml creates an empty file. If this is your goal, try
echo. > yamlfile.yaml

How to source environment variables from a script on a remote host when using remote mode in clion?

At my company we use a number of linux servers dedicated to compilation of our codebase. I would like to use CLion's remote working capabilities, but so far I am unable to find a way for CLion to source my ~/.bashrc file, which sources other files that set the env and toolchain.
Is there a way to make clion source a file, .bashrc to be specific, after making the ssh connection to the remote server?
I did find a workaround:
I created a bash script that looks like this:
export PATH=/home/user/Qt/5.15.1/gcc_64/bin/:$PATH
/home/user/Documents/cmake-3.19.0-rc3-Linux-x86_64/bin/cmake $#
And set my toolchain's cmake to that file. Now whenever there is a configuration or building operation the script would pick up the arguments, setup the environment and then call cmake with passed parameters.
Unfortunately, as of 13.11.2020 there is no way to source a script from the remote machine while working in CLion remotely via ssh.
There is a ticket for this functionality to be added so if you are reading this in the future, check the web, maybe the situation has changed.

Alias to open file on Windows using CygWin

I have a windows machine with CygWin installed on it. I do not hold any admin privileges, so, forget about changing environment variables which apply to all user and etc...
Scenario:
When I execute CygWin and type the following command to execute Maven, it works perfectly:
/cygdrive/c/maven/apache-maven-3.5.0/bin/mvn
However, when I create the file .profile as below:
alias mvn="cygdrive/c/maven/apache-maven-3.5.0/bin/mvn"
After restarting CygWing and executing the command "mvn", the following message is sent: No such file or directory.
Any suggestions?
Thanks in advance.
For any of you who may have the same problem, the way I solved this was basically adding a "sh" at the beginning of the command:
elias mvn="sh /cygdrive/c/maven/apache-maven-3.5.0/bin/mvn"
Cheers.

proxy and php scripts

It is probably a simple question but I dont know how to solve my problem.
There is a proxy on the network I am using. I execute php scripts on command line (composer.phar not to same the name). The script, using curl obviously, try to download file from http urls. I cannot download because of the proxy.
So my question is this one :
where should I configure proxy settings to use a tool like composer.phar ?
Maybe the command line is not the problem and I would have the same problem if I were using curl in an application.
Thank you
I have to add a HTTP_PROXY system environment variable to make it work

Maven in Intellij IDEA cannot resolve symbol env.HOSTNAME

I searched all over for a resolution to this problem, but could not find anything specific to my setup. Finally, one of our sys admins figured it out.
I am running Intellij IDEA on Ubuntu 11.10. My Maven pom.xml file was unable to resolve a symbol, a system property environmental variable env.HOSTNAME.
Copy from user1141627 answers' edit:
It turns out that we had to manually set this variable from the terminal so Java would recognize it. The command was:
set env HOSTNAME yourhostname
After restarting Intellij, env.HOSTNAME resolved just fine. To get yourhostname, you can use the command:
hostname
or
echo $HOSTNAME
I realize this is not a question, it is an answer. Hopefully someone finds it useful if they come across a similar problem.
I know this is an old question, but my answer might help somebody.
Add export HOSTNAME=myhost to your ~/.profile file, and reboot your computer.

Resources