pyecsca.codegen.render module¶
- render(config)[source]¶
Render the config into a temporary directory.
- Parameters:
config¶ (
DeviceConfiguration
) – The configuration to render.- Return type:
Tuple
[str
,str
,str
]- Returns:
The temporary directory, the elf-file name, the hex-file name.
- build(dir, elf_file, hex_file, outdir, strip=False, remove=True)[source]¶
Build a rendered configuration.
- Parameters:
dir¶ (
str
) – Directory with a rendered implementation.elf_file¶ (
str
) – Elf-file name.hex_file¶ (
str
) – Hex-file name.outdir¶ (
str
) – Output directory to copy the elf and hex files into.strip¶ (
bool
) – Whether to strip the resulting binary of debug symbols.remove¶ (
bool
) – Whether to remove the original directory after build.
- Return type:
CompletedProcess
- Returns:
The subprocess that ran the build (make).
- render_and_build(config, outdir, strip=False, remove=True)[source]¶
Render and build a config in one go.
- Parameters:
config¶ (
DeviceConfiguration
) – The configuration to build.outdir¶ (
str
) – Output directory to copy the elf and hex files into.strip¶ (
bool
) – Whether to strip the resulting binary of debug symbols.remove¶ (
bool
) – Whether to remove the original directory after build.
- Return type:
Tuple
[str
,str
,str
,CompletedProcess
]- Returns:
The subprocess that ran the build (make).