`mcu8051ide` on Linux mint 19 not working or opening - tcl

mcu8051ide on Linux mint 19 not working or opening, all dependencies are installed but when I check libraries, itcl is not present is the error.
I am confused what to do?

I installed Linux mint 19 in a virtual machine to check out what's going on.
The Itcl 3.4 pkgIndex.tcl file has the following contents:
# Tcl package index file, version 1.0
if {![package vsatisfies [package provide Tcl] 8.6]} {return}
package ifneeded Itcl 3.4 [list load [file join /usr lib x86_64-linux-gnu "libitcl3.4.so.1"] Itcl]
This means that Itcl will only be available with Tcl 8.6. However, mcu8051ide specifically starts tclsh8.5. That's the reason it can't find Itcl.
The mcu8051ide command is a very short shell script that only starts tclsh8.5 and passes /usr/share/mcu8051ide/lib/main.tcl as the script to run. If instead you run that script with tclsh (which is a symbolic link that points to tclsh8.6), it seems to work at first glance.
So, you can either modify the original startup script, or put a modified copy in your own bin directory.

go to /usr/local/share/mcu8051ide/lib
(or to /usr/share/mcu8051ide/lib depending on config during cmake)
and then edit the main.tcl file
using sudo nano main.tcl
On the 51st line,
change the value for MIN_TCL_VER from 8.5 to 8.6.

Related

Installation of Rainflow algorithm for Octave

I woud like to ask you a question regarding of installation of Rainflow package from this site: https://github.com/AmritaLonkar/rainflow-octave
I should be this https://de.mathworks.com/matlabcentral/fileexchange/3026-rainflow-counting-algorithm modified Matlab package for Octave, but it does not work.
Installation is written here, but I am not able to do so. I am NOT a programmer, so I would like to ask you for help and detailed procedure of installation.
Compilation and installation for GNU Octave
Do the following to create a compiled mex-file from "rainflow.c" and to test the result:
$ cd ./rainflow-octave$ make$ ls ./src/rainflow.mexrainflow.mex$ make test
Move files: rainflow.mex, rainflow.m and sig2ext.m to a place where GNU Octave can find them.
Octave will locate oct- or mex- files automatically if they are in a directory listed in the search path. To figure out the search path, do:
$ octaveoctave> path Octave's search path contain the following directories:
.
/usr/local/share/octave/site-m
Please do not hesitate to ask more questions if needed.
Best regards
Michal
My system
OS: e.g. **Windows 10
Octave version: e.g. Version 6.1.0
Installation method: e.g. Downloaded" from https://github.com/AmritaLonkar/rainflow-octave
I was able to build and run the rainflow package just using Octave 6.2.0 on my Windows 10 system.
Octave is capable of performing some compilation internally in order to build packages. I have no idea how to use the rainflow tool once built, but the following process worked to create it:
download the rainflow source tree and unzip it to it's own folder. This is normally the purpose of the git program mentioned above. It downloads and manages source code. Instead, manually download the source code.
Start from the rainflow page
click the Green button that says Code
click Download ZIP, save the file in a folder named rainflow where you'll be able to find it again. I used C:\Octave\rainflow\.
Now open Octave. You can use the pkg tool to build an installable package from the downloaded source code and then install it. This package is simple enough that the Octave-Windows environment is sufficient to perform the build:
in Octave, use either the cd command or the folder tree in the upper left of Octave to navigate to the folder where you saved rainflow. In my case, using the cd command I would type cd c:\octave\rainflow\. Yours might be different.
the only file in that folder should be rainflow-octave-master.zip
now, use the pkg tool to compile the package using the command pkg build . rainflow-octave-master.zip (the . means it will save the package in the current folder.)
When it finishes there should now be a second file in that folder named rainflow-1.0.2-x86_64-w64-mingw32-api-v55.tar.gz
install the package using the command pkg install rainflow-1.0.2-x86_64-w64-mingw32-api-v55.tar.gz (It will give some warnings about documentation, but the package should still install.)
verify installation by listing installed packages using the command pkg list. you should see rainflow in the list of packages. if not, try pkg rebuild then another pkg list. In my case, I see partway down the list:
rainflow | 1.0.2 | C:\Users\USERNAME\octave\rainflow-1.0.2
You can now use the package by first loading it using the command pkg load rainflow.
Testing it out a bit:
octave:76> rainflow
error: rainflow: RAINFLOW requires at least one input argument.
octave:77> rainflow(1)
ans = [](3x0)
octave:78> A = magic(3)
A =
8 1 6
3 5 7
4 9 2
octave:79> rainflow(A)
ans =
0.5000 2.0000 0.5000 0.5000 3.5000
3.5000 3.0000 8.5000 6.5000 5.5000
1.0000 1.0000 0.5000 1.0000 0.5000
The only issue I see is that afterward help rainflow does not show the help from rainflow.m, I suspect it should be included in the rainflow.c file. maybe this has to do with a change in octave since rainflow was created? if you want to read the help, you need to navigate to the package installation location or the location of the source files you unzipped and type help rainflow, at which point it will show:
octave:49> help rainflow
'rainflow' is a script from the file C:\octave\rainflow\src\rainflow.m
RAINFLOW cycle counting.
RAINFLOW counting function allows you to extract
cycle from random loading.
SYNTAX
rf = RAINFLOW(ext)
rf = RAINFLOW(ext, dt)
rf = RAINFLOW(ext, extt)
OUTPUT
rf - rainflow cycles: matrix 3xn or 5xn dependend on input,
rf(1,:) Cycles amplitude,
rf(2,:) Cycles mean value,
rf(3,:) Number of cycles (0.5 or 1.0),
rf(4,:) Begining time (when input includes dt or extt data),
rf(5,:) Cycle period (when input includes dt or extt data),
INPUT
ext - signal points, vector nx1, ONLY TURNING POINTS!,
dt - sampling time, positive number, when the turning points
spaced equally,
extt - signal time, vector nx1, exact time of occurrence of turning points.
See also SIG2EXT, RFHIST, RFMATRIX, RFPDF3D.
those other functions appear to be included as well and the help works, so you can try help sig2ext, help rfhist, help rfmatrix, and help rfpdf3d. I have not tested to see if they all actually work. But this will get the package up and running for you to start using. Good luck!
This worked for me. I'm on linux, but process should be the same on windows.
mkdir TempFolder
cd TempFolder
git clone https://github.com/AmritaLonkar/rainflow-octave.git
cd rainflow-octave
make # for some reason this places the .tar.gz package in the PARENT folder
cd .. # so let's go there
octave # and let's start octave from this directory
now from inside octave:
pkg prefix /path/where/you/want/the/package/to/be/installed
pkg install rainflow-octave-1.0.2.tar.gz
pkg load rainflow # to load the package and test it
rfctest # run the test to ensure it works

TCL_LIB_SPEC missing in modules install

I'm trying to install modules from SourceForge and I'm getting an error that a variable named TCL_LIB_SPEC is not set. What is this supposed to be set to?
The answer here is to install the TCL development package
% yum install tcl-devel
This gives you a tclConfig.sh file at /usr/lib64/tcl8.5
So
% cd /usr/lib64/tcl8.5
% . ./tclConfig.sh
Then configure works.
It's supposed to be set to the instructions to use with your compiler for linking against the Tcl C library, and it should (conventionally) be generated by running the relevant configure script inside a Tcl source distribution. Or a distribution of Tcl (e.g., on Linux perhaps called tcl-dev) may have alternate correct values already set up.

Install Tcl tk binaries in Buildroot

I want to have tclsh binary in my root file system generated by Buildroot.
In buildroot, we can (from menuconfig) go to Interpreter languages and scripting -> then choose tcl
But this will install tcl8.6 packages (opt0.4, http1.0). The tcl shell itself is not implemented in the generated file system.
Does anyone know how to enable tclsh in Buildroot
Thanks in Advance
You will have to tell buildroot not to remove tclsh from your build. This can be achieved by setting BR2_PACKAGE_TCL_SHLIB_ONLY=n after having run make menuconfig.
See also https://git.busybox.net/buildroot/tree/package/tcl/tcl.mk#n51.

Scilab, backdoor error, octave conflict

I installed scilab.6.0.0 and backdoor fromscilab website (which I could not find it from Application>Module maneger>atom>Technical). I moved the backdoor file my home and from scilab command line I installed it
-->atomsInstall('/home/user/BackDoor_0.2_5.5.bin.x86_64.linux.tar.gz')
Even though, it installed backdoor successfully, when I restart the scilab I got this error message with backdoor
Start Toolbox BackDoor
Load macros
atomsLoad: An error occurred while loading 'BackDoor-0.2':
lib: Old binary lib detected. Please recompile it for Scilab 6.
As I understand I need to update the library, but I don't know how?
Would sb tell me explicitly (because I am a newbie user of scilab) how can I get over the error?
at the and I try to connect octave and scilab and when I try to run a demo script at octave I get also this error
>> sci_sim_example
Scilab connection failed
FYI: I already installed sci_cosim package (after I downloaded the package, I write to octave prompt >>pkg install sci_cosim_0.1.3.tar.gz), and I load it before running the script.
How can I recompile the lib: Old binary lib detected
Thank you so much for your help in advance
Here's what worked for me.
Download Scilab 5.5.2 (link for Linux 64bit version)
Extract the .tar.gz file in your preferred system location to install it there. Generally, my preferred location to extract / install self-contained packages is inside /opt .
You can extract the .tar.gz file using your filebrowser's graphical facilities, or on the command line; if /opt is owned by root (which it usually is) you may need to change ownership after extraction. E.g. your installation might look something like this:
cd /opt
sudo wget http://www.scilab.org/download/5.5.2/scilab-5.5.2.bin.linux-x86_64.tar.gz
sudo tar -xvzf ./scilab-5.5.2.bin.linux-x86_64.tar.gz
sudo rm scilab-5.5.2.bin.linux-x86_64.tar.gz
sudo chown $USER ./scilab-5.5.2 -R
Launch scilab by typing
/opt/scilab-5.5.2/bin/scilab &
in your terminal.
Once scilab is launched, go to Applications->Module Manager ATOMS. In the new window that comes up, click on All modules -> BackDoor -> Install.
You should get a message saying "Installation done, please restart SciLab".
Exit Scilab, and launch it again from the terminal. If you see a message:
atomsLoad: An error occurred while loading 'BackDoor-0.2':
File "/opt/scilab-5.5.2/share/scilab/contrib/BackDoor/0.2/etc/backdoor.start" does not exist.
then type the following commands in your terminal to rename the affected files:
cd /opt/scilab-5.5.2/share/scilab/contrib/BackDoor/0.2/etc/
mv BackDoor.start backdoor.start
mv BackDoor.quit backdoor.quit
Restart SciLab again. Hopefully this time it will work and SciLab will inform you that BackDoor is listening for connections at a certain port.
PS. Also note that from the octave side of things, the -auto option is no longer accepted when you perform a pkg install. You will need to load the sockets and sci_cosim packages manually each time you want to use this.

Equivalent to libmysqldev FreeBSD

I have compiled a program in fedora using the mysql dev library (include mysql.h in header file). I need to compile in on FreeBSD. I do not want to download from source and compile but rather would like to download from ports or something equivalent to facilitate removing it if need be.
Does anyone know the equivalent of the libmysql-dev in FreeBSD. I have not found it in ports?
You do not need a special package for this. The standard mysql client package/port already includes the libraries and the header files you will need. The header files will end up, by
default, in /usr/local/include/mysql/ directory, while
the libraries will go to /usr/local/lib/mysql/.
So - just install a client from ports or packages, and you are set.
mysql.h is included in the mysql-client-xx port.
assuming you have a configure script or makefile you should set the LDFLAGS and CPPFLAGS environment variables to:
export LDFLAGS='-l /usr/local/lib'
export CPPFLAGS='-I /usr/local/include'
(or setenv, if using csh)
then ./configure and make as normal.
if you are compiling from the command line "gcc -o myprog mysource.c" just add the -I and -l options to your command and it should compile fine.
try: find /usr/local -iname 'mysql' to see files (headers, shared objects and binaries) you in fact have installed on your system.