mcu_ab568x/app/projects/AB5682C_240_284/ram.ld
2025-05-30 18:03:10 +08:00

436 lines
9.9 KiB
Plaintext

#include "config.h"
ENTRY(_start)
/* Define the flash max size */
__max_flash_size = FLASH_CODE_SIZE;
__base = 0x10000000;
/* Define the area */
__bram_vma = 0x10C00;
//__sram_vma = 0x16400;
__sram_vma = 0x16A00;
__disp_vma = 0x27600;
__aram_vma = 0x36000;
__dram_vma = 0x3B000;
__eram_vma = 0x3E000;
__comm_vma = __sram_vma;
__sram_size = 67k;
MEMORY
{
init : org = __base, len = 512
flash(rx) : org = __base + 512, len = __max_flash_size
stack : org = 0x10800, len = 1k
sram : org = __sram_vma, len = __sram_size
disp : org = __disp_vma, len = 60K - 0x600
aram : org = __aram_vma, len = 20k
bram : org = __bram_vma, len = 22k + 0x600
dram : org = __dram_vma, len = 12k
eram : org = __eram_vma, len = 2560
}
SECTIONS
{
.init : {
__code_start_eq = .;
KEEP(*(.reset))
*(.text.com_eq.*)
. = ALIGN(512);
__code_end_eq = .;
. = ALIGN(512);
} > init
.btcom_flash : {
__code_start_bt_comm = .;
*(.bcom_text*)
*(.bcom_rodata*)
. = ALIGN(512);
__code_end_bt_comm = .;
} > flash
.comm : {
__comm_start = .;
KEEP(*(.vector))
*(.plt)
*(.com_text*)
*(.com_text.bb.leisr)
*(.com_text.stack.handler)
*(.com_rodata*)
*(.srodata*)
*bsp_halt.o(.rodata*)
*debug.o(.rodata*)
*(.data*)
*(.sdata*)
*\ext_scan.o(.rodata*)
*\ble_evt.o(.rodata*)
*\hci_transport_h3.o(.rodata*)
*gui.o(.rodata*)
__comm_end = .;
. = ALIGN(512);
} > sram AT > flash
.flash : {
__code_start_stream = .;
*(.com_stream.text*)
. = ALIGN(512);
__code_end_stream = .;
__code_start_record = .;
*(.com_rec*)
. = ALIGN(512);
__code_end_record = .;
__code_start_mp3dec = .;
*(.mp3dec*)
. = ALIGN(512);
__code_end_mp3dec = .;
__code_start_sbcdec = .;
*(.sbcdec*)
*(.sbc_com*)
. = ALIGN(512);
__code_end_sbcdec = .;
__code_start_sbcenc = .;
*(.rodata.sbcenc*)
*(.text.sbcenc*)
. = ALIGN(512);
__code_end_sbcenc = .;
__code_start_mp3enc = .;
*(.mpaenc*)
. = ALIGN(512);
__code_end_mp3enc = .;
__code_start_wavdec = .;
*(.wavdec*)
. = ALIGN(512);
__code_end_wavdec = .;
__code_start_wmadec = .;
*(.wmadec.bitstream)
*(.wmadec.windows)
*(.wmadec*)
. = ALIGN(512);
__code_end_wmadec = .;
__code_start_apedec = .;
*(.apedec*)
. = ALIGN(512);
__code_end_apedec = .;
__code_start_flacdec = .;
*(.flacdec*)
. = ALIGN(512);
__code_end_flacdec = .;
__code_start_usbdev = .;
*(.usbdev*)
. = ALIGN(512);
__code_end_usbdev = .;
__code_start_wma_rlc44q = .;
*(.wma_huff_rlc44q_table)
. = ALIGN(512);
__code_end_wma_rlc44q = .;
__code_start_wma_rlc44o = .;
*(.wma_huff_rlc44o_table)
. = ALIGN(512);
__code_end_wma_rlc44o = .;
__code_start_wma_rlc16 = .;
*(.wma_huff_rlc16_table)
. = ALIGN(512);
__code_end_wma_rlc16 = .;
__code_start_sniff = .;
*(.text.sniff.bb.entry)
. = ALIGN(512);
__code_end_sniff = .;
__code_start_sleep = .;
*(.saradc_text*)
*(.sleep_text*)
*(.text.sleep.rf)
*(.text.charge_com*)
. = ALIGN(512);
__code_end_sleep = .;
__code_start_pwrsave = .;
*(.text.pwroff*)
. = ALIGN(512);
__code_end_pwrsave = .;
__code_start_bb_test = .;
*(.bb_test*)
*(.bb_test_rodata*)
. = ALIGN(512);
__code_end_bb_test = .;
__code_start_bt_voice = .;
*(.bt_voice*)
. = ALIGN(512);
__code_end_bt_voice = .;
__code_start_bt_aec = .;
*(.text.aec.*)
. = ALIGN(512);
__code_end_bt_aec = .;
__code_start_bt_alc = .;
*(.text.alc.*)
. = ALIGN(512);
__code_end_bt_alc = .;
__code_start_nr_far = .;
*(.text.ains_far.*)
*(.rodata.ains_far.*)
. = ALIGN(512);
__code_end_nr_far = .;
__code_start_wsola = .;
*(.text.mav.*)
*(.rodata.mav.*)
. = ALIGN(512);
__code_end_wsola = .;
__code_start_piano = .;
*(.piano_com*)
. = ALIGN(512);
__code_end_piano = .;
__code_start_fota = .;
*(.text.fot.cache*)
. = ALIGN(512);
__code_end_fota = .;
__code_start_update = .;
*(.text.update*)
. = ALIGN(512);
__code_end_update = .;
__code_start_rf = .;
*(.text.rf_init*)
. = ALIGN(512);
__code_end_rf = .;
*(.irq_init.aligned)
*(.text*)
*(.rodata*)
*(.rela*)
LONG(0)
. = ALIGN(512);
} > flash
.stack (NOLOAD) : {
__irq_stack_start = .;
. = 0x400;
__irq_stack = .;
} > stack
__irq_stack_size = __irq_stack - __irq_stack_start;
.disp (NOLOAD) : {
*(.disp.*)
} > disp
.bss (NOLOAD) : {
__bss_start = .;
*(COMMON)
*(.bss*)
*(.sbss*)
*(.buf*)
*(.dac_obuf)
*(.sdadc_buf)
*(.ble_cache*)
*(.ancs_client*)
*(.ams_client*)
*(.sbcbuf.dec) //通话msbc解码会用到, 故不能复用
*(.sco_hci)
*(.plc_buf)
*(.mavsco_buf*)
*(.nr_far_buf.*)
*(.usb_buf.bulk)
*(.heap.os)
*(.heap.func)
*(.btmem.stack.a2dp)
#if BT_PBAP_EN || BT_MAP_EN
*(.pbap_buf*)
#endif
__hr_start = .;
__hr_3300_3605_start = .;
*algo.o(.bss*)
*modle5_13.o(.bss*)
*modle5_17.o(.bss*)
*modle5_18.o(.bss*)
*modle5_2.o(.bss*)
*modle5_5.o(.bss*)
*modle5_6.o(.bss*)
*spo2Algo.o(.bss*)
*spo2_cal.o(.bss*)
*acPower_add_doublefre.o(.bss*)
*(.hrs3300_buf)
*(.hr_buf)
*(.hr_data*)
*hx3605_hrs_agc.o(.bss*)
*hx3605_spo2_agc.o(.bss*)
__hr_3300_3605_stop = .;
__hr_stop = .;
__bss_end = .;
} > sram
__bss_size = __bss_end - __bss_start;
.bram __bram_vma (NOLOAD) : {
*(.btmem.bthw)
*(.btmem*)
*(.btstack_hci.buf)
*(.ble_buf*)
} > bram
.aec_ram __aram_vma (NOLOAD) : {
*(.aec_buf)
. = 0x5000;
} > aram
.aram_sbc __aram_vma (NOLOAD) : {
. = 0x600;
*(.sbc_cache_buf)
*(.a2dp_buf*)
*(.a2dp_play)
*(.bt_id3_buf)
. = 0x5000;
} > aram
.aram_ctp __aram_vma (NOLOAD) : {
*(.ctp_ota*)
. = 0x5000;
} > aram
.aram_music __aram_vma (NOLOAD) : {
*(.fname.buf)
*(.pff.buf)
*(.pff_buf*)
. = 0x600;
*(.mp3buf.dec)
*(.mp3_id3_buf)
*(.avio_buf) //aram不支持USB DMA, 放此处不能使用USB
*(.diskio_buf)
*(.usb_buf.*)
*(.udev_buf*)
*(.wavres.buf)
*(.lrc_buf*)
*(.pff.scan.tempbuf)
. = 0x3000;
} > aram
.aram_wma __aram_vma (NOLOAD) : {
. = 0x600;
*(.wma_coefs_buf0)
*(.wma_coefs_buf)
*(.wma_ctx_buf)
*(.wma_wincb_buf)
*(.wma_id3_buf)
} > aram
.aram_flac __aram_vma (NOLOAD) : {
. = 0x600;
*(.flac_decoded_buf)
. = 0x3000;
} > aram
.aram_fcc __aram_vma (NOLOAD) : {
. = 0x1000;
*(.fcc_buf.huart)
*(.fcc_buf*)
} > aram
.aram_upd __aram_vma (NOLOAD) : {
. = 0x4800;
*(.upd_buf*)
*(.ota_buf*)
. = 0x5000;
} > aram
.dram_alipay __dram_vma (NOLOAD) : {
. = 0xD38;
*(.qr_buff)
. = 0x3000;
} > dram
.dram_mp3 __dram_vma (NOLOAD) : {
*(.mp3_decram_buf)
. = 0x3000;
} > dram
.dram_ape __dram_vma (NOLOAD) : {
*(.apebuf.cb)
*(.apebuf.filter)
*(.apebuf.decode)
*(.apebuf.seektbl)
. = 0x3000;
} > dram
.dram_wma __dram_vma (NOLOAD) : {
*(.wmabuf*)
. = 0x3000;
} > dram
.dram_flac __dram_vma (NOLOAD) : {
*(.flacbuf*)
*(.flac_decoded_buf1)
*(.wavbuf.dec)
. = 0x3000;
} > dram
.dram_sbc __dram_vma (NOLOAD) : {
*(.sbc_decram_buf)
. = 0xD38;
} > dram
.dram_sco __dram_vma (NOLOAD) : {
*(.wavenc.sco)
. = 0xD38; //0xd38之前为msbc解码空间
*(.sco_cache)
*(.sco_data)
*(.sco_hci)
*(.plc_buf)
*(.plc_data)
. = 0x3000;
} > dram
.dram_rec __dram_vma (NOLOAD) : {
. = 0xD38;
*(.rec.wave.header)
*(.recenc.obuf)
*(.rec.obuf)
*(.l2enc_bit_buf)
*(.l2enc.buf*)
. = 0x3000;
} > dram
.dram_usb __dram_vma (NOLOAD) : {
*(.usb.device.desc.buf)
*(.ude.aubuf)
. = 0x3000;
} > dram
.dram_upd __dram_vma (NOLOAD) : {
*(.fot_data.*)
} > dram
}
/* Calc the lma */
__bank_size = SIZEOF(.flash);
__comm_lma = LOADADDR(.comm);
__comm_size = SIZEOF(.comm);