NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » Using Fedora Linux 16

November 16, 2011
by pfullen
pfullen's Avatar

I just created a new Computer in my basement lab.

I installed Fedora Linux

I am now having to figure out how to get a txt editor and learn the "cmd" prompt syntax.

Does anyone have any suggestions for getting an editor and also any links for learning the Linux syntax?

Thanks for any help you can provide

November 16, 2011
by treymd
treymd's Avatar

Are you using the gui or command prompt. I'm old school linux and use primarily vi/vim in the console. My electronics computer is actually running Fedora 15 and I connect to it from my windows computer using putty. I'm digging up a shell tutorial wait one...

November 16, 2011
by treymd
treymd's Avatar

Shell Tutorial This one looks like a good place to start.

Also, man is your friend. type "man command" for a manual on just about any console command.

On Redhat based systems, (which fedora is) you install everything through yum. This one in particular is a command you'll want to run: yum groupinstall "Development Tools"

Probably this one too:

yum groupinstall "Development Libraries"

and for your nerdkit

yum install avrdude

yum install avr-gcc

yum install avr-libc

November 16, 2011
by treymd
treymd's Avatar

Quick primer on vi should you choose to go down that dark path:

create or open a file by typing vi filename.

once in the file I usually just hit the a key to start editing. escape will bring you back to non editing mode where you can use small r to replace one character, or capital R to enter replace mode where everything you type will replace the existing text. again, hit escape to exit this mode.

when you are in the non-editing mode you can issue commands prefixed with the colon character. :wq tells vi to save/write the file and quit :q is simply quit :q! is quit without saving changes. If you find yourself stuck in some sort of accidental typo hell, hitting escape a few times and :q! will drop you back to the shell.

vim is an extremely powerful editor and comes with a manual of it's own, there are SO many things you can do with it. I won't attempt to even try to get into the details and encourage you to seek out a vim tutorial.

I do however recommend that if you are going to use vi(vim) for coding, to install vim-enhanced (yum install vim-enhanced) and run the program using the command vim rather than plain old vi, as that will give you immediate syntax highlighting for your code.

November 16, 2011
by Ralphxyz
Ralphxyz's Avatar

I really like EMACS but it is probable overkill for AVR programing.

There are lots of editors available for Linux/UNIX.

Ralph

November 16, 2011
by pfullen
pfullen's Avatar

Thanks

Can I use the terminal to type in the yum commands I am not having any luck. Sorry not sure what I am doing

November 16, 2011
by treymd
treymd's Avatar

emacs is the other wildy popular and powerful command line editor.

yes the yum commands I posted are terminal(shell commands) You need to be root to execute them, or use sudo, running as root is easier but I'm sure there are some security purists who will smack me for suggesting it.

You can also install the same packages using the gui package installer, which quietly uses yum in the background. That should be somewhere in your menu and might make life a bit easier. I do it the way I do because I've been doing it this way for over 15 years. It really doesn't matter which you choose, although I do feel you have more control over the system when you use the command line.

For the command line version, open a terminal, execute the command: su

this will prompt you for the root password you set at install time, if you used a live disc I THINK su will just put you right into superuser mode without a password prompt, not 100% sure. You can tell that you are running as root by the way the command prompt looks. Generally it will literally say root@host or user@host, but if it ends with # [root@host dir]# you are indeed the superuser.

If you are getting an error, go ahead and post it here, it will give us some idea of the problem you are encountering.

November 28, 2011
by pfullen
pfullen's Avatar

I have vim setup and working great. However I can't figure out how to get it to auto load the C script that I downloaded

Thanks

December 04, 2011
by pfullen
pfullen's Avatar

hanks a bunch I was able to get it to work

The C script was created by Fritz Mehner It allows vim to have a ton more function while programming C or C++

I edited the vimrc file

I also had to add

:filetype plugin on

You download the script at http://www.vim.org/scripts/script.php?script_id=213

You will need to make a new folder called .vim with a subfolder called plugin If you unzip the cvim plugin there should be a file called c.vim Copy this into .vim/plugin

It will then run the script when GVim starts up

Post a Reply

Please log in to post a reply.

Did you know that a thermometer can be made "faster" by using a bit of math? Learn more...