File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ LDFLAGS=
1111INCFLAGS=" -Ifirmware/ap_types/"
1212PROJECT=myproject
1313LIB_STAMP=mystamp
14- WEIGHTS_DIR=" \" weights\" "
14+ BASEDIR=" $( cd " $( dirname " $0 " ) " && pwd) "
15+ WEIGHTS_DIR=" \" ${BASEDIR} /firmware/weights\" "
1516
1617${CC} ${CFLAGS} ${INCFLAGS} -D WEIGHTS_DIR=${WEIGHTS_DIR} -c firmware/${PROJECT} .cpp -o ${PROJECT} .o
1718${CC} ${CFLAGS} ${INCFLAGS} -D WEIGHTS_DIR=${WEIGHTS_DIR} -c ${PROJECT} _bridge.cpp -o ${PROJECT} _bridge.o
Original file line number Diff line number Diff line change @@ -725,13 +725,10 @@ def write_build_script(self, model):
725725 # build_lib.sh
726726 build_lib_src = (filedir / '../templates/vivado/build_lib.sh' ).resolve ()
727727 build_lib_dst = Path (f'{ model .config .get_output_dir ()} /build_lib.sh' ).resolve ()
728- weights_dir = (build_lib_dst .parent / 'firmware/weights' ).resolve ()
729728 with open (build_lib_src ) as src , open (build_lib_dst , 'w' ) as dst :
730729 for line in src .readlines ():
731730 line = line .replace ('myproject' , model .config .get_project_name ())
732731 line = line .replace ('mystamp' , model .config .get_config_value ('Stamp' ))
733- if line .startswith ('WEIGHTS_DIR=' ):
734- line = f'WEIGHTS_DIR=\\ ""{ weights_dir } \\ ""\n '
735732
736733 dst .write (line )
737734 build_lib_dst .chmod (build_lib_dst .stat ().st_mode | stat .S_IEXEC )
You can’t perform that action at this time.
0 commit comments