An Introduction To Linux Development Environment


Published on

Published in: Technology

An Introduction To Linux Development Environment

  1. 1. An Introduction to Linux Development Environment S.M.H. Hamidi hamidi{ at }ce{ dot }sharif{ dot }edu Hamedan Linux Seminar, Fall 2004
  2. 2. Outline <ul><li>Introduction </li></ul><ul><li>Linux & Programming relationship </li></ul><ul><li>Applications and benefits </li></ul><ul><li>Embedded systems </li></ul><ul><li>Components of Linux development platform </li></ul><ul><li>Resources </li></ul><ul><li>Conclusion </li></ul>
  3. 3. Introduction <ul><li>Linux & Programming have inherit relationship. </li></ul><ul><li>Linux is an open “ source code” software . </li></ul><ul><li>Linux made by programmers, having in mind other programmers. </li></ul><ul><li>Best of the kind programming tools come free with Linux. </li></ul>
  4. 4. How does it affect programmers’ life? <ul><li>Make an unrefined idea to a big Open Source project. </li></ul><ul><li>Share your idea and code fragments. </li></ul><ul><li>Gather a team of volunteers from all over the word. </li></ul><ul><li>Get donations for your basic idea and team leadership. </li></ul>
  5. 5. How does it affect programmers’ life? ( cont’d ) <ul><li>Take advantage of free testers, debuggers, documenters and developers. </li></ul><ul><li>Some users may see your work and become real customers: </li></ul><ul><ul><li>Some may need support and training. </li></ul></ul><ul><ul><li>Sign a financial contract with those who need a customized version of your system. </li></ul></ul>
  6. 6. How does it affect programmers’ life? ( vice versa ) <ul><li>You are forced by your employer to do a huge project with an early deadline. </li></ul><ul><li>You search the web for similar previously done work. </li></ul><ul><li>You likely find a close work and make some changes and will be able to meet the deadline. </li></ul>
  7. 7. How does it affect programmers’ life? ( cont’d ) <ul><li>You gain benefit of other efforts as others of yours: Cooperation </li></ul><ul><li>Learn from elegant codes of professionals. </li></ul><ul><li>Improve your coding and team working skills by joining big Open Source projects. </li></ul>
  8. 8. Applications & benefits <ul><li>Open Source returns freedom and authority to the customer. </li></ul><ul><li>Change software according to your desire. </li></ul><ul><li>Integrate existing software systems to a new one. (System Integration) </li></ul><ul><li>Add new features to your software. (e.g. Persian support) </li></ul>
  9. 9. Applications & benefits ( cont’d ) <ul><li>Building applications from source has some advantages in comparison with binary distributions: </li></ul><ul><ul><li>Performance tuning (e.g. compiling & customizing Linux kernel) </li></ul></ul><ul><ul><li>Hardware fitting </li></ul></ul><ul><ul><li>Minimizing size and features can lead to more security and better performance. </li></ul></ul>
  10. 10. Applications & benefits ( cont’d ) <ul><li>Some applications are normally distributed as source and should be build/ported on host machine. </li></ul><ul><li>Solve software bugs yourself instead of bug report and waiting to be fixed in later releases. </li></ul><ul><li>Write device driver for your specialized hardware embedded systems </li></ul>
  11. 11. What are embedded systems? <ul><li>A combination of computer hardware and software dedicated to specific tasks. </li></ul><ul><li>In contrast with general-purpose software/hardware </li></ul><ul><li>Limited hardware capabilities: generally lack of memory space, power supply and fast processors </li></ul><ul><li>Customized, minimized and crash-protected Operating System and applications are needed. </li></ul>
  12. 12. Embedded systems market <ul><li>Fast growing market and applications: </li></ul><ul><ul><li>Mobile phones </li></ul></ul><ul><ul><li>Home and office appliances </li></ul></ul><ul><ul><li>Network devices (routers, firewalls, wireless access points) </li></ul></ul><ul><ul><li>PDA’s (Personal Digital Assistants) and Pocket PC’s </li></ul></ul><ul><ul><li>WebTV </li></ul></ul><ul><ul><li>Thin clients </li></ul></ul><ul><ul><li>Game devices (e.g. Xbox) </li></ul></ul><ul><ul><li>Robots </li></ul></ul><ul><ul><li>Real time applications </li></ul></ul><ul><ul><li>… </li></ul></ul>
  13. 13. Embedded systems and Linux <ul><li>Linux as an operating system can act greatly as heart of Embedded system software. </li></ul><ul><li>Access to code make it easy to customize and minimize the Linux kernel so that it can be put on a ROM. </li></ul><ul><li>It can be changed to fit specific hardware. (e.g. through writing device drivers) </li></ul>
  14. 14. Embedded systems and Linux ( cont’d ) <ul><li>Windows CE: not a great competitor </li></ul><ul><li>Linux architecture makes it a suitable choice: </li></ul><ul><ul><li>Access to source code </li></ul></ul><ul><ul><li>Easy customization </li></ul></ul><ul><ul><li>Low memory consumption </li></ul></ul><ul><ul><li>No built-in GUI </li></ul></ul><ul><ul><li>Built-in firewall and router </li></ul></ul><ul><ul><li>Many freely availabe embedded applications </li></ul></ul><ul><ul><li>… </li></ul></ul>
  15. 15. And then? <ul><li>Roll up your sleeves and get into Linux coding. </li></ul><ul><li>Write your course projects in the Linux environment: </li></ul><ul><li>Better understanding of different level of build process. </li></ul><ul><li>Its difficulty is once! (Learning time) </li></ul>
  16. 16. Ready to start a quick tour?
  17. 17. Components of a Development Platform <ul><li>Editor </li></ul><ul><li>Compiler </li></ul><ul><li>Linker and loader </li></ul><ul><li>Project manager </li></ul><ul><li>Debugger </li></ul><ul><li>Version control and team collaboration </li></ul><ul><li>Documentation system </li></ul>
  18. 18. Editor <ul><ul><li>Feature rich editors increase developer productivity: </li></ul></ul><ul><ul><ul><li>Syntax Highlighting </li></ul></ul></ul><ul><ul><ul><li>Opening multiple windows </li></ul></ul></ul><ul><ul><ul><li>Rapid typing and code navigation </li></ul></ul></ul><ul><ul><ul><li>Support of tags </li></ul></ul></ul><ul><ul><ul><li>Folding code </li></ul></ul></ul><ul><ul><ul><li>Auto complete and easy coding </li></ul></ul></ul><ul><ul><ul><li>Extensibility and customizing </li></ul></ul></ul><ul><ul><ul><li>Code beautifying </li></ul></ul></ul>
  19. 19. Editor ( cont’d ) <ul><li>Vim and Emacs are two professional editors with many features and extensions. </li></ul><ul><li>Support for many languages and file formats </li></ul>
  20. 20. Vim (folding and highlighting)
  21. 21. Vim (multiple windows)
  22. 22. Compiler <ul><li>gcc , best standard and fast C/C++ compiler in the world, claimed by many professionals </li></ul><ul><li>gcc was developed by Richard Stallman, founder of Free Software Foundation. </li></ul><ul><li>gcc is ported on many platforms more than any compiler. </li></ul><ul><li>ld , is default Linux linker but gcc can be used also. </li></ul>
  23. 23. Project Management with make <ul><li>Make is a well-designed utility for code project management and build automation. </li></ul><ul><li>Idea behind Make has become as a essential part of every development environment, including MS Visual Studio </li></ul><ul><li>autoconf and automake provide a nice way for porting softwares. </li></ul>
  24. 24. Debugger <ul><li>gdb and gdbserver </li></ul>
  25. 25. Version Control System <ul><li>CVS (Concurrent Version System) one of the first and best version control systems on the world. </li></ul><ul><li>CVS is widely used all over the world. Mostly all open source projects make use of CVS . </li></ul><ul><li>It has some features for team collaboration. Mailing lists are also a necessary part of every open source projects. </li></ul>
  26. 26. Documentation System <ul><li>Docbook </li></ul><ul><li>And many others that are not listed on this slide because lack of time! </li></ul>
  27. 27. Integrated Development Environment <ul><li>RHIDE </li></ul><ul><li>motor </li></ul><ul><li>Kdevelop </li></ul><ul><li>Eclips </li></ul><ul><li>Anjuta </li></ul><ul><li>Magic C++ </li></ul>
  28. 28. anjuta
  29. 29. Eclipse
  30. 30. Online Resources <ul><li>YoLinux programming tutorials </li></ul><ul><li>Advanced Linux Programming </li></ul><ul><li>Linux Devices </li></ul><ul><li>Linux kernel sources </li></ul><ul><li>The Linux Development Platform </li></ul><ul><li>Linoleum Linux Programming Resources </li></ul><ul><li>RedHat Developer Courses </li></ul><ul><li>This Presentation : </li></ul>
  31. 31. Q & A Any question?