This commit is contained in:
pvvx 2017-02-19 22:35:23 +03:00
parent 629e5fdc28
commit bd42ffa334
212 changed files with 35447 additions and 223 deletions

View file

@ -0,0 +1,18 @@
set libname=lib_platform
del %libname%_tst.a
md %libname%.lib
cd %libname%.lib
PATH=D:\MCU\GNU_Tools_ARM_Embedded\5.2_2015q4\bin;%PATH%
arm-none-eabi-ar.exe x ..\%libname%.a
del hal_efuse.o
del hal_common.o
del freertos_pmu_8195a.o
del hal_soc_ps_monitor.o
del app_start.o
del hal_log_uart.o
del hal_pinmux.o
del hal_misc.o
del startup.o
arm-none-eabi-ar.exe ru ..\%libname%_tst.a *.o
cd ..
rd /q /s %libname%.lib

View file

@ -0,0 +1,4 @@
ram_libc.o
ram_libgloss_retarget.o
rtl_eabi_cast_ram.o
rtl_math_ram.o

View file

@ -0,0 +1,13 @@
set libname=lib_rtlstd
del %libname%_new.a
md %libname%.lib
cd %libname%.lib
PATH=D:\MCU\GNU_Tools_ARM_Embedded\5.2_2015q4\bin;%PATH%
arm-none-eabi-ar.exe x ..\%libname%.a
del ram_libc.o
rem del ram_libgloss_retarget.o
rem del rtl_eabi_cast_ram.o
rem del rtl_math_ram.o
arm-none-eabi-ar.exe ru ..\%libname%_new.a *.o
cd ..
rem rd /q /s %libname%.lib

View file

@ -0,0 +1,12 @@
set libname=lib_sdcard_v2
del %libname%_new.a
md %libname%.lib
cd %libname%.lib
PATH=D:\MCU\GNU_Tools_ARM_Embedded\5.2_2015q4\bin;%PATH%
arm-none-eabi-ar.exe x ..\%libname%.a
del sd.o
del sdio_host.o
del hal_sdio_host.o
arm-none-eabi-ar.exe ru ..\%libname%_new.a *.o
cd ..
rem rd /q /s %libname%.lib

View file

@ -0,0 +1,11 @@
set libname=lib_wlan
del %libname%_new.a
md %libname%.lib
cd %libname%.lib
PATH=D:\MCU\GNU_Tools_ARM_Embedded\5.2_2015q4\bin;%PATH%
rem arm-none-eabi-ar.exe x ..\%libname%.a
arm-none-eabi-objcopy.exe --globalize-symbol rtw_flash_map_update.part.12 rtl8195a_hal_init.o
rem rtw_flash_map_update
arm-none-eabi-ar.exe ru ..\%libname%_new.a *.o
cd ..
rem rd /q /s %libname%.lib

View file

@ -9,10 +9,8 @@ MEMORY
{
TCM (rwx) : ORIGIN = 0x1FFF0000, LENGTH = 65536
ROM_USED_RAM (rwx) : ORIGIN = 0x10000bc8, LENGTH = 21560 /* end 0x10006000 */
RECY_RAM (rwx) : ORIGIN = 0x10002100, LENGTH = 16128 /* end 0x10006000 */
//RECY_RAM (rwx) : ORIGIN = 0x10002100, LENGTH = 16128 /* end 0x10006000 */
BD_RAM (rwx) : ORIGIN = 0x10006000, LENGTH = 434176
//RECY_RAM (rwx) : ORIGIN = 0x10002100, LENGTH = 7936 /* end 0x10004000 */
//BD_RAM (rwx) : ORIGIN = 0x10004000, LENGTH = 442368
SDRAM_RAM (rwx) : ORIGIN = 0x30000000, LENGTH = 2M
}
@ -117,10 +115,10 @@ SECTIONS
__ram_image2_text_start__ = .;
__image2_entry_func__ = .;
.image2.start.table1$$Base = .;
*(SORT(.image2.ram.data*))
KEEP(*(SORT(.image2.ram.data*)))
__image2_validate_code__ = .;
*(.image2.validate.rodata*)
*(.custom.validate.rodata*)
KEEP(*(.image2.validate.rodata*))
KEEP(*(.custom.validate.rodata*))
} > BD_RAM
.ram_image2.text :

View file

@ -0,0 +1,67 @@
/* ENTRY(Reset_Handler) */
MEMORY
{
ROM (rx) : ORIGIN = 0x00000000, LENGTH = 1M
SRAM (rwx) : ORIGIN = 0x10000000, LENGTH = 448K
TCM (rwx) : ORIGIN = 0x1FFF0000, LENGTH = 65K
SDRAM_RAM (rwx) : ORIGIN = 0x30000000, LENGTH = 2M
}
SECTIONS
{
.rom :
{
__rom_image_start__ = .;
KEEP(*(.rom));
__rom_image_end__ = .;
} > ROM
.sram : /* use in rom */
{
__ram_image_start__ = .;
KEEP(*(.ram_dedecated_vector_table)) /* 0x10000000: NewVectorTable */
KEEP(*(.ram_user_define_irq_table)) /* 0x10000100: UserIrqFunTable */
KEEP(*(.ram_user_define_data_table)) /* 0x10000200: UserIrqDataTable */
/* __rom_bss_start__ = .; */
KEEP(*(.hal.ram.bss)) /* 0x10000300: CfgSysDebugWarn .. _pHAL_Gpio_Adapter */
KEEP(*(.timer2_7_vector_table.data)) /* 0x10000358: Timer2To7VectorTable */
KEEP(*(.infra.ram.bss)) /* 0x10000370: first .. z4 */
KEEP(*(.mon.ram.bss)) /* 0x10000384: pUartLogCtl .. ArgvArray */
KEEP(*(.wlan_ram_map)) /* 0x100006d4: rom_wlan_ram_map, FalseAlmCnt, ROMInfo, DM_CfoTrack */
KEEP(*(.ram.rom.wlanmap)) /* align(8) */
KEEP(*(.libc.ram.bss)) /* 0x10000760: rom_libgloss_ram_map __rtl_malloc_av_ __rtl_errno */
/* __rom_bss_end__ = .; */
/* __ram_start_table_start__ = .; */
/* 0x10000bc8: bootloader */
KEEP(*(SORT(.start.ram.data*)))
/* __image1_validate_code__ = .; */
KEEP(*(.image1.validate.rodata))
KEEP(*(.infra.ram.data*))
KEEP(*(.timer.ram.data*))
KEEP(*(.cutb.ram.data*))
KEEP(*(.cutc.ram.data*))
KEEP(*(.data));
KEEP(*(.hal.ram.data)) /* 0x10001c60: _reent *rtl_impure_ptr */ /* 0x10001c68: _reent impure_data */
KEEP(*(.libc.reent))
KEEP(*(.rom.unc.data))
KEEP(*(.sdr.rand2.data)) /* Sdr_Rand2() y,z,c */
/* KEEP(*(.hal.flash.data)) */
/* 0x100020c0: end ram-rom */
__ram_image_end__ = .;
} > SRAM
}
SECTIONS
{
__rom_bss_start__ = 0x10000300; /* use in rom */
__rom_bss_end__ = 0x10000bc8; /* use in rom */
__ram_start_table_start__ = 0x10000bc8; /* use in rom */
__image1_validate_code__ = 0x10000bdc; /* needed by ram code */
_rtl_impure_ptr = 0x10001c60; /* for standard library */
}

View file

@ -0,0 +1,240 @@
ENTRY(Reset_Handler)
INCLUDE "export-rom_v04.txt"
MEMORY
{
ROM (rx) : ORIGIN = 0x000000, LENGTH = 1M
ROM_RAM1 (rwx): ORIGIN = 0x10000000, LENGTH = 0x2100 /* end 0x10002100 */
BOOT_RAM (rwx): ORIGIN = 0x10000bc8, LENGTH = 13368 /* end 0x10006000 */
RECY_RAM (rwx): ORIGIN = 0x10002100, LENGTH = 0x3F00 /* end 0x10006000 */
BD_RAM (rwx) : ORIGIN = 0x10006000, LENGTH = 424K /* end 0x10070000 */
ROM_RAM3 (rwx): ORIGIN = 0x1006D000, LENGTH = 12K /* end 0x10070000 */
TCM (rwx) : ORIGIN = 0x1FFF0000, LENGTH = 64K /* end 0x20000000 */
SDRAM (rwx) : ORIGIN = 0x30000000, LENGTH = 2M /* end 0x30200000 */
}
EXTERN(PreProcessForVendor)
EXTERN(RtlBootToSram)
EXTERN(_rtl_impure_ptr)
EXTERN(impure_data)
SECTIONS
{
/* 0x00000000: ROM */
.rom :
{
__rom_image_start__ = .;
KEEP(*(.rom));
__rom_image_end__ = .;
} > ROM
/* 0x10000000: SRAM */
.rom_ram : /* use in rom */
{
__ram_image_start__ = .;
KEEP(*(.ram_dedecated_vector_table)) /* 0x10000000: NewVectorTable */
KEEP(*(.ram_user_define_irq_table)) /* 0x10000100: UserIrqFunTable */
KEEP(*(.ram_user_define_data_table)) /* 0x10000200: UserIrqDataTable */
/* __rom_bss_start__ = .; */
KEEP(*(.hal.ram.bss)) /* 0x10000300: CfgSysDebugWarn .. _pHAL_Gpio_Adapter */
KEEP(*(.timer2_7_vector_table.data)) /* 0x10000358: Timer2To7VectorTable */
KEEP(*(.infra.ram.bss)) /* 0x10000370: first .. z4 */
KEEP(*(.mon.ram.bss)) /* 0x10000384: pUartLogCtl .. ArgvArray */
KEEP(*(.wlan_ram_map)) /* 0x100006d4: rom_wlan_ram_map, FalseAlmCnt, ROMInfo, DM_CfoTrack */
KEEP(*(.ram.rom.wlanmap)) /* align(8) */
KEEP(*(.libc.ram.bss)) /* 0x10000760: rom_libgloss_ram_map __rtl_malloc_av_ __rtl_errno */
/* __rom_bss_end__ = .; */
} > ROM_RAM1
/* 0x10000bc8: bootloader */
.ram_image1.text . : /* use in rom & boot */
{
/* __ram_start_table_start__ = .; */
__ram_image1_text_start__ = .;
KEEP(*(SORT(.start.ram.data*)))
/* __image1_validate_code__ = .; */
KEEP(*(.image1.validate.rodata))
KEEP(*(.infra.ram.data*))
KEEP(*(.timer.ram.data*))
KEEP(*(.cutb.ram.data*))
KEEP(*(.cutc.ram.data*))
KEEP(*(.data));
KEEP(*(.hal.ram.data))
KEEP(*(.libc.reent))
KEEP(*(.rom.unc.data))
KEEP(*(.sdr.rand2.data))
build/obj/project/src/user/rtl_bios_data.o (.rodata*)
__ram_image_end__ = .;
/* 0x100020c0: end */
build/obj/project/src/user/rtl_boot.o (.text* .rodata*)
__image1_bss_start__ = .;
__image1_bss_end__ = .;
__ram_image1_text_end__ = .;
} > BOOT_RAM
.tcm :
{
__tcm_start__ = .;
*(.tcm.heap)
__tcm_end__ = .;
} > TCM
.image2.start.table :
{
__ram_image2_text_start__ = .;
__image2_entry_func__ = .;
.image2.start.table1$$Base = .;
KEEP(*(SORT(.image2.ram.data*)))
__image2_validate_code__ = .;
KEEP(*(.image2.validate.rodata*))
KEEP(*(.custom.validate.rodata*))
} > BD_RAM
.ram_image2.text :
{
*(.infra.ram.start*)
*(.mon.ram.text*)
*(.hal.flash.text*)
*(.hal.sdrc.text*)
*(.hal.gpio.text*)
*(.fwu.text*)
*(.text*)
*(.sdram.text*)
*(.p2p.text*)
*(.wps.text*)
*(.websocket.text*)
} > BD_RAM
.ram_image2.rodata :
{
*(.rodata*)
*(.fwu.rodata*)
*(.sdram.rodata*)
*(.p2p.rodata*)
*(.wps.rodata*)
*(.websocket.rodata*)
} > BD_RAM
.ram.data :
{
__data_start__ = .;
*(.data*)
*(.sdram.data*)
*(.p2p.data*)
*(.wps.data*)
*(.websocket.data*)
__data_end__ = .;
__ram_image2_text_end__ = .;
} > BD_RAM
.ram.bss :
{
__bss_start__ = .;
.ram.bss$$Base = .;
*(.hal.flash.data*)
*(.hal.sdrc.data*)
*(.hal.gpio.data*)
*(.fwu.data*)
*(.bss*)
*(COMMON)
*(.bdsram.data*)
*(.sdram.bss*)
*(.p2p.bss*)
*(.wps.bss*)
*(.websocket.bss*)
__bss_end__ = .;
.ram.bss$$Limit = .;
} > BD_RAM
.bf_data :
{
__buffer_data_start__ = .;
*(.bfsram.data*)
__buffer_data_end__ = .;
} > BD_RAM
.bf_data2 :
{
__buffer_data_start2__ = .;
__buffer_data_end2__ = .;
} > RECY_RAM
.sdr_text :
{
__sdram_data_start__ = .;
} > SDRAM
.sdr_rodata :
{
} > SDRAM
.sdr_data :
{
__sdram_data_end__ = .;
} > SDRAM
.sdr_bss :
{
__sdram_bss_start__ = .;
__sdram_bss_end__ = .;
} > SDRAM
.heap :
{
__end__ = .;
end = __end__;
*(.heap*)
__HeapLimit = .;
} > BD_RAM
/* .stack_dummy section doesn't contains any symbols. It is only
* used for linker to calculate size of stack sections, and assign
* values to stack symbols later */
.stack_dummy :
{
*(.stack)
} > BD_RAM
/* Set stack top to end of RAM, and stack limit move down by
* size of stack_dummy section */
__StackTop = ORIGIN(BD_RAM) + LENGTH(BD_RAM);
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
PROVIDE(__stack = __StackTop);
/* Check if data + heap + stack exceeds RAM limit */
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
.boot.head :
{
KEEP(*(.loader.head*))
}
.image1.head :
{
KEEP(*(SORT(.image1.head*)))
}
.image2.head :
{
KEEP(*(SORT(.image2.head*)))
}
.image3.head :
{
KEEP(*(SORT(.image3.head*)))
}
.image4.head :
{
KEEP(*(SORT(.image4.head*)))
}
}