OSDN Git Service

(none)
authorryuz <ryuz>
Sat, 15 Nov 2008 15:26:35 +0000 (15:26 +0000)
committerryuz <ryuz>
Sat, 15 Nov 2008 15:26:35 +0000 (15:26 +0000)
aplfw/sample/arm/ez_arm7/gcc/link.x
aplfw/sample/mips/jelly/gcc/gmake.mak
kernel/build/mips/jelly/gcc/gmake.mak
sample/mips/jelly/gcc/gmake.mak
sample/mips/jelly/gcc/ram.lds [new file with mode: 0755]
sample/mips/jelly/gcc/rom.lds [moved from sample/mips/jelly/gcc/link.x with 100% similarity]

index 24f4b63..7a6bc3c 100755 (executable)
@@ -5,7 +5,7 @@ MEMORY
 {
        vector : o = 0x00000000, l = 0x00000040
        rom    : o = 0x00000040, l = 0x0000ffc0
-       ram    : o = 0x40000000, l = 0x00004000
+       ram    : o = 0x40000000, l = 0x00100000
 }
 
 SECTIONS
index 645ebe8..446caf6 100755 (executable)
@@ -128,7 +128,7 @@ clean: makeexe_clean
 depend: makeexe_depend
 
 .PHONY : mostlyclean
-mostlyclean: clean
+mostlyclean: clean kernel_clean
        $(MAKE) -C $(APLFW_BUILD_DIR) -f gmake.mak clean
 
 .PHONY : mostlydepend
index 911a1c1..2580d1e 100755 (executable)
@@ -24,7 +24,7 @@ CMD_LIBR ?= $(GCC_ARCH)ar
 
 
 # %jp{アーキテクチャ定義}%en{architecture}
-ARCH_NAME ?= mips1
+ARCH_NAME ?= jelly
 ARCH_PROC ?= mips/mips1
 ARCH_IRC  ?= mips/jelly
 ARCH_CC   ?= gcc
@@ -61,8 +61,8 @@ SRC_DIRS += $(SRC_PROC_DIR) $(SRC_PROC_DIR) $(SRC_PROC_CC_DIR) $(SRC_IRC_DIR) $(
 
 
 # %jp{オプションフラグ}%en{option flags}
-AFLAGS  = -march=mips1
-CFLAGS  = -march=mips1
+AFLAGS  = -march=mips1 -msoft-float -G 0 
+CFLAGS  = -march=mips1 -msoft-float -G 0
 ARFLAGS = 
 
 
index 20bcae8..ff07510 100755 (executable)
@@ -46,12 +46,12 @@ include $(KERNEL_MAKINC_DIR)/common.inc
 
 
 # %jp{リンカスクリプト}%en{linker script}
-LINK_SCRIPT = link.x
+LINK_SCRIPT = rom.lds
 
 
 # %jp{内蔵RAM}%en{internal RAM}
 ifeq ($(MEMMAP),ram)
-LINK_SCRIPT  = linkram.x
+LINK_SCRIPT  = ram.lds
 TARGET      := $(TARGET)_ram
 endif
 
@@ -62,9 +62,9 @@ SRC_DIRS += . ..
 
 
 # %jp{オプションフラグ}%en{option flags}
-AFLAGS  = -march=mips1
-CFLAGS  = -march=mips1
-LNFLAGS = -march=mips1 -nostartfiles -Wl,-Map,$(TARGET).map,-T$(LINK_SCRIPT)
+AFLAGS  = -march=mips1 -msoft-float -G 0
+CFLAGS  = -march=mips1 -msoft-float -G 0
+LNFLAGS = -march=mips1 -msoft-float -G 0 -nostartfiles -Wl,-Map,$(TARGET).map,-T$(LINK_SCRIPT)
 
 
 # %jp{コンパイラ依存の設定読込み}%en{compiler dependent definitions}
diff --git a/sample/mips/jelly/gcc/ram.lds b/sample/mips/jelly/gcc/ram.lds
new file mode 100755 (executable)
index 0000000..ff95e29
--- /dev/null
@@ -0,0 +1,51 @@
+OUTPUT_ARCH(mips)
+ENTRY(_reset_handler)
+
+MEMORY
+{
+       rom    : o = 0x00000000, l = 0x00010000
+       ram    : o = 0x00010000, l = 0x00010000
+}
+
+SECTIONS
+{
+       .text :
+       {
+                ___text = . ; 
+               */crt0.o(.text)
+               *(.text)
+               *(.strings)
+               *(.rodata*)
+               *(.glue*)
+                ___text_end = . ; 
+       }  > rom
+       .tors :
+       {
+               . = ALIGN(4);
+               ___ctors = . ;
+               *(.ctors)
+               ___ctors_end = . ;
+               ___dtors = . ;
+               *(.dtors)
+               ___dtors_end = . ;
+       } > rom
+       data : AT (ADDR(.tors) + SIZEOF(.tors))
+       {
+           ___data_rom = ADDR(.tors) + SIZEOF(.tors);
+               ___data = . ;
+               *(.data)
+               _gp = ALIGN(16) + 0x7ff0;
+               *(.sdata)
+               ___data_end = . ;
+       } > ram
+       .bss :
+       {
+               ___bss = . ;
+               *(.sbss)
+               *(.bss)
+               *(COMMON)
+               *(.scommon)
+               ___bss_end = . ;  
+       } > ram
+}
+