summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/apps
diff options
context:
space:
mode:
authorIngo Albrecht2010-03-13 22:25:47 +0100
committerIngo Albrecht2010-07-20 14:41:19 +0200
commit42984320de6b8c8f3d3bf72cd6640d743f499538 (patch)
tree55c12875fc027230345f700dcfc70e9c7bd3e2ef /src/target/firmware/apps
parentosmoload: command reorg, state machine reorg, query timeouts (diff)
downloadosmocom-42984320de6b8c8f3d3bf72cd6640d743f499538.tar.gz
osmocom-42984320de6b8c8f3d3bf72cd6640d743f499538.tar.xz
osmocom-42984320de6b8c8f3d3bf72cd6640d743f499538.zip
loader: reply dump mode. additional information in init reply.
Diffstat (limited to 'src/target/firmware/apps')
-rw-r--r--src/target/firmware/apps/loader/main.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/target/firmware/apps/loader/main.c b/src/target/firmware/apps/loader/main.c
index 8d8559e..a0baf45 100644
--- a/src/target/firmware/apps/loader/main.c
+++ b/src/target/firmware/apps/loader/main.c
@@ -109,6 +109,20 @@ loader_send_simple(uint8_t dlci, uint8_t command) {
sercomm_sendmsg(dlci, msg);
}
+extern unsigned char _start;
+
+static void
+loader_send_init(uint8_t dlci) {
+ struct msgb *msg = sercomm_alloc_msgb(1);
+ if(!msg) {
+ puts("Failed to allocate message buffer!\n");
+ }
+ msgb_put_u8(msg, LOADER_INIT);
+ msgb_put_u32(msg, 0);
+ msgb_put_u32(msg, &_start);
+ sercomm_sendmsg(dlci, msg);
+}
+
int main(void)
{
/* Always disable wdt (some platforms enable it on boot) */
@@ -138,7 +152,7 @@ int main(void)
sercomm_register_rx_cb(SC_DLCI_LOADER, &cmd_handler);
/* Notify any running osmoload about our startup */
- loader_send_simple(SC_DLCI_LOADER, LOADER_INIT);
+ loader_send_init(SC_DLCI_LOADER);
/* Wait for events */
while (1) {