From 611e358ad94d5e05a2f20a78690671423439fac3 Mon Sep 17 00:00:00 2001 From: harald42 Date: Tue, 4 Jun 2013 11:28:42 +0200 Subject: [PATCH] add BOOTLOADER_GET_MAC --- platform/osd-merkur/Makefile.osd-merkur | 6 ++++++ platform/osd-merkur/params.c | 9 +++++++++ platform/osd-merkur/params.h | 6 ++++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/platform/osd-merkur/Makefile.osd-merkur b/platform/osd-merkur/Makefile.osd-merkur index 3c97ed6cb..fd3a75b36 100644 --- a/platform/osd-merkur/Makefile.osd-merkur +++ b/platform/osd-merkur/Makefile.osd-merkur @@ -43,6 +43,12 @@ AVRDUDE_PORT=usb:00B000000D79 # Verify off AVRDUDE_OPTIONS=-V +#debug +# CFLAGS += -save-temps +# Bootloader bonsai +# LDFLAGS += -save-temps +LDFLAGS += -Wl,--defsym,bootloader_get_mac=0x0001f3a0 + include $(CONTIKIAVR)/Makefile.avr include $(CONTIKIAVR)/radio/Makefile.radio diff --git a/platform/osd-merkur/params.c b/platform/osd-merkur/params.c index aadbb83c4..a5a83932a 100644 --- a/platform/osd-merkur/params.c +++ b/platform/osd-merkur/params.c @@ -84,6 +84,9 @@ const uint8_t default_domain_name[] PROGMEM = PARAMS_DOMAINNAME; #if PARAMETER_STORAGE==0 /* 0 Hard coded, minmal program and eeprom usage. */ + +extern uint8_t bootloader_get_mac(uint8_t); + uint8_t params_get_eui64(uint8_t *eui64) { #if CONTIKI_CONF_RANDOM_MAC @@ -92,7 +95,13 @@ params_get_eui64(uint8_t *eui64) { return 1; #else uint8_t i; +#if BOOTLOADER_GET_MAC + for (i=0;i