diff options
| author | 2019-04-13 12:40:52 -0400 | |
|---|---|---|
| committer | 2019-04-13 12:40:52 -0400 | |
| commit | 55bfff7cf6541caac172b43186cf14405185b14d (patch) | |
| tree | c1ae99d2b39f8df8933d81ec2e61e81050bdb410 /frontends/calculator/CEdev/examples/debugging | |
| parent | 761462861fc1228e65546c4e0f877d5212320082 (diff) | |
| download | cetris-55bfff7cf6541caac172b43186cf14405185b14d.tar.gz cetris-55bfff7cf6541caac172b43186cf14405185b14d.tar.bz2 cetris-55bfff7cf6541caac172b43186cf14405185b14d.zip | |
fix curses on linux
Diffstat (limited to 'frontends/calculator/CEdev/examples/debugging')
4 files changed, 110 insertions, 110 deletions
diff --git a/frontends/calculator/CEdev/examples/debugging/bin/DEMO.map b/frontends/calculator/CEdev/examples/debugging/bin/DEMO.map index 4462134..ec5a9cf 100644 --- a/frontends/calculator/CEdev/examples/debugging/bin/DEMO.map +++ b/frontends/calculator/CEdev/examples/debugging/bin/DEMO.map @@ -1,35 +1,35 @@ -Segment Base Top High Length --------- ------ ------ ------ ------- -icon D1A882 D1A882 0h -launcher D1A882 D1A882 0h -libs D1A882 D1A882 0h -startup D1A882 D1A8C1 3Fh -cleanup D1A8C1 D1A8D5 14h -exit D1A8D5 D1A8DB 6h -code D1A8DB D1A9D6 FBh -data D1A9D6 D1A9D6 0h -strsect D1A9D6 D1AA7B A5h -text D1AA7B D1AA7B 0h -bss D031F6 D031F6 D13FD6 0h -header D1A87F D1A882 3h - -Label Value -------------------------- ------ -_os_DisableHomeTextBuffer = D1A8DB -_os_EnableHomeTextBuffer = D1A8ED -_dbg_Debugger = D1A8FF -_dbg_RemoveAllBreakpoints = D1A905 -_dbg_RemoveWatchpoint = D1A90B -_dbg_SetWatchpoint = D1A915 -_dbg_RemoveAllWatchpoints = D1A921 -_dbg_SetWriteWatchpoint = D1A927 -_abort = D1A933 -_sprintf = 0000BC -__ccleanup = D1A8C1 -_errno = D008DC -_init = D1A882 -_exit = D1A8D7 -__exit = D1A8B0 -__exitsp = D1A8B0 -__errsp = D1A8B0 -_main = D1A93C +Segment Base Top High Length
+-------- ------ ------ ------ -------
+icon D1A882 D1A882 0h
+launcher D1A882 D1A882 0h
+libs D1A882 D1A882 0h
+startup D1A882 D1A8C1 3Fh
+cleanup D1A8C1 D1A8D5 14h
+exit D1A8D5 D1A8DB 6h
+code D1A8DB D1A9D6 FBh
+data D1A9D6 D1A9D6 0h
+strsect D1A9D6 D1AA7B A5h
+text D1AA7B D1AA7B 0h
+bss D031F6 D031F6 D13FD6 0h
+header D1A87F D1A882 3h
+
+Label Value
+------------------------- ------
+_os_DisableHomeTextBuffer = D1A8DB
+_os_EnableHomeTextBuffer = D1A8ED
+_dbg_Debugger = D1A8FF
+_dbg_RemoveAllBreakpoints = D1A905
+_dbg_RemoveWatchpoint = D1A90B
+_dbg_SetWatchpoint = D1A915
+_dbg_RemoveAllWatchpoints = D1A921
+_dbg_SetWriteWatchpoint = D1A927
+_abort = D1A933
+_sprintf = 0000BC
+__ccleanup = D1A8C1
+_errno = D008DC
+_init = D1A882
+_exit = D1A8D7
+__exit = D1A8B0
+__exitsp = D1A8B0
+__errsp = D1A8B0
+_main = D1A93C
diff --git a/frontends/calculator/CEdev/examples/debugging/makefile b/frontends/calculator/CEdev/examples/debugging/makefile index 3ea542a..8617bbc 100644 --- a/frontends/calculator/CEdev/examples/debugging/makefile +++ b/frontends/calculator/CEdev/examples/debugging/makefile @@ -1,18 +1,18 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -# This is just so the main makefile in $CEDEV/examples makes this one be like "make debug" -.DEFAULT_GOAL := debug - -include $(CEDEV)/include/.makefile +# ----------------------------
+# Set NAME to the program name
+# Set ICON to the png icon file name
+# Set DESCRIPTION to display within a compatible shell
+# Set COMPRESSED to "YES" to create a compressed program
+# ----------------------------
+
+NAME ?= DEMO
+COMPRESSED ?= NO
+ICON ?= iconc.png
+DESCRIPTION ?= "C SDK Demo"
+
+# ----------------------------
+
+# This is just so the main makefile in $CEDEV/examples makes this one be like "make debug"
+.DEFAULT_GOAL := debug
+
+include $(CEDEV)/include/.makefile
diff --git a/frontends/calculator/CEdev/examples/debugging/readme.md b/frontends/calculator/CEdev/examples/debugging/readme.md index 9d95f90..47c916a 100644 --- a/frontends/calculator/CEdev/examples/debugging/readme.md +++ b/frontends/calculator/CEdev/examples/debugging/readme.md @@ -1,10 +1,10 @@ -### Debugging Demo - -This demo demonstrates how to use a few of the debugging features implemented in CEmu - - - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### Debugging Demo
+
+This demo demonstrates how to use a few of the debugging features implemented in CEmu
+
+
+
+---
+
+This demo is a part of the C SDK Toolchain for use on the CE.
+
diff --git a/frontends/calculator/CEdev/examples/debugging/src/main.c b/frontends/calculator/CEdev/examples/debugging/src/main.c index 67b5bac..0972efd 100644 --- a/frontends/calculator/CEdev/examples/debugging/src/main.c +++ b/frontends/calculator/CEdev/examples/debugging/src/main.c @@ -1,47 +1,47 @@ -#include <stdbool.h> -#include <stddef.h> -#include <stdint.h> -#include <tice.h> - -#include <assert.h> -#include <debug.h> - -/* - * Even though debug.h has prototypes for Debugger, SetWriteWatchpoint, SetWatchpoint, RemoveWatchpoint, RemoveAllWatchpoints, RemoveAllBreakpoints... - * you have to use the dbg_ prefix as shown here: - */ - -void main(void) { - /* Set the intial value of some variables */ - int dbg_test_var_1 = 10; - uint8_t dbg_test_var_2 = 3; - - /* Print a simple debugging string */ - dbg_sprintf(dbgout, "This is the start of a CEmu debugging test\n"); - - /* You can enter the debugger manually */ - dbg_Debugger(); - - /* Set a watchpoint that will break anytime we write/change this variable */ - dbg_SetWriteWatchpoint(&dbg_test_var_1, sizeof dbg_test_var_1); - - /* Set a non breaking watchpoint just so we can see what is in this variable at any given time */ - dbg_SetWatchpoint(&dbg_test_var_2, sizeof dbg_test_var_2); - - /* Now, let's write to the variable to see what happens (Go to the 'Watchpoints' tab in CEmu to view the status) */ - dbg_test_var_1 = 5; - - /* Remove the watchpoint that we had set */ - dbg_RemoveWatchpoint(&dbg_test_var_1); - dbg_RemoveWatchpoint(&dbg_test_var_2); - - /* We can also use those */ - dbg_RemoveAllWatchpoints(); - dbg_RemoveAllBreakpoints(); - - /* Set this value to zero */ - dbg_test_var_2 = 0; - - /* Fail this assertion */ - assert(dbg_test_var_2); -} +#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <tice.h>
+
+#include <assert.h>
+#include <debug.h>
+
+/*
+ * Even though debug.h has prototypes for Debugger, SetWriteWatchpoint, SetWatchpoint, RemoveWatchpoint, RemoveAllWatchpoints, RemoveAllBreakpoints...
+ * you have to use the dbg_ prefix as shown here:
+ */
+
+void main(void) {
+ /* Set the intial value of some variables */
+ int dbg_test_var_1 = 10;
+ uint8_t dbg_test_var_2 = 3;
+
+ /* Print a simple debugging string */
+ dbg_sprintf(dbgout, "This is the start of a CEmu debugging test\n");
+
+ /* You can enter the debugger manually */
+ dbg_Debugger();
+
+ /* Set a watchpoint that will break anytime we write/change this variable */
+ dbg_SetWriteWatchpoint(&dbg_test_var_1, sizeof dbg_test_var_1);
+
+ /* Set a non breaking watchpoint just so we can see what is in this variable at any given time */
+ dbg_SetWatchpoint(&dbg_test_var_2, sizeof dbg_test_var_2);
+
+ /* Now, let's write to the variable to see what happens (Go to the 'Watchpoints' tab in CEmu to view the status) */
+ dbg_test_var_1 = 5;
+
+ /* Remove the watchpoint that we had set */
+ dbg_RemoveWatchpoint(&dbg_test_var_1);
+ dbg_RemoveWatchpoint(&dbg_test_var_2);
+
+ /* We can also use those */
+ dbg_RemoveAllWatchpoints();
+ dbg_RemoveAllBreakpoints();
+
+ /* Set this value to zero */
+ dbg_test_var_2 = 0;
+
+ /* Fail this assertion */
+ assert(dbg_test_var_2);
+}
|