Forum Discussion
Altera_Forum
Honored Contributor
12 years agousing the FPU on Cortex A9
Hello, I'm trying to use the FPU in my baremetal project. I use the ARM DS-5 (altera edition) with the DS5-GCC. I try to compile a simple project with the following options: -mf...
Altera_Forum
Honored Contributor
11 years agoHi,
Please help me to update my project for hardware floating point. my make file is like this: //====================================== SOCEDS_ROOT ?= $(SOCEDS_DEST_ROOT) HWLIBS_ROOT = $(SOCEDS_ROOT)/ip/altera/hps/altera_hps/hwlib HWLIBS_SRC := EXAMPLE_SRC := hello.c io.c C_SRC := $(EXAMPLE_SRC) $(HWLIBS_SRC) alt_fpga_manager.c alt_bridge_manager.c alt_clock_manager.c i2c.c cascade_header.c LINKER_SCRIPT := cycloneV-dk-ram-modified.ld MULTILIBFLAGS := -mcpu=cortex-a9 -mfloat-abi=softfp -mfpu=neon-fp16 CFLAGS := -g -O0 -Wall -Werror -std=c99 $(MULTILIBFLAGS) -I$(HWLIBS_ROOT)/include LDFLAGS := -T$(LINKER_SCRIPT) $(MULTILIBFLAGS) CROSS_COMPILE := arm-altera-eabi- CC := $(CROSS_COMPILE)gcc LD := $(CROSS_COMPILE)g++ OC := $(CROSS_COMPILE)objcopy MKIMAGE := mkimage RM := rm -rf CP := cp -f ELF ?= $(basename $(firstword $(C_SRC))).axf OBJ := $(patsubst %.c,%.o,$(C_SRC)) BIN = $(basename $(firstword $(C_SRC))).bin IMG = $(basename $(firstword $(C_SRC)))-mkimage.bin .PHONY: all all: $(BIN) $(ELF) $(IMG) $(SPL) .PHONY: clean clean: $(RM) $(ELF) $(HWLIBS_SRC) $(OBJ) $(BIN) $(IMG) %.c: $(HWLIBS_ROOT)/src/hwmgr/%.c $(CP) $< $@ $(OBJ): %.o: %.c Makefile $(CC) $(CFLAGS) -c $< -o $@ $(ELF): $(OBJ) $(LD) $(LDFLAGS) $(OBJ) -o $@ $(BIN): $(ELF) $(OC) -O binary $(ELF) $(BIN) $(IMG): $(BIN) $(MKIMAGE) -A arm -T standalone -C none -a 0x100040 -e 0 -n "baremetal image" -d $(BIN) $(IMG) //====================================== where I need to change ?? I have tried with hard in place of softfp and it gives me error in build project error is like this: //================= error: hello.o uses VFP register arguments, hello.axf does not //================= please help me as soon as possible Thanks in advance.