From a57b4ca91b4848d0656428e1ae3dc07e072d0ef2 Mon Sep 17 00:00:00 2001 From: Peter McGoron Date: Sat, 8 Apr 2023 16:45:48 +0000 Subject: [PATCH] generate_csr_locations.py: static const --- firmware/generate_csr_locations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/generate_csr_locations.py b/firmware/generate_csr_locations.py index 4e9a750..1e445bf 100644 --- a/firmware/generate_csr_locations.py +++ b/firmware/generate_csr_locations.py @@ -19,9 +19,9 @@ class CSRGenerator: def print_array(self, name, num): if num == 1: - self.print(f'uintptr_t {name} = {self.get_reg(name, None)};\n') + self.print(f'static const uintptr_t {name} = {self.get_reg(name, None)};\n') else: - self.print(f'uintptr_t {name}[{num}] = {{', self.get_reg(name, 0)) + self.print(f'static const uintptr_t {name}[{num}] = {{', self.get_reg(name, 0)) for i in range(1,num): self.print(',', self.get_reg(name, i)) self.print('};\n\n')