FAQ Database Discussion Community


Is there any way to show camera stream and draw something on top of it (in linux)?

linux,opengl-es,arm,gstreamer
I am using freescale gpu sdk,Open GLES APIs for drawing and Gstreamer APIs for camera streaming for ARM architecture. It is possible in my case to do them separately but i want to know is there any way to show camera stream and draw something on it? Thanks in Advance....

JTag Debugging with Eclipse Mars CDT : “Program file does not exist”

arm,eclipse-cdt,cortex-m3,jtag,jlink
I have successfully compiled an ARM embedded project, next files has been created: MyProject.elf MyProject.bin MyProject.hex MyProject.map MyProjectmd5.bin Then I am going to Run -> Debug Configurations -> GDB SEGGER J-Link Debugging -> New -> Debug and I get the error: Program file does not exist The GCC Compiler for...

Are Assemblers Installed By Default?

assembly,arm,raspberry-pi
Hello awesome community! I am just starting with learning Assembly Language. I am going to start with ARM Assembly on my Raspberry Pi B+, and later in want to learn Assembly for 64 bit Intel processors running Windows (8.1). But i was wondering if the assembler for the ARM processor...

Nordic nRF51 DK on Mac with CrossWorks

arm,bluetooth-lowenergy,nrf51
On OSX with Rowley Associates CrossWorks what are the steps needed to compile and run a simple BLE UART sample code for Nordic nRF51 DK to an iPhone. I found iOS and Android code here and am comfortable with that part: https://www.nordicsemi.com/Products/nRFready-Demo-APPS But I am not sure how to get...

Beagleboard Qemu baremetal with UEFI

arm,qemu,beagleboard,u-boot,uefi
I am trying to boot a freertos app from UEFI on Qemu When i run the app from uboot, using the below commands it runs without any errors fatload mmc 0 80300000 rtosdemo.bin go 0x80300000 An uefi application loads the elf file at 0x80300000 and then I tried two options....

How to cross-compile asterisk with dahdi already cross-compiled for arm?

linux-kernel,arm,cross-compiling,asterisk
I'm trying to cross-compile asterisk for ARM. Everything's fine when I cross compile mandatory modules like sqlite3, ncurses and openssl and then including them when cross-compiling asterisk with their respective option --with-sqlite3, --with-ncurses --with-crypto and --with-ssl. But when I tried to include dahdi, nothing came true. This happened when --with-dahdi=$(DAHDI_DIR)/linux:...

Does supported android apps in Delphi XE6 with Qualcomm-Snapdragon-800-MSM8974?

android,delphi,arm,firemonkey,delphi-xe6
Android Devices Supported for Application Development http://docwiki.embarcadero.com/RADStudio/XE7/en/Android_Devices_Supported_for_Application_Development and •Processor: 2,2 GHz X 4 (Snapdragon 800) http://www.generalmobile.com/discoveryElite.html but http://system-on-a-chip.findthebest.com/compare/34-297/ARM-Cortex-A15-MPCore-vs-Qualcomm-Snapdragon-800-MSM8974 There isn't neon simd in Qualcomm-Snapdragon-800-MSM8974 Does supported android apps in Delphi XE6 with Qualcomm-Snapdragon-800-MSM8974?...

arm-linux-gnueabi-ld and fpc ppcrossarm still links to linux-i386

linux,arm,cross-compiling,freepascal
I was able to build a freepascal crosscompiler for arm, but now when i want to build a a simple graphical app in lazarus or rebuild LCL the compilation works until is called arm-linux-gnueabi-ld which one still looking for all graphics librarys in /usr/lib/gcc/i586-linux-gnu/4.9/ instead /usr/lib/gcc/arm-linux-gnueabi/4.9. so how i can...

Cache and scratchpad memories

caching,arm,computer-architecture
Could someone explain what is the difference between cache memory and scratchpad memory? I'm currently learning about computer architecture.

arm-none-eabi-gcc: SECTIONS: unclear syntax *.a:

c,gcc,arm,linker-scripts
I could not find a clear answer to a very specific problem, even after reading several manual pages and guides. I work on a linker script for the tool chain mentioned in the title. During the development I was tying to link a static library (archived, .a) to a location...

Xcode 6.3 beta - Your executable contains unsupported architecture '[armv7k]'

ios,xcode,arm,apple-watch,xcode6.3
I'm updating my existing app to include support for Apple Watch (at this stage just handling of notifications), however when I archive my app and try to submit it to the app store for review I continually get this error. I've tried playing around with the build settings and I've...

Prevent and catch access to secure memory from normal code

arm,embedded,bare-metal,trust-zone
I am exploring the ARM trustzone on my imx53-QSB and I have a question. I shared the memory between the normal and the secure world. But when I try to access to read from a secure memory adress from the normal (like that : cprintf("Secure Data SD0: 0x%x\n", *R32 SD0);)...

One Bus Instructions for Arm Instructions

assembly,arm,machine-code
I am currently trying figure out one instructions given each clock cycle using an ARM processor. I have been introduced to these concepts twice now and have yet to find anyone who teaches it properly. Currently I am trying to figure out the instructions: 1). LSR R0, R1, #2; 2)....

How to divide the L2 cache between the cores on a ARM Cortex-A7?

caching,linux-kernel,arm,cortex-a,l2-cache
Context and goal I'd like to run two fully standalone applications on my Olimex A20 Lime platform that run a ARM Cortex-A7. The goal is to dedicate one core to each application. So far so good. Now I'd like to divide the L2 cache between the cores in the following...

ARM, Thumb and Thumb 2 instructions confusion

arm,thumb
I am a bit confused about instruction sets. There are Thumb, ARM and Thumb 2. From what I have read Thumb instructions are all 16-bit but inside the ARMv7M user manual (page vi) there are Thumb 16-bit and Thumb 32-bit instructions mentioned. Now I have to overcome this confusion. It...

Program counter changes oddly without any instruction modifying it (qemu-arm, bare metal)

assembly,segmentation-fault,gdb,arm,qemu
I'm currently trying to make a program i wrote run on a bare metal arm device. Since i'm not having the device (yet), i try to run the code on an arm emulation using qemu. i run my code with this command: qemu-system-arm -M realview-pb-a8 -m 128M -nographic -s -S...

Is it possible to change endianness mid-execution on ARM (Android/Linux)?

android,linux,arm
I am wondering if it is possible to change the endianness of a running application mid-execution on the ARM platform. As some of you know, ARM is bi-endian (supporting both big and little) and I am wondering if on Android (or linux in general) if it is possible to either...

Handling IP changes in uPnP device

ip,arm,upnp
i am working in an ARM based media processor. I need to implement upnp for the device. Advertisement is only needed, i.e device discovery so IP address of the device can be found. I was able to implement the advertisement but i am failed when the IP of the device...

docker build is very slow even with simple commands

arm,docker
I'm building a docker image on my Raspberry Pi, which is of course takes some time. The problem here is that even very simple commands in the Dockerfile like setting an environment variable, using chmod +x on a single file or exposing port 80 take minutes to complete. Here is...

Cant find JavaFX in JDK8 for Arm

javafx,arm,java-8,beagleboneblack
I downloaded and installed JDK8u33 for ARM on my beaglebone black, and according to this documentation (http://docs.oracle.com/javase/8/embedded/jdk-arm-8u6/index.html) javafx is included and supported. However, I can not find jfxrt.jar anywhere in the JRE or JDK, and using javac on a simple javafx program yields "javafx.application" is not a package. What gives?...

neon:multiply and accumulate for 64 bit as IP & OP

arm,simd,neon,cortex-a
Is there any way to implement below logic in neon . As I did not find any multiply and accumulate instruction for 64 bit input and output value . int64x2_t result; int64x2_t num1; int64x2_t num2; >> result + = num1*num2 << ...

Eclipse CDT shows … not resolved errors for ARM neon intrinsics, but produces the binary

c++,eclipse,arm,neon
I develop ARM-Neon based embedded software for Cortex A8 and A9 processors. I use Eclipse CDT Luna for development environment. I opened a project and added #include "arm_neon.h" at the beginning of my main code, and the following flags to both C++ compiler and linker miscellaneous flags part in project...

I am unable to set the compiler path for opencv library.

c++,linux,opencv,arm,ubuntu-14.04
I want to cross compile my C++ opencv code into ARM A8 cross compiler, I already made an cross compiling environment for it and I did changed the paths in CMake gui as well. I am easily able to run a normal C++ code into it. But when I am...

Debugging an ARM assembly (Neon extension)

debugging,assembly,android-ndk,arm
I am developing an algorithm that uses ARM Neon instructions. I am writing the code using assembler file (.S and no inline asm). My question is that what is the best way for debugging purpose i.e. viewing registers, memory, etc. Currently, I am using Android NDK to compile and my...

cross compile Boost 1.57.0 on ubuntu for arm

g++,arm,cross-compiling
I am new into cross compile process. Need to cross compile boost library for arm. Please suggest step to cross-compile boost library. Is it possible to cross compile required feature of boost library?

snprintf() prints garbage floats with newlib nano

c,arm,embedded,printf,newlib
I am running a bare metal embedded system with an ARM Cortex-M3 (STM32F205). When I try to use snprintf() with float numbers, e.g.: float f; f = 1.23; snprintf(s, 20, "%5.2f", f); I get garbage into s. The format seems to be honored, i.e. the garbage is a well-formed string...

No LR and SPSR for EL0 in Aarch64

exception-handling,arm,cpu-registers,arm64
In AArch64, There are 4 exception levels viz EL0-3. ARM site mentions there are 4 Stack pointers (SP_EL0/1/2/3) but only 3 exception Link registers (ELR_EL1/2/3) and only 3 saved program status register(SPSR_EL1/2/3). Why the ELR_EL0 and SPSR_EL0 are not required? P.S. Sorry if this is a silly question. I am...

Fastest way to work with unaligned data on a word-aligned proccessor?

c,arm,memory-alignment,micro-optimization,cortex-m
I'm doing a project on an ARM Cortex M0, which does not support unaligned(by 4bytes) access, and I'm trying to optimize the speed of operations on unaligned data. I'm storing Bluetooth Low Energy Access addresses (48bit) as 6-byte arrays in some packed structs acting as packet buffers. Because of the...

How to determine if a word(4 bytes) is a 16-bit instruction or 32-bit instruction?

arm,decoding,armv7,cortex-m3,opcodes
How do I know if the bytes in the word represent a 16-bit instruction or a 32-bit instruction ? I referred the ARM ARMv7M and I am not clear how to distinguish if it a 16-bit instruction or a 32-bit instruction. It says If bits [15:11] of the halfword being...

C Global declared in ISR

c,arm,embedded,cortex-m,codewarrior
I am evaluating Freescale's Kinetis Design Studio for their ARM series microcontrollers. I was looking at an example as a basis to do my first "blink an LED" project. When using variables shared between my main program and an ISR such as a counter, I would typically define a volatile...

QEMU with Linux build with custom toolchain

linux,arm,qemu,toolchain
I am running Debian and have built my arm toolchain by hand. When I build the Linux kernel using my toolchain QEMU fails to build. If I use the recompiled toolchain that comes with Debian everything works fine. Any idea what I could be doing wrong or how to debug?...

Swap the two middle bytes of a word using 4 ARM instructions

algorithm,assembly,arm
The task is to write code in arm assembler using no more than 4 instructions that swaps the two middle bytes in a given 32-bit word. For example if the word is 0xAABBCCDD the result should be 0xAACCBBDD. You may use at most 4 arm instructions from the set AND,...

IAR inline assembly using global C variable

c,assembly,arm,inline,iar
I'm using IAR Embedded Workbench for ARM 6.50.4 Functional Safety Version 6.50 and I can't seem to get an assembly inline instruction working. For the background: I'm trying to implement a context switch on an ARM7TDMI using the PIT Interrupt. When saving the current context I have to get the...

C Disassembly to ARMv6: Meaning of Dot (.) Before a Label

c,assembly,arm
I disassembled a C program to see how structs were created and I have a question. This is on a Raspberry PI using gcc -S -o source.s mystruct.c To get the source. Questions: I noticed in all the programs I disassemble, there are labels .Lxx. What's the difference between a...

Neon instruction, vsub_f32(a, b), is it a-b or b-a?

c++,arm,neon,intrinsics
In this neon instruction (from here): float32x2_t vsub_f32(float32x2_t a, float32x2_t b); // VSUB.F32 d0,d0,d0 Does it return a - b or b - a? I cannot find it in the ARM documentation......

ARM interrupts from the beginning (Cortex-M4)

c,arm,interrupt,cortex-m,nxp-microcontroller
I am dealing with a new microcontroller LPC4088 from NXP. I needed 2 weeks to study and write a working examples for peripherals: IOCONFIG, GPIO, TIMERS, PWM and ADC. Please take a look at my repositories here. This is how you will get a feeling for how I work and...

GCC tool for size analysis?

c,gcc,arm
I develop for embedded platforms by using GCC (arm-none-eabi-gcc). For size analysis, I use: arm-none-eabi-size and the .map file. Because I'm having problems about size of my code, my question is: Is there any tool for size analysis more powerful? Any with statisticts or size by files? Or with the...

How to get proper backtrace in process signal handler (armv7-uclibc)?

linux,arm,uclibc
I already did google many times to find right solution for backtrace() in signal handler and tried almost everything but I was not able to get the backtrace successfully in my signal handler - this is not SIGUSR1 handler. enable UCLIBC_HAS_BACKTRACE=y in uclibc config and compiled it verified that libubacktrace.so...

Why Cortex-M requires its first word as initial stack pointer?

arm,cortex-m
Imagine that I am writing an assembly language program which doesn't use the stack at all. Why does Cortex-M mandates for a stack pointer ? What does the CPU do with this stack pointer even if I don't use it(Does the CPU require the SP to function ? I don't...

LD giving strange error and not finding an existing file when using ARM gcc

c,gcc,linker,arm
This is the command line executed by my Makefile: arm-none-eabi-gcc bubblesort.c -O0 -mcpu=cortex-m0 -mthumb -Wl, -T ../boot_and_link/linker.ld -l ../boot_and_link/startup.o As I understand it, it should compile bubblesort.c for a CortexM0 and then the linker should you use linker.ld as a linker script and should also link startup.o with the output...

Installing libraries for arm-gcc-compiler

linux,gcc,arm,cross-compiling,embedded-linux
I have a functional arm cross compiler that I can use with arm-linux-gnueabi-gcc command. This works for simple programs but I run into problems when I have to compile bigger programs requiring libraries like x11, opengl as the required headers/files are not present in arm-linux-gnuebi directory but in normal gcc...

ARM, GNU assembler: how to pass “array” arguments to execve()?

linux,assembly,arm,shellcode,execve
I was writing a simple shellcode that would call execve() for an ARM platform (Linux on Raspberry PI) and got stuck with the second argument to execve. As per documentation: int execve(const char *filename, char *const argv[], char *const envp[]); Which totally cuts it for me if I call execve("/bin/sh",...

Program Runs Fine for Hours and Eventually Seg Faults with Memory Address 0x10 [closed]

c++,c,memory,arm
So I've been tracking some memory issue for the longest time. I'm coding in C++ and I can see that my program mostly works. I am monitoring my resources and I dont think I have a memory leak because my memory used stays below 12% (I'm on a system with...

Did anyone compiled GSL for androind?

android,arm,gsl
I am trying to compile gsl for android but it is giving error. I checked on their website and they said that It has been reported to compile on the following other platforms, SunOS 4.1.3 & Solaris 2.x (Sparc) Alpha GNU/Linux, gcc HP-UX 9/10/11, PA-RISC, gcc/cc IRIX 6.5, gcc m68k...

what's ARM TCM memory

memory,arm
what is TCM memory on ARM processors, is it a dedicated memory which resides next to the processor or just a region of RAM which is configured as TCM??. if it's a dedicated memory, why can we configure it's location and size?....

How do I understand and fix error while compiling Linux kernel for embedded system

c,linux-kernel,make,arm,native
While trying to compile the following file: /* * linux/arch/arm/mm/proc-syms.c * * Copyright (C) 2000-2002 Russell King * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software...

fpscr register is not updated when enabling floating point exceptions on arm7, SIGFPE not generated

debugging,android-ndk,floating-point,arm
fpscr register is not updated and SIGFPE is not generated. This was tested on an NVidia Shield Tablet and a 1st gen Nexus 7. feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW); The implementation calls code, which eventually executes this assembly: asm _volatile__("vmsr fpscr,%0" : :"ri" (fpscr)); ; disassembly follows ldr r3, [r11,...

What are the steps to setup an RTOS application on STM32 using Linux and Makefiles instead of using Windows based IDEs?

makefile,arm,embedded-linux,stm32,rtos
I am using STM32F4 Discovery board to develop a simple application to on-board accelerometer while simultaneously lighting respective LEDs mounted around the accelerometer device. I want to use any RTOS but I am unable to decide which one since I am new to using RTOS. If anyone could elaborate the...

Running a C Program with No OS on Raspberry Pi

c,arm,embedded,raspberry-pi,low-level
I'd like to experiment using the Raspberry Pi for some different low level embedded applications. The only problem is that, unlike the AVR and PIC microcontroller boards available, Raspberry Pi typically runs an OS (like Raspbian) that distributes CPU time across all running programs and makes it impractical for certain...

Valgrind on ARMv5

c++,c,arm,valgrind
I'm trying to debug a program on a embedded device. The problem is that it uses ARMv5 and valgrind doesn't support that platform (there are some patches over there but I was not able to make it work). I tried some tools like gdb or memwatch, but it isn't enough...

Traversing a string using arm assembly inside V8 source

arm,v8
I am trying to implement a fastpath for regular expressions in arm/code-stubs-arm.cc in the RegExpExecStub::Generate function. The subject string is stored in the register 'r4'. I need to traverse character by character in the string but I can't seem to be able to do it. I have tried things like:...

C programming without malloc

c,arm,embedded
I have to write white complex application for embedded device in C. Runtime (libc) does not support malloc/calloc/realloc/free or any other kind of dynamic memory management. What are best practice for such cases? Edit: Application is complex. for instance, it should do public key cryptography. Device is specific ARM-M0 based...

Where to go from Sourcery CodeBench **LITE** [closed]

linux,arm,cross-compiling,archlinux
I have been using Sourcery CodeBench LITE for ARM targets until today when I realized that it is no longer available for ARM targets. Instead Mentor graphics wants us to pay the nonfree Sourcery CodeBench. I wonder. Isn't Sourcery CodeBench LITE derived from GNU GCC? Then why don't they make...

Cross compile stunnel

linux,makefile,cmake,arm,cross-compiling
I am having difficulties with cross compiling stunnel for an ARM device. Cross compiling OpenSSL was done via this CMake project: http://www.valvers.com/open-software/projects/openssl-cmake/ and it runs successfully on the target device. The CMake toolchain file I use when compiling OpenSSL: SET(CMAKE_SYSTEM_NAME Linux) SET(CMAKE_C_COMPILER /home/elias/toolchains/axotec/3.4.1/bin/arm-linux-gcc) SET(CMAKE_CXX_COMPILER /home/elias/toolchains/axotec/3.4.1/bin/arm-linux-g++) SET(CMAKE_FIND_ROOT_PATH /home/elias/toolchains/axotec/3.4.1/arm-linux...

Why Device Tree Structure (DTS) file is needed both in bootloader and kernel source code?

linux-kernel,arm,embedded-linux,u-boot,device-tree
Bootloaders like U-Boot that do not implement the Open Firmware API, are expected to pass to the kernel a binary form of the flattened device tree - LinuxFDTBlob Why are the DTS files present in the kernel as well? Isn't that redundant? As an example, U-boot source code has...

Text as parameter in inline assembly (ARM)?

gcc,arm,inline-assembly
Is there a way to put plain text in inline assembly (ARM)? My problem is reading banked registers. The syntax is (r11 of user mode): mrs r0, r11_usr The problem is the "usr"-part. I tried: #define READ_REG_MODE(retvar, rg, mode) \ asm volatile (\ "mrs %[reg], r%c[rn]_%c[mod]\n\t"\ :[reg] "=r" (retvar)\ :[rn]"I"(rg),...

Illegal instruction when running simple ELLCC-generated ELF binary on a Raspberry Pi

arm,raspberry-pi,cross-compiling,raspbian,ellcc
I have an empty program in LLVM IR: define i32 @main(i32 %argc, i8** %argv) nounwind { entry: ret i32 0 } I'm cross-compiling it on Intel x86-64 Windows for ARM Linux using ELLCC, with the following command: ecc++ hw.ll -o hw.o -target arm-linux-engeabihf It completes without errors and generates an...

STM32 Large binary created when using malloc

linker,arm,malloc,stm32,codesourcery
SOLVED. SEE THE SOLUTION SECTION BELOW. I've got a problem where my build environment is outputting a large binary file, and I'm hoping that someone can help get me moving again. I'm using an STM32F105 processor, Eclipse, FreeRTOS, and CodeSourcery compiler to try to get some AHRS evaluation code running...

What is the right way to create a constant pool for inline assembly?

c,gcc,arm,inline-assembly
The problem is that inside a C function I have an inline assembly. Something like ldr r7, =0xdeadbeef svc 0 If a literal pool wasn't created explicitly (this is the case), assembler creates one at the end of the translation unit. Usually this is fine, but if the translation unit...

Undefined reference to 'strnlen' despite “string.h” include

c,eclipse,gcc,arm,lpc
I am trying to use create a project for LPC1769 on LPCXpresso. I have a C file calling #include <string.h> int main() { //some stuff strnlen(SomeString, someInt); } to which I get an error: Undefined reference to 'strnlen' The weird part is that there is no problem with strcpy, strncpy...

How to read a specific MMIO register value

arm,beagleboneblack
I want to get the unique serial number from Beaglebone Black. AM335X Reference Manual 9.3.1.25 tells me that I should be able to get the unique serial id from mac_id0_lo and mac_id0_hi registers. The offsets of these registers are 630h and 634h. How can I read the values of these...

Wrong results multiplying two 32 bit numbers in C

c,matrix,arm,fixed-point,cortex-m
I am trying two multiply to matrices in C and I cant understand why I get these results... I want to do : Btranspose * B #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h> #define LOW_WORD(x) (((x) << 16) >> 16) #define HIGH_WORD(x) ((x) >> 16) #define ABS(x) (((x) >=...

After making function call in the programme ,control is jumping into the unspecified memory location

c,gps,arm,embedded
i am developing a gps code which takes the raw data from the gps and decodes the data and saves it into the respected variables(arrays).The problem is whenever i make the function call,it is executing the function statements upto the end of the function ie., "}" ,and after that the...

ARM, .COMMON section and -fno-common flag

gcc,linker,arm,ld
I'm trying to diagnose a problem. The problem is my program works fine if I place a printf (specifically printf) in the beginning of the program, and it doesn't if I don't. The issue is very specific to a loop that reads systick variable that I increment in systick_handler. If...

How do I link the correct library so __aeabi_idiv and __aeabi_idivmod work?

c,makefile,arm,raspberry-pi
This is the question I'm following up on. I have the same problem as regomodo did in that thread way back in 2011: I'm trying to run a little program on my Raspberry Pi, and I'm using operators that aren't natively supported by ARM: hello.c:(.text+0x64): undefined reference to `__aeabi_idiv' hello.c:(.text+0x7c):...

Clarifications on iOS Assembly Language

ios,objective-c,assembly,arm,stack-memory
I'm investigating a little bit on how Objective-C language is mapped into Assembl. I've started from a tutorial found at iOS Assembly Tutorial. The code snippet under analysis is the following. void fooFunction() { int add = addFunction(12, 34); printf("add = %i", add); } It is translated into _fooFunction: @...

Branch to an address using GCC inline ARM asm

gcc,assembly,arm,inline-assembly
I want to branch to a particular address(NOT a label) using ARM assembly, without modifying the LR register. So I go with B instead of BL or BX. I want this to be done in GCC inline asm. Here is the documentation, and here is what I 've tried: #define...

Pipeline refill cycles for instructions in arm

assembly,arm,pipeline,instruction-set
Following are the instructions of arm Cortex M4 processor with 3 stage pipeline.How do we come to know the number of pipeline refill cycle for such instructions?? Assembler Cycles 1. MOV PC, Rm 1 + P 2. ADD PC, PC, Rm 1 + P 3. B <label> 1 + P...

gcc; arm64; aarch64; unrecognized command line option '-mfpu=neon'

gcc,arm,neon,arm64,linaro
I got compilation error: unrecognized command line option '-mfpu=neon' when tried to compile with -mfpu=neon flag. Actually, any 'mfpu' options I tried failed. However in documentation this flag is mentioned, so it should be valid What is wrong with this key? How could I tell compiler to use NEON? Linaro...

Update linker variables after --gc-sections

linux,gcc,linker,arm,linker-scripts
I wrote a small binary in cortex-a9 board, and defined a linker script like this: SECTIONS { .text : { __text = . ; *(.vector) *(.text) *(.text.*) } .rodata : { *(.rodata) *(.rodata.*) } .data : { __data_start = . ; *(.data) *(.data.*) } . = ALIGN(4); __bss_start = ....

_sbrk function not found when placed in a static library

c,gcc,linker,arm
I'm creating a bare-metal application for the stm32f407 microcontroller, which has an ARM Cortex M4 core. As such, I'm delivering the implementation of functions like _sbrk myself. I now find that when I try to create a static library containing _sbrk, and link it with my main.c into an application,...

Code using indirect assignment not working

c,pointers,arm
On an embedded ARM system I have implemented a register system: Each register is an array of uint8_T The host system can set either one register or more registers at the same time, by issuing a specific command on the serial port of the CPU. This is the code, stripped...

How to install gcc-arm-none-eabi for MinGW users?

c++,windows,gcc,arm,cross-compiling
I am interested in taking my C++ program and cross compiling it into something that can run on an ARM MCU. To do this, I am required to have gcc-arm-none-eabi installed. I'm currently on a Windows 7 machine, and so I have installed GCC/make/g++/etc. via MinGW. From the research I've...

What is __rw::__rw_deallocate?

c++,boost,arm
I have an ARM application in which I occasionally get data abort or prefetch abort crash reports with __rw::__rw_deallocate(void*, unsigned int, int) at the top of the stack. What is this function and who owns it? Google turns up various linker and build errors related to this function, but my...

Translate ARM binary to x86

ubuntu,binary,x86,arm
Is it possible to translate an ARM binary (shared object) to the x86 architecture? Basically I want to use the ARM libfoo.so in a x86 environment....

ARM conditional instruction setting flags

arm,arm64
As I read about conditional execution in ARM, I can see why instructions in ARM do not set the flags by default. They seem to set flags only when the S suffix is added in. I was wondering if it would be possible to have an ARM instruction that executes...

__isr_vectors variable not found when placed inside a static library

gcc,linker,arm,static-libraries,linker-scripts
As a spin-off of a previous question (sbrk function not found when placed in a static library): I'm creating a bare-metal application for the stm32f407 microcontroller, which has an ARM Cortex M4 core. I'm trying to create a static library containing basic stuff like cmsis, the HAL functions, and the...

Get a character from a string value?

assembly,arm
I have a set of numbers in a string (in memory) as follows: numbers DCB "012345" How can I access that first digit and insert it into a register? I would load it right, but I am unsure how to load that specific digit....

What do these ARM assembly instructions do?

assembly,arm
I came across these ASM instructions recently and am trying to figure out what they do. I went through a few ARM assembly books (such as THIS) and was able to figure out what a couple of instructions do. For instance, MRS (Move to Register from Status) copies status from...

Is it safe to support only armeabi-v7a for Android 4 and above?

android,android-ndk,arm
I have developed an app which is mostly in C++ and is compiled by NDK to .so libraries as usual. We know that native apps have to be build for each CPU architecture separately; So I have different so files for armeabi and armeabi-v7a. (I deliberately left out x86 and...

Installing Informix Client SDK on Raspberry pi

python,sdk,arm,raspberry-pi,informix
I wanted my raspberry pi to connect to an Informix database thru Python. I tried installing the InformixDB module for python but I get an error as NameError: name 'arch_' is not defined But this is caused because I didn't have an Informix Client SDK installed on the pi which...

ARM assembly cannot use immediate values and ADDS/ADCS together

gcc,assembly,arm,instructions
I am currently trying to speed up some of my C functions on a Cortex-M0 (Freescale KL25Z) using assembly. I get a problem with this minimal test program: @.syntax unified .cpu cortex-m0 .text .global test .code 16 test: mov r0, #0 adds r0, r0, #1 bx lr When I try...

SAM4S initialization in baby steps

arm,embedded,microcontroller,atmel
This question may be so obvious it is stupid but I am failing to come up with an answer for it. I am trying to make a simple makefile project for the sam4s xplained board from Atmel. I am new to ARM and am feeling a bit lost in how...

STM32F4 - can I use delays in interrupt routines?

c,arm,stm32,stm32f4discovery
I'm using an STM32F4 discovery board for a project and am wondering if I'm approaching the problem correctly. When I press a button, an external interrupt is triggered which runs a routine; without using a delay, this part works fine. As the routine moves a servo then returns it to...

Can I use CMAKE_SYSTEM_PROCESSOR, defined in a toolchain file, in CMakeLists?

c++,cmake,arm,raspberry-pi,cross-compiling
I'd like to add Raspberry Pi as a cross compilation target to a C++ project which uses CMake. Following the accepted answer to this question, I've set up the environment successfully. The project has many build targets already, all of them defined in the main CMakeLists.txt in a quite ugly...

Prelink Error: prelink-cross: simple hello world example

c++,compilation,arm,cross-compiling,prelink
I am trying to cross-prelink a simple hello world program. I use the cross-compile toolchain arm-2012.03-57-arm-none-linux-gnueabi-i686-pc-linux-gnu and I am not sure if I have used the prelink-cross options correclty. I'll be glad if someone could point me to the right direction. More details about the source code on github. Thank...

Neon Comparison

c,arm,simd,neon,cortex-a
As per the Neon documentation: If the comparison is true for a lane, the result in that lane is all bits set to one. If the comparison is false for a lane, all bits are set to zero. The return type is an unsigned integer type. I have written a...

GCC ARM How to assign value to particular fp register using inline assembly?

gcc,arm,inline-assembly
I have trouble to assign value to particular fp register. For example, If I use general register it compiles and works fine: register uint* r1 asm ("r1") = (uint *) lrd; but when I try to do the same for fp register: register float f3 asm ("f3") = 1.0; I'm...

How to cross compile a .c file for Openwrt?

linux,arm,cross-compiling,beagleboneblack,openwrt
I am trying to cross compile a .c file for Openwrt. I downloaded Openwrt and added my file in package directory and created Makefile for it but while compiling it is skipping. I don't know what is wrong This the Makefile : * include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=gav PKG_VERSION:=1 PKG_RELEASE:=1...

Call a function every 10 seconds in C - mbed platform

c,arm,embedded,microcontroller,mbed
I could use: while(1==1) { delay(10); f(); // <-- function to be called every 10 seconds otherfunctions(); } But this will take just over 10 seconds because the other functions take some time to execute. Is there a delay function that takes into account the time taken by the other...

Flashing a C program to ARM

c,arm,embedded
I just started programming for an ARM Processor and I have never been this clueless. There are a couple of example projects that came with the board (ADucm350) and I wanted to upload one of them. I downloaded Keil (or I think it's just the project management software part of...

Cmake errors: The CXX Compiler identification is unknown, The C compiler identification is unknown

c++,opencv,cmake,arm,cmake-gui
I'm trying to install OpenCV on Fedora 21 with a cross compiler for ARM processor. However, when i try to configure using Cmake 3.03, it gives the error: *The CXX compiler identification is unknown The C compiler identification is unknown Check for working CXX compiler: /opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-g++ Check for working CXX...

If else OR statement in Assembly?

if-statement,assembly,arm,cortex-m
Confused on using branching commands in Assembly, mostly just BNE, and BEQ. So I have to write an assembly code for the pseudo-code: X = 5, Y = 10, Z = 15 if X != 4 && Y == 10 || Z = 20 A = X + Y -...

Why do we write pgd address to TTBR0/TTBR1 during each context switch?

linux-kernel,arm
In the Linux kernel code, why it is required to write pgd(mm_struct->pgd_t) address during every context switch? Is pgd unique to every process?...

LPC17XX SPI: Implementing pulse-sensitive(edge-triggered) interrupts

c,arm,interrupt,spi,lpc
I would like to implement a pulse-sensitive, aka edge-triggered, interrupt on an LPC1759 microcontroller. In the UM10360.pdf datasheet and ARM Cortex-M3 user guide, it says that interrupts can be triggered based on level- or pulse-sensitive behavior, but I am unable to find how to set this to be pulse-sensitive. Can...

How to convert unsigned char to signed integer by neon

arm,simd,neon,cortex-a
How to convert a variable of data type uint8_t to int32_t using Neon? I could not find any intrinsic for doing this.

Qt application trying to load platform plugin “xcb” instead of “eglfs”

arm,qml,qtwebkit,yocto,qt5.4
Built Raspberry Pi 2 linux distro including Qt5.4 + QtWebKit + QML plugin using Yocto on fido branch See tutorial Testing with the following QML script [email protected]:~# more webkit3.qml import QtQuick 2.0 import QtQuick.Controls 1.0 import QtWebKit 3.0 ScrollView { width: 640 height: 480 WebView { id: webview url: "http://qt-project.org"...

Add command under ARM architecture and program counter

assembly,arm,compiler-optimization,stack-memory,program-counter
I'm focusing on a snippet of ARM Assembly where add command it is used. The snippet, see below, simply states: to the address of the program counter add the offset calculated to find the position of the string stored at L._str, where L._str is the symbol (the address) of a...

Preparing GNU toolchain for bare metal ARM on Linux

linux,gcc,arm,gnu
I would like to prepare GNU toolchain for bare metal ARM to use it with Geany IDE. There are some tutorials like this one: Building the GNU ARM Toolchain for Bare Metal but I do not understand few steps. First of all, everyone who uses Linux OS implicitly has gcc,...

ARM Keil error #17 expected a “]”, C3910W: Old syntax

c,compiler-errors,arm,microcontroller,keil
Hi I am trying to build a program on Keil μVision v.5.12. The errors seems to be only "one" (expecting a ]) . But the code works (compiles and runs without err/warnings) on my linux partition. Rebuild target 'Target 1' compiling ax.c... ax.c: Warning: C3910W: Old syntax, please use '--c99'....