Ignore:
Timestamp:
Jul 24, 2014, 4:38:36 PM (10 years ago)
Author:
cfuguet
Message:

tsar_boot: preloader ldscript is automatically generated

  • Stack for processor 0 is allocated at the end of the cluster(0,0) ram segment:

SEG_RAM_BASE + SEG_RAM_SIZE - RESET_STACK_SIZE

  • code base is equal to the SEG_ROM_BASE constant defined in the hard_config.h file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/softs/tsar_boot/Makefile

    r758 r759  
    1 # let the user have a default configuration (ie for PLATFORM_DIR)
     1# let the user have a default configuration (ie for HARD_CONFIG_PATH)
    22-include ./build.mk
    33
     
    88
    99ifneq ($(MAKECMDGOALS),$(filter $(MAKECMDGOALS),clean distclean clean-doc doc))
    10   ifndef PLATFORM_DIR
    11     $(error please define PLATFORM_DIR 'make PLATFORM_DIR=foo')
     10  ifndef HARD_CONFIG_PATH
     11    $(error please define HARD_CONFIG_PATH 'make HARD_CONFIG_PATH=foo')
    1212  else
    13     $(info Make for $(PLATFORM_DIR))
     13    $(info Make for $(HARD_CONFIG_PATH))
    1414  endif
    1515endif
     
    2626AR         := mipsel-unknown-elf-ar
    2727RM         := rm -rf
     28SED        := sed
    2829ECHO       := @echo
    2930MKDIR      := mkdir
     
    3839# =============================================================================
    3940
    40 INCLUDE    += -I. -Iinclude -Idrivers -I$(PLATFORM_DIR)
     41INCLUDE    += -I. -Iinclude -Idrivers -I$(HARD_CONFIG_PATH)
    4142
    4243# =============================================================================
     
    108109        ./version.sh > $@
    109110
    110 $(TARGET): $(BUILD_DIR) $(OBJS) $(PLATFORM_DIR)/ldscript $(BUILD_DIR)/platform.ld $(BUILD_DIR)/$(DRV_LIB)
     111$(BUILD_DIR)/preloader.ld: preloader.ld.in
     112        $(ECHO) "[   CC    ]     $(notdir $<)"
     113        $(CC) -x c $(INCLUDE) -E $< | $(SED) -e '/#/d' -e '/^[\s\t]*$$/d' > $@
     114
     115$(TARGET): $(BUILD_DIR) $(OBJS) $(BUILD_DIR)/preloader.ld $(BUILD_DIR)/platform.ld $(BUILD_DIR)/$(DRV_LIB)
    111116        $(ECHO) "[   LD    ]     $@"
    112         $(LD) -o $@ -T $(PLATFORM_DIR)/ldscript $(OBJS) -L$(BUILD_DIR) -ldrivers
     117        $(LD) -o $@ -T $(BUILD_DIR)/preloader.ld $(OBJS) -L$(BUILD_DIR) -ldrivers
    113118        $(DU) -D $@ > $@.txt
    114119
     
    123128endif
    124129
    125 $(BUILD_DIR)/platform.dtb: $(PLATFORM_DIR)/$(DTS)
     130$(BUILD_DIR)/platform.dtb: $(HARD_CONFIG_PATH)/$(DTS)
    126131        $(ECHO) "[   DTC   ]     $(notdir $<)"
    127132        ${DTC} -O dtb -o $@ $< &> /dev/null
Note: See TracChangeset for help on using the changeset viewer.