Mercurial > code > home > repos > homeauto
annotate service/iot2/esp32_main/panicoverride.nim @ 1754:92999dfbf321 default tip
add shelly support
author | drewp@bigasterisk.com |
---|---|
date | Tue, 04 Jun 2024 13:03:43 -0700 |
parents | 17ff9322328b |
children |
rev | line source |
---|---|
728
17ff9322328b
an attempt as ESP-IDF build (doesn't work) calling a nim-generated main function (also doesn't work)
drewp@bigasterisk.com
parents:
diff
changeset
|
1 proc printf(frmt: cstring) {.varargs, importc, header: "<stdio.h>", cdecl.} |
17ff9322328b
an attempt as ESP-IDF build (doesn't work) calling a nim-generated main function (also doesn't work)
drewp@bigasterisk.com
parents:
diff
changeset
|
2 proc exit(code: int) {.importc, header: "<stdlib.h>", cdecl.} |
17ff9322328b
an attempt as ESP-IDF build (doesn't work) calling a nim-generated main function (also doesn't work)
drewp@bigasterisk.com
parents:
diff
changeset
|
3 |
17ff9322328b
an attempt as ESP-IDF build (doesn't work) calling a nim-generated main function (also doesn't work)
drewp@bigasterisk.com
parents:
diff
changeset
|
4 {.push stack_trace: off, profiler:off.} |
17ff9322328b
an attempt as ESP-IDF build (doesn't work) calling a nim-generated main function (also doesn't work)
drewp@bigasterisk.com
parents:
diff
changeset
|
5 |
17ff9322328b
an attempt as ESP-IDF build (doesn't work) calling a nim-generated main function (also doesn't work)
drewp@bigasterisk.com
parents:
diff
changeset
|
6 proc rawoutput(s: string) = |
17ff9322328b
an attempt as ESP-IDF build (doesn't work) calling a nim-generated main function (also doesn't work)
drewp@bigasterisk.com
parents:
diff
changeset
|
7 printf("%s\n", s) |
17ff9322328b
an attempt as ESP-IDF build (doesn't work) calling a nim-generated main function (also doesn't work)
drewp@bigasterisk.com
parents:
diff
changeset
|
8 |
17ff9322328b
an attempt as ESP-IDF build (doesn't work) calling a nim-generated main function (also doesn't work)
drewp@bigasterisk.com
parents:
diff
changeset
|
9 proc panic(s: string) = |
17ff9322328b
an attempt as ESP-IDF build (doesn't work) calling a nim-generated main function (also doesn't work)
drewp@bigasterisk.com
parents:
diff
changeset
|
10 rawoutput(s) |
17ff9322328b
an attempt as ESP-IDF build (doesn't work) calling a nim-generated main function (also doesn't work)
drewp@bigasterisk.com
parents:
diff
changeset
|
11 exit(1) |
17ff9322328b
an attempt as ESP-IDF build (doesn't work) calling a nim-generated main function (also doesn't work)
drewp@bigasterisk.com
parents:
diff
changeset
|
12 |
17ff9322328b
an attempt as ESP-IDF build (doesn't work) calling a nim-generated main function (also doesn't work)
drewp@bigasterisk.com
parents:
diff
changeset
|
13 {.pop.} |