Compare commits

..

No commits in common. "1a4be828cf50456efb411858082c70e7ae62b66e" and "05b02061050e408689c17f7d1fbdbcb9c1a25843" have entirely different histories.

4 changed files with 8 additions and 12 deletions

View file

@ -72,10 +72,6 @@ ProductId-MCS = 0x0b
SerialNo-MCS = 9
ProductId-NMRENA10 = 0x0c
SerialNo-NMRENA10 = 13
ProductId-NMAHEPAM = 0x0c
SerialNo-NMAHEPAM = 14
ProductId-SETH = 0x0c
SerialNo-SETH = 15
#sirena:
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, '[');
isopen = 0;
if (e && !(optional_open & optional_brackets))
if (optional & optional_expression)
if (optional_open & optional_expression)
return 0;
else
return e;

View file

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

View file

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