Compare commits
6 commits
a75d940be5
...
cbd60728e9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbd60728e9 | ||
|
|
a4a0898c48 | ||
|
|
db69642f35 | ||
|
|
ca2c37e3ef | ||
|
|
21217d00a9 | ||
|
|
ad63785861 |
4 changed files with 17 additions and 13 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -9,3 +9,4 @@ __pycache__
|
|||
revision.h+
|
||||
*~
|
||||
*.s
|
||||
oops.txt
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/ipython --profile=armlib
|
||||
#!/usr/bin/ipython3 --profile=armlib
|
||||
|
||||
import sys, time, threading
|
||||
|
||||
|
|
@ -604,7 +604,7 @@ def init_irena(scope, name="xRENA", prod=None, options="", long_options=[]):
|
|||
oo,ff = getopt.getopt(sys.argv[1:],
|
||||
"A:U:N:S:X"+options,
|
||||
["autostart=","network=","usb=",
|
||||
"serial=","isp=","reset-port=",
|
||||
"serialr=", "serial=","isp=","reset-port=",
|
||||
"none"]+long_options)
|
||||
_opt = (oo,ff)
|
||||
autostart = None
|
||||
|
|
@ -620,10 +620,13 @@ def init_irena(scope, name="xRENA", prod=None, options="", long_options=[]):
|
|||
if o in "-N -U -S -X --network --usb --serial --isp --none":
|
||||
if _ifc:
|
||||
raise ValueError("multiple interface options -N -U -S -X")
|
||||
if o in "-S --serial --isp --reset-port":
|
||||
if o in "-S --serialr --isp --reset-port":
|
||||
if _ifc_uart:
|
||||
raise ValueError("--reset-port with --serial")
|
||||
import uartterm
|
||||
if o == "--serialr":
|
||||
uartterm.uart.RESET_ASSERT=False
|
||||
uartterm.uart.RESET_DEASSERT=True
|
||||
if not o=="--reset-port":
|
||||
_ifc_uart = uartterm.init_uart(scope=scope, dname=name, addr=v, isp=o=="--isp")
|
||||
_ifc = _ifc_uart
|
||||
|
|
|
|||
18
oops.py
18
oops.py
|
|
@ -1,4 +1,4 @@
|
|||
#! /usr/bin/pythom
|
||||
#! /usr/bin/python3
|
||||
|
||||
|
||||
class oops(object):
|
||||
|
|
@ -102,14 +102,14 @@ class oops(object):
|
|||
|
||||
def report_addr(self, addr):
|
||||
m,s = self.find_addr(addr)
|
||||
r = "0x%08x " % addr
|
||||
r = f"0x{addr:08x} "
|
||||
if s:
|
||||
if isinstance(s, tuple):
|
||||
r += "%s %s:" % (s[1],s[0])
|
||||
r += f"{s[1]} {s[0]}:"
|
||||
else:
|
||||
r += "%s " % s
|
||||
r += "{s} "
|
||||
if m:
|
||||
r += "%s + 0x%04x" % (m, addr - self.map[m]["addr"])
|
||||
r += f"{m} + 0x{addr - self.map[m]['addr']:04x}"
|
||||
return r+'\n'
|
||||
|
||||
def open(self, filename="oops.txt"):
|
||||
|
|
@ -119,17 +119,17 @@ class oops(object):
|
|||
|
||||
def stackdump(self, l):
|
||||
ll = l.split()
|
||||
if ll[0][:3] != "@0x" or ll[0][-1]!=":":
|
||||
if ll[0][:3] != b"@0x" or ll[0][-1:]!=b":":
|
||||
return ""
|
||||
a = int(ll[0][1:-1], 16)
|
||||
import time
|
||||
r = time.strftime("Stackdump at %Y-%m-%dT%H:%M:%SZ:\n", time.gmtime())
|
||||
for aa in ll[1:]:
|
||||
r += "@0x%08x " % a
|
||||
r += f"@0x{a:08x} "
|
||||
a += 4
|
||||
aaa = int(aa,16)
|
||||
aaa = int(aa, 16)
|
||||
if aaa==self.stack_guard:
|
||||
r += "0x%08x Stack guard\n" % aaa
|
||||
r += f"0x{aaa:08x} Stack guard\n"
|
||||
else:
|
||||
r += self.report_addr(aaa)
|
||||
self.f.write(r)
|
||||
|
|
|
|||
2
ssp.c
2
ssp.c
|
|
@ -456,7 +456,7 @@ const struct keywords ssp_variable_names[] = {
|
|||
VARIABLE("ssp_adc", &ssp_conf_adc),
|
||||
VARIABLE("ssp_dac", &ssp_conf_dac),
|
||||
VARIABLE("ssp_pressure", &ssp_conf_bate),
|
||||
{}
|
||||
KW_END
|
||||
};
|
||||
|
||||
error_msg_t ssp_error(const char *m, int c)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue