arm

Why is a GCC cross compile not building `crti.o`?

In an attempt to build a gcc 4.x.x cross compiler for arm, I'm stuck at a missing crti.o file in the $BUILD_DIR/gcc subdirectory. An strace on the top level Makefile shows that the compiled xgcc is calling the cross-linker ld with "crti.o" as an argument. I'm assuming that if the cross linking ld is being called, the native /usr/lib/cr...

davinci-board and touch-screen

Hi all I am using linux davinci (33bd223c). my embedded card is da830 and i have a touch screen on it - TS2046. I found a driver on the net - (two files - TS2046.c TS2046.h , and some changes to the config and makefile). I know that the board is connected to the touch screen via spi. to be accurate - SPI1. Despite all of this, i dont hav...

How to get a call stack backtrace? (deeply embedded, no library support)

I want my exception handlers and debug functions to be able to print call stack backtraces, basically just like the backtrace() library function in glibc. Unfortunately, my C library (Newlib) doesn't provide such a call. I've got something like this: #include <unwind.h printf("\t#%d: program counter at %08x\n", *depth, _Unwind_Get...

SAM-BA not responding with olimex sam7s256

I am using an Olimex sam7s256 board. I tried to get it up and running in linux (Ubuntu). I was able to successfully install GCC and binutils. I installed SAM-BA for linux from the atmel site. I was able to get the USB port for connection as specified in the SAM-BA manual (.dev/ttyUSB0). But when I try to use the GUI and 'connect' there i...

Is the binary representation of native types guaranteed the same on all targets?

I"m planning to store my data in a binary format as a resource, read it into an int buffer and basically pass it straight down to a native C++ function, which might cast it to a struct/class and work with it. No pointers, obviously, just ints and floats. The question is - what kind of fixing up do I need to do? I suppose that I need to ...

Non 8 Byte aligned memory access causes memory access violation on iPhone 3GS with iOS 4.0

Hi, consider the following Objective-C++ iPhone Application (TestMemAppDelegate.mm). It crashes with an EXC_BAD_ACCESS on the iPhone (3GS with iOS 4.0). It works fine in the Simulator. It is clearly a memory alignment thing, because it works fine on the iPhone if the "DataA" struct starts on a 8 Byte border. Can anyone explain the caus...

How do I debug a arm9 2.4.19 linux hang?

Hi everyone, I'm trying to debug this arm9 ... it's running some variation of Linux 2.4.19. When I load a pci driver, the arm9 just hangs and reboots. I've tried to enable to kernel hacking options in the menuconfig, but I don't see any error messages at all. Just a hang, and a reboot. That's all. What else could I try? I've neve...

Dissasembling simple ARM instructions?

I've been messing around with IDA Pro and trying to disassemble my own products just for the sake of it. I've noticed a couple of things I don't understand because my assembly language knowledge is terrible. Here is a little chunk of code which invokes CGContextSetRGBStrokeColor. CGContextSetRGBStrokeColor(ctx, 1, 1, 1, 1); In IDA i...

Getting argument lists from ARM dynamic libraries (frameworks)?

I have a number of private frameworks I want to use, however I cannot find any headers for them. Is there a de-facto way of getting arguments from C function calls using IDA Pro? (Not ObjC messages). Edit: Oops, I meant C not C++. ...

EBusError on assigning PageControl fpc/Lazaurs

I am trying to create dynamic TTabSheets for my program. Written in FPC/Lazarus being built for ARM/WinCE Everything works, including design time created tabsheets but the following code try Tab := TTabSheet.Create(PageControl1); logit('1'); Tab.PageControl := PageControl1; logit('2'); Tab.Caption := gname; except on E...

An objcopy equivalent for Mac / iPhone?

Hello, I would like to rename symbols inside object files (.o) with something that would be the Mac equivalent of binutils' objcopy --redefine-syms tool. I found no arm-apple-darwin10-objcopy. I tried the MacPorts' arm-elf-binutils port and also tried to play a bit with otool and segedit without much success. Any idea please? ...

Fast float to int conversion and floating point precision on ARM (iPhone 3GS/4)

Hi, I read (http://www.stereopsis.com/FPU.html) mentioned in (http://stackoverflow.com/questions/78619/what-is-the-fastest-way-to-convert-float-to-int-on-x86). Does anyone know if the slow simple cast (see snippet below) does apply to ARM architecture, too? inline int Convert(float x) { int i = (int) x; return i; } To apply some ...

shifting left and then immediately shifting right in asm?

disclaimer : I'm an asm newbie. I probably need to review my 2s complement or something to fully comprehend :( I'm confused as to the purpose of the following: .... BL some_func MOV R3, R0,LSL#16 MOVS R3, R3,LSR#16 .... why the shift back? and the movs? ...

Patching Arm Executable?

Hi, I must patch an arm executable in my Pocket PC. I am dissassembling the ARM executable with IDA Pro. But I can not edit binary. As you know Ollydbg let us to edit binary / add assembly code (Right Click->Assemble) But it doesnt support ARM. So I dissassembly it with IDA Pro. But in IDA , I can not add my assembly code into my ARM E...

Generating random numbers with ARM Assembly

hi , i want to generate random number to use it in my iphone project by Inlining in my objective-c code some assembly , is this possible with arm-assembly ?! Thank you to help .. ...

Debugging arm-elf C code using Zylin in Eclipse CDT

Hi everyone, I'm using Eclipse CDT with Zylin embedded debug (native) and arm-elf-gdb 6.6 on OS X 10.5.8. I've got an OCD debugger connecting to a board with an ARM processor. Eclipse is able to stop at the first breakpoint and gather variables from memory, but any subsequent breakpoints or single-steps fail. I can set breakpoints ok w...

Serving GWT app from ARM-based machine.

I have an ARM-based platform and I'd like to use it to serve GWT application. On x86 I'd go with Tomcat to serve pages, but what options do I have on ARM architecture? Although GWT is preferred it isn't a must-have but I don't want to switch from Java to PHP. ...

Using Multiply Accumulate Instruction Inline Assembly in C++

I am implementing a FIR filter on an ARM9 processor and am trying to use the SMLAL instruction. Initially I had the following filter implemented and it worked perfectly, except this method uses too much processing power to be used in our application. uint32_t DDPDataAcq::filterSample_8k(uint32_t sample) { // This routine is base...

Any open-source ARM7 emulators suitable for linking with C?

I have an open-source Atari 2600 emulator (Z26), and I'd like to add support for cartridges containing an embedded ARM processor (NXP 21xx family). The idea would be to simulate the 6507 until it tries to read or write a byte of memory (which it will do every 841ns). If the 6507 performs a write, put the address and data on some of the...

WaitFor implementation for Cortex M3

Hello. I'm using stm32f103 with GCC and have a task, which can be described with following pseudocode: void http_server() { transmit(data, len); event = waitfor(data_sent_event | disconnect_event | send_timeout_event); } void tcp_interrupt() { if (int_reg & DATA_SENT) { emit(data_send_event); } } void main.c() { run_task...