From c0d9224f09ba16d2f2c78605f532cd37f080bf13 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 16 May 2024 09:19:18 +0200 Subject: [PATCH] integration/export/_generate_csr_header_includes_c: Fix refactoring issue and do not include generated/soc.h when access functions are disabled. --- litex/soc/integration/export.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litex/soc/integration/export.py b/litex/soc/integration/export.py index e9d0e9167..a6d1ffdb7 100644 --- a/litex/soc/integration/export.py +++ b/litex/soc/integration/export.py @@ -278,7 +278,9 @@ def _generate_csr_header_includes_c(with_access_functions): """ Generate the necessary include directives for the CSR header file. """ - includes = "#include \n" + includes = "" + if with_access_functions: + includes += "#include \n" includes += "#ifndef __GENERATED_CSR_H\n" includes += "#define __GENERATED_CSR_H\n" if with_access_functions: