-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev -> Master Release 10
- Loading branch information
Showing
235 changed files
with
6,208 additions
and
115,987 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# | ||
# This is very much a work in progress to show how we can use macros to make the | ||
# GDB interface a lot more useable. For example the next / step commands only | ||
# work if the stepper doesn't leave the current scope. Beyond that you have a | ||
# single hardware breakpoint which can be used as an hb or a wa. You have to | ||
# remember to delete the previous one, so the br macro does this for you. | ||
# | ||
file app/.output/eagle/debug/image/eagle.app.v6.out | ||
#set remotedebug 1 | ||
set remotelogfile gdb_rsp_logfile.txt | ||
set serial baud 115200 | ||
set remote hardware-breakpoint-limit 1 | ||
set remote hardware-watchpoint-limit 1 | ||
#set debug xtensa 4 | ||
target remote /dev/ttyUSB0 | ||
|
||
set confirm off | ||
set print null-stop | ||
define br | ||
d | ||
hb $arg0 | ||
end | ||
|
||
define upto | ||
d | ||
hb $arg0 | ||
c | ||
end | ||
|
||
set pagination off | ||
set history filename ~/.gdb_history | ||
set history save on | ||
set history size 1000 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
|
||
set pagination off | ||
set print null-stop | ||
|
||
define prTS | ||
set $o = &(((TString *)($arg0))->tsv) | ||
printf "Common header: next = %p, marked = 0x%01x\n", $o->next, $o->marked | ||
printf "String: hash = 0x%08x, len = %u : %s\n", $o->hash, $o->len, (char *)(&$o[1]) | ||
end | ||
|
||
define prTnodes | ||
set $o = (Table *)($arg0) | ||
set $n = 1<<($o->lsizenode) | ||
set $i = 0 | ||
while $i < $n | ||
set $nd = ($o->node) + $i | ||
if $nd->i_key.nk.tt && $nd->i_val.tt | ||
if $nd->i_key.nk.tt == 6 | ||
printf "%4u: %s %2i\n", $i, $nd->i_key.nk.tt , $nd->i_val.tt | ||
else | ||
printf "%4u: %2i %2i\n", $i, $nd->i_key.nk.tt , $nd->i_val.tt | ||
end | ||
end | ||
set $i = $i +1 | ||
end | ||
end | ||
define prTV | ||
if $arg0 | ||
set $type = ($arg0).tt | ||
set $val = ($arg0).value | ||
|
||
if $type == 0 | ||
# NIL | ||
printf "Nil\n" | ||
end | ||
if $type == 1 | ||
# Boolean | ||
printf "Boolean: %u\n", $val.n | ||
end | ||
if $type == 2 | ||
# ROTable | ||
printf "ROTable: %p\n", $val.p | ||
end | ||
if $type == 3 | ||
# Light Function | ||
printf "Light Func: %p\n", $val.p | ||
end | ||
if $type == 4 | ||
# Light User Data | ||
printf "Light Udata: %p\n", $val.p | ||
end | ||
if $type == 5 | ||
# Number | ||
printf "Number: %u\n", $val.n | ||
end | ||
if $type == 6 | ||
prTS $arg0 | ||
end | ||
if $type == 7 | ||
# Table | ||
set $o = &($val->gc.h) | ||
printf "Common header: next = %p, marked = 0x%01x\n", $o->next, $o->marked | ||
printf "Nodes: %4i %p\n", 2<<($o->lsizenode), $o->node | ||
printf "Arry: %4i %p\n", $o->sizearray, $o->array | ||
end | ||
if $type == 8 | ||
# Function | ||
set $o = &($val->gc.cl.c) | ||
printf "Common header: next = %p, marked = 0x%01x\n", $o->next, $o->marked | ||
if $o->isC == 0 | ||
set $o = &($val->gc.cl.l) | ||
printf "LClosure: nupvalues = %u, gclist = %p, env = %p, p = %p\n", \ | ||
$o->nupvalues, $o->gclist, $o->env, $o->p | ||
else | ||
printf "CClosure: nupvalues = %u, gclist = %p, env = %p, f = %p\np", \ | ||
$o->nupvalues, $o->gclist, $o->env, $o->f | ||
end | ||
end | ||
if $type == 9 | ||
# UserData | ||
end | ||
if $type == 10 | ||
# Thread | ||
end | ||
end | ||
end | ||
|
||
define prT | ||
print *(Table*)($arg0) | ||
end | ||
|
||
define prL | ||
if L > 0 | ||
printf " stack: %u\n", L->top-L->base | ||
printf " hooking: %u, %u, %u, %u, %p\n", L->hookmask, L->allowhook, L->basehookcount, L->hookcount, L->hook | ||
end | ||
end | ||
|
||
define dumpstrt | ||
set $st = $arg0 | ||
set $i = 0 | ||
while $i< $st->size | ||
set $o = &(((TString *)($st->hash[$i]))->tsv) | ||
while $o | ||
if $o->next | ||
printf "Slot: %5i %p %p %08x %02x %4u", \ | ||
$i, $o, $o->next, $o->hash, $o->marked, $o->len | ||
else | ||
printf "Slot: %5i %p %08x %02x %4u", \ | ||
$i, $o, $o->hash, $o->marked, $o->len | ||
end | ||
if $o->marked & 0x80 | ||
printf "* %s\n", *(char **)($o+1) | ||
else | ||
printf " %s\n", (char *)($o+1) | ||
end | ||
set $o = &(((TString *)($o->next))->tsv) | ||
end | ||
set $i = $i + 1 | ||
end | ||
end | ||
|
||
define dumpRAMstrt | ||
dumpstrt &(L->l_G->strt) | ||
end | ||
|
||
define dumpROstrt | ||
dumpstrt &(L->l_G->ROstrt) | ||
end | ||
|
||
define graylist | ||
set $n = $arg0 | ||
while $n | ||
printf "%p %2u %02X\n",$n, $n->gch.tt, $n->gch.marked | ||
set $n=$n->gch.next | ||
end | ||
end | ||
|
||
define prPC | ||
printf "Excuting instruction %i: %08x\n", (pc - cl->p->code)+1-1, i | ||
end | ||
|
||
|
||
define where | ||
set $f=cl->p | ||
printf "<%s:%u,%u>, opcode %u\n",\ | ||
(char *)$f->source+17, $f->linedefined, $f->lastlinedefined, pc - $f->code | ||
end | ||
|
||
define callinfo | ||
printf "%p: ", L->ci | ||
print *L->ci | ||
end | ||
|
||
define luastack | ||
set $i = 0 | ||
set $ci = L->base_ci | ||
set $s = L->stack | ||
set $last = L->stack_last - L->stack | ||
printf "stack = %p, last: %i, size: %i, " , $s, $last, L->stacksize | ||
if $last+6==L->stacksize | ||
printf "(OK)\n" | ||
else | ||
printf "(MISMATCH)\n" | ||
end | ||
printf " Ndx top base func\n" | ||
while $ci <= L->ci | ||
printf "%3u %6i %6i %6i\n", $i++, $ci->top-$s, $ci->base-$s, ($ci++)->func-$s | ||
end | ||
end | ||
|
||
define stacklen | ||
printf "%i top: %p, base: %p\n", \ | ||
L->ci->top - L->base, L->ci->top, L->base | ||
end | ||
|
||
define stackcheck | ||
set $ci = L->ci | ||
printf "Used: %i, Headroom: %i, Total: %i\n", \ | ||
L->top-$ci->base-1, $ci->top-L->top+1, $ci->top-$ci->base | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
sdk/ | ||
cache/ | ||
.ccache/ | ||
local/ | ||
luac.cross | ||
user_config.h | ||
server-ca.crt | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "app/u8g2lib/u8g2"] | ||
path = app/u8g2lib/u8g2 | ||
url = https://github.com/olikraus/U8g2_Arduino.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.