Skip to content

Commit

Permalink
Merge branch 'wellenvogel:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
norbert-walter authored Apr 29, 2024
2 parents 69c2d15 + 0bb6898 commit e7a7d29
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 14 deletions.
3 changes: 3 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ For details refer to the [example description](lib/exampletask/Readme.md).

Changelog
---------
[20240428](../../releases/tag/20240428)
**********
* fix build error with M5 gps kit
[20240324](../../releases/tag/20240324)
**********
* add [SSI rotary encoders](doc/Sensors.md)
Expand Down
Binary file added doc/AtomS3-PortABC-CAN.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/AtomS3Can.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 11 additions & 1 deletion doc/Hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,15 @@ Can be used e.g. as an NMEA2000 Adapter for a laptop running e.g. OpenCPN with t
![OpenCPN on Laptop via USB and MFD on Android via WiFi](in_action1.jpg)
![OpenCPN on Laptop via USB and AvNav on Android via WiFi](in_action2.jpg)

M5 Stack AtomS3Lite Canunit (experimental since dev20230826)
M5 Stack AtomS3Lite Canunit
---------------------
* Hardware: [M5_ATOMS3 Lite](http://docs.m5stack.com/en/core/AtomS3%20Lite) + [CAN Unit](http://docs.m5stack.com/en/unit/can)
* Prebuild Binary: m5stack-atoms3-canunit-all.bin
* Build Define: BOARD_M5ATOMS3_CANUNIT
* Power: Via USB

![M5_Atom_S3 with CAN unit](AtomS3Can.jpg)

M5 Stick C Canunit
------------------
* Hardware: [M5_StickC+](http://docs.m5stack.com/en/core/m5stickc_plus) + [CAN Unit](http://docs.m5stack.com/en/unit/can)
Expand All @@ -98,6 +100,14 @@ M5 Stick C Canunit

Can be used e.g. as an NMEA2000 Adapter for a laptop running e.g. OpenCPN with the NMEA2000 Data converted to NMEA0183.

M5 Stack AtomS3Lite PortABC+CAN+ENV3
------------------
* Hardware: [M5_ATOMS3 Lite](http://docs.m5stack.com/en/core/AtomS3%20Lite) + [M5_PORTABC](https://docs.m5stack.com/en/unit/AtomPortABC) + [CAN Unit](http://docs.m5stack.com/en/unit/can) + [M5 ENV3](https://docs.m5stack.com/en/unit/envIII)
* Build: [Online service](BuildService.md)
* Power: Via USB

![M5_Atom_S3 + PortABC + CAN unit + ENV3](AtomS3-PortABC-CAN.jpg)

Node MCU32s - [Homberger Board](https://github.com/AK-Homberger/NMEA2000WifiGateway-with-ESP32)
--------------------------------------
* Hardware: see link in heading
Expand Down
2 changes: 1 addition & 1 deletion lib/hardware/GwM5Base.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifdef M5_GPS_KIT
GWRESOURCE_USE(BASE,M5_GPS_KIT)
GWRESOURCE_USE(SERIAL1,M5_GPS_KIT)
#define _GWI_SERIAL1 BOARD_LEFT1,-1,GWSERIAL_TYPE_UNI,"9600"
#define _GWI_SERIAL1 BOARD_LEFT1,-1,GWSERIAL_TYPE_UNI,9600
#endif

//M5 ProtoHub
Expand Down
36 changes: 24 additions & 12 deletions tools/decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"ESP32S3": "esp32s3"
}

BACKTRACE_REGEX = re.compile(r"(?:\s+(0x40[0-2](?:\d|[a-f]|[A-F]){5}):0x(?:\d|[a-f]|[A-F]){8})\b")
BACKTRACE_REGEX = re.compile(r"(?:\s+(0x4[0-9a-fA-F][0-9a-fA-F](?:\d|[a-f]|[A-F]){5}):0x(?:\d|[a-f]|[A-F]){8})\b")
EXCEPTION_REGEX = re.compile("^Exception \\((?P<exc>[0-9]*)\\):$")
COUNTER_REGEX = re.compile('^epc1=(?P<epc1>0x[0-9a-f]+) epc2=(?P<epc2>0x[0-9a-f]+) epc3=(?P<epc3>0x[0-9a-f]+) '
'excvaddr=(?P<excvaddr>0x[0-9a-f]+) depc=(?P<depc>0x[0-9a-f]+)$')
Expand All @@ -65,6 +65,7 @@
STACK_END = '<<<stack<<<'
STACK_REGEX = re.compile(
'^(?P<off>[0-9a-f]+):\W+(?P<c1>[0-9a-f]+) (?P<c2>[0-9a-f]+) (?P<c3>[0-9a-f]+) (?P<c4>[0-9a-f]+)(\W.*)?$')
CORE_REGEXP=re.compile('^Core')

StackLine = namedtuple("StackLine", ["offset", "content"])

Expand All @@ -84,7 +85,8 @@ def __init__(self):
self.sp = None
self.end = None
self.offset = None

self.line = 0
self.core = None
self.stack = []

def _parse_backtrace(self, line):
Expand Down Expand Up @@ -143,19 +145,27 @@ def _parse_stack_line(self, line):
return None

def parse_file(self, file, platform, stack_only=False):
lc=0
if platform == 'ESP32' or platform == 'ESP32S3':
func = self._parse_backtrace
else:
func = self._parse_exception
if stack_only:
func = self._parse_stack_begin

hasresult=False
for line in file:
func = func(line.strip())
if func is None:
break

if func is not None:
if CORE_REGEXP.match(line):
self.core=re.sub("(Core\s+[0-9]+).*",r"\1",line.strip())
lc+=1
nextfunc = func(line.strip())
if nextfunc is None:
hasresult=True
self.line=lc
yield(self)
self.__init__()


if not hasresult:
print("ERROR: Parser not complete!")
sys.exit(1)

Expand Down Expand Up @@ -249,6 +259,9 @@ def print_stack(lines, resolver):


def print_result(parser, resolver, platform, full=True, stack_only=False):
print("##line %d"%parser.line)
if parser.core is not None:
print("##",parser.core)
if platform == 'ESP8266' and not stack_only:
print('Exception: {} ({})'.format(parser.exception, EXCEPTIONS[parser.exception]))

Expand Down Expand Up @@ -314,7 +327,6 @@ def parse_args():
parser = ExceptionDataParser()
resolver = AddressResolver(addr2line, elf_file)

parser.parse_file(file, args.platform, args.stack_only)
resolver.fill(parser)

print_result(parser, resolver, args.platform, args.full, args.stack_only)
for result in parser.parse_file(file, args.platform, args.stack_only):
resolver.fill(result)
print_result(result, resolver, args.platform, args.full, args.stack_only)
4 changes: 4 additions & 0 deletions webinstall/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ types:
description: "M5 Gps Unit"
url: "https://docs.m5stack.com/en/unit/gps"
resource: serial
- label: "RS232/RS422"
value: SERIAL_GROOVE_232#grv#
description: "Generic RS232/RS422 Unit (bidirectional)"
resource: serial

- &m5groove
type: select
Expand Down

0 comments on commit e7a7d29

Please sign in to comment.