Thursday, October 4, 2018

CPLD Vs FPGA

https://numato.com/kb/cpld-vs-fpga-differences-one-use/

Complex Programming Logic Device & Field Programmable Gate Array

CPLD and FPGA nicely explained, courtesy www.numato.com. 

Thursday, October 3, 2013

XCode app as Agent in MAC

How to make Agent app in Xcode

If you already wrote the NSApplication using Xcode and want to run the same app in background, it can be done simply by adding a entry in -info.plist . Just add a "Application is agent(UIElement)"- Yes.
This would make your app run in background and provide some service, so that other apps can make use of it. Below is the screenshot of -info.plist entry FYR



Hide the Window in Xcode app

To hide the Xcode app main window or any window inside

1. Choose the xib file from the Xcode project.
2. Select the Window that you want to hide, and check the corresponding attributes from attribute window.
3. Uncheck the "Visible at Launch" checkbox.

And you are done, below attached is the screenshot of the window attributes from Xcode ide FYR.


Sunday, September 29, 2013

make install problem

make[2]: Nothing to be done for `install-exec-am'.
====================================

This may be a error that one may encounter during installation of some linux based sofwares. In the process of executing ./configure, make, make install , this could be a error when we do make install. To eliminate the issue just try

./configure --prefix=/usr

this would work for most of the installation.

Monday, September 23, 2013

QLThumbnailImageCreate Fails


Console Output 

ImageIO:   CGImageDestinationAddImage image parameter is nil

ImageIO:   CGImageDestinationFinalize image destination does not have enough images

The above error happens due to either CGSizeMake size is zero,i.e., the image we are trying to create has maximum size as Zero. or The system doesn't have codec to parse the file passed as parameter. I just spend quite a bit of time puzzling, unable to find why the QLThumbnailImageCreate fails, although all the parameters are valid, the reason was, i was trying to parse a video file, for which my current system didn't have codec. Finally, tried with some .mpg extension and it worked fine. Hope this post help someone save sometime. 

Friday, September 20, 2013

XCode objective-c++ Compilation error


XCode compilation error
==================
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)


The above error is due to .cpp extension used for objective-c++ file, ie., a file that
has the objective-c and c++ code has extension .cpp insted of .mm. Rename to .mm extension
could solve this issue.

Thursday, September 19, 2013

Setting up VIM as IDE in MAC OS X


To setup VIM in mac os x :
#####################

1. By default MAC OS X comes with vim installed.

2. Download and install cscope-15.8a.tar.gz (601.2 kB) from cscope.org.

3. Unzip the cscope-15.8a.tar.gz from terminal. (tar -xvzf cscope-15.8a.tar.gz).

4. cd cscope-15.8.a folder, and do ./configure, make, and make install.

5. the above install may fail due to ncurses dependency with following error.
 
In file included from main.c:49:
/usr/include/ncurses.h:539:40: error: macro "cbreak" passed 1 arguments, but takes just 0
/usr/include/ncurses.h:564:44: error: macro "erasechar" passed 1 arguments, but takes just 0
/usr/include/ncurses.h:600:43: error: macro "killchar" passed 1 arguments, but takes just 0
make[2]: *** [main.o] Error 1

6. The above error can be resolved by making changes in src/constants.h file. Open this file in vim and modify the below line
 
 #if (BSD || V9 ) && !__NetBSD__ && !__FreeBSD__
with this
#if (BSD || V9 ) && !__NetBSD__ && !__FreeBSD__ && !__APPLE__

 
7. Now repeat step 4. It will succeed.
 
8. Download and install Exuberant Ctags from crags website http://ctags.sourceforge.net

9. Follow the similar procedure to install ctags
tar xzvf ctags-5.8.tar.gz
cd ctags-5.8
./configure
make
sudo make install
 
10. After exuberant crags installed, you can verify it using the below commands
which -a ctags

/usr/bin/ctags ==> original ctags
/usr/local/bin/ctags ==> exuberant ctags

11. To set OS X to use exuberant crags, just export the path
 
  export PATH="/usr/local/bin:$PATH"

12. Downlod Taglist plugin and unzip using tar -xzvf and do the following
 
Copy the tag list.vim to /usr/share/vim/vim73/plugin/.
Copy the tag list.txt to /usr/share/vim/vim73/doc/.

13. Thats it you are ready to go. If any problem such as Taglist showing empty or no tags appears add the following lines in vimrc file

let Taglist_Ctags_Cmd = "/usr/local/bin/ctags"
"to inform vim about filetype
filetype on
"to inform vim about syntax highlighting
  syntax on

14. To permanently avoid exporting path export PATH="/usr/local/bin:$PATH" each time, add following line in top of /etc/paths
 
/usr/local/bin

15. Add the below line  vimrc file to automatically find the tags file generated in current directory , all the way to root

 set tags = ./tags; /

If any doubt related to creating scope db and others refer to my previous posts. thank you.

Ref: http://vim-taglist.sourceforge.net/faq.html