Open boger047 opened 3 months ago
The scenario I'm using requires an absolute path, and the call to template_dir in cmake.py requires that the program execution path be in the same directory as the script
template_dir
this is my solution
abspath = os.path.abspath(os.path.join(self.path,'CMakeLists.txt')) self.generateFile('CMakeLists.txt', abspath)
replace to
template_path = os.path.split(os.path.realpath(__file__))[0]
abspath = os.path.abspath(os.path.join(self.path,'CMakeLists.txt')) self.generateFile('CMakeLists.txt', abspath, template_dir=template_path)
self.linkerScript('STM32FLASH.ld',os.path.join(self.path,'STM32FLASH.ld'), template_path)
The scenario I'm using requires an absolute path, and the call to
template_dir
in cmake.py requires that the program execution path be in the same directory as the scriptthis is my solution
replace to