505 lines
12 KiB
Plaintext
505 lines
12 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 + 0x800 + 0x800 + 0x400;
|
|
__aram_vma = 0x36000;
|
|
__dram_vma = 0x3B000;
|
|
__eram_vma = 0x3E000;
|
|
|
|
__comm_vma = __sram_vma;
|
|
__sram_size = 67k + 0x800 + 0x800 + 0x400;
|
|
|
|
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 - 0x800 - 0x800 - 0x400
|
|
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
|
|
|
|
#if SECURITY_PAY_EN
|
|
//将支付宝库复用aram通话部分
|
|
.alipay_lib __aram_vma (NOLOAD) : {
|
|
. = ALIGN(4);
|
|
. = 0x600;
|
|
__alipay_start = .;
|
|
//*(.alipay.hs_HSI2CBuf)
|
|
*hs_private.o(.bss*)
|
|
//*(.hs.pTestBuf)
|
|
|
|
//*(.alipay.hed_HEDI2CBuf)
|
|
*hed_private.o(.bss*)
|
|
*vendor_api.o(.bss*)
|
|
|
|
*alipay_misc.c.obj(.bss*)
|
|
*alipay*.c.obj(.sbss*)
|
|
*vendor_os.o(.bss*)
|
|
*se_bind.c.obj(.bss*)
|
|
*alipay_commu_route.c.obj(.bss*)
|
|
*unbind_proto.c.obj(.bss*)
|
|
*ble_bind.c.obj(.bss*)
|
|
*cJSON.c.obj(.bss*)
|
|
*se_sst.c.obj(.bss*)
|
|
*dev_comm.c.obj(.bss*)
|
|
*common.o(.sbss*)
|
|
*hs_private.o(.sbss*)
|
|
*func_alipay.o(.sbss*)
|
|
*ble_bind.c.obj(.sbss*)
|
|
*cJSON.c.obj(.sbss*)
|
|
*se_sst.c.obj(.sbss*)
|
|
*dev_comm.c.obj(.sbss*)
|
|
*unbind_proto.c.obj(.sbss*)
|
|
|
|
__alipay_end = .;
|
|
. = 0x5000;
|
|
} > aram
|
|
__alipay_size = __alipay_end - __alipay_start;
|
|
#endif // SECURITY_PAY_EN
|
|
|
|
.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.*)
|
|
/*
|
|
#if SECURITY_PAY_EN
|
|
__heap_start = .;
|
|
*(.heap.func)
|
|
__heap_end = .;
|
|
#endif // SECURITY_PAY_EN
|
|
*/
|
|
} > 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)
|
|
//#if !SECURITY_PAY_EN
|
|
__heap_start = .;
|
|
*(.heap.func)
|
|
__heap_end = .;
|
|
//#endif // SECURITY_PAY_EN
|
|
|
|
*(.btmem.stack.a2dp)
|
|
|
|
#if BT_PBAP_EN || BT_MAP_EN
|
|
*(.pbap_buf*)
|
|
#endif
|
|
__hr_start = .;
|
|
|
|
__hr_3300_3605_start = .;
|
|
*(.hrs3300_buf)
|
|
*(.hr_buf)
|
|
*(.hr_data*)
|
|
__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) : {
|
|
#if SECURITY_PAY_EN
|
|
__aec_start = .;
|
|
#endif // SECURITY_PAY_EN
|
|
*(.aec_buf)
|
|
#if SECURITY_PAY_EN
|
|
__aec_end = .;
|
|
#endif // SECURITY_PAY_EN
|
|
. = 0x5000;
|
|
} > aram
|
|
#if SECURITY_PAY_EN
|
|
__aec_size = __aec_end - __aec_start;
|
|
#endif // SECURITY_PAY_EN
|
|
|
|
|
|
.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
|
|
|
|
|
|
#if SECURITY_PAY_EN
|
|
//支付宝恢复func heap内存到原来的sram
|
|
.alipay_restore __heap_start (NOLOAD) : {
|
|
*(.alipay_restore.buf)
|
|
} > sram
|
|
//支付宝运行内存 将func heap重新初始化与aram复用
|
|
.alipay_enter __alipay_end (NOLOAD) : {
|
|
*(.alipay_enter.buf)
|
|
. = __aec_end;
|
|
} > aram
|
|
//支付宝驱动i2c初始化内存复用到原来func heap位置
|
|
.alipay_i2c_dev __heap_start (NOLOAD) : {
|
|
__dev_start = .;
|
|
*(.alipay.hs_HSI2CBuf) //宏思I2C驱动缓存
|
|
*(.hs.pTestBuf) //宏思测试内存,只有开启测试模式才会占用内存
|
|
*(.alipay.hed_HEDI2CBuf) //华大I2C驱动缓存
|
|
__dev_end = .;
|
|
} > sram
|
|
__dev_size = __dev_end - __dev_start;
|
|
#endif // SECURITY_PAY_EN
|
|
|
|
}
|
|
|
|
/* Calc the lma */
|
|
__bank_size = SIZEOF(.flash);
|
|
__comm_lma = LOADADDR(.comm);
|
|
__comm_size = SIZEOF(.comm);
|