Dne Ne 25. dubna 2010 14:09:18 Nico Coesel napsal(a): > Yu, > IMHO this has to do with the way arm_jtag.h is doing some obfusticated > casts. IIRC I posted a patch to this list a couple of months ago. I ran > into the same problem when compiling for MIPS.
True indeed. You can read 4 byte wide data on ARM using ldr/str instructions only from addresses aligned to 4 bytes (used for operations with uint32_t). Though, you can read 1 byte data using ldrb/strb instructions from unaligned addresses (used for operations with uint8_t). Moreover, there're ldrd/strd instructions which operate on addresses aligned to 8 bytes (used for operations with uint64_t). Therefore upcasting the uint8_t which can sit at unaligned address to uint32_t which must be aligned causes the problem. And indeed, if you do that, you get very wild undefined results. Cheers > > Nico Coesel > > -----Oorspronkelijk bericht----- > Van: openocd-development-boun...@lists.berlios.de namens Yu Li > Verzonden: za 4/24/10 15:44 > Aan: openocd-development@lists.berlios.de > Onderwerp: [Openocd-development] build openocd for arm > > hi, > i want to build openocd that can run on arm9. > i use, > $ CC=arm-linux-gcc ./configure --prefix=/opt/arm-openocd > --build=i686-pc-linux-gnu --host=arm-linux --target=arm-linux > --enable-parport --enable-maintainer-mode > $ make > > but i got the error > arm_jtag.h: 81: error: cast increases required alignment of target type. > even though i delete the -Werror option in Makefile, the error still > holded. > > someone help me please. > > My enviroment > gcc v4.3.2 > openocd v0.4.0 > Vmware kubuntu 9.04 _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development