Questions tagged [gnu-arm]

41 questions
1
vote
1 answer

GNU Arm Embedded Toolchain | arm-none-eabi-gcc options: What is a difference between Thumb (-mthumb) and Arm (-marm) state?

I have a maybe trivial question, but what is a difference between Thumb (-mthumb) and Arm (-marm) state and why most of the tutorials recommend to use Thumb state? I am curious what exactly does it mean? What it is related to? Best!
1
vote
1 answer

arm-none-eabi global initialized variable incorrect value

I try to make some example for stm32f334 (just led blink). I had a problem with the linker when I want to constrain using .data section (by use initialized global variable) I got a problem. Global variable got incorrect value! This is my…
Lazor
  • 21
  • 2
1
vote
0 answers

STM32F3 C programming: Stuck at channel selection while implementing ADC

Short version: Need help with C programming to select channel/s for ADC in STM32F3(Dicovery board). Please find the code that I have written as of now at the end of the question. It would be great if anyone can refer to some resources for bare metal…
easwaran
  • 51
  • 4
1
vote
1 answer

GNU make stops without error before makefile is finished

Good morning, I am trying to cross-compile for an Atmel AT92SAM using Eclipse with the GNU-Arm toolchain under Windows 7. My Problem is, that the building process stops after the linker finished, although it should also create a raw binary and print…
DrJohn
  • 86
  • 1
  • 8
1
vote
2 answers

Function sscanf must be assigned to variable otherwise strange behavior

Consider this code: #define TRANSLATOR_requestElectricityMeterWrite() do{addr = word_getAddress(); value = word_getValue(); }while(0) uint16_t value; uint8_t addr; bool dispatcher(void) { TRANSLATOR_requestElectricityMeterWrite(); return…
Hairi
  • 3,318
  • 2
  • 29
  • 68
1
vote
1 answer

arm gcc by default compiling its libc

I am trying to compile an SDK with the an embedded arm gcc compiler in cygwin. It is a makefile based SDK. My target is a cortex m3 device. My problem is, the SDK has a custom libc implementation for the target, and when I compile with the arm…
Ryan
  • 33
  • 1
  • 6
1
vote
1 answer

STM32 CubeMX/GNU/Eclipse-Toolchain Retargeting (newlib and libgloss)

I set up a Windows-based tool-chain for a STM32F401C Discovery Board using Eclipse CDT 4.5.1 (Mars), ARM GCC 4.9 2015q3, GnuArmEclipse-Plugin by Liviu Ionescu, OpenOCD 0.9.0 and STM32CubeMX 4.11.0. So basically, I generated an SW4STM32 project using…
Dino
  • 342
  • 1
  • 9
1
vote
2 answers

How can I align stack to the end of SRAM?

I have a STM32F103VCT6 microcontroller with 48kb of SRAM, and recently i've got a memory collision: I have some static variable (lets call it A) located in heap with size of 0x7000 and I wrote some simple function to get info about stack and…
desertkun
  • 1,027
  • 10
  • 19
1
vote
0 answers

Problems with GNU Arm and Eclipse

Last days I've been trying to set up GNU ARM plugin with Eclipse on Linux. The problem is I can't properly compile for my STM32 Discovery F4 board. There are no problems with compiling normal gcc ARM project, but when it comes to STM32F4xx I am…
Jacajack
  • 759
  • 2
  • 11
  • 23
1
vote
2 answers

Unexpected warning on GNU ARM Assembler

I am writing some bare metal code for the Raspberry Pi and am getting an unexpected warning from the ARM cross assembler on Windows. The instructions causing the warnings were: stmdb sp!,{r0-r14}^ and ldmia sp!,{r0-r14}^ The warning is: Warning:…
1
vote
1 answer

Gnu arm giving error on UBFX, Bad instruction

My arm assembly code is: mov r1, #5 UBFX r0, r1, #1, #1 When I try to compile it with arm-elf-gcc file.s It gives following error: ass2_sample.s: Assembler messages: ass2_sample.s:42: Error: bad instruction `ubfx r0,r1,#1,#1' I am using GCC-3.4…
Harshveer Singh
  • 4,037
  • 7
  • 37
  • 45
0
votes
1 answer

GNU ASM .section directive not working/linker issue

I'm trying to move my _start function to 0x0, as it is the bootloader. Flash ROM exists from 0x0 to the first 128MB (=1Gb), other memory is DDR3 RAM but we will map RAM to 0x80000000 to 0xFFFFFFFF. The issue is with the directive .section ".vect",…
Gregory Fenn
  • 460
  • 2
  • 13
0
votes
2 answers

STR (ARM gnu Assembly)cannot change memory in

I want to change some bits in memory by STR instruction. .text .equ ram_address,0x4000 .equ pattern,0x55 .equ counter,50 mov r0,#pattern mov r1,#counter mov r2,#ram_address back: str r0,[r2] add r2,#4 subs…
0
votes
0 answers

Cycle through commandline arguments in Arm Assembler

I have a program which can read the first argument (after program name) and print it. But how do I access the next argument in the list, and subsequent ones? main: push {r4,r9, ip, lr} ldr r4, [r1, #4] // comes in as r1, need to save…
Rick Dearman
  • 356
  • 2
  • 12
0
votes
2 answers

Assertion Failed: The toolchain is unable to build a dummy C file

A number of students + myself have been attempting to set up a Zephyr RTOS build environment under Windows 10, to build applications that target various ARM Cortex M boards. We have each followed the Zephyr "Getting Started Guide" and ran into the…
John Scolaro
  • 695
  • 6
  • 20