Error OpenOCD debugging on ATSAMA5D36 Xplained board: - atmel

I'm trying to flash on ATSAMA5D36 Xplained board using OpenOCD.
I builded and compiled application and want to debug using OpenOCD. When I am doing that I get the following error.
Openocd verson:
openocd-0.9.0.tar.gz
root#Harsha:/home/harsha/openocd_bin# openocd -f
interface/ftdi/ngxtech.cfg -f target/sama5d36.cfg Open On-Chip Debugger 0.10.0+dev-00556-gd0be163-dirty (2018-10-25-18:04) Licensed under GNU GPL v2
For bug reports, read http://openocd.org/doc/doxygen/bugs.html WARNING!
This file was not tested with real interface, but is assumed to work as this
interface uses the same layout as configs that were verified. Please report your
experience with this file to openocd-devel mailing list, so it could be marked
as working or fixed.
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
connect_deassert_srst
adapter speed: 1500 kHz
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
embedded:startup.tcl:21: Error: target requires -dap parameter instead of -chain-position!
in procedure 'script'
at file "embedded:startup.tcl", line 60
in procedure 'target' called at file "target/sama5d36.cfg", line 46
in procedure 'ocd_bouncer'
at file "embedded:startup.tcl", line 21
Steps Followed:
$ sudo apt-get install build-essential
$ sudo apt-get install automake
$ sudo apt-get install autoconf
$ sudo apt-get install texinfo
Build:
$ cd openocd-r520/
$ ./bootstrap
$ ./configure --enable-ft2232_ftd2xx
$ make
$ sudo make install
I'm using a JTAG adapter based on the FT2232 chip, FTDI support library.
$ wget http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx0.20.0 .tar.gz
$ tar -zxf libftd2xx0.20.0tar.gz
$ sudo cp *.h /usr/local/include/
$ sudo cp libftd2xx.so.0.20.0 /usr/local/lib/
$ cd /usr/local/lib/
$ sudo ln -s libftd2xx.so.0.20.0 libftd2xx.so
$ sudo ln -s libftd2xx.so.0.20.0 libftd2xx.so.0
$ cd /usr/lib/
$ sudo ln -s /usr/local/lib/libftd2xx.so.0.20.0libftd2xx.so.0
$ sudo mount -a
-I am not able to figure out the issue, I only know this details. Any help will be appreciated.
Thanks in Advance

Related

Symlink make as gmake on Mac

I am running a program (OpenModelica OMEdit 1.18.0~dev-109-ged8ef0a) which requires gmake for one of its operations. gmake is not installed on my Mac (Big Sur 11.5.2) but make is. I tried to symlink gmake to point at make but it does not work:
➜ where make
/usr/bin/make
➜ make -v | HEAD -n 1
GNU Make 3.81
➜ pwd
/opt/openmodelica/bin
➜ sudo ln -s /usr/bin/make /opt/openmodelica/bin/gmake
➜ ls -lh gmake
lrwxr-xr-x 1 root wheel 13B 13 Dec 09:15 gmake -> /usr/bin/make
➜ /opt/openmodelica/bin/gmake -v
gmake: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find gmake 2> /dev/null' failed with exit code 17664: (null) (errno=Invalid argument)
xcode-select: Failed to locate 'gmake', requesting installation of command line developer tools.
It prompts each time to install the XCode command line developer tools which I have already done. From the error message it looks like it is trying to find gmake despite pointing at the make executable? (Why is it erroring?) Is there a way to get this to work as I was expecting or do I have to install gmake using brew then symlink to that?
Command line tools version:
➜ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 12.5.1.0.1.1623191612
volume: /
location: /
install-time: 1639360537
groups: com.apple.FindSystemFiles.pkg-group
** edit **
I'm using zsh 5.8 (x86_64-apple-darwin20.0), I don't know if that's a factor in the gmake symlink to make not working correctly?
I don't understand why this works but from #Holger Just's comment:
➜ brew install make
This will add a symlink:
➜ ls -lh /usr/local/bin/gmake
/usr/local/bin/gmake# -> ../Cellar/make/4.3/bin/gmake
And then symlinking to that instead:
➜ sudo ln -s /usr/local/bin/gmake /opt/openmodelica/bin/gmake
... works as expected:
➜ /opt/openmodelica/bin/gmake -v | head -n 1
GNU Make 4.3

kibana-time-plugin downloaded but bower install not working and even kibana not working

I wanted to have a Widget to view and edit the time range from within dashboards of kibana. So after lot of research i found a plugin as Kibana-time-plugin. Ref: https://github.com/nreese/kibana-time-plugin
Currently i am using kibana 5.4.0 in my local. After installing the plugin i have tried "bower install" as per the command specified in git page. But getting an error as :-
$ bower install
/usr/bin/env: ‘node’: No such file or directory
And even if Kibana is not running and giving an error as below attached image:-
kibana5.4.0
Can anyone Guide me on this ?
Thanks in Advance !!!!!!!!!!!!!!!
I think the optimization failures may be due to file permissions, the plugin files need to be accessible by the kibana user. Specifically check this instruction:
Installing plugins with linux packages
Here is a complete script that worked for me. I am new to Kibana and Kibana plugins so any feedback appreciated. Two important notes:
1) I am pulling the zip file from S3 so you will need to edit that.
2) Be sure to restart kibana afterwards and check the logs
#!/bin/bash
# install nodejs and npm
sudo curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash -
sudo yum install -y nodejs
sudo npm install -g bower
# copy the plugin zip and unzip it and fix the name
cd /usr/share/kibana/plugins
sudo aws s3 cp s3://<YOUR-BUCKET>/kibana-time-plugin-master.zip .
sudo unzip kibana-time-plugin-master.zip
sudo mv kibana-time-plugin-master kibana-time-plugin
# install the plugin
cd /usr/share/kibana/plugins/kibana-time-plugin
sudo sed -i -e 's/5.0.0/5.4.2/' package.json
sudo chown -R kibana:kibana *
sudo mkdir -p /home/kibana
sudo chown -R kibana:kibana /home/kibana
sudo -u kibana bower install

Error installing Meteor on linux x86_64 chrome os

I am trying to install Meteor on the HP14 Chromebook. It is a linx x86_64 chrome os system.
Each time I try to install it I run into errors.
The first time I tried to install it the installer just downloaded the Meteor preengine but never downloaded the tarball or installed the actual meteor application structure.
So, I decided to try as sudo.
sudo curl https://install.meteor.com | /bin/sh
This definitely installed it because you can see it when ls
chronos#localhost ~/projects $ chronos#localhost ~/projects $ ls /home/chronos/user/.meteor/
bash: chronos#localhost: command not found
Now when I try to run meteor --version or meteor create myapp without sudo I get the following error.
````
chronos#localhost ~/projects $ meteor create myapp
'/home/chronos/user/.meteor' exists, but '/home/chronos/user/.meteor/meteor' is not executable.
Remove it and try again.
````
When I try to run sudo meteor --version or sudo meteor create myapp I get this error.
chronos#localhost ~/projects $ sudo meteor create myapp
mkdir: cannot create directory ‘/root/.meteor-install-tmp’: Read-only file system
Any ideas? Thinking I have to make that partition writeable. I made partition 4 writeable.
Put your chrome book into dev mode.
http://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices
Boot into dev mode.
ctrl-alt t to crosh
shell
sudo su -
cd /usr/share/vboot/bin/
./make_dev_ssd.sh --remove_rootfs_verification --partitions 4
reboot
After rebooting
sudo su -
mount -o remount,rw /
mount -o remount,exec /mnt/stateful_partition
Write yourself a read/write script
sudo vim /sbin/rw
#!/bin/bash
echo "Making FS Read/Write"
sudo mount -o remount,rw /
sudo mount -o remount,exec /mnt/stateful_partition
sudo mount -i -o remount,exec /home/chronos/user
echo "You should now have full Read/Write access"
exit
Change permissions on script
sudo chmod a+x /sbin/rw
Run to set read/write root
sudo rw
Install Meteor as indicated on www.meteor.com via curl and meteor create works!
Alternatively you can edit the chomeos_startup though that might not be the best idea. It is probably best to have read/write on demand as illustrated above.
cd /sbin sudo
sudo vim chromeos_startup
Go to lines 51 and 58 and remove the noexec options from the mount command.
Down at the bottom of the script, above the note about ureadahead and below the if statement, add in:
mount -o remount,exec /mnt/stateful_partition
#uncomment this to mount root r/w on boot
mount -o remount,rw /
Again, editing chromeos_startup probably isn't the best idea unless you are so lazy you can't type sudo rw.
Enjoy.
This is super easy to fix!!
Just run this (or put it in .bashrc or .zshrc to make it permanent):
sudo mount -i -o remount,exec /home/chronos/user
Based on your question (you are using sudo) I assume you already have Dev Mode enabled, which is required for the above sudo command to work.
ChromeOS mounts the home folder using the noexec option by default, and this command remounts it with exec instead. And boom, Meteor will work just fine after that (and so will a bunch of other programs running out of your home folder).
Original tip: https://github.com/dnschneid/crouton/issues/928

Nginx doesnt work

In ubuntu 12.04 (server):
sudo apt-get install libpcre3 libpcre3-dev zlib1g-dev
wget http://nginx.org/download/nginx-1.5.6.tar.gz && tar zxvf nginx-1.5.6.tar.gz && cd nginx-1.5.6 && ./configure && make && sudo make install
Then I try:
sudo service nginx start
or
nginx -s reload
and many others that I find in google - all of them doesnt works. (nginx: unrecognized service, no command found, etc)
How to start nginx?
for you guys, who used nginx installation via passenger:
$ wget -O init-deb.sh https://gist.githubusercontent.com/rschmitty/5891885/raw/9b737a42e950581f16ed3074c69f5bcb920f24cb/660-init-deb.sh
$ sudo mv init-deb.sh /etc/init.d/nginx
$ sudo chmod +x /etc/init.d/nginx
$ sudo /usr/sbin/update-rc.d -f nginx defaults
It enables standard service nginx start|stop|restart|reload commands
You can install nginx like you installed those libraries. The only reason to compile it manually is if you want a really new feature or security fix.
sudo apt-get install nginx
It should automatically start nginx. If not you may start it manually.
sudo /etc/init.d/nginx start

Is there a way to get to the beginning of a command without holding the arrow?

I've been using unix for some time, and I would like to know if there is a simple command for getting to the begginging of a command without holding the arrow.
Say I want to change /usr/ to /foo/
/usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
After you typed the first command you could use
$^/usr/^/foo/
To run the last command by replacing /usr/ with /foo/
Example
$ echo "/foo/bar/"
/foo/bar/
$ ^/foo/^/baz/
echo "/baz/bar/"
/baz/bar/
Emacs bindings: Ctrl+A or Home
VIM bindings: 0

Resources