Prepare the build environment. Args: env: SCons Environment object
(self, env)
| 78 | return logger |
| 79 | |
| 80 | def prepare_environment(self, env) -> None: |
| 81 | """ |
| 82 | Prepare the build environment. |
| 83 | |
| 84 | Args: |
| 85 | env: SCons Environment object |
| 86 | """ |
| 87 | self.environment = env |
| 88 | |
| 89 | # Set environment variables |
| 90 | env['RTT_ROOT'] = self.root_directory |
| 91 | env['BSP_ROOT'] = self.bsp_directory |
| 92 | |
| 93 | # Add to Python path |
| 94 | import sys |
| 95 | tools_path = os.path.join(self.root_directory, 'tools') |
| 96 | if tools_path not in sys.path: |
| 97 | sys.path.insert(0, tools_path) |
| 98 | |
| 99 | self.logger.debug(f"Prepared environment with RTT_ROOT={self.root_directory}") |
| 100 | |
| 101 | def load_configuration(self, config_file: str = 'rtconfig.h') -> None: |
| 102 | """ |
no test coverage detected