26 November 2009, 23:03 | #1 |
FPGAmiga rulez!
Join Date: Dec 2007
Location: South of France
Age: 50
Posts: 155
|
m68k-amigaos-ld.exe bug ?
Hello,
I am trying to use AmiDevCpp to generate a boot ROM. I am using vasmm68k for the assembly part and GCC for the C part. I have a custom makefile and .ld file. If I tell the linker to generate a binary for srec file, I have an ACCESS_VIOLATION. If I generate an a.out file and use m68k-amigaos-objcopy.exe to create a binary, I have an empty binary file. Makefile: Code:
# Project: pff # Compiler: m68k-Amiga-OS3 # Compiler Type: MingW 3 # Makefile created by wxDev-C++ 6.10.2 on 26/11/09 13:13 CPP = m68k-amigaos-g++.exe CC = m68k-amigaos-gcc.exe WINDRES = windres.exe OBJ = main.o pff.o LINKOBJ = crt0.o main.o pff.o math.o access.o diskio.o sd.o LIBS = -T bootstrap.ld -Map bootstrap.map INCS = -I"D:/Perso/AmiDevCpp/usr/local/amiga/m68k-amigaos/sys-include" CXXINCS = -I"D:/Perso/AmiDevCpp/usr/local/amiga/m68k-amigaos/sys-include" RCINCS = AOUT = bootrom.aout BIN = bootrom.bin DEFINES = CXXFLAGS = $(CXXINCS) $(DEFINES) -save-temps -fexpensive-optimizations -O3 -m68000 -nostdlib -noixemul CFLAGS = $(INCS) $(DEFINES) -save-temps -fexpensive-optimizations -O3 -m68000 -nostdlib -noixemul GPROF = gprof.exe RM = rm -f LINK = m68k-amigaos-ld.exe OBJCOPY = m68k-amigaos-objcopy.exe .PHONY: all all-before all-after clean clean-custom all: all-before $(BIN) all-after clean: clean-custom $(RM) $(OBJ) $(BIN) $(AOUT) $(BIN): $(AOUT) $(OBJCOPY) -O binary $(AOUT) $(BIN) $(AOUT): $(OBJ) $(LINK) $(LIBS) main.o: $(GLOBALDEPS) main.c $(CC) -c main.c -o main.o $(CFLAGS) pff.o: $(GLOBALDEPS) pff.c $(CC) -c pff.c -o pff.o $(CFLAGS) Code:
TARGET(a.out-amiga) INPUT(crt0.o main.o pff.o math.o access.o diskio.o sd.o) OUTPUT(bootrom.aout) MEMORY { bootram (RWX) : ORIGIN = 0x00000000, LENGTH = 0x00002000 sdram (RWX) : ORIGIN = 0x00002000, LENGTH = 0x00FFE000 } SECTIONS { .text : { _stext = . ; crt0.o (.text) *(.text) _etext = . ; } > bootram .data : { _sdata = . ; *(.data) _edata = . ; } > sdram .bss : { _sbss = . ; *(.bss) *(COMMON) _ebss = . ; } > sdram } The only short term solution I see is to write everything in assembly. |
28 November 2009, 00:00 | #2 |
FPGAmiga rulez!
Join Date: Dec 2007
Location: South of France
Age: 50
Posts: 155
|
I have found the solution :
vasm does not generate ".text" and ".data" sections but "code" and "data". I found the problem by using the excellent vlink from Frank Wille. His tool gives you more information than GNU ld in verbose mode Now I am even thinking about dropping GCC and using VBCC. Now, I have my boot ROM, it is time to run some 68000 code on the FPGA. Cheers, Frederic |
30 November 2009, 09:54 | #3 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Rewriting m68k code | RobSis | Coders. Tutorials | 1 | 26 January 2013 16:15 |
AROS m68k Bug Reports | Ezrec | Amiga scene | 1 | 03 October 2011 22:40 |
#M68k @ Amigaworld.net | Iznougoud | Amiga scene | 0 | 06 October 2007 16:35 |
Shorten ported to AmigaOS m68k and WarpOS | Paul | News | 0 | 20 August 2006 12:05 |
If WinUAE cannot detect your supposedly empty HDD, look for zap.exe or wipe.exe. | fmcpma | support.WinUAE | 5 | 08 August 2006 00:35 |
|
|