Compile libssh for ESP32 - libssh

I am trying to use the libssh library on the ESP32. When I compile the program, I get lots of errors.
The first error is "fatal error: sys/select.h: No such file or directory." I commented it out just to see if I could get past it, and it says it can't find bignum.
Any idea how to get libssh to work on a micro-controller like the ESP32?
Thanks.

I think your bigest problem is that you have no operating system.
linux on esp32 won't work because it has no MMU.
maybe freertos has possibilities.
why would you need ssh on esp32.
maybe an https webserver with basic authentication could serve your goals.

Related

"Program File does not exist" while trying to debug with Eclipse/OpenOCD

I recently got a nrf51 bluetooth module and I am trying to debug it with Eclipse Mars. I installed the required toolchain as well as OpenOCD (I am using STLink v2 to debug the board).
While running openOCD and arm-none-eabi-gdb in console, everything works fine. The OpenOCD server starts up and I am able to connect with the gdb tool.
However, when trying to start a debug session with Eclipse, it throws the error "Exception occurred during launch. Reason: Program file does not exist". The build process finishes normally. It's the first time I used Eclipse for C/C++ development and the first time after years I used Eclipse at all so I don't even have an idea what could be wrong.
I tried messing around with the project settings without luck. Can anyone give me a hint?
I should mention, I used an already existing Makefile since I tried compiling one of the nordic SDK examples. I Changed it so the resulting files are ready for debugging.
In past I've used Segger's Jlink programmer and the JlinkExe (A pre-built binary) for Linux platform to program Nordic Bluetooth module such as NRF51 and it worked seamlessly. There are some very good documentation on using GNU toolchain with NRF51 series SOC and in case you get your hands on Segger's Jlink, I would recommend you to use that for programming. Meanwhile, this thread in the Nordic's developer zone seem to be very much similar to your problem. Maybe you'll be find some clues there.

Can an IDE/Netbeans connect to a remote computer and compile/run/debug code on it?

I'm developing a program for a specific environment. That means it needs to run on the OS and compile using its compiler. I have a different environment at home (Windows 8) is there a way Netbeans can be used to connect to the target environment and use its compiler? It is enabled for remote login.
So basically right now I write code on my home computer, connect using Putty to the target computer, copy the source code over, compile it and run it. I'm trying to simplyfy this process so I only have to use Netbeans.
Why don't I just get same compiler and do everything locally? The target computer is running Linux and the program has a lot of system calls.
I know Aptana has a simillar feature, but Aptana is so crappy in general I don't want to use it.
Let me know if my question doesn't make sense and I'll try and reword it.
Yes, you can do remote development in NetBeans. It's described in its Help subsystem:

Libpurple can't connect - purple_presence_is_online failed

I am writing myself a small jabber client. I have used code from Libpurple.com and on Linux (Mint) everything works fine. With libraries linked program compiles with no errors and receives messages.
But when I use the same code on Windows 7, link all neccessary libraries and with Cygwin installed and PATH set, program compiles with no errors, but then NetBeans (IDE I use in Windows and Linux) says 'RUN FAILED'
When I run program from windows command line it says:
libpurple initialized. Running version 2.10.7.
** <myclient.exe:6500>: CRITICAL **: purple_presence_is_online: assertion 'presence != NULL' failed
and then it freeze. I already tried going back to libpurple 2.10.3 (the version I have in Linux) but still the same. Turning firewall off did'n help either.
Few things to note:
Each OS has its own issues when a program is deployed. So, ignore the fact that your client is working in Linux. Start with the fact, that your program / libpurple didn't work in Windows.
Try to see if there is a client ( pidgin etc ) which uses the same code path ( the function where the assertion fails ), and succeeds. This is to do basic sanity check that the libpurple code is in fact usable in that environment ( Cygwin )
If there is any traffic between your client and the server, try getting a wireshark traffic dump, and compare it between working ( Linux ) and failing ( Cygwin ) environment.
Why not use a simple XMPP client library like GLOOX (http://camaya.net/gloox) instead of libPurple. GLOOX is a cross platform library that do not need CYGWIN on Windows to compile. And its complete, providing implementation for all the essentail XMPP estensions.
However, if you want to connect to other non-XMPP networks like Yahoo, Facebook, then libPurple will definitely is the answer.
Since your issue is hard to reproduce, I'd suggest you use the debugger to investigate where that "presence" pointer comes from, and which code block sets it to NULL. Then you could ask "why purple_stupid_function() returns a NULL pointer" which is much easier to answer.
The last time I looked at LibPurple (years ago) I could only get it working with MinGW, not Cygwin.

Apply VST audio effect/plugin to audio-file

This is my first question after leeching over here for some time.. So spare me.
I need to apply the iZotope Vinyl VST effect to some audio files via CLI or C++ (so language doesn't really matter), it has to work on a Mac or on a Unix based system. I've researched all over the webs and can't find any working solution.
I've tried using MissWatson, a command line utility, this works but my result audio files are silent...
./MissWatson -plugin=Vinyl -input-file="/Users/Sjaq/Desktop/test.wav" -output-file="/Users/Sjaq/Downloads/MissWatson-v1.0-mac/res.wav" -parameter=1:0.6,2:0.6,11:0.4
Then I tried using the Steinberg VST SDK by creating a host application, starting from the vstvalidator provided by the SDK. But when I try to load the VST I get this error:
2010-12-01 16:57:40.774 vstvalidator[4654:903] Error loading /Library/Audio/Plug-Ins/VST/Vinyl.vst/Contents/MacOS/Vinyl: dlopen(/Library/Audio/Plug-Ins/VST/Vinyl.vst/Contents/MacOS/Vinyl, 262): no suitable image found. Did find:
/Library/Audio/Plug-Ins/VST/Vinyl.vst/Contents/MacOS/Vinyl: no matching architecture in universal wrapper
And I don't know what to do. I'm pretty new to C++ and and made a few apps without any issues, but this time I've hit a dead end.
I've read about pyvst but it seems to need a DLL for the VST so that didn't work either.
I'm the author of MissWatson, and as you probably noticed on the webpage, I unfortunately was required to close-source the code, so I can't really ask you for more diagnostic information, since I wouldn't be able to patch MissWatson if it's a bug there. However, I would recommend running MissWatson with the -verbose switch and perhaps logging that output to file if that floods your terminal. You might find something in that output which helps you to diagnose the problem.
Anyways, as for the error in your VST host, I have a feeling that you are compiling your app as a 64-bit executable and trying to load a 32-bit plugin. Since hardly any VST/AU plugins (and also sequencers, for that matter) have made the leap to 64-bit, you'd be better off just compiling your app as a 32-bit x86 binary.
By default, the "debug" configuration in Xcode only builds your app for the native architecture of your machine to save time during compilation. I would advise that you disable this feature in your project's build settings and always build with the architectures you plan to ship with. This will prevent weird cross-architecture types of errors like the one you saw above.
Edit: I have since started a new command-line VST host to replace MissWatson which is called MrsWatson. You should try using this tool instead.
Perhaps you can port the source code of this open source vst host to match your platforms?
http://www.hermannseib.com/english/vsthost.htm
Scroll down to the bottom of the page.
Hope it helps.

program doesn't work after FTP

I was working on a c++ project on a remote linux server via ssh. I decided I wanted to test the files on my own machine using valgrind. I FTP-ed the project directory from the remote server to my own machine, compiled, and attempted to run.
I got the message:
Error opening /proc/96855/stat
And based on the different arguments I ran my program with, that number between proc and stat would change.
Does anyone know what happened here? Shouldn't everything work just fine on my machine as long as I have all the .cpp and .h files necessary? It compiled just fine, so I am lost.
What operating system is your local machine running?
My guess is that it doesn't support operations that the software requires (for example, trying to access processes through the /proc directory).
Maybe you forgot to tell FTP that this was an "image". Try again with "image" turned on.
Another practice that I use when I FTP is to turn on hashing with "#". I want to be able to see that the number of bytes transferred is exactly the same as the size on my machine.
Maybe a client program like FileZilla would help as well.