summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--digital/avr/modules/flash/flash.avr.c2
-rw-r--r--digital/avr/modules/trace/trace.c4
-rw-r--r--digital/io/src/move_cb.c3
-rw-r--r--digital/io/src/trace.trc1
-rw-r--r--tools/trace/tinter/thost.py4
5 files changed, 9 insertions, 5 deletions
diff --git a/digital/avr/modules/flash/flash.avr.c b/digital/avr/modules/flash/flash.avr.c
index 7b563bc6..872b727c 100644
--- a/digital/avr/modules/flash/flash.avr.c
+++ b/digital/avr/modules/flash/flash.avr.c
@@ -28,7 +28,7 @@
#include "modules/utils/utils.h"
#define FLASH_LOG_PAGE_SIZE 0x80000
-#define FLASH_LOG_BUFFER_SIZE 128
+#define FLASH_LOG_BUFFER_SIZE 16
/** Flash access.
* The flash contains an address of 21 bits in a range from 0x0-0x1fffff.
diff --git a/digital/avr/modules/trace/trace.c b/digital/avr/modules/trace/trace.c
index 37288ee1..9de43e35 100644
--- a/digital/avr/modules/trace/trace.c
+++ b/digital/avr/modules/trace/trace.c
@@ -42,7 +42,7 @@ struct trace_t
/** Flash status. */
trace_status_t status;
/** Flash start address */
- const uint32_t addr_start;
+ uint32_t addr_start;
/** Flash address. */
uint32_t addr;
};
@@ -122,7 +122,7 @@ trace_init (void)
}
new_trace_val ++;
proto_send1b ('v', new_trace_val);
- *((uint32_t*) &trace_global.addr_start) = new_trace_addr;
+ trace_global.addr_start = new_trace_addr;
/* Store the trace val. */
flash_write (new_trace_addr, new_trace_val);
diff --git a/digital/io/src/move_cb.c b/digital/io/src/move_cb.c
index 03b32731..ae8b14ef 100644
--- a/digital/io/src/move_cb.c
+++ b/digital/io/src/move_cb.c
@@ -31,11 +31,13 @@
#include "move.h"
#include "sharp.h"
#include "aquajim.h"
+#include "trace_event.h"
#include "main.h" /* main_post_event_for_top_fsm */
#include "modules/math/fixed/fixed.h" /* fixed_* */
#include "modules/path/path.h"
#include "modules/utils/utils.h"
+#include "modules/trace/trace.h"
#include "debug.host.h"
@@ -125,6 +127,7 @@ move_get_next_position (move_position_t *dst)
/* Give the current position of the bot to the path module */
path_endpoints (current_pos.x, current_pos.y,
move_data.final.x, move_data.final.y);
+ TRACE (TRACE_MOVE__PATH_UPDATE);
/* Update the path module */
path_update ();
diff --git a/digital/io/src/trace.trc b/digital/io/src/trace.trc
index f1f8753b..aa556602 100644
--- a/digital/io/src/trace.trc
+++ b/digital/io/src/trace.trc
@@ -4,3 +4,4 @@ EVENT asserv__last_status_ack seq 1 status 1 "Asserv[0x%02x]: status: %x."
EVENT main_timer__late "MainTimer: we are late."
EVENT fsm__handle_event fsm 1 event 1 "FSM[%c]: handle event %i."
EVENT fsm__handle_timeout fsm 1 "FSM[%c]: handle timeout."
+EVENT move__path_update "Path: update."
diff --git a/tools/trace/tinter/thost.py b/tools/trace/tinter/thost.py
index cdaef554..b5c43c0f 100644
--- a/tools/trace/tinter/thost.py
+++ b/tools/trace/tinter/thost.py
@@ -6,7 +6,7 @@ from utils import *
FLASH_MEMORY_HIGH = 0x1fffff
FLASH_PAGE = 0x80000
-FLASH_BUFFER_SIZE = 128
+FLASH_BUFFER_SIZE = 16
FLASH_CMD_INIT = 0
FLASH_CMD_READ = 1
@@ -64,7 +64,7 @@ class THost:
i -= FLASH_PAGE
start_addr = i
- end_addr = start_addr + FLASH_PAGE
+ end_addr = start_addr + 100 * 16
print "Dump memory from address : " + hex(start_addr) + " to " + \
hex(end_addr)