From cf7a2d968328775590e0c210d705d01c253185f2 Mon Sep 17 00:00:00 2001 From: pvvx Date: Mon, 10 Apr 2017 19:47:45 +0300 Subject: [PATCH] add AutoMake Eclipse --- .cproject | 120 ++++---- .settings/language.settings.xml | 2 +- .../common/GCC/rlx8195A-v04-EclipseAuto.ld | 256 ++++++++++++++++++ project_set.xml | 106 +------- sdkset.mk | 8 +- 5 files changed, 326 insertions(+), 166 deletions(-) create mode 100644 RTL00_SDKV35a/component/soc/realtek/8195a/misc/bsp/lib/common/GCC/rlx8195A-v04-EclipseAuto.ld diff --git a/.cproject b/.cproject index fc9752d..71457cd 100644 --- a/.cproject +++ b/.cproject @@ -257,7 +257,7 @@ - + @@ -614,7 +614,7 @@ - + @@ -627,7 +627,11 @@ - + + + + + @@ -637,9 +641,9 @@ - + - + - + @@ -826,45 +830,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -957,4 +922,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml index 02a1622..2f66a76 100644 --- a/.settings/language.settings.xml +++ b/.settings/language.settings.xml @@ -27,7 +27,7 @@ - + diff --git a/RTL00_SDKV35a/component/soc/realtek/8195a/misc/bsp/lib/common/GCC/rlx8195A-v04-EclipseAuto.ld b/RTL00_SDKV35a/component/soc/realtek/8195a/misc/bsp/lib/common/GCC/rlx8195A-v04-EclipseAuto.ld new file mode 100644 index 0000000..3d58080 --- /dev/null +++ b/RTL00_SDKV35a/component/soc/realtek/8195a/misc/bsp/lib/common/GCC/rlx8195A-v04-EclipseAuto.ld @@ -0,0 +1,256 @@ + +ENTRY(Reset_Handler) +ENTRY(main) + +INCLUDE "export-rom_v04.txt" + +MEMORY +{ + ROM (rx) : ORIGIN = 0x000000, LENGTH = 1M /* end 0x00100000 */ + ROM_USED_RAM (rwx): ORIGIN = 0x10000000, LENGTH = 0x2400 /* end 0x10002400 */ + BOOT_RAM (rwx) : ORIGIN = 0x10000bc8, LENGTH = 21560 /* end 0x10006000 */ + ROM_HEAP (rwx) : ORIGIN = 0x10002400, LENGTH = 3K /* end 0x10003000 */ + RAM_HEAP1 (rwx) : ORIGIN = 0x10003000, LENGTH = 12K /* end 0x10006000 */ + BD_RAM (rwx) : ORIGIN = 0x10006000, LENGTH = 424K /* end 0x10070000 */ + TCM (rwx) : ORIGIN = 0x1FFF0000, LENGTH = 64K /* end 0x20000000 */ + TCM_TAB (rwx) : ORIGIN = 0x1FFFFD00, LENGTH = 768 /* end 0x20000000 */ + SDRAM_RAM (rwx) : ORIGIN = 0x30000000, LENGTH = 2M /* end 0x30200000 */ +} + +EXTERN(RAM_IMG2_VALID_PATTEN) +EXTERN(InfraStart) + +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_USED_RAM + + /* 0x10000bc8: bootloader */ + + .ram_image1.text . : /* use in rom & boot */ + { + /* __ram_start_table_start__ = .; */ + __ram_image1_text_start__ = .; + KEEP(*rtl_boot*.o(.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(*(.libc.reent)) + KEEP(*(.rom.unc.data)) + KEEP(*(.sdr.rand2.data)) + + PROVIDE (__ram_image_end__ = .); /* 0x100020c0: end */ + + /* boot & images data */ + + KEEP(*(.hal.ram.data)) + KEEP(*(.hal.flash.data)) + KEEP(*rtl_boot*.o(.rodata*)) + KEEP(*rtl_boot*.o(.text*)) + KEEP(*rtl_boot*.o(.data*)) + __image1_bss_start__ = .; + KEEP(*rtl_boot*.o(.bss*)) + __image1_bss_end__ = .; + __ram_image1_text_end__ = .; + + } > BOOT_RAM + + .romheap : + { + __rom_heap_start__ = .; + end = __rom_heap_start__; + . = ALIGN(0x1000); + __rom_heap_end__ = .; + } > ROM_HEAP + + .ram_heap1 : + { + __ram_heap1_start__ = .; + /* *(.heap1*) */ + } > RAM_HEAP1 + + .tcm : + { + __ram_tcm_start__ = .; + __tcm_heap_start__ = .; + *(.tcm.heap) + } > TCM + + .soc_ps_monitor : + { + __tcm_heap_end__ = .; + } > TCM_TAB + + .image2.start.table : + { + __ram_heap1_end__ = .; + __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*) + . = ALIGN(4); + KEEP(*(.init)) + + /* init data */ + . = ALIGN(4); + PROVIDE (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE (__init_array_end = .); + + . = ALIGN(4); + KEEP(*(.fini)) + + . = ALIGN(4); + PROVIDE (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE (__fini_array_end = .); + + *(.mon.ram.text*) + *(.hal.flash.text*) + *(.hal.sdrc.text*) + *(.hal.gpio.text*) + *(.fwu.text*) + *(.otg.rom.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*) + . = ALIGN(4); + xHeapRegions = .; + LONG(__ram_heap1_start__) + LONG(__ram_heap1_end__ - __ram_heap1_start__) + LONG(__ram_heap2_start__) + LONG(__ram_heap2_end__ - __ram_heap2_start__) + LONG(__sdram_heap_start__) + LONG(__sdram_heap_end__ - __sdram_heap_start__) + LONG(0) + LONG(0) + UartLogRamCmdTable = .; + KEEP(*(SORT(.mon.tab*))) + UartLogRamCmdTable_end = .; + LONG(0) + } > BD_RAM + + PROVIDE(UartLogRamCmdTableSize = UartLogRamCmdTable_end - UartLogRamCmdTable); + + .ram.data : + { + __data_start__ = .; + *(.data*) + *(.p2p.data*) + *(.wps.data*) + *(.websocket.data*) + *(.sdram.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*) + *(.bdsram.data*) + *(.bfsram.data*) + *(COMMON) + *(.bss*) + *(.sdram.bss*) + *(.p2p.bss*) + *(.wps.bss*) + *(.websocket.bss*) + *(.ssl_ram_map*) + __bss_end__ = .; + .ram.bss$$Limit = .; + + } > BD_RAM + + .ram_heap2 : + { + . = ALIGN(8); + __ram_heap2_start__ = .; + *(.heap*) /* ucHeap */ + } > BD_RAM + __ram_heap2_end__ = 0x10070000; + + .sdr_text : + { + __sdram_data_start__ = .; + } > SDRAM_RAM + + .sdr_rodata : + { + } > SDRAM_RAM + + .sdr_data : + { + __sdram_data_end__ = .; + } > SDRAM_RAM + + .sdr_bss : + { + __sdram_bss_start__ = .; + __sdram_bss_end__ = .; + . = ALIGN(8); + __sdram_heap_start__ = .; + } > SDRAM_RAM + __sdram_heap_end__ = 0x30200000; + + .boot.head : + { + KEEP(*(.loader.head*)) + } + ASSERT(__ram_image_end__ == 0x100020c0, "Error rom-bios-boot code & data!") +} diff --git a/project_set.xml b/project_set.xml index 03613f9..385a03d 100644 --- a/project_set.xml +++ b/project_set.xml @@ -7,115 +7,13 @@ /${ProjName}/project/inc /${ProjName}/project/inc/rtl8195a -/${ProjName}/project/src/mad -/${ProjName}/${ProjSDK}/component/soc/realtek/common/bsp -/${ProjName}/${ProjSDK}/component/os/freertos -/${ProjName}/${ProjSDK}/component/os/freertos/freertos_v8.1.2/Source/include -/${ProjName}/${ProjSDK}/component/os/freertos/freertos_v8.1.2/Source/portable/GCC/ARM_CM3 -/${ProjName}/${ProjSDK}/component/os/os_dep/include -/${ProjName}/${ProjSDK}/component/soc/realtek/8195a/misc/driver -/${ProjName}/${ProjSDK}/component/common/api/network/include -/${ProjName}/${ProjSDK}/component/common/api -/${ProjName}/${ProjSDK}/component/common/api/platform -/${ProjName}/${ProjSDK}/component/common/api/wifi -/${ProjName}/${ProjSDK}/component/common/api/wifi/rtw_wpa_supplicant/src -/${ProjName}/${ProjSDK}/component/common/application -/${ProjName}/${ProjSDK}/component/common/application/google -/${ProjName}/${ProjSDK}/component/common/media/framework -/${ProjName}/${ProjSDK}/component/common/example -/${ProjName}/${ProjSDK}/component/common/example/wlan_fast_connect -/${ProjName}/${ProjSDK}/component/common/mbed/api -/${ProjName}/${ProjSDK}/component/common/mbed/hal -/${ProjName}/${ProjSDK}/component/common/mbed/hal_ext -/${ProjName}/${ProjSDK}/component/common/mbed/targets/hal/rtl8195a -/${ProjName}/${ProjSDK}/component/common/network -/${ProjName}/${ProjSDK}/component/common/network/lwip/lwip_v1.4.1/port/realtek/freertos -/${ProjName}/${ProjSDK}/component/common/network/lwip/lwip_v1.4.1/src/include -/${ProjName}/${ProjSDK}/component/common/network/lwip/lwip_v1.4.1/src/include/lwip -/${ProjName}/${ProjSDK}/component/common/network/lwip/lwip_v1.4.1/src/include/ipv4 -/${ProjName}/${ProjSDK}/component/common/network/lwip/lwip_v1.4.1/port/realtek -/${ProjName}/${ProjSDK}/component/common/test -/${ProjName}/${ProjSDK}/component/soc/realtek/8195a/cmsis -/${ProjName}/${ProjSDK}/component/soc/realtek/8195a/cmsis/device -/${ProjName}/${ProjSDK}/component/soc/realtek/8195a/fwlib -/${ProjName}/${ProjSDK}/component/soc/realtek/8195a/fwlib/rtl8195a -/${ProjName}/${ProjSDK}/component/soc/realtek/8195a/misc/rtl_std_lib/include -/${ProjName}/${ProjSDK}/component/common/drivers/wlan/realtek/include -/${ProjName}/${ProjSDK}/component/common/drivers/wlan/realtek/src/osdep -/${ProjName}/${ProjSDK}/component/soc/realtek/8195a/fwlib/ram_lib/wlan/realtek/wlan_ram_map/rom -/${ProjName}/${ProjSDK}/component/common/network/ssl/polarssl-1.3.8/include -/${ProjName}/${ProjSDK}/component/common/network/ssl/ssl_ram_map/rom -/${ProjName}/${ProjSDK}/component/common/utilities -/${ProjName}/${ProjSDK}/component/common/application/apple/WACServer/External/Curve25519 -/${ProjName}/${ProjSDK}/component/common/application/apple/WACServer/External/GladmanAES -/${ProjName}/${ProjSDK}/component/soc/realtek/8195a/fwlib/ram_lib/usb_otg/include -/${ProjName}/${ProjSDK}/component/common/media/codec -/${ProjName}/${ProjSDK}/component/common/drivers/usb_class/host/uvc/inc -/${ProjName}/${ProjSDK}/component/common/drivers/usb_class/device -/${ProjName}/${ProjSDK}/component/common/drivers/usb_class/device/class -/${ProjName}/${ProjSDK}/component/common/file_system/fatfs -/${ProjName}/${ProjSDK}/component/common/file_system/fatfs/r0.10c/include -/${ProjName}/${ProjSDK}/component/common/drivers/sdio/realtek/sdio_host/inc -/${ProjName}/${ProjSDK}/component/common/audio -/${ProjName}/${ProjSDK}/component/common/drivers/i2s -/${ProjName}/${ProjSDK}/component/common/application/xmodem +/${ProjName}/project/inc/mad /${ProjName}/project/inc /${ProjName}/project/inc/rtl8195a -/${ProjName}/project/src/mad -/${ProjName}/${ProjSDK}/component/soc/realtek/common/bsp -/${ProjName}/${ProjSDK}/component/os/freertos -/${ProjName}/${ProjSDK}/component/os/freertos/freertos_v8.1.2/Source/include -/${ProjName}/${ProjSDK}/component/os/freertos/freertos_v8.1.2/Source/portable/GCC/ARM_CM3 -/${ProjName}/${ProjSDK}/component/os/os_dep/include -/${ProjName}/${ProjSDK}/component/soc/realtek/8195a/misc/driver -/${ProjName}/${ProjSDK}/component/common/api/network/include -/${ProjName}/${ProjSDK}/component/common/api -/${ProjName}/${ProjSDK}/component/common/api/platform -/${ProjName}/${ProjSDK}/component/common/api/wifi -/${ProjName}/${ProjSDK}/component/common/api/wifi/rtw_wpa_supplicant/src -/${ProjName}/${ProjSDK}/component/common/application -/${ProjName}/${ProjSDK}/component/common/application/google -/${ProjName}/${ProjSDK}/component/common/media/framework -/${ProjName}/${ProjSDK}/component/common/example -/${ProjName}/${ProjSDK}/component/common/example/wlan_fast_connect -/${ProjName}/${ProjSDK}/component/common/mbed/api -/${ProjName}/${ProjSDK}/component/common/mbed/hal -/${ProjName}/${ProjSDK}/component/common/mbed/hal_ext -/${ProjName}/${ProjSDK}/component/common/mbed/targets/hal/rtl8195a -/${ProjName}/${ProjSDK}/component/common/network -/${ProjName}/${ProjSDK}/component/common/network/lwip/lwip_v1.4.1/port/realtek/freertos -/${ProjName}/${ProjSDK}/component/common/network/lwip/lwip_v1.4.1/src/include -/${ProjName}/${ProjSDK}/component/common/network/lwip/lwip_v1.4.1/src/include/lwip -/${ProjName}/${ProjSDK}/component/common/network/lwip/lwip_v1.4.1/src/include/ipv4 -/${ProjName}/${ProjSDK}/component/common/network/lwip/lwip_v1.4.1/port/realtek -/${ProjName}/${ProjSDK}/component/common/test -/${ProjName}/${ProjSDK}/component/soc/realtek/8195a/cmsis -/${ProjName}/${ProjSDK}/component/soc/realtek/8195a/cmsis/device -/${ProjName}/${ProjSDK}/component/soc/realtek/8195a/fwlib -/${ProjName}/${ProjSDK}/component/soc/realtek/8195a/fwlib/rtl8195a -/${ProjName}/${ProjSDK}/component/soc/realtek/8195a/misc/rtl_std_lib/include -/${ProjName}/${ProjSDK}/component/common/drivers/wlan/realtek/include -/${ProjName}/${ProjSDK}/component/common/drivers/wlan/realtek/src/osdep -/${ProjName}/${ProjSDK}/component/soc/realtek/8195a/fwlib/ram_lib/wlan/realtek/wlan_ram_map/rom -/${ProjName}/${ProjSDK}/component/common/network/ssl/polarssl-1.3.8/include -/${ProjName}/${ProjSDK}/component/common/network/ssl/ssl_ram_map/rom -/${ProjName}/${ProjSDK}/component/common/utilities -/${ProjName}/${ProjSDK}/component/common/application/apple/WACServer/External/Curve25519 -/${ProjName}/${ProjSDK}/component/common/application/apple/WACServer/External/GladmanAES -/${ProjName}/${ProjSDK}/component/soc/realtek/8195a/fwlib/ram_lib/usb_otg/include -/${ProjName}/${ProjSDK}/component/common/media/codec -/${ProjName}/${ProjSDK}/component/common/drivers/usb_class/host/uvc/inc -/${ProjName}/${ProjSDK}/component/common/drivers/usb_class/device -/${ProjName}/${ProjSDK}/component/common/drivers/usb_class/device/class -/${ProjName}/${ProjSDK}/component/common/file_system/fatfs -/${ProjName}/${ProjSDK}/component/common/file_system/fatfs/r0.10c/include -/${ProjName}/${ProjSDK}/component/common/drivers/sdio/realtek/sdio_host/inc -/${ProjName}/${ProjSDK}/component/common/audio -/${ProjName}/${ProjSDK}/component/common/drivers/i2s -/${ProjName}/${ProjSDK}/component/common/application/xmodem +/${ProjName}/project/inc/mad diff --git a/sdkset.mk b/sdkset.mk index b1a3600..2fcee4a 100644 --- a/sdkset.mk +++ b/sdkset.mk @@ -3,7 +3,7 @@ CFLAGS = -DM3 -DCONFIG_PLATFORM_8195A -DGCC_ARMCM3 -DARDUINO_SDK -DF_CPU=166666666L -DNDEBUG CFLAGS += -mcpu=cortex-m3 -mthumb -g2 -Os -std=gnu99 CFLAGS += -fno-common -fmessage-length=0 -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-short-enums -fsigned-char -CFLAGS += -w -Wno-pointer-sign +CFLAGS += -w -Wno-pointer-sign LFLAGS = -mcpu=cortex-m3 -mthumb -g -Os -nostartfiles -nostdlib #--specs=nano.specs LFLAGS += -Wl,--gc-sections -Wl,--cref -Wl,--entry=Reset_Handler -Wl,--no-enum-size-warning -Wl,--no-wchar-size-warning -Wl,-nostdlib @@ -67,7 +67,7 @@ INCLUDES += sdk/component/common/network/ssl/ssl_ram_map/rom INCLUDES += sdk/component/common/utilities INCLUDES += sdk/component/common/application/apple/WACServer/External/Curve25519 INCLUDES += sdk/component/common/application/apple/WACServer/External/GladmanAES -INCLUDES += sdk/component/soc/realtek/8195a/fwlib/ram_lib/usb_otg/include +#INCLUDES += sdk/component/soc/realtek/8195a/fwlib/ram_lib/usb_otg/include INCLUDES += sdk/component/common/media/codec INCLUDES += sdk/component/common/drivers/usb_class/host/uvc/inc INCLUDES += sdk/component/common/drivers/usb_class/device @@ -87,6 +87,9 @@ BOOT_C = SRC_C += sdk/component/soc/realtek/8195a/fwlib/ram_lib/rtl_bios_data.c BOOT_C += sdk/component/soc/realtek/8195a/fwlib/ram_lib/rtl_boot.c +#startup +SRC_C += sdk/component/soc/realtek/8195a/fwlib/ram_lib/startup.c + #cmsis SRC_C += sdk/component/soc/realtek/8195a/cmsis/device/system_8195a.c @@ -361,7 +364,6 @@ ADD_SRC_C += sdk/component/soc/realtek/8195a/fwlib/src/hal_pinmux.c ADD_SRC_C += sdk/component/soc/realtek/8195a/fwlib/src/hal_misc.c #ADD_SRC_C += sdk/component/soc/realtek/8195a/fwlib/src/hal_spi_flash_ram.c # COMPONENTS -ADD_SRC_C += sdk/component/soc/realtek/8195a/fwlib/ram_lib/startup.c ADD_SRC_C += sdk/component/common/mbed/targets/hal/rtl8195a/flash_eep.c ADD_SRC_C += sdk/component/soc/realtek/8195a/misc/rtl_std_lib/lib_rtlstd/ram_libc.c ADD_SRC_C += sdk/component/soc/realtek/8195a/misc/rtl_std_lib/lib_rtlstd/ram_libgloss_retarget.c