Skip to content

abspath dependence #4

@boger047

Description

@boger047

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions