GNU ARM plugin for Eclipse under Windows - OpenOCD not starting debugging - gcc

I'm having problems trying to setup dev env for STM32F4 Discovery board in Windows.
I have installed all required files (GCC for ARM, Windows Build Tools, Eclipse Plugin) and I'm getting this error when trying to start OpenOCD debugging:
Missing mandatory configuration. Fill-in the 'Config options:' field in the Debugger tab.
This is my debug config screen:
And this is the error which I get when I try to start it (and build success message):

openocd must be told what kind of board it should talk to
http://gnuarmeclipse.github.io/debug/openocd/#create-the-debugger-configuration
the only field that usually requires attention is the OpenOCD Setup
Other options:, where you should add one or more configuration
scripts; for example, for the STM32F4DISCOVERY board, the field should
read -f board/stm32f4discovery.cfg

Related

Zabbix Agent2 loadable plugin performance issue on Windows

For my work purposes, I have to build a plugin for zabbix Agent2 that has to on Windows systems. For simplicity purposes I chose to go with a loadable plugin but more on that later.
I followed the guide at # https://www.zabbix.com/documentation/guidelines/en/plugins/loadable_plugins to build the example myip plugin on my Windows laptop and after linking it through an additionnal config file in the C:\Program Files\Zabbix Agent 2\zabbix_agent2.d\plugins.d directory, it works.
It works meaning that I can query the new item both with:
> zabbix_get -s localhost -k myip
> zabbix_agent -c zabbi_agent2.conf -t myip.
The only issue is the zabbix_agent2 process CPU usage sky rocks when I linked my loadable plugin, and restarted the agent.
I am talking about a usage of about 17-20% on my 8cores/1.99Ghz i7 laptop. That is just insane.
If I unlink the agent2 and the loadable plugin, the agent cpu usage comes back to normal (less than 1%).
After looking at the agent log file (zabbi_agent2.log), it is full of lines like
2022/11/10 09:22:16.817154 failed to read response for plugin Myip, failed to read type header, The handle is invalid.
When I run zabbix_agent -v -c zabbi_agent2.conf -t myip with the -v (verbose) option, I see the same error in the output multiple times before the actual value of the metric.
I suspect the high CPU usage is caused by this error happening and being logged too frequently.
After having read the source code of the plugin-support at https://git.zabbix.com/projects/AP/repos/plugin-support/browse/plugin/comms/connection.go (line 42), I recognized the line of code creating the error.
As there are builtin plugins for the agent2 too, it tried to recompile the agent2 on windows but was getting an even worse error while i have not even added my plugin yet.
I acutually wrote a post on that as well here (# https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/454191-error-during-zabbix-agent2-compilation-from-sources and Error during Windows Zabbix Agent2 compilation from sources)
Resources:
Go: dl.google.com/go/go1.19.3.windows-amd64.msi
Zabbix Agent2: https://cdn.zabbix.com/zabbix/binaries/stable/6.2/6.2.4/zabbix_agent2-6.2.4-windows-amd64-openssl.msi
I build the same plugin for the agent2 on linux both as a loadable and builtin plugin and it is working flawlessly so i think it really is a windows issue.

Removing the proxy and host from Netbeans

I know this questions is not related to programming but I can't find the root problem of my proxy/host.
Ok, let me explain, I am in China, so I have to make use of a VPN. The software is called SSTap and because of that reason I called the host in the same way.
For the project I am trying to make I am using LibGDX and gradle ofc.
After not being able to settle a proxy I removed it, as shown in the picture it is selected as "no proxy" and there are no proxy settings, and down in the output I am getting the warning.
Is there another place to totally remove the host?
I am using "Product Version: Apache NetBeans IDE 12.3"
Thanks in advance I will write down more questions
ReEdit part:
Sorry I thought it was loaded
The warning is: Warning: Failed to parse host SSTap
The way I configure the host/proxy was in a pop-up window that have not appeared anymore and I am unable to find it after setting the host again, the only way that I know to see the host is by Tools -> Options -> General Tab, the picture is not complete but that is the path to get there
I am having difficulties to load the picture, I am in China and I am using a VPN, so it is quite hard to visualize it, since I created the account yesterday I am unable to post pictures and instead they are added by links automatically
picture/warning
enter image description here
enter image description here
I went into my gradle.properties file found in C:\Users\User. gradle inside looks like this:
## For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Sat Dec 25 18:51:22 CST 2021
systemProp.http.proxyHost=SSTap
systemProp.https.proxyHost=SSTap
systemProp.https.proxyPort=25378
systemProp.http.proxyPort=25378
systemProp.https.nonProxyHosts=127.0.0.1
systemProp.http.nonProxyHosts=127.0.0.1
I removed the last 6 rows,created a new project using Desktop, Android, IOs, HTML in LibGDX , trusted all the projects with gradle, classes have no packages when created, if I create them or import them by myself (in desktop project). And even if it says "cannot find symbol"(class) within the core path e.g. import com.pokedemon.game.Hello;
the code runs
A problem that I had before when trying to resolve problems was: com.android.tools.lint:lint-gradle:26.5.4
Still no packages I closed Netbeans and open it again but again no packages but the proxy and host are fixed now

GoLand IDE: Debug program initiated by shell script (Kubernetes local cluster)

I'm a beginner to Kubernetes, and I tried to understand the source code by debugging from GoLand IDE. Starting a cluster with the provided hack/local-up-cluster.sh script works fine, but I cannot debug in GoLand.
I've tried to edit Run -> EditConfigurations-> +Shell Script with the script path as hack/local-up-cluster.sh, the script could run successfully but it won't stop at any break point.
Can someone please help me on how to set the IDE to debug the code initiated by a shell script?
If you don't use the IDE to launch the process, then you can use the Run | Attach to process feature to attach the IDE debugger to an existing project.
Make sure that the compiled application has the optimizations turned off, if you are using Go 1.10+ the compiler flag is -gcflags="all=-N -l".

Getting output from from VS WSL build events

Visual Studio has a relatively new way of doing Linux builds, using the local WSL system. This platform toolset is called WSL_1_0
What in a remote build was called "Remote Pre-Build Event" is now called "Wsl Pre-Build Event" (in the UI..still Remote whatever in msbuild, apparently) and it works basically the same, but with execution occurring in WSL on the local machine rather than on a linux machine.
Aaaand...any script output seems to be swallowed (vs. running on a remote machine where it was displayed in the build window):
1>Target RemotePreBuildEvent:
1> Invoking 'echo "me : stuff error 567 HELLO"', working directory: '/mnt/s/buildroot/CoreTech/ThirdPartyTools/Encryption/Rijndael/Project/Linux'
1>Target ClCompile:
1> Starting remote build
If I replace this with a script, it is executed..but the output is swallowed.
I've tried redirecting to stderr both within the script and within the command and it seems to change nothing. I've also adjusted Tools->Options->Project and Solutions->Build and Run output verbosity as high as I'm willing to (Normal) with no changes.
Anyone have any ideas on solving this?
I've also adjusted Tools->Options->Project and Solutions->Build and
Run output verbosity as high as I'm willing to (Normal) with no
changes.
Normally it's recommended to change the Verbosity to Detailed and higher to see more details. And this is the only option I know in latest VS2019 16.3.7 can control the behavior of output log.
So you can change it to Detailed to check if there's more info to be displayed in output window.(For some reason,my configuration fails for the wsl.exe, so I can't test it myself whether this option can work)
And if the echo info is still not shown, I guess this scenario is not be supported for now since it's quite a new feature. Just post your feedback in DC as the Give Us Feedback in this document suggests. The team there would look and consider about supporting that. May it makes some help :)

Customize Netbeans' gdb session

I would like to customize my remote debug session when debugging with netbeans 8 (from a windows machine).
In the gdb log, I have this line:
&"C:\Users\xxx/.gdbinit: No such file or directory.\n"
I have created such a file, but it's still ignored in my gdb session. It is probably a bug in Netbeans + Windows.
Is it possible to configure the Netbeans' gdb to use a custom configuration ?
There is an option about the debug session in the projet properties.
Here it is possible to give a file location for the gdbinit to be loaded.
For a remote debug session the path must match a valid .gdbinit on the remote machine.

Resources