fixes in mb851 and stm32w108: erroneous linking with mpu.o, conf file,

more printouts in main when ipv6 is used, and a target for memory
profiling taking stm's gnu.ld static stack size into account
This commit is contained in:
simonduq 2012-03-27 11:34:23 +02:00
parent 5240519dd9
commit 930c7c25bc
3 changed files with 48 additions and 7 deletions

View File

@ -23,7 +23,7 @@ CONTIKI_CPU_DIRS = . dev hal simplemac hal/micro/cortexm3 hal/micro/cortexm3/stm
STM32W_C = leds-arch.c leds.c clock.c watchdog.c uart1.c uart1-putchar.c slip_uart1.c slip.c\
stm32w-radio.c stm32w_systick.c uip_arch.c rtimer-arch.c adc.c micro.c sleep.c \
micro-common.c micro-common-internal.c clocks.c mfg-token.c nvm.c flash.c rand.c system-timer.c mpu.c
micro-common.c micro-common-internal.c clocks.c mfg-token.c nvm.c flash.c rand.c system-timer.c
STM32W_S = spmr.s79 context-switch.s79
@ -297,3 +297,12 @@ else
login:
$(SERIALDUMP) -b115200 -d10000 $(USBDEVPREFIX)$(firstword $(MOTES))
endif
# a target that gives a user-friendly memory profile, taking into account the RAM
# that is statically occupied by the stack as defined in cpu/stm32w108/gnu.ld
RAM_SIZE = 8192
FLASH_SIZE = 128*1024
STACK_SIZE = 1280
%.size: %.$(TARGET)
@size -A $< | egrep "data|bss" | awk '{s+=$$2} END {s=s+$(STACK_SIZE); f=$(RAM_SIZE)-s; printf "[RAM] used %6d, free %6d\n",s,f;}'
@size -A $< | egrep "text|isr_vector" | awk '{s+=$$2} END {f=$(FLASH_SIZE)-s; printf "[Flash] used %6d, free %6d\n",s,f;}'

View File

@ -129,11 +129,16 @@
#define UIP_CONF_MAX_LISTENPORTS 8
#define UIP_CONF_UDP_CONNS 4
#include "net/sicslowpan.h"
#define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_CONF_COMPRESSION_HC06
#define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06
#ifndef SICSLOWPAN_CONF_FRAG
#define SICSLOWPAN_CONF_FRAG 1
#endif /* SICSLOWPAN_CONF_FRAG */
#ifndef SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS
#define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2
#endif /* SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS */
#ifndef SICSLOWPAN_CONF_MAXAGE
#define SICSLOWPAN_CONF_MAXAGE 2
#endif /* SICSLOWPAN_CONF_MAXAGE */
#else /* WITH_UIP6 */

View File

@ -68,6 +68,9 @@
#include "net/rime/rime-udp.h"
#include "net/uip.h"
#if WITH_UIP6
#include "net/uip-ds6.h"
#endif /* WITH_UIP6 */
#define DEBUG 1
#if DEBUG
@ -100,8 +103,6 @@ set_rime_addr(void)
uint8_t u8[8];
}eui64;
//rimeaddr_t lladdr;
int8u *stm32w_eui64 = ST_RadioGetEui64();
{
int8u c;
@ -186,6 +187,32 @@ main(void)
autostart_start(autostart_processes);
printf("Tentative link-local IPv6 address ");
{
uip_ds6_addr_t *lladdr;
int i;
lladdr = uip_ds6_get_link_local(-1);
for(i = 0; i < 7; ++i) {
printf("%02x%02x:", lladdr->ipaddr.u8[i * 2],
lladdr->ipaddr.u8[i * 2 + 1]);
}
printf("%02x%02x\n", lladdr->ipaddr.u8[14], lladdr->ipaddr.u8[15]);
}
if(!UIP_CONF_IPV6_RPL) {
uip_ipaddr_t ipaddr;
int i;
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_TENTATIVE);
printf("Tentative global IPv6 address ");
for(i = 0; i < 7; ++i) {
printf("%02x%02x:",
ipaddr.u8[i * 2], ipaddr.u8[i * 2 + 1]);
}
printf("%02x%02x\n",
ipaddr.u8[7 * 2], ipaddr.u8[7 * 2 + 1]);
}
watchdog_start();
@ -262,11 +289,11 @@ void UsageFault_Handler(){
errcode = 7;
//leds_on(LEDS_RED);
//halReboot();
}*/
}
void Default_Handler()
{
//errcode = 8;
leds_on(LEDS_RED);
halReboot();
}
}*/