From 97d19406ca11bd744b4ecc8db8256658d63183fe Mon Sep 17 00:00:00 2001 From: Raman Date: Mon, 8 Aug 2016 19:43:29 +0530 Subject: [PATCH] Rename linker script for the XMC4500; Support for XMC47 on the way --- src/platform/xmc4000/conf.lua | 12 ++++++++++-- .../{linker_script.ld => xmc4500_linker_script.ld} | 0 2 files changed, 10 insertions(+), 2 deletions(-) rename src/platform/xmc4000/{linker_script.ld => xmc4500_linker_script.ld} (100%) diff --git a/src/platform/xmc4000/conf.lua b/src/platform/xmc4000/conf.lua index 5f52c9f7..e7bf6e1e 100755 --- a/src/platform/xmc4000/conf.lua +++ b/src/platform/xmc4000/conf.lua @@ -3,7 +3,12 @@ specific_files = "platform.c startup_XMC4500.S system_XMC4500.c xmclib/src/xmc4_eru.c xmclib/src/xmc4_flash.c xmclib/src/xmc4_gpio.c xmclib/src/xmc4_rtc.c xmclib/src/xmc4_scu.c xmclib/src/xmc_can.c xmclib/src/xmc_ccu4.c xmclib/src/xmc_ccu8.c xmclib/src/xmc_common.c xmclib/src/xmc_dac.c xmclib/src/xmc_dma.c xmclib/src/xmc_dsd.c xmclib/src/xmc_ebu.c xmclib/src/xmc_ecat.c xmclib/src/xmc_eru.c xmclib/src/xmc_eth_mac.c xmclib/src/xmc_fce.c xmclib/src/xmc_gpio.c xmclib/src/xmc_hrpwm.c xmclib/src/xmc_i2c.c xmclib/src/xmc_i2s.c xmclib/src/xmc_ledts.c xmclib/src/xmc_posif.c xmclib/src/xmc_rtc.c xmclib/src/xmc_sdmmc.c xmclib/src/xmc_spi.c xmclib/src/xmc_uart.c xmclib/src/xmc_usbd.c xmclib/src/xmc_usic.c xmclib/src/xmc_vadc.c xmclib/src/xmc_wdt.c xmclib/gen/CLOCK_XMC4/clock_xmc4.c xmclib/gen/CLOCK_XMC4/clock_xmc4_conf.c xmclib/gen/UART/uart.c xmclib/gen/UART/uart_conf.c xmclib/gen/CPU_CTRL_XMC4/cpu_ctrl_xmc4.c xmclib/gen/CPU_CTRL_XMC4/cpu_ctrl_xmc4_conf.c xmclib/gen/FATFS/fatfs.c xmclib/gen/FATFS/fatfs_conf.c xmclib/gen/FATFS/sltha.c xmclib/gen/RTC/rtc.c xmclib/gen/RTC/rtc_conf.c xmclib/gen/SDMMC_BLOCK/sdmmc_block_private_sd.c xmclib/gen/SDMMC_BLOCK/sdmmc_block.c xmclib/gen/SDMMC_BLOCK/sdmmc_block_conf.c xmclib/gen/SYSTIMER/systimer.c xmclib/gen/SYSTIMER/systimer_conf.c xmclib/gen/DAVE.c pot.c dts.c" -local ldscript = "linker_script.ld" +local ldscript = "" +local cpu = comp.cpu:upper() + +if cpu == 'XMC4500F144K1024' then + ldscript = "xmc4500_linker_script.ld" +end addi( "src/platform/" .. platform .. "/xmclib/inc" ) addi( "src/platform/" .. platform .. "/xmclib/gen" ) @@ -21,7 +26,10 @@ specific_files = specific_files .. " src/platform/cortex_utils.s src/platform/ar ldscript = sf( "src/platform/%s/%s", platform, ldscript ) addm( { "FOR" .. cnorm( comp.cpu ), "FOR" .. cnorm( comp.board ), 'gcc', 'CORTEX_M4' } ) -addm( { "XMC4500_F144x1024" } ) + +if cpu == 'XMC4500F144K1024' then + addm( { "XMC4500_F144x1024" } ) +end -- Standard GCC Flags addcf( { '-ffunction-sections', '-fdata-sections', '-fno-strict-aliasing', '-Wall' } ) diff --git a/src/platform/xmc4000/linker_script.ld b/src/platform/xmc4000/xmc4500_linker_script.ld similarity index 100% rename from src/platform/xmc4000/linker_script.ld rename to src/platform/xmc4000/xmc4500_linker_script.ld