package ITB manager fatih.bellachia@lapp.in2p3.fr author fatih.bellachia@lapp.in2p3.fr use libopencm3 v0r* use support v0r* use rcc v0r* use usart v0r* use i2c v3r* use channel v0r* use module v0r* use dataStorage v0r* use main v0r* use ipmc v0r* use sensors v0r* use ekeying v0r* use fwUpgrade v0r* #------------------------------------------------------------------------------- # To enable access of FRU/SDR data stored in EEPROM, uncomment the line below. # By default FRU/SDR data are strored in 'IOIF' MCU memory. # # CAUTION: If you want to use EEPROM don't forget to download # eeprom_programmer_IOIF.elf in 'IOIF' slave MCU by # executing the following command: # # % make flash_eeprom_programmer #------------------------------------------------------------------------------- #use prom24256 v0r* #------------------------------------------------------------------------------- # Generators # # Usage: # apply_pattern gen-fru-file m4_file= fru_file= # apply_pattern gen-eeprom_data_copy-file fru_file= sdr_file= # src_dir= #------------------------------------------------------------------------------- # Macros macro fru_file "$(src)fru_data.c" macro sdr_file "$(src)sdr_data.c" macro m4_file "../share/data/$(package).m4" # cppcheck macro_append cppcheck_flags " --suppress=unusedStructMember" # Generate FRU file apply_pattern gen-fru-file m4_file=$(m4_file) fru_file=$(fru_file) # Generate eeprom_data_copy file apply_pattern gen-eeprom_data_copy-file fru_file=$(fru_file) sdr_file=$(sdr_file) src_dir=$(src) #------------------------------------------------------------------------------- # Module(s) # # Usage: # apply_pattern arm-module name= target_mcu= source= #------------------------------------------------------------------------------- # Compile sensors module apply_pattern arm-module name=sensors target_mcu=IOIF source=sensors.c # Compile p2p_ekeying module apply_pattern arm-module name=p2p_ekeying target_mcu=IOIF source=p2p_ekeying.c #------------------------------------------------------------------------------- # Applications # # Usage: # apply_pattern arm-application name= target_mcu= # # - eeprom_programmer_IOIF utility run in IOIF (slave MCU) target # - bmc_IPMC application run in IPMC (master MCU) target # - bmc_IOIF application run in IOIF (slave MCU) target #------------------------------------------------------------------------------- # Build eeprom_programmer application apply_pattern build-eeprom_programmer # Build BMC application for IPMC (master MCU) apply_pattern arm-application name=bmc target_mcu=IPMC # Build BMC application for IOIF (slave MCU) apply_pattern arm-application name=bmc target_mcu=IOIF #------------------------------------------------------------------------------- # FLASH programming # # Usage: # apply_pattern flash host= name= target_mcu= # [target_suffix=none] #------------------------------------------------------------------------------- ###macro openocd_host "localhost" macro openocd_host "lappc-p481" ###macro openocd_host "lappc-at27" apply_pattern flash host=$(openocd_host) name=bmc target_mcu=IPMC apply_pattern flash host=$(openocd_host) name=bmc target_mcu=IOIF apply_pattern flash host=$(openocd_host) name=eeprom_programmer target_mcu=IOIF #------------------------------------------------------------------------------- # Debugging program with INSIGHT # # Usage: # apply_pattern debug host= name= target_mcu= # [target_suffix=none] #------------------------------------------------------------------------------- apply_pattern debug host=$(openocd_host) name=bmc target_mcu=IPMC apply_pattern debug host=$(openocd_host) name=bmc target_mcu=IOIF apply_pattern debug host=$(openocd_host) name=eeprom_programmer target_mcu=IOIF #------------------------------------------------------------------------------- # Rebuild all project action # # this command is used when configuration header files have been changed #------------------------------------------------------------------------------- action rebuild "${CMTROOT}/mgr/cmt broadcast -local -exclude='config' make clean all" #------------------------------------------------------------------------------- # build project action # # this command is used when configuration header files have been changed #------------------------------------------------------------------------------- action bmc "make clean all"