Compare commits
4 commits
05b0206105
...
1a4be828cf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a4be828cf | ||
|
|
743ccf640d | ||
|
|
b1d5a9e4dd | ||
|
|
0e34184422 |
4 changed files with 12 additions and 8 deletions
4
Makefile
4
Makefile
|
|
@ -72,6 +72,10 @@ 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
|
||||
|
|
|
|||
2
parser.c
2
parser.c
|
|
@ -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_open & optional_expression)
|
||||
if (optional & optional_expression)
|
||||
return 0;
|
||||
else
|
||||
return e;
|
||||
|
|
|
|||
12
uartterm.py
12
uartterm.py
|
|
@ -631,9 +631,7 @@ class uart(threading.Thread):
|
|||
|
||||
ihex_filename = "irena.hex"
|
||||
|
||||
def isp_load_ihex(self, fn=None):
|
||||
if not fn:
|
||||
fn = self.ihex_filename
|
||||
def isp_load_ihex(self, fn):
|
||||
x = ihexfile(fn)
|
||||
if x and isinstance(x[1], tuple):
|
||||
raise ValueError("iHex: not a continuous file\n")
|
||||
|
|
@ -723,11 +721,13 @@ class uart(threading.Thread):
|
|||
# X X X read and verify
|
||||
# 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]
|
||||
if not image:
|
||||
sys.stderr.write("Loading ihex file %s\n" % self.ihex_filename)
|
||||
image = self.isp_load_ihex(self.ihex_filename)
|
||||
if not ihex:
|
||||
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
|
||||
# !! no, skip this, since verification of blank sector fails due to boot vector mapping
|
||||
r = []
|
||||
|
|
|
|||
|
|
@ -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, 1);
|
||||
e = parse_expression_square(cmd, &index, optional_expression);
|
||||
static ERRORMESSAGE(error,712,"index out of range 0..127");
|
||||
if (!e && index>=128)
|
||||
e = &error;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue