LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-01-2014, 10:33 AM   #1
Palmitoxico
LQ Newbie
 
Registered: Sep 2014
Location: Brazil, São Paulo
Distribution: Debian, ArchLinux
Posts: 6

Rep: Reputation: Disabled
Lightbulb Getting started with an open source project (Cortex-m debugger)


Hello Linux lovers!

I'm an experienced programmer for embedded platforms (8051, PIC, AVR, ARM Cortex-M) and I've a solid knowledge in C programming and assembly. I also have some experience in Linux software development (C, C++ and wxwidgets), but I used to write simple programs for specific functions.

Recently I've started developing for Cortex-M microcontrollers (STM32F4) using gnu tools and openocd for debug. Initially I tried to use Eclipse IDE, after all configurations I've got it working, but Eclipse is so bloated and buggy that is impossible to use it for medium to big projects. Now I'm using make scripts for compile and gdb + openocd (terminal) for debugging, believe or not: still easier and more productive than using Eclipse.

Well, the gdb alone isn't very suitable to debug microcontroller firmware, since you need to watch peripheral's registers and see them in a proper way (access by their names and have labeled bit fields). I tried ddd, but it didn't help so much and still using the old X11 style.

So I've decided to write my own GUI interface for gdb (ARM) following this goals:

- Use wxwidgets;
- Each Cortex-M microcontroller will have a xml file that describes the memory map and all peripheral registers;
- Highlight C and assembly code;
- Show details about the current context (Thread or Handler mode, privileged or unprivileged mode, pending exceptions, etc).

In the future I plan to make it cross-platform, but initially it will only run on Linux.

My problem is that I don't have experience for creating and managing medium or large open source projects and what tools I need to use. For example, I see a lot of code repositories that uses advanced make scripts, configuration scripts, documentation tools, etc. Can anyone explain what tools I need and why? Maybe someone can post an initial template for c++ projects? Any hints for this project?

Thank you.
 
Old 09-04-2014, 11:05 AM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
I suppose at a bare minimum you will want to check out Autoconf and Automake.

Autoconf is more important when you are developing for multiple platforms. It depends on another Gnu piece of software, M4. Autoconf produces shell scripts which will automatically configure your source files depending on platform and features.

Automake will produce makefiles, which as you probably know, run the sequence of commands necessary to compile, link, and install your software (among other things).

Both programs can be rather complicated, but the Gnu website has decent documentation on both, should be enough to get you started:

http://www.gnu.org/savannah-checkout...ode/index.html
http://www.gnu.org/software/automake.../automake.html

There is also a pretty decent book on the Gnu autotools from No Starch if you really want to get down and dirty:
http://www.nostarch.com/autotools.htm

As for documentation tools, there are thousands of different ones that you could use. My suggestion is to have a search, try a few, and standardize on the one you like best.

Also: Many IDEs will create skeleton make/configure files and templates when you start a new project. I am most familiar with Kdevelop, but again, have a search and see what's out there.
 
1 members found this post helpful.
Old 09-08-2014, 09:37 PM   #3
Palmitoxico
LQ Newbie
 
Registered: Sep 2014
Location: Brazil, São Paulo
Distribution: Debian, ArchLinux
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank you!

I'll try to figure out how to use these tools. For while I've little time, but I'll post my experiences with the tools that you suggested.
 
Old 09-24-2014, 12:17 PM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
No problem. You can also use make to build documentation targets, such as man pages, html or pdf docs, and the like.

There is also a newer build system out ther called Cmake that a lot of projects are using now (KDE comes to mind). I have not used it yet personally, but it is probably worth checking out.
 
Old 09-24-2014, 12:30 PM   #5
Palmitoxico
LQ Newbie
 
Registered: Sep 2014
Location: Brazil, São Paulo
Distribution: Debian, ArchLinux
Posts: 6

Original Poster
Rep: Reputation: Disabled
I've used cmake before to compile Kicad, I'll check it.

Up to now I've setup a git repo and some folders.

I'm thinking in using GPL V2 for this project (seems to attract more devs).

Now I'm stuck with GUI, must I use some GUI editor or avoid them?
 
Old 09-24-2014, 12:44 PM   #6
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
That's a personal choice I suppose. If you prefer the CLI you can of course use vim or emacs. I myself use Kdevelop, and like it very much. It has hundreds of features, the most useful of which I find is the fact you can mouseover any variable or function call and a popup will show you where it is defined, and even open headers or other files so you can read the definition. Downside is that it needs at least kdelibs installed which is a pain in the butt if you don't use KDE.

If you develop on different computers I would recommend creating a remote git repository on github, makes it very easy to share your source between different computers.
 
Old 09-24-2014, 12:52 PM   #7
Palmitoxico
LQ Newbie
 
Registered: Sep 2014
Location: Brazil, São Paulo
Distribution: Debian, ArchLinux
Posts: 6

Original Poster
Rep: Reputation: Disabled
I think I wasn't clear in my statement.

By the "GUI editor" I mean something like wxSmith or wxGlade. I don't known if these tools are good choices for medium open source projects.
 
Old 09-24-2014, 01:07 PM   #8
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Ah, I gotcha. I've very little experience with those kind of tools, but I understand they help to vastly speed up GUI development. It is much easier (and less bug-prone) to layout your GUI visually than to do so with straight code. I'd give them a try, maybe with just a tiny project first to see how they work.
 
Old 09-26-2014, 08:13 AM   #9
Palmitoxico
LQ Newbie
 
Registered: Sep 2014
Location: Brazil, São Paulo
Distribution: Debian, ArchLinux
Posts: 6

Original Poster
Rep: Reputation: Disabled
Great!

Now I tried Cmake, and is MUCH easier to use than GNU Autotools, definitively I'll use it in my project!

Some helpful information:
http://leandro.setefaces.org/2011/tutorial-cmake-p-i/ (Portuguese)
http://www.cmake.org/cmake/help/cmake_tutorial.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: 10 ways to get started with open source LXer Syndicated Linux News 0 01-29-2013 08:20 PM
LXer: Morevna - An Open Source Anime Project Using Open Source Tools Only LXer Syndicated Linux News 0 07-22-2010 02:30 AM
LXer: Open access and open source intersect in Public Knowledge Project LXer Syndicated Linux News 0 03-24-2007 12:31 PM
LXer: Open-xchange Unveils Community Project To Build Open Source ... LXer Syndicated Linux News 0 03-12-2007 11:32 PM
Getting started in Open Source whereverjustice Linux - Newbie 2 04-21-2005 10:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration