mirror of
https://github.com/fail0verflow/mini.git
synced 2024-11-28 06:04:19 +01:00
thumb mode for mini
This commit is contained in:
parent
9211533614
commit
3b9fb897f7
17
Makefile
17
Makefile
@ -1,7 +1,8 @@
|
|||||||
include ../../starlet.mk
|
include ../../starlet.mk
|
||||||
|
|
||||||
ASFLAGS += -D_LANGUAGE_ASSEMBLY
|
ASFLAGS += -D_LANGUAGE_ASSEMBLY
|
||||||
CFLAGS += -DCAN_HAZ_IRQ -DCAN_HAZ_IPC
|
CFLAGS += -DCAN_HAZ_IRQ -DCAN_HAZ_IPC -mthumb-interwork
|
||||||
|
THUMBFLAGS = -mthumb
|
||||||
LDSCRIPT = mini.ld
|
LDSCRIPT = mini.ld
|
||||||
LIBS = -lgcc
|
LIBS = -lgcc
|
||||||
|
|
||||||
@ -10,10 +11,11 @@ MAKEBIN = python ../makebin.py
|
|||||||
|
|
||||||
TARGET = armboot.elf
|
TARGET = armboot.elf
|
||||||
TARGET_BIN = armboot.bin
|
TARGET_BIN = armboot.bin
|
||||||
OBJS = start.o main.o ipc.o vsprintf.o string.o gecko.o memory.o memory_asm.o \
|
OBJS = start.o memory.o memory_asm.o utils_asm.o panic.o irq_asm.o ipc.o \
|
||||||
utils_asm.o utils.o ff.o diskio.o sdhc.o powerpc_elf.o powerpc.o panic.o \
|
exception_asm.o nand.o exception.o ldhack.o
|
||||||
irq.o irq_asm.o exception.o exception_asm.o seeprom.o crypto.o nand.o \
|
THUMB_OBJS = sdmmc.o sdhc.o boot2.o powerpc.o powerpc_elf.o diskio.o ff.o \
|
||||||
boot2.o ldhack.o sdmmc.o
|
crypto.o seeprom.o utils.o main.o vsprintf.o string.o \
|
||||||
|
gecko.o irq.o
|
||||||
|
|
||||||
include ../../common.mk
|
include ../../common.mk
|
||||||
|
|
||||||
@ -21,6 +23,11 @@ all: $(TARGET_BIN)
|
|||||||
|
|
||||||
main.o: main.c git_version.h
|
main.o: main.c git_version.h
|
||||||
|
|
||||||
|
$(THUMB_OBJS): %.o : %.c
|
||||||
|
@echo " COMPILE[T] $<"
|
||||||
|
@mkdir -p $(DEPDIR)
|
||||||
|
@$(CC) $(CFLAGS) $(THUMBFLAGS) $(DEFINES) -Wp,-MMD,$(DEPDIR)/$(*F).d,-MQ,"$@",-MP -c $< -o $@
|
||||||
|
|
||||||
$(TARGET_BIN): $(TARGET) $(ELFLOADER)
|
$(TARGET_BIN): $(TARGET) $(ELFLOADER)
|
||||||
@echo "MAKEBIN $@"
|
@echo "MAKEBIN $@"
|
||||||
@$(MAKEBIN) $(ELFLOADER) $< $@
|
@$(MAKEBIN) $(ELFLOADER) $< $@
|
||||||
|
3
start.S
3
start.S
@ -104,7 +104,8 @@ done_bss2:
|
|||||||
bl debug_output
|
bl debug_output
|
||||||
@ take the plunge
|
@ take the plunge
|
||||||
mov r0, r4
|
mov r0, r4
|
||||||
bl _main
|
ldr r4, =(_main+1)
|
||||||
|
blx r4
|
||||||
@ _main returned! Go to whatever address it returned...
|
@ _main returned! Go to whatever address it returned...
|
||||||
mov pc, r0
|
mov pc, r0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user