Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abspath dependence #4

Open
boger047 opened this issue Jul 29, 2024 · 0 comments
Open

abspath dependence #4

boger047 opened this issue Jul 29, 2024 · 0 comments

Comments

@boger047
Copy link

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

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant