Writing Software is easy, writing Software targeting a specific hardware can be pretty daunting. Daunting in terms of setting up your development environment, which compiler to use, what do the numerous compiler flags mean, how the linker comes around and its role in mitigating all those 'undefined reference' tags among other things.
I had a very basic understanding of C and some practical experience on the Arduino. Starting off with ARM was no joke, i didn't really sleep comfortably for too many nights in a row. For me understanding how the things fit in the big picture of having that LED blink is more important than that content feeling one gets after seeing the same. Flashing the code onto the board and seeing it run is easy, there is more than sufficient documentation online and follow any of those tutes and you'll find your way through. I suggest you do that if you would like to right now, this post tries to put things in perspective for a Beginner in embedded software and in a way helps me put down everything on 'paper'. Also, i am no embedded Software God.
Step 2. Once you have chosen your toolchain its important to give a read to its documentation and find out what things are what in it. How do i invoke the compiler, linker and assembler, what are the roles of these different tools, and how can i inter-convert between the final executable file format i am targetting. Read this. and this. Knowing a few compiler flags and their purpose is important.
Step 3. Get your C right. Since most of embedded development happens on C its good to run through a C refresher course on the side while you are doing steps 1 and 2. Basics of C, including Structures, Pointers and functions calling is important. Don't forget reading about the role of .c and .h files in any code. Small things go a long way in avoiding a lot of frustrating moments ahead. See this and this.
Once done, I would recommend using Eclipse (C/C++) as an IDE and integrating all of your stuff there. By stuff i mean integrating all your source code and compiler. You'll need to install an Eclipse plugin also for integrating your toolchain with the IDE. So now, here is a brief description of some generic steps you'd follow to set your own generic microcontroller development environment,
File -> New C Project, gets you this,
Click on 'Finish' on the next screen.
Once done, you need to get into the details and open the properties of this project. This will be screen under C/C++ Build,
Define your compiler symbols under Cross GCC Compiler -> Symbols.
Include your Compiler Include paths under 'Includes',
Set optimizations in the link under 'Includes'.
Set all your other compiler specific flags under 'Miscellanous'. This is what i set for building Stellaris TI ARM based Microcontroller code,
I leave finding out the meaning of all these flags to you. The compiler documentation covers them.
You now need to enter the location of the linker file and any libraries (with paths) which your code would use. To define the location of the linker file, look under the Miscellaneous tab under Cross GCC Linker
Define the libraries under the 'Libraries' section. Its important to understand what libraries are and how they help in the linking process. Libraries are basically an archive of the object files created during compilation. You do not need to include the source of the functions if you are including the libary directly into your code.
Thats it you are done. This is the generic way of building code targeting hardware.
Just build to generate your hex file. Check out the tool arm-none-eabi-objcopy to interconvert different file formats depending on the tool you use to burn the code onto your board.
Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
✓ Live Streaming✓ Interactive Chat✓ Private Shows✓ HD Quality✓ Free Actions
Free to watch • No registration required • HD streaming
Okay, yesterday I got the PDK installed properly and actually managed to get the device connected. Sadly, the simple sample wouldn't compile for device though.
Today I found out that I got the newest Version of this codesourcery toolchain, but an older one was recommended by the Palm PDK installation instructions (>link).
So I'm downloading the older version (very slow download -.-). And then we'll see :)