Commit 2bd7fdb2 authored by Sydney Speckle's avatar Sydney Speckle

update Makefile and copy script

parent e0d4adc1
......@@ -33,15 +33,15 @@
######################################################
###################USER###############################
PROJECT_NAME = emros
MODULES = NanoOFC/core NanoOFC/logger utilityOFC devices system motors basecontroller emrosCommon gui
#PROJECT_NAME =demo_1
#MODULES =
PROJECT_NAME =emros
MODULES =NanoOFC/core NanoOFC/logger utilityOFC devices system motors basecontroller emrosCommon gui
OUTPUT_NAME =debuggee.emp
USER_LIBS =
USER_LIB_PATHS =
PATH_EM5 = /media/em5
PATH_EM5 =/media/em5
OPTIMISATAON = -O0 -fno-strict-overflow
OPTIMISATAON =-O0 -fno-strict-overflow
USER_DEFINES =DEF_4WD
######################################################
......@@ -144,7 +144,7 @@ $(BUILD_PATH)/obj/%.o: %.cpp
.PHONY: tidy clean dirs init debug print-% rename prep build processing
debug: print-C_OBJ print-CXX_OBJ print-OBJ print-TARGET_OUT print-INC print-C_SRC print-CXX_SRC print-VPATH print-MODULE_PATH print-LIBS print-LIB_PATHS print-LDFLAGS print-CXX_D print-CORES print-MAKEFLAGS
debug: print-C_OBJ print-CXX_OBJ print-OBJ print-TARGET_OUT print-INC print-C_SRC print-CXX_SRC print-VPATH print-MODULE_PATH print-LIBS print-LIB_PATHS print-LDFLAGS print-CXX_D print-CORES print-MAKEFLAGS print-USER_DEFINES
#recursive calls
......@@ -163,7 +163,7 @@ init:
@mkdir -p $(BUILD_PATH)/bin $(BUILD_PATH)/obj
prep:
@./prepare_and_copy_to_master.sh $(BUILD_PATH) $(OUTPUT) $(PROJECT_NAME) $(NANOTEC_BASE_PATH) $(NANOTEC_TOOLS_DIR) $(PATH_EM5) $(PATH_EM5)
@./prepare_and_copy_to_master.sh $(BUILD_PATH) $(OUTPUT) $(PROJECT_NAME) $(NANOTEC_BASE_PATH) $(NANOTEC_TOOLS_DIR) $(PATH_EM5) $(OUTPUT_NAME)
build: $(BUILD_PATH)/bin/$(OUTPUT)
......
......@@ -9,17 +9,18 @@ PROJECT_NAME=$3
NANOTEC_BASE_PATH=$4
NANOTEC_TOOLS_DIR=$5
PATH_EM5=$6
OUTPUT_NAME=$7
echo -e "[\033[94mobjcopy\033[0m]"
arm-none-eabi-objcopy -O binary $BUILD_DIR/bin/$OUTPUT $BUILD_DIR/bin/$PROJECT_NAME.emp
echo -e "[\033[94mstm32crc\033[0m]"
./$NANOTEC_BASE_PATH/$NANOTEC_TOOLS_DIR/stmcrc32.x $BUILD_DIR/bin/$PROJECT_NAME.emp a
echo -e "[\033[94mrenaming\033[0m]"
mv -v $BUILD_DIR/bin/$PROJECT_NAME.emp $BUILD_DIR/bin/debuggee.emp
mv -v $BUILD_DIR/bin/$PROJECT_NAME.emp $BUILD_DIR/bin/$OUTPUT_NAME
echo -e "[\033[94mcopying to master\033[0m]"
#mount -v $PATH_EM5
if (mount -v $PATH_EM5) then
cp -v $BUILD_DIR/bin/debuggee.emp $PATH_EM5/progs/debuggee.emp
cp -v $BUILD_DIR/bin/$OUTPUT_NAME $PATH_EM5/progs/$OUTPUT_NAME
echo -e "[\033[94msyncing\033[0m]"
sync
umount -v $PATH_EM5
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment