mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Minimon is loaded to 0x0ffff000 by uart_boot, so it needs to be linked to that address as well, or it won't work. Also add that hint to the README, fix a warning, and fix the disassembly base address (was wrong either way).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18930 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5456859dd7
commit
601afcbd0b
4 changed files with 15 additions and 12 deletions
|
@ -40,7 +40,7 @@ LINKFILE = $(OBJDIR)/$(TARGET).lds
|
||||||
|
|
||||||
$(OBJDIR)/$(TARGET).bin : $(OBJDIR)/$(TARGET).elf
|
$(OBJDIR)/$(TARGET).bin : $(OBJDIR)/$(TARGET).elf
|
||||||
$(OC) -O binary $(OBJDIR)/$(TARGET).elf $(OBJDIR)/$(TARGET).bin
|
$(OC) -O binary $(OBJDIR)/$(TARGET).elf $(OBJDIR)/$(TARGET).bin
|
||||||
$(TOOLSDIR)/sh2d $(OBJDIR)/$(TARGET).bin -o 0900000 > $(OBJDIR)/$(TARGET).asm
|
$(TOOLSDIR)/sh2d $(OBJDIR)/$(TARGET).bin -o 0x0ffff000 > $(OBJDIR)/$(TARGET).asm
|
||||||
|
|
||||||
$(OBJDIR)/$(TARGET).elf : $(OBJS)
|
$(OBJDIR)/$(TARGET).elf : $(OBJS)
|
||||||
$(CC) -Os -nostdlib -o $(OBJDIR)/$(TARGET).elf -L$(OBJDIR) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$(TARGET).map
|
$(CC) -Os -nostdlib -o $(OBJDIR)/$(TARGET).elf -L$(OBJDIR) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$(TARGET).map
|
||||||
|
|
|
@ -4,3 +4,6 @@ MiniMon is the tiny but powerful-enough piece of code that can be loaded
|
||||||
with the UART boot mod.
|
with the UART boot mod.
|
||||||
It allows to read and write memory, flash program, execute code.
|
It allows to read and write memory, flash program, execute code.
|
||||||
This is suitable to reflash the box, load Rockbox or the gdb stub, etc.
|
This is suitable to reflash the box, load Rockbox or the gdb stub, etc.
|
||||||
|
|
||||||
|
The SVN version is linked to 0x0ffff000, i.e. start of IRAM.
|
||||||
|
This address has to match the address uart_boot downloads it to.
|
|
@ -46,7 +46,7 @@ int main(void)
|
||||||
UINT32 size;
|
UINT32 size;
|
||||||
UINT32 content;
|
UINT32 content;
|
||||||
volatile UINT8* paddr = 0;
|
volatile UINT8* paddr = 0;
|
||||||
volatile UINT8* pflash; // flash base address
|
volatile UINT8* pflash = 0; // flash base address
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,7 +3,7 @@ INPUT(minimon.o)
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
DRAM : ORIGIN = 0x09000000, LENGTH = 0x200000
|
IRAM : ORIGIN = 0x0FFFF000, LENGTH = 0x500
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
|
@ -12,22 +12,22 @@ SECTIONS
|
||||||
{
|
{
|
||||||
*(.startvector)
|
*(.startvector)
|
||||||
. = ALIGN(0x4);
|
. = ALIGN(0x4);
|
||||||
} > DRAM
|
} > IRAM
|
||||||
|
|
||||||
.got :
|
.got :
|
||||||
{
|
{
|
||||||
*(.got)
|
*(.got)
|
||||||
} > DRAM
|
} > IRAM
|
||||||
|
|
||||||
.got.plt :
|
.got.plt :
|
||||||
{
|
{
|
||||||
*(.got.plt)
|
*(.got.plt)
|
||||||
} > DRAM
|
} > IRAM
|
||||||
|
|
||||||
.rela.got :
|
.rela.got :
|
||||||
{
|
{
|
||||||
*(.rela.got)
|
*(.rela.got)
|
||||||
} > DRAM
|
} > IRAM
|
||||||
|
|
||||||
.text :
|
.text :
|
||||||
{
|
{
|
||||||
|
@ -35,26 +35,26 @@ SECTIONS
|
||||||
*(.entry)
|
*(.entry)
|
||||||
*(.text)
|
*(.text)
|
||||||
. = ALIGN(0x4);
|
. = ALIGN(0x4);
|
||||||
} > DRAM
|
} > IRAM
|
||||||
|
|
||||||
.data :
|
.data :
|
||||||
{
|
{
|
||||||
*(.data)
|
*(.data)
|
||||||
} > DRAM
|
} > IRAM
|
||||||
|
|
||||||
.rodata :
|
.rodata :
|
||||||
{
|
{
|
||||||
*(.rodata)
|
*(.rodata)
|
||||||
. = ALIGN(0x4);
|
. = ALIGN(0x4);
|
||||||
} > DRAM
|
} > IRAM
|
||||||
|
|
||||||
.bss :
|
.bss :
|
||||||
{
|
{
|
||||||
*(.bss)
|
*(.bss)
|
||||||
} > DRAM
|
} > IRAM
|
||||||
|
|
||||||
.stack :
|
.stack :
|
||||||
{
|
{
|
||||||
*(.stack)
|
*(.stack)
|
||||||
} > DRAM
|
} > IRAM
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue