Simple program in assembly using Tiva C launchpad?

In summary, the speaker has acquired a new Tiva C MCU with ARM architecture and is seeking help with programming in assembly for this architecture. They are specifically looking for help with writing a simple program that puts a value in a register. They mention that they have experience with MSP430 and provide an example of how the project would look for that architecture. They ask for someone to show them how to write the code for ARM architecture, as they are not familiar with the ORG, RESET, and END parts. They also mention the importance of reading the ARM programmer's reference manual and provide a link to their own example code.
  • #1
jean28
85
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:
#include 	"msp430.h"
;---------------------------------------
	ORG	0f800h	; Program Start
;---------------------------------------
RESET 	mov 	#0280h,SP	; Stack Pointer Initialized
StopWDT	mov	#WDTPW+WDTHOLD,&WDTCTL	; Stop WDT

	mov	#5, R15	; Delay to R15z

	ORG	0FFFEh		; MSP430 RESET Vector
	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!
 
Engineering news on Phys.org
  • #2
I can't help you, but you need to read the ARM programmers reference manual so that you understand the register/memory/alu architecture. Also, the branch instructions, how you test alu results, etc. Every processor is different.
 

1. What is assembly language and why is it used?

Assembly language is a low-level programming language that uses mnemonic codes to represent machine instructions. It is used to directly control the hardware of a computer and is often used for programming microcontrollers and other embedded systems.

2. What is the Tiva C launchpad and how does it work?

The Tiva C launchpad is a development board based on the ARM Cortex-M4 microcontroller. It is designed for low-power and real-time applications, and has a variety of features such as GPIOs, ADCs, and timers. It works by running code stored in its flash memory and communicating with external devices through its pins.

3. How do I write a simple program in assembly using Tiva C launchpad?

To write a simple program in assembly using Tiva C launchpad, you will need to first understand the architecture and instruction set of the microcontroller. Then, you can use an assembly language editor or IDE to write your code and assemble it into machine code. Finally, you can load the program onto the launchpad and test it using a debugger.

4. Can I use assembly language to create complex programs?

Yes, you can use assembly language to create complex programs, but it may require more time and effort compared to using higher-level languages. Assembly language is often used for optimizing critical parts of a program or for programming low-level systems where efficiency is crucial.

5. Are there any resources available for learning assembly language and programming on the Tiva C launchpad?

Yes, there are many resources available for learning assembly language and programming on the Tiva C launchpad. You can find tutorials, documentation, and online forums to help you get started. Additionally, many microcontroller manufacturers provide sample code and development kits for their products.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
2
Views
5K
  • Programming and Computer Science
Replies
4
Views
2K
Replies
5
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
3K
  • Sticky
  • Programming and Computer Science
Replies
13
Views
4K
  • Programming and Computer Science
Replies
17
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
3K
  • Computing and Technology
Replies
6
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
7K
  • Programming and Computer Science
Replies
9
Views
2K
Back
Top