Code: Select all
ARMGNU ?= arm-none-eabi- #ARMGNU ?= COPS = -Wall -nostdlib -nostartfiles -ffreestanding -Iinclude -O2 \ -mcpu=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -march=armv8-a+neon+fpv3 #COPS = -Wall -nostdlib -nostartfiles -ffreestanding -Iinclude -O2 \ # -mfpu=neon-vfpv4 -mcpu=cortex-a53 -mfloat-abi=hard -march=armv8-a #old flags #-mfpu=neon-vfpv4 -mfloat-abi=hard -march=armv7-a -mtune=cortex-a53 ASMOPS = -Iinclude BUILD_DIR = build SRC_DIR = src all :kernel7.img clean: del $(BUILD_DIR)\*.o del $(BUILD_DIR)\*.d # del $(BUILD_DIR)\*.elf $(BUILD_DIR)/%_c.o: $(SRC_DIR)/%.c # mkdir -p $(@D) $(ARMGNU)gcc $(COPS) -MMD -c $< -o [email protected] $(BUILD_DIR)/%_s.o: $(SRC_DIR)/%.S $(ARMGNU)gcc $(ASMOPS) -MMD -c $< -o [email protected] C_FILES = $(wildcard src/*.c) ASM_FILES = $(wildcard src/*.S) #OBJ_FILES = $(wildcard $(BUILD_DIR)/*.o) OBJ_FILES = $(C_FILES:$(SRC_DIR)/%.c=$(BUILD_DIR)/%_c.o) OBJ_FILES += $(ASM_FILES:$(SRC_DIR)/%.S=$(BUILD_DIR)/%_s.o) DEP_FILES = $(OBJ_FILES:%.o=%.d) -include $(DEP_FILES) #include the previously built object files #OBJ_FILES += $(wildcard $(BUILD_DIR)/*.o) kernel7.img: $(SRC_DIR)/linker32.ld $(OBJ_FILES) $(ARMGNU)ld -T src/linker32.ld -Map output.map -o $(BUILD_DIR)/kernel7.elf $(OBJ_FILES) $(ARMGNU)objcopy $(BUILD_DIR)/kernel7.elf -O binary kernel7.img $(ARMGNU)nm -n $(BUILD_DIR)/kernel7.elf > $(BUILD_DIR)/output.symbol $(ARMGNU)objdump -D $(BUILD_DIR)/kernel7.elf > $(BUILD_DIR)/output.list
Code: Select all
@FPU_enable: @ MRC p15, 0, r0, c1, c1, 2 @ ORR r0, r0, #3<<10 @ MCR p15, 0, r0, c1, c1, 2 @ @ mrc p15,0,r0,c1,c0, #2 // R0 = Access Control Register @ orr r0, #(0x300000 + 0xC00000) // Enable Single & Double Precision @ mcr p15,0,r0,c1,c0, #2 // Access Control Register = R0 @ mov r0, #0x40000000 // R0 = Enable VFP vmsr fpexc,r0 // FPEXC = R0 --- THIS LINE ALWAYS GIVES AN ERROR!!! @
What does this mean?Sorry fixed it... my assembler options were not being updated
Both DietPi and RetroPie MUST build and work on various different machines, including RPi, so if you use their build settings for the 3 different CPU's and it still does not work, the problem is then with your setup.I have not yet been able to enable the floating point unit, I have tried many options (Linux and windows) and have not yet been able to enable the FP unit.
If you look at the Makefile shown the -mcpu and -march options were only applied when compiling C code (using COPTS). For assembly files no -mcpu or -march options were being applied (using ASMOPTS).
Not sure what DietPi and RetroPie have to do with this thread, sheroy hadn't mentioned anything about what they were compiling. Especially as sheroy said a month ago that they had identified the error, was the error was, and that it was now fixed.