Cannot read/write interval timer register DE1-SoC HPS - arm

I have a DE1-SoC (Cyclone V) board where I am trying to get timer interrupts to work on the HPS. I found an example in the Intel FPGA University Program called "interrupt_example", and when I run it on the Intel FPGA Universioty Program, it runs perfectly.
Now I want to transfer this project to ARM DS, but I cannot get it to work because everytime when I am trying to write to the interval timer at address 0xFF202000, the debugger won't proceed. When I try to look in the memory of 0xFF202000 in ARM DS, I also cannot see anything.
I am using the same compiler (GCC C 4.7.3 arm-altera-eabi) and I tried to use the same compiler arguments:
Intel FPGA Monitor Program
rm -f interrupt_example.c.o
arm-altera-eabi-gcc -Wall -c -g -O1 -mfloat-abi=soft -march=armv7-a -mtune=cortex-a9 -mcpu=cortex-a9 interrupt_example.c -o interrupt_example.c.o
rm -f exceptions.c.o
arm-altera-eabi-gcc -Wall -c -g -O1 -mfloat-abi=soft -march=armv7-a -mtune=cortex-a9 -mcpu=cortex-a9 exceptions.c -o exceptions.c.o
rm -f HPS_timer_ISR.c.o
arm-altera-eabi-gcc -Wall -c -g -O1 -mfloat-abi=soft -march=armv7-a -mtune=cortex-a9 -mcpu=cortex-a9 HPS_timer_ISR.c -o HPS_timer_ISR.c.o
rm -f interval_timer_ISR.c.o
arm-altera-eabi-gcc -Wall -c -g -O1 -mfloat-abi=soft -march=armv7-a -mtune=cortex-a9 -mcpu=cortex-a9 interval_timer_ISR.c -o interval_timer_ISR.c.o
rm -f pushbutton_ISR.c.o
arm-altera-eabi-gcc -Wall -c -g -O1 -mfloat-abi=soft -march=armv7-a -mtune=cortex-a9 -mcpu=cortex-a9 pushbutton_ISR.c -o pushbutton_ISR.c.o
rm -f interrupt_example.axf
ARM DS
make all
'Building file: ../interrupt_example/HPS_timer_ISR.c'
'Invoking: GCC C Compiler 4.7.3 [arm-altera-eabi]'
arm-altera-eabi-gcc.exe -Dsoc_cv_av -I"C:\CSA\Baremetal_Hex_Disco\sw\hps\application\inc" -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include/soc_cv_av -O1 -g3 -Wall -c -mfloat-abi=soft -march=armv7-a -mtune=cortex-a9 -mcpu=cortex-a9 -MMD -MP -MF"interrupt_example/HPS_timer_ISR.d" -MT"interrupt_example/HPS_timer_ISR.o" -c -o "interrupt_example/HPS_timer_ISR.o" "../interrupt_example/HPS_timer_ISR.c"
'Finished building: ../interrupt_example/HPS_timer_ISR.c'
' '
'Building file: ../interrupt_example/exceptions.c'
'Invoking: GCC C Compiler 4.7.3 [arm-altera-eabi]'
arm-altera-eabi-gcc.exe -Dsoc_cv_av -I"C:\CSA\Baremetal_Hex_Disco\sw\hps\application\inc" -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include/soc_cv_av -O1 -g3 -Wall -c -mfloat-abi=soft -march=armv7-a -mtune=cortex-a9 -mcpu=cortex-a9 -MMD -MP -MF"interrupt_example/exceptions.d" -MT"interrupt_example/exceptions.o" -c -o "interrupt_example/exceptions.o" "../interrupt_example/exceptions.c"
'Finished building: ../interrupt_example/exceptions.c'
' '
'Building file: ../interrupt_example/interval_timer_ISR.c'
'Invoking: GCC C Compiler 4.7.3 [arm-altera-eabi]'
arm-altera-eabi-gcc.exe -Dsoc_cv_av -I"C:\CSA\Baremetal_Hex_Disco\sw\hps\application\inc" -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include/soc_cv_av -O1 -g3 -Wall -c -mfloat-abi=soft -march=armv7-a -mtune=cortex-a9 -mcpu=cortex-a9 -MMD -MP -MF"interrupt_example/interval_timer_ISR.d" -MT"interrupt_example/interval_timer_ISR.o" -c -o "interrupt_example/interval_timer_ISR.o" "../interrupt_example/interval_timer_ISR.c"
'Finished building: ../interrupt_example/interval_timer_ISR.c'
' '
'Building file: ../interrupt_example/pushbutton_ISR.c'
'Invoking: GCC C Compiler 4.7.3 [arm-altera-eabi]'
arm-altera-eabi-gcc.exe -Dsoc_cv_av -I"C:\CSA\Baremetal_Hex_Disco\sw\hps\application\inc" -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include/soc_cv_av -O1 -g3 -Wall -c -mfloat-abi=soft -march=armv7-a -mtune=cortex-a9 -mcpu=cortex-a9 -MMD -MP -MF"interrupt_example/pushbutton_ISR.d" -MT"interrupt_example/pushbutton_ISR.o" -c -o "interrupt_example/pushbutton_ISR.o" "../interrupt_example/pushbutton_ISR.c"
'Finished building: ../interrupt_example/pushbutton_ISR.c'
' '
'Building file: ../.metadata/.plugins/org.eclipse.cdt.make.core/specs.c'
'Invoking: GCC C Compiler 4.7.3 [arm-altera-eabi]'
arm-altera-eabi-gcc.exe -Dsoc_cv_av -I"C:\CSA\Baremetal_Hex_Disco\sw\hps\application\inc" -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include/soc_cv_av -O1 -g3 -Wall -c -mfloat-abi=soft -march=armv7-a -mtune=cortex-a9 -mcpu=cortex-a9 -MMD -MP -MF".metadata/.plugins/org.eclipse.cdt.make.core/specs.d" -MT".metadata/.plugins/org.eclipse.cdt.make.core/specs.o" -c -o ".metadata/.plugins/org.eclipse.cdt.make.core/specs.o" "../.metadata/.plugins/org.eclipse.cdt.make.core/specs.c"
'Finished building: ../.metadata/.plugins/org.eclipse.cdt.make.core/specs.c'
' '
'Building file: ../main.c'
'Invoking: GCC C Compiler 4.7.3 [arm-altera-eabi]'
arm-altera-eabi-gcc.exe -Dsoc_cv_av -I"C:\CSA\Baremetal_Hex_Disco\sw\hps\application\inc" -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include/soc_cv_av -O1 -g3 -Wall -c -mfloat-abi=soft -march=armv7-a -mtune=cortex-a9 -mcpu=cortex-a9 -MMD -MP -MF"main.d" -MT"main.o" -c -o "main.o" "../main.c"
'Finished building: ../main.c'
' '
I am also using the same linker arguments:
Intel FPGA Monitor Program
arm-altera-eabi-gcc -Wl,--defsym -Wl,arm_program_mem=0x40 -Wl,--defsym -Wl,arm_available_mem_size=0x3fffffb8 -Wl,--defsym -Wl,__cs3_stack=0x3ffffff8 -Wl,--section-start -Wl,.vectors=0x0 -T"C:/intelFPGA_lite/17.0/University_Program/Monitor_Program/build/altera-socfpga-hosted-with-vectors.ld" interrupt_example.c.o exceptions.c.o HPS_timer_ISR.c.o interval_timer_ISR.c.o pushbutton_ISR.c.o -o interrupt_example.axf
ARM DS
arm-altera-eabi-gcc -T "C:\intelFPGA_lite\17.0\University_Program\Monitor_Program\build\altera-socfpga-hosted-with-vectors.ld" --exceptions -Wl,--defsym -Wl,arm_program_mem=0x40 -Wl,--defsym -Wl,arm_available_mem_size=0x3fffffb8 -Wl,--defsym -Wl,__cs3_stack=0x3ffffff8 -Wl,--section-start -Wl,.vectors=0x0 -o "Baremetal_Hex_Disco.axf" ./interrupt_example/HPS_timer_ISR.o ./interrupt_example/exceptions.o ./interrupt_example/interval_timer_ISR.o ./interrupt_example/pushbutton_ISR.o ./.metadata/.plugins/org.eclipse.cdt.make.core/specs.o ./main.o
I also tried to use the same preloader, but this does not work out when I am writing the debug script. I am not sure if this is the problem. If this is actually the problem, I would appreciate it if someone can help me writing another debug script, because ARM DS is giving me problems when I try to use u-boot-spl.de1-soc.srec as a preloader.
Preloader information in Intel FPGA Monitor Program
Info: Running Quartus Prime Programmer
Info: Version 17.0.0 Build 595 04/25/2017 SJ Lite Edition
Info: Copyright (C) 2017 Intel Corporation. All rights reserved.
Info: Your use of Intel Corporation's design tools, logic functions
Info: and other software and tools, and its AMPP partner logic
Info: functions, and any output files from any of the foregoing
Info: (including device programming or simulation files), and any
Info: associated documentation or information are expressly subject
Info: to the terms and conditions of the Intel Program License
Info: Subscription Agreement, the Intel Quartus Prime License Agreement,
Info: the Intel MegaCore Function License Agreement, or other
Info: applicable license agreement, including, without limitation,
Info: that your use is for the sole purpose of programming logic
Info: devices manufactured by Intel and sold by Intel or its
Info: authorized distributors. Please refer to the applicable
Info: agreement for further details.
Info: Processing started: Sun Feb 07 10:04:39 2021
Info: Command: quartus_hps --cable="DE-SoC [USB-1]" -o GDBSERVER --gdbport0=3350 --preloader=C:/intelFPGA_lite/17.0/University_Program/Monitor_Program/arm_tools/u-boot-spl.de1-soc.srec --preloaderaddr=0xffff13a0 --source=C:/Users/red25/Documents/interrupt_example.srec
Current hardware is: DE-SoC [USB-1]
Successfully change hardware frequency to 16Mhz
Found HPS at device 1
Double check JTAG chain
HPS Device IDCODE: 0x4BA00477
AHB Port is located at port 0
APB Port is located at port 1
Double check device identification ...
>>CPU0 halted at 0x2fa8.
>>Resetting HPS.
>>Downloading preloader.....
>>Program loaded. PC set to program entry (0xFFFF0000)
>>Setting vector base address register to: 0xffff0000
>>Running preloader..
>>Preloader successfully run.
>>Downloading user program.
>>Program loaded. PC set to program entry (0x0128)
>>Setting vector base address register to: 0x0
>> Hard breakpoint set.
Starting GDB Server.
Debug script in ARM DS
reset
wait 5s
stop
wait
loadfile "$sdir/../../preloader/uboot-socfpga/spl/u-boot-spl" 0x0
set semihosting enabled true
delete
tbreak spl_boot_device
run
wait
loadfile "$sdir/../Debug/Baremetal_Hex_Disco.axf" 0x0
start*
The disassembly of the code where the 0xFF202000 is being written also looks identical:
Intel FPGA Monitor Program
Disassembly picture Intel FPGA Monitor Program
ARM DS
Disassembly picture ARM DS
I tried everything which I could think of now. I really hope someone can help me. Thank you in advance.
Edit:
In the mean time, I found that when the program tries to write to 0xFF202000, it enters an endless loop in assembly. I am not really familiar with assembly, so I am not sure why this happens.
Endless loop assembly 0xFF202000

Related

How to Cross-Compile from LLVM IR to Assembly for ARM Cortex M4?

I'm trying to cross-compile an llvm-ir file to assembly, or better generate an object file, for an ARM Cortex M4 microprocessor using llc compiler.
Which are the parameters that I have to specify in order to do so?
I have tried with this command
llc -mtriple=armv7m-eabi -mcpu=cortex-m4 file.ll -o file.s
It doesn't throw any error but the assembly code generated is still for an x86 machine.
In particular, trying to compiling with random parameters, e.g.
llc -mtriple=randomwords -mcpu=cortex-m4 file.ll -o file.s
It goes smooth, producing an assembly code for the x86 machine. It ignores what I specify.
I found a solution, or better a work around to this problem.
Instead of using directly llc, first I've obtained the binary code through this command
llvm-as file.ll -o file.bc
An than I used clang to crosscompile and obtain the object file for ARM Cortex M4 using this instruction
clang --target=arm-none-eabi -march=armv7e-m -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -nostdlib file.bc -c -o file.o
The -c is used to compile only.
It is also possible to obtain the assembly code by using the following command line
clang -S --target=arm-none-eabi -march=armv7e-m -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -nostdlib file.bc -o file.s
llc (not sure about prior to v9) seems to only care about the architecture.
I can cross compile and link with the following script (for a RPI running Linux):
#/bin/sh
llc-9 -march=arm -float-abi=hard -O3 -filetype obj $1.ll -o $1.o
~/devel/musl/musl-cross-make/output/bin/arm-linux-musleabihf-gcc -mfloat-abi=hard -static $1.o -o $1
llc --version will show the available architectures
Try the following for your case (or use a more specific architecture if it is in the list):
llc -march=arm -mcpu=cortex-m4 -filetype obj file.ll -o file.o

What kind of syntax is platform.txt from Adafruit_nRF52_Arduino

If someone would please tell me what kind of syntax the following file is?
https://github.com/adafruit/Adafruit_nRF52_Arduino/blob/master/platform.txt
name=Adafruit nRF52 Boards
version=0.19.0
# Compile variables
# -----------------
compiler.warning_flags=-w
compiler.warning_flags.none=-w
compiler.warning_flags.default=
compiler.warning_flags.more=-Wall
compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
compiler.c.cmd=arm-none-eabi-gcc
compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD
compiler.c.elf.cmd=arm-none-eabi-gcc
compiler.c.elf.flags=-Ofast -Wl,--gc-sections -save-temps
compiler.S.cmd=arm-none-eabi-gcc
compiler.S.flags=-c -g -x assembler-with-cpp
compiler.cpp.cmd=arm-none-eabi-g++
compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD
compiler.ar.cmd=arm-none-eabi-ar
compiler.ar.flags=rcs
compiler.objcopy.cmd=arm-none-eabi-objcopy
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
compiler.elf2bin.flags=-O binary
compiler.elf2bin.cmd=arm-none-eabi-objcopy
compiler.elf2hex.flags=-O ihex
compiler.elf2hex.cmd=arm-none-eabi-objcopy
compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align --specs=nano.specs --specs=nosys.specs
compiler.size.cmd=arm-none-eabi-size
# this can be overriden in boards.txt
build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float
build.debug_flags=-DCFG_DEBUG=0
# common compiler for nrf
rtos.path={build.core.path}/freertos
nordic.path={build.core.path}/nordic
build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DLFS_NAME_MAX=64 -Ofast {build.debug_flags} "-I{build.core.path}/cmsis/include" "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src"
# usb flags
build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'
# These can be overridden in platform.local.txt
compiler.c.extra_flags=
compiler.c.elf.extra_flags=
compiler.cpp.extra_flags=
compiler.S.extra_flags=
compiler.ar.extra_flags=
compiler.elf2bin.extra_flags=
compiler.elf2hex.extra_flags=
# Compile patterns
# ----------------
## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BSP_VERSION="{version}" {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}"
snip
While building my project with Eclipse Arduino I am having issues with the Makefile that gets created from this file in arduinocdt which I am trying to debug.
There is an issue with macro expansion from ARDUINO_BSP_VERSION (solved)
Another issue is with flashing my built firmware.
The file is in fact a Java .properties file and the 3rd party Hardware format specification to be used in Arduino IDE and Eclipse Arduino CDT.

Problems building DBD Sybase on Debian

I am trying to build DBD::Sybase on Debian machine, but I am running into a problem. The problem is, BFD (GNU Binutils) 2.21.1 internal error when linking the program. Please help me resolve this.
I successfully installed freetds
Downloaded "DBD-Sybase-1.16"
Executed "perl Makefile.PL INSTALL_BASE=/usr/lib/perl5/" which was successfull
When I execute "sudo make", I get the following error. I tried googling but could not find help.
Here is the tail of the build.
Skip blib/lib/DBD/Sybase.pm (unchanged)
Skip blib/lib/DBD/dbd-sybase.pod (unchanged)
Running Mkbootstrap for DBD::Sybase ()
chmod 644 Sybase.bs
/network/glnxa64/gcc-4.7.2/bin/gcc -c -I/usr/local/freetds/include -DSYB_LP64 -DNO_BLK=1 -I/company/hub/share/apps/BuildTools/Linux/glibc-2.13/x86_64/perl/perl-5.20.2-mw-021/lib/site_perl/5.20.2/x86_64-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -O2 -pipe -pthread -fPIC -fwrapv -fno-strict-aliasing -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.16\" -DXS_VERSION=\"1.16\" -fPIC "-I/company/hub/share/apps/BuildTools/Linux/glibc-2.13/x86_64/perl/perl-5.20.2-mw-021/lib/5.20.2/x86_64-linux-thread-multi/CORE" Sybase.c
/network/glnxa64/gcc-4.7.2/bin/gcc -c -I/usr/local/freetds/include -DSYB_LP64 -DNO_BLK=1 -I/company/hub/share/apps/BuildTools/Linux/glibc-2.13/x86_64/perl/perl-5.20.2-mw-021/lib/site_perl/5.20.2/x86_64-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -O2 -pipe -pthread -fPIC -fwrapv -fno-strict-aliasing -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.16\" -DXS_VERSION=\"1.16\" -fPIC "-I/company/hub/share/apps/BuildTools/Linux/glibc-2.13/x86_64/perl/perl-5.20.2-mw-021/lib/5.20.2/x86_64-linux-thread-multi/CORE" dbdimp.c
rm -f blib/arch/auto/DBD/Sybase/Sybase.so
LD_RUN_PATH="/usr/local/freetds/lib" /network/glnxa64/gcc-4.7.2/bin/gcc -shared -L/usr/local/freetds/lib -pthread -L/usr/local/lib -fstack-protector Sybase.o dbdimp.o -o blib/arch/auto/DBD/Sybase/Sybase.so \
-L/usr/local/freetds/lib -lct -ldl -lm \
/network/glnxa64/gcc-4.7.2/bin/ld: BFD (GNU Binutils) 2.21.1 internal error, aborting at /local/greg/3p/sources/gcc-4.7/../binutils/bfd/reloc.c line 443 in bfd_get_reloc_size
/network/glnxa64/gcc-4.7.2/bin/ld: Please report this bug.
collect2: error: ld returned 1 exit status
Makefile:485: recipe for target 'blib/arch/auto/DBD/Sybase/Sybase.so' failed
make: *** [blib/arch/auto/DBD/Sybase/Sybase.so] Error 1
As #jww pointed out, the issue was the older version of binutils and gcc. I just edited the generated Makefile in Sybase base directory to point to newer versions of gcc and binutils. FYI, I the versions that worked are "gcc version 6.3.0 " and "GNU ld (GNU Binutils) 2.28.1"

GNU Make --output-sync doesn't work?

this is driving me bonkers.
For parallel make builds (-j), you're supposed to be able to synchronize the console output. Here is ref:
GNU Make Manual: 5.4.1 Output During Parallel Execution
I'm using GNU Make 3.82 for x86_64-redhat-linux-gnu
Un-Synchronized:
make -j8 all //not synchronized
yields (i'm using eclipse-cdt managedbuild here):
Building file: ../dome.c
Building file: ../main.c
Invoking: GCC C Compiler
gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"dome.d" -MT"dome.d" -o "dome.o" "../dome.c"
Invoking: GCC C Compiler
gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -o "main.o" "../main.c"
Finished building: ../dome.c
Finished building: ../main.c
Building target: empty_linux
Invoking: GCC C Linker
gcc -o "empty_linux" ./dome.o ./main.o
Finished building target: empty_linux
Synchronized Attempt
make -j8 all --output-sync
yields (same result for -O/-Oline/etc):
make: unrecognized option '--output-sync
Question
what the heck am I doing wrong??
The --output-sync option is only available in GNU make 4.0. Also, in your case you should use:
--output-sync=target
or
-Otarget
But this won't work with version 3.82.

Apple LLVM compiler 4.0 error clang

Sorry my English is bad, i'm French.
I'm starting in the C language and I meet an error during my building
error: -fobjc-arc is not supported with fragile abi
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
I try to find some solution on the web, but no result..
ProcessPCH /Users/Hollisprice/Library/Developer/Xcode/DerivedData/DevTool-dfnxafkbvghokwdpcwpuvrurijwt/Build/Intermediates/PrecompiledHeaders/DevTool-Prefix-btzmnprddvcwlhbcsotsvtjgrmyp/DevTool-Prefix.pch.pth DevTool/DevTool-Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/Hollisprice/Documents/xCode/DevTool
setenv LANG en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c-header -arch i386 -fmessage-length=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wduplicate-method-match -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-sign-compare -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -fasm-blocks -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.8 -g -Wno-sign-conversion "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -iquote /Users/Hollisprice/Library/Developer/Xcode/DerivedData/DevTool-dfnxafkbvghokwdpcwpuvrurijwt/Build/Intermediates/DevTool.build/Debug/DevTool.build/DevTool-generated-files.hmap -I/Users/Hollisprice/Library/Developer/Xcode/DerivedData/DevTool-dfnxafkbvghokwdpcwpuvrurijwt/Build/Intermediates/DevTool.build/Debug/DevTool.build/DevTool-own-target-headers.hmap -I/Users/Hollisprice/Library/Developer/Xcode/DerivedData/DevTool-dfnxafkbvghokwdpcwpuvrurijwt/Build/Intermediates/DevTool.build/Debug/DevTool.build/DevTool-all-target-headers.hmap -iquote /Users/Hollisprice/Library/Developer/Xcode/DerivedData/DevTool-dfnxafkbvghokwdpcwpuvrurijwt/Build/Intermediates/DevTool.build/Debug/DevTool.build/DevTool-project-headers.hmap -I/Users/Hollisprice/Library/Developer/Xcode/DerivedData/DevTool-dfnxafkbvghokwdpcwpuvrurijwt/Build/Products/Debug/include -I/Library/Frameworks/SDL.framework/Headers -I/Users/Hollisprice/Library/Developer/Xcode/DerivedData/DevTool-dfnxafkbvghokwdpcwpuvrurijwt/Build/Intermediates/DevTool.build/Debug/DevTool.build/DerivedSources/i386 -I/Users/Hollisprice/Library/Developer/Xcode/DerivedData/DevTool-dfnxafkbvghokwdpcwpuvrurijwt/Build/Intermediates/DevTool.build/Debug/DevTool.build/DerivedSources -F/Users/Hollisprice/Library/Developer/Xcode/DerivedData/DevTool-dfnxafkbvghokwdpcwpuvrurijwt/Build/Products/Debug -F/Library/Frameworks --serialize-diagnostics /Users/Hollisprice/Library/Developer/Xcode/DerivedData/DevTool-dfnxafkbvghokwdpcwpuvrurijwt/Build/Intermediates/PrecompiledHeaders/DevTool-Prefix-btzmnprddvcwlhbcsotsvtjgrmyp/DevTool-Prefix.pch.dia -c /Users/Hollisprice/Documents/xCode/DevTool/DevTool/DevTool-Prefix.pch -o /Users/Hollisprice/Library/Developer/Xcode/DerivedData/DevTool-dfnxafkbvghokwdpcwpuvrurijwt/Build/Intermediates/PrecompiledHeaders/DevTool-Prefix-btzmnprddvcwlhbcsotsvtjgrmyp/DevTool-Prefix.pch.pth -MMD -MT dependencies -MF /Users/Hollisprice/Library/Developer/Xcode/DerivedData/DevTool-dfnxafkbvghokwdpcwpuvrurijwt/Build/Intermediates/PrecompiledHeaders/DevTool-Prefix-btzmnprddvcwlhbcsotsvtjgrmyp/DevTool-Prefix.pch.d
Thank's to help me..
I believe that happens because you are compiling code with ARC for 32-bit x86. You must compile to 64-bit architecture if you want to use ARC.

Resources