mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
The Echo R1 is a new open-hardware music player design, based on the STM32H743 microcontroller. Schematics and hardware documentation for it can be found here: - https://github.com/amachronic/echoplayer This is an incomplete port. The bootloader can be loaded using OpenOCD and it can draw to the LCD using SPI. SDRAM is working but hasn't been extensively tested. Change-Id: Ifd2bee15c49868fbc989683d3ca14dce48bf3e18
97 lines
2 KiB
Text
97 lines
2 KiB
Text
#include "cpu.h"
|
|
|
|
/*
|
|
* TODO: this is temporary and has not been tested
|
|
*/
|
|
|
|
ENTRY(main)
|
|
OUTPUT_FORMAT(elf32-littlearm)
|
|
OUTPUT_ARCH(arm)
|
|
STARTUP(target/arm/stm32/crt0-stm32h7.o)
|
|
|
|
MEMORY
|
|
{
|
|
SRAM_AXI (rwx) : ORIGIN = STM32_SRAM_AXI_BASE, LENGTH = STM32_SRAM_AXI_SIZE
|
|
DTCM (rwx) : ORIGIN = STM32_DTCM_BASE, LENGTH = STM32_DTCM_SIZE
|
|
ITCM (rwx) : ORIGIN = STM32_ITCM_BASE, LENGTH = STM32_ITCM_SIZE
|
|
SDRAM (rwx) : ORIGIN = STM32_SDRAM1_BASE, LENGTH = MEMORYSIZE * 1024 * 1024
|
|
}
|
|
|
|
/*
|
|
* to control section alignment (only affects on-disk alignment):
|
|
* -Wl,-z,max-page-size=0x1
|
|
*/
|
|
|
|
PHDRS
|
|
{
|
|
sram_rx PT_LOAD ;
|
|
sram_ro PT_LOAD ;
|
|
sram_rw PT_LOAD ;
|
|
itcm PT_LOAD ;
|
|
dtcm PT_LOAD ;
|
|
sdram_rx PT_LOAD ;
|
|
sdram_rw PT_LOAD ;
|
|
}
|
|
|
|
SECTIONS
|
|
{
|
|
.text :
|
|
{
|
|
loadaddress = .; /* only needed to keep ROLO happy */
|
|
|
|
KEEP(*(.bootdata))
|
|
*(.init.text*)
|
|
*(.text*)
|
|
} > SRAM_AXI :sram_rx
|
|
|
|
.rodata :
|
|
{
|
|
*(.rodata*)
|
|
} > SRAM_AXI :sram_ro
|
|
|
|
.data :
|
|
{
|
|
_databegin = .;
|
|
*(.data*)
|
|
_dataend = .;
|
|
} > SRAM_AXI :sram_rw
|
|
_datacopy = LOADADDR(.data);
|
|
|
|
.itext :
|
|
{
|
|
KEEP(*(.vectors.arm))
|
|
KEEP(*(.vectors.platform))
|
|
*(.icode*);
|
|
} > ITCM :itcm
|
|
|
|
.stack (NOLOAD) :
|
|
{
|
|
irqstackbegin = .;
|
|
. += 0x400;
|
|
irqstackend = .;
|
|
|
|
stackbegin = .;
|
|
. += 0x2000;
|
|
stackend = .;
|
|
|
|
*(.stack);
|
|
} > DTCM :dtcm
|
|
|
|
.bss (NOLOAD) :
|
|
{
|
|
_bssbegin = .;
|
|
*(.bss*);
|
|
*(COMMON);
|
|
_bssend = .;
|
|
} > SDRAM :sdram_rw
|
|
|
|
audiobuffer = ALIGN(32);
|
|
audiobufend = ORIGIN(SDRAM) + LENGTH(SDRAM) - CODEC_SIZE - PLUGIN_BUFFER_SIZE;
|
|
codecbuf = audiobufend;
|
|
pluginbuf = codecbuf + CODEC_SIZE;
|
|
}
|
|
|
|
EXTERN(__vectors_arm);
|
|
EXTERN(__vectors_platform);
|
|
ASSERT(DEFINED(__vectors_arm), "ARM exception vectors are not defined.");
|
|
ASSERT(DEFINED(__vectors_platform), "Platform exception vectors are not defined.");
|