This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Newbie: Help me in getting started!

Note: This was originally posted on 11th December 2012 at http://forums.arm.com

Hello,

This is Annim Banerjee here...
Sorry if i have started a new topic over a wrong place!!!
if yes, then please place this in its correct place...


I am a clean/New to ARM. That means i dont know what all basic requirements are there to get started with ARM!!!

Platform i am having:
  •    i got my development board which has a LPC2138 pre soldered on it.
  • Few GPIO are out for general purpose tasks...
  • Also got its programmer too.
  • I Am having Flash Magic.
What i am not Having: this is where you people can help me....
  • No awareness of what tools are required for start writing code.
  • NO LPC21xx.h file found under GNU ARM pre-build tool chain.
  • What?Where? is all about startup Code *.S ?
  • Is startup code written manually or genrated automatically.
  • What all terms / terminology required to know before all?
  • Is MAIN.C and any startup .S file sufficient for putting a HEX file onto board via programmer?!
  • Any Freeware IDE for doing development for the same...
  • A good tutorial, as setp-by-step, or even DIY sort of!
  • What more... 
Also please , if possible direct me to any such place where i fit to go and get all my answers!!! I hope you all might have got the meaning of my words as described above.
Getting no good results over google / internet with my limited keywords!!

and sorry for asking soo much at once!!

Thank You!!!
  • Note: This was originally posted on 11th December 2012 at http://forums.arm.com

    Hello Annim,

    I am new to ARM processor software development myself but hopefully I can point you in the right direction to get started.

    (1) KEIL.com provide a free evaluation version of their uVision MDK-ARM IDE. I downloaded version 4.60 recently. The evaluation version is limited to 32k code size but this should be enough to get you started.
    The LPC2138 is included in the device library. There are plenty of code examples and tutorials included with the free version plus an extensive help documentation. By the way, KEIL is owned by ARM.

    (2) KEIL uVision IDE automatically includes the appropriate startup code. When you start a new project in Keil uVision, you are given the option to include a default 'startup.s' file based on the device you select.

    (3) The startup code is device specific. The startup code is executed before the main() function is executed. The startup.s file performs initialisation tasks such as defining the stack and heap memory sizes, defining a default interrupt vector table and provides an entry point for code execution (calls main()). This code can be edited to suit your particular requirements. The startup code is also used to copy the initialised RW data from ROM to RAM before program execution and to zero-initialise RAM.

    (4) startup.s and main.c is enough to build your application into a binary executable and hex file. I recently developed a simple application to toggle a couple of GPIO pins on a Cortex-M3 based microcontroller.
    I only have two files in my project - startup.s and main.c

    The KEIL IDE is able to download the binary file to flash memory via external debugger hardware. The built in KEIL flash programming tools use the bin file (rather than the hex file) for programming flash memory.

    By the way, KEIL uVision also has a simulation mode that allow you to debug your application without any external hardware.

    (5) ARM manuals on the compiler toolchain are available here http://www.keil.com/support/man_arm.htm. These manuals should help to answer your questions.

    Hope this helps to get you started.

    Best regards,
    Ger

  • Note: This was originally posted on 12th December 2012 at http://forums.arm.com

    Hi Annim,

    I don't think I have reached the intermediate level quite yet!

    My understanding is that the startup code is processor specific. Each ARM processor family can have a different startup sequence. For example, when the cortex-M3 exits reset, it reads two locations from memory.

    (1) Location 0x0 must contain the starting value of the  stack pointer register.
    (2) location 0x4 must contain the reset vector. The reset vector is the starting address for program execution and calls main.

    Other reasons for different startup code include:
    (1) The periheral interrupt names are device specific.
    (2) A feature of older ARM processors is that they operate in ARM state and thumb state. Since the Cortex-M3 only operates in thumb mode, the startup code for these processors will not run on the Cortex-M3

    I also found a Keil tutorial at http://www.slideshare.net/anishgoel/keil-tutorial. This tutorial references Flash Magic. I'm not familiar with Flash Magic myself.

    Hope this helps.

    All the best,
    Ger