integration/export/_generate_csr_header_includes_c: Fix refactoring issue and do not include generated/soc.h when access functions are disabled.

This commit is contained in:
Florent Kermarrec 2024-05-16 09:19:18 +02:00
parent 8a83585b85
commit c0d9224f09
1 changed files with 3 additions and 1 deletions

View File

@ -278,7 +278,9 @@ def _generate_csr_header_includes_c(with_access_functions):
""" """
Generate the necessary include directives for the CSR header file. Generate the necessary include directives for the CSR header file.
""" """
includes = "#include <generated/soc.h>\n" includes = ""
if with_access_functions:
includes += "#include <generated/soc.h>\n"
includes += "#ifndef __GENERATED_CSR_H\n" includes += "#ifndef __GENERATED_CSR_H\n"
includes += "#define __GENERATED_CSR_H\n" includes += "#define __GENERATED_CSR_H\n"
if with_access_functions: if with_access_functions: