Questions tagged [thumb]

A reduced instruction set for ARM processors (based on a 16-bit encoding, instead of 32 bits in standard ARM mode), originally intended for embedded systems with a small amount of RAM. Also for question with the later Thumb2 mixed 16 and 32 bit instruction modes. Consider the tags 'slider' and 'thumbnails' for other meanings of 'thumb'.

This tag is for questions concerning the ARM CPU's operating mode called thumb. Questions about thumb assembly language, interworking between thumb and ARM mode as well as operating system issue in dealing with thumb mode are on topic.

The Thumb instruction set (16 bit only) with restricted use of r8-r15 was later extended to include a mix of 16 and 32 bit instructions. This was called Thumb-2. Thumb-2 is a marketing term. Different CPU families and even specific devices have different instructions. Thumb-2 is fairly meaningless in a technical sense (except it means variable length instructions (always two halfwords) are available along with 16 bit thumb instructions). Thumb-2 at wikipedia

On modern ARM CPUs, Thumb-2 is as rich as the traditional 32-bit mode and much more memory efficient.

For questions related to the scrollbar thumbs consider one of,

For questions about thumbnails, use the tag .

See also:

The paper Profile guided selection of ARM and thumb instructions gives some benchmarking of legacy thumb versus 32 bit modes. Different algorithms are faster in one mode versus the other. The paper is somewhat obsolete as Thumb-2 will be more efficient in modern (2014+) CPUs. Although some deeply embedded devices may only support Thumb.

252 questions
-1
votes
1 answer

Inline version of function fails

I've been writing code to interface with a hardware register on SAMV71Q20B. The function in question is: // Reads current MII link busy status u32 mii_is_busy(void) { return !GMAC->GMAC_NSR.bit.IDLE; } Compiled to Assembly 4B03 ldr r3,…
-1
votes
1 answer

How do we enable thumb mode in stm32f series when we use embedded c to drive it?Can you explain it in detail as i am a beginner

I want to enable thumb mode in stm32f401re board. the code i had written for it is in embedded c. How do we enable thumb mode in embedded c language. Do we use -mthumb command for it, do we have to add any library prior using that command. Or is…
-1
votes
2 answers

Is CMPS a valid ARM/THUMB instruction?

I know that the CMP instruction updates the condition flags. In some material from my university, I have seen a CMPS instruction. It seems pretty senseless to me, as the condition flags are set anyways (I guess they are trying to confuse us...). I…
Fabian
  • 312
  • 3
  • 13
-1
votes
1 answer

EXTI Interrupt gets thrown non-stop (stm32f1)

I'm trying to simply turn of an LED with a Button, using a falling edge EXTI Interrupt. Unfortunately, the LED is blinking without touching the button, debugging with gdb also shows, that the ISR is called repeatedly. As I tested the LED (PA5) and…
some_user
  • 179
  • 11
-1
votes
1 answer

IF ELSE Statements Operands

I have a very simple IF ELIF ELSE ENDIF statement to check if the value in r0 compared to other values. The code always throws the following errors when assembled: main.s(25): error: A1198E: Unknown operand main.s(27): error: A1198E: Unknown…
Off Beat
  • 25
  • 5
-1
votes
1 answer

a question in implementing a function in arm simulator for format 4

My question is about representing the carry-bit and arithmetic shift right in my ARM thumb simulation function. do I have to create a boolian variable if the op code is the binary bit-value of ADC then i add the boolian variable as 1 and if not…
Nisback
  • 11
  • 1
  • 6
-1
votes
1 answer

Configuring USART to send a character in ARM thumb assembly

I am trying to send a character using my stm32. I am using Real Term serial capture program and have set up a baud rate of 9600. I have attempted to write the initialization for the USART and GPIOA. So far, when I reset my device, it sends a NULL…
DarkLink
  • 355
  • 4
  • 16
-1
votes
1 answer

Is nesting ARM Thumb2 "IT" instructions well defined?

If I have an ARM Thumb 2 instruction stream that looks like the following: itt NZ mov r1,r2 it MI mov r3,r4 The IT block of the first IT instruction contains mov and a second it. Is this sequence allowable, or is it undefined behavior?
John Källén
  • 7,551
  • 31
  • 64
-2
votes
1 answer

arm-none-eabi-gcc with nucleo L432KC board

I am looking for a procedure to compile and upload my code for the STM32L432KC nucleo board from the linux terminal like the procedure I used with my atmega328p Here I kinda got attached to using vim and the gdb debugger and I was so happy doing so…
Susano
  • 230
  • 2
  • 9
-2
votes
1 answer

ARM asembly help for CortexM

I need to craft an ASM function. I got the most of it done,but I don't manage to get it to work as it should. I want to do a loop that runs to infinity untill a bit in a certain register(SysTick->CTRL Flag) becomes set. I used TST r5,#Val. The val…
Andrei112
  • 3
  • 1
-2
votes
1 answer

Assembly code meaning in memory disassembly view

What is the meaning of the following assembly instructions set: flashEraseSector: 00005f24: push {r7, lr} 00005f26: sub sp, #24 00005f28: add r7, sp, #0 00005f2a: str r0, [r7, #4] 17 temp1 = (locat <<…
user8540390
  • 143
  • 1
  • 10
1 2 3
16
17