From e9e6ec9d22774ae3cd07f737d3e7c466e9620413 Mon Sep 17 00:00:00 2001 From: "Peter D. Gray" Date: Fri, 23 Feb 2024 13:29:58 -0500 Subject: [PATCH] debug helper --- unix/variant/sim_psram.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unix/variant/sim_psram.py b/unix/variant/sim_psram.py index 7b0aa364..9db42f90 100644 --- a/unix/variant/sim_psram.py +++ b/unix/variant/sim_psram.py @@ -10,6 +10,10 @@ class SimulatedPSRAMWrapper(psram.PSRAMWrapper): # note: need heapsize=X with big number to get object so big on the heap self._wr = bytearray(self.length) + # help to find un-init memory bugs faster + for i in range(self.length): + self._wr[i] = 0x65 + def read_at(self, offset, ln): # one-copy byte-wise access return bytes(self._wr[offset:offset+ln])