Compare commits

...

4 commits

Author SHA1 Message Date
Stephan I. Böttcher
1a4be828cf Merge branch 'master' of forge.bexus.org:Stephan/irena-arm 2025-02-24 16:20:15 +01:00
Stephan I. Böttcher
743ccf640d Makefile: add BOX NMAHEPAM and SETH 2025-02-24 16:20:01 +01:00
stephan
b1d5a9e4dd parse_expression_square: fix optional_expression
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9278 bc5caf13-1734-44f8-af43-603852e9ee25
2025-02-24 15:11:39 +00:00
stephan
0e34184422 uartterm: isp_burn_image(…, ihex=None, …)
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9277 bc5caf13-1734-44f8-af43-603852e9ee25
2025-02-24 14:58:06 +00:00
4 changed files with 12 additions and 8 deletions

View file

@ -72,6 +72,10 @@ ProductId-MCS = 0x0b
SerialNo-MCS = 9 SerialNo-MCS = 9
ProductId-NMRENA10 = 0x0c ProductId-NMRENA10 = 0x0c
SerialNo-NMRENA10 = 13 SerialNo-NMRENA10 = 13
ProductId-NMAHEPAM = 0x0c
SerialNo-NMAHEPAM = 14
ProductId-SETH = 0x0c
SerialNo-SETH = 15
#sirena: #sirena:
ProductId-Torsten = 0x04 ProductId-Torsten = 0x04

View file

@ -379,7 +379,7 @@ error_msg_t parse_expression_square(struct command *cmd, unsigned int *r, int op
e = expect_char(cmd, '['); e = expect_char(cmd, '[');
isopen = 0; isopen = 0;
if (e && !(optional_open & optional_brackets)) if (e && !(optional_open & optional_brackets))
if (optional_open & optional_expression) if (optional & optional_expression)
return 0; return 0;
else else
return e; return e;

View file

@ -631,9 +631,7 @@ class uart(threading.Thread):
ihex_filename = "irena.hex" ihex_filename = "irena.hex"
def isp_load_ihex(self, fn=None): def isp_load_ihex(self, fn):
if not fn:
fn = self.ihex_filename
x = ihexfile(fn) x = ihexfile(fn)
if x and isinstance(x[1], tuple): if x and isinstance(x[1], tuple):
raise ValueError("iHex: not a continuous file\n") raise ValueError("iHex: not a continuous file\n")
@ -723,11 +721,13 @@ class uart(threading.Thread):
# X X X read and verify # X X X read and verify
# X X read all complete sectors # X X read all complete sectors
def isp_burn_image(self, image=None, burn=False, verify=True, read=False, patch=False): def isp_burn_image(self, image=None, ihex=None, burn=False, verify=True, read=False, patch=False):
self.rimage = [None for x in self.LPC2148_sectors] self.rimage = [None for x in self.LPC2148_sectors]
if not image: if not image:
sys.stderr.write("Loading ihex file %s\n" % self.ihex_filename) if not ihex:
image = self.isp_load_ihex(self.ihex_filename) ihex = self.ihex_filename
sys.stderr.write(f"Loading ihex file {ihex}\n")
image = self.isp_load_ihex(ihex)
# sector 0 is erased first and written last # sector 0 is erased first and written last
# !! no, skip this, since verification of blank sector fails due to boot vector mapping # !! no, skip this, since verification of blank sector fails due to boot vector mapping
r = [] r = []

View file

@ -365,7 +365,7 @@ static int vars(struct command *cmd, const struct command_par *par)
e = parse_variable(cmd, &var, &name); e = parse_variable(cmd, &var, &name);
if (!e) if (!e)
e = parse_expression_square(cmd, &index, 1); e = parse_expression_square(cmd, &index, optional_expression);
static ERRORMESSAGE(error,712,"index out of range 0..127"); static ERRORMESSAGE(error,712,"index out of range 0..127");
if (!e && index>=128) if (!e && index>=128)
e = &error; e = &error;