Simple program in assembly using Tiva C launchpad?

Discussion in 'Embedded Systems and Microcontrollers' started by jean28, Sep 17, 2013.

  1. jean28

    Thread Starter Member

    Sep 5, 2012
    76
    0
    Hey guys!

    I just got a new Tiva C MCU. It's architecture is ARM, and I have no experience programming in assembly using said architecture. To start, I'm trying to run a simple program that puts a value in a register. In an MSP430, the project I'm trying to do would look something like this:

    Code ( (Unknown Language)):
    1. #include    "msp430.h"
    2. ;---------------------------------------
    3.     ORG 0f800h  ; Program Start
    4. ;---------------------------------------
    5. RESET   mov     #0280h,SP   ; Stack Pointer Initialized
    6. StopWDT mov #WDTPW+WDTHOLD,&WDTCTL  ; Stop WDT
    7.  
    8.     mov #5, R15 ; Delay to R15z
    9.  
    10.     ORG 0FFFEh      ; MSP430 RESET Vector
    11.     END
    Would somebody be kind enough to show me the code of how to write this in ARM architecture (specially with the Tiva C series Launchpad)? I think I know how to write the mov, but the other parts (such as the ORG, RESET, and END) don't seem to work the same way that they do in the MSP.

    Thank you all very much!!
     
Loading...