An Introduction To Linux Development Environment

31
An Introduction to Linux Development Environment S.M.H. Hamidi hamidi{at}ce{dot}sharif{dot} edu Hamedan Linux Seminar, Fall 2004

description

 

Transcript of An Introduction To Linux Development Environment

Page 1: An Introduction To Linux Development Environment

An Introduction to Linux Development Environment

S.M.H. Hamidi hamidi{at}ce{dot}sharif{dot}edu

Hamedan Linux Seminar, Fall 2004

Page 2: An Introduction To Linux Development Environment

Outline

Introduction Linux & Programming

relationship Applications and benefits Embedded systems Components of Linux

development platform Resources Conclusion

Page 3: An Introduction To Linux Development Environment

Introduction

Linux & Programming have inherit relationship.

Linux is an open “source code” software.Linux made by programmers, having in

mind other programmers.Best of the kind programming tools come

free with Linux.

Page 4: An Introduction To Linux Development Environment

How does it affect programmers’ life?

Make an unrefined idea to a big Open Source project.

Share your idea and code fragments. Gather a team of volunteers from all over

the word.Get donations for your basic idea and

team leadership.

Page 5: An Introduction To Linux Development Environment

How does it affect programmers’ life? (cont’d)

Take advantage of free testers, debuggers, documenters and developers.

Some users may see your work and become real customers:Some may need support and training.Sign a financial contract with those who

need a customized version of your system.

Page 6: An Introduction To Linux Development Environment

How does it affect programmers’ life? (vice versa)

You are forced by your employer to do a huge project with an early deadline.

You search the web for similar previously done work.

You likely find a close work and make some changes and will be able to meet the deadline.

Page 7: An Introduction To Linux Development Environment

How does it affect programmers’ life? (cont’d)

You gain benefit of other efforts as others of yours: Cooperation

Learn from elegant codes of professionals.

Improve your coding and team working skills by joining big Open Source projects.

Page 8: An Introduction To Linux Development Environment

Applications & benefits

Open Source returns freedom and authority to the customer.

Change software according to your desire.

Integrate existing software systems to a new one. (System Integration)

Add new features to your software. (e.g. Persian support)

Page 9: An Introduction To Linux Development Environment

Applications & benefits (cont’d)

Building applications from source has some advantages in comparison with binary distributions:Performance tuning (e.g. compiling &

customizing Linux kernel)Hardware fittingMinimizing size and features can lead to

more security and better performance.

Page 10: An Introduction To Linux Development Environment

Applications & benefits (cont’d)

Some applications are normally distributed as source and should be build/ported on host machine.

Solve software bugs yourself instead of bug report and waiting to be fixed in later releases.

Write device driver for your specialized hardware embedded systems

Page 11: An Introduction To Linux Development Environment

What are embedded systems?

A combination of computer hardware and software dedicated to specific tasks.

In contrast with general-purpose software/hardware

Limited hardware capabilities: generally lack of memory space, power supply and fast processors

Customized, minimized and crash-protected Operating System and applications are needed.

Page 12: An Introduction To Linux Development Environment

Embedded systems market

Fast growing market and applications: Mobile phones Home and office appliances Network devices (routers, firewalls, wireless access points) PDA’s (Personal Digital Assistants) and Pocket PC’s WebTV Thin clients Game devices (e.g. Xbox) Robots Real time applications …

Page 13: An Introduction To Linux Development Environment

Embedded systems and Linux

Linux as an operating system can act greatly as heart of Embedded system software.

Access to code make it easy to customize and minimize the Linux kernel so that it can be put on a ROM.

It can be changed to fit specific hardware. (e.g. through writing device drivers)

Page 14: An Introduction To Linux Development Environment

Embedded systems and Linux (cont’d)

Windows CE: not a great competitor Linux architecture makes it a suitable choice:

Access to source code Easy customization Low memory consumption No built-in GUI Built-in firewall and router Many freely availabe embedded applications …

Page 15: An Introduction To Linux Development Environment

And then?

Roll up your sleeves and get into Linux coding.

Write your course projects in the Linux environment:

Better understanding of different level of build process.

Its difficulty is once! (Learning time)

Page 16: An Introduction To Linux Development Environment

Ready to start a quick tour?

Page 17: An Introduction To Linux Development Environment

Components of a Development Platform

EditorCompilerLinker and loaderProject managerDebuggerVersion control and team collaborationDocumentation system

Page 18: An Introduction To Linux Development Environment

Editor

Feature rich editors increase developer productivity:

Syntax HighlightingOpening multiple windowsRapid typing and code navigationSupport of tags Folding codeAuto complete and easy codingExtensibility and customizingCode beautifying

Page 19: An Introduction To Linux Development Environment

Editor (cont’d)

Vim and Emacs are two professional editors with many features and extensions.

Support for many languages and file formats

Page 20: An Introduction To Linux Development Environment

Vim (folding and highlighting)

Page 21: An Introduction To Linux Development Environment

Vim (multiple windows)

Page 22: An Introduction To Linux Development Environment

Compiler

gcc, best standard and fast C/C++ compiler in the world, claimed by many professionals

gcc was developed by Richard Stallman, founder of Free Software Foundation.

gcc is ported on many platforms more than any compiler.

ld, is default Linux linker but gcc can be used also.

Page 23: An Introduction To Linux Development Environment

Project Management with make

Make is a well-designed utility for code project management and build automation.

Idea behind Make has become as a essential part of every development environment, including MS Visual Studio

autoconf and automake provide a nice way for porting softwares.

Page 24: An Introduction To Linux Development Environment

Debugger

gdb and gdbserver

Page 25: An Introduction To Linux Development Environment

Version Control System

CVS (Concurrent Version System) one of the first and best version control systems on the world.

CVS is widely used all over the world. Mostly all open source projects make use of CVS.

It has some features for team collaboration. Mailing lists are also a necessary part of every open source projects.

Page 26: An Introduction To Linux Development Environment

Documentation System

DocbookAnd many others that are not listed on

this slide because lack of time!

Page 27: An Introduction To Linux Development Environment

Integrated Development Environment

RHIDEmotorKdevelopEclipsAnjutaMagic C++

Page 28: An Introduction To Linux Development Environment

anjuta

Page 29: An Introduction To Linux Development Environment

Eclipse

Page 30: An Introduction To Linux Development Environment

Online Resources

YoLinux programming tutorials Advanced Linux Programming Linux Devices Linux kernel sources The Linux Development Platform Linoleum Linux Programming Resources RedHat Developer Courses This Presentation: http://ce.sharif.edu/~hamidi/LP-

intro.ppt

Page 31: An Introduction To Linux Development Environment

Any question?

Q & A