From 370b4827f2cdd2b690bee6df07ca6d4ba2f3d9c4 Mon Sep 17 00:00:00 2001 From: Sarat Chand Savitala Date: Thu, 12 Mar 2015 22:54:39 +0530 Subject: [PATCH] sw_apps:zynqmp_fsbl: Removed unnecessary files and set compiler options Made changes in FSBL tcl file so that unnecessary files are deleted from build. Since HSI and SDK create their own Makefile, static Makefile is also removed from build. Also based on CPU, compiler optins are set to match to those set in SDK. Signed-off-by: Sarat Chand Savitala --- lib/sw_apps/zynqmp_fsbl/data/zynqmp_fsbl.tcl | 25 ++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/lib/sw_apps/zynqmp_fsbl/data/zynqmp_fsbl.tcl b/lib/sw_apps/zynqmp_fsbl/data/zynqmp_fsbl.tcl index 21845126..ccfce3d8 100755 --- a/lib/sw_apps/zynqmp_fsbl/data/zynqmp_fsbl.tcl +++ b/lib/sw_apps/zynqmp_fsbl/data/zynqmp_fsbl.tcl @@ -98,13 +98,15 @@ proc swapp_generate {} { # generate/copy ps init files ::hsi::utils::generate_psinit - #delete unnecessary files (only psu_init.c & psu_init.h are needed for FSBL) + #delete unnecessary files set files(0) "psu_init.html" set files(1) "psu_init.tcl" set files(2) "psu_init_gpl.c" set files(3) "psu_init_gpl.h" set files(4) "psu_pmucfg.c" + set files(5) "psu_clock_registers.log" + set files(6) "Makefile" foreach init_file [array get files] { file delete -force $init_file @@ -114,8 +116,27 @@ proc swapp_generate {} { set hw_processor [common::get_property HW_INSTANCE $proc_instance] set proc_type [common::get_property IP_NAME [get_cells $hw_processor]]; + # based on the CPU (A53 or R5), + # remove unnecesary linker script and retain just one: lscript.ld + # set the compiler flags if { $proc_type == "psu_cortexr5" } { - set_property -name {APP_COMPILER_FLAGS} -value {-mcpu=cortex-r5} -objects [current_sw_design ] + set ld_file_a53 "lscript_a53.ld" + file delete -force $ld_file_a53 + + set_property -name {APP_COMPILER_FLAGS} \ + -value {-Wall -O0 -g3 -fmessage-length=0 -mcpu=cortex-r5 -mfloat-abi=softfp} \ + -objects [current_sw_design ] + } else { + set ld_file "lscript.ld" + file delete -force $ld_file + + set ld_file_a53 "lscript_a53.ld" + set ld_file_new "lscript.ld" + file rename -force $ld_file_a53 $ld_file_new + + set_property -name {APP_COMPILER_FLAGS} \ + -value {-Wall -O0 -g3 -fmessage-length=0 -DXFSBL_A53} \ + -objects [current_sw_design ] } }