mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-03 22:06:22 +00:00
14 lines
583 B
Plaintext
14 lines
583 B
Plaintext
|
#!/bin/sh
|
||
|
echo \#include '"loader/symbols.h"'
|
||
|
echo "const struct symbols symbols[] = {"
|
||
|
|
||
|
if [ -f $* ] ; then
|
||
|
msp430-nm $* | perl -ne 'print ".global $2\n$2 = 0x$1\n" if(/([0-9a-f]+) [ABDRST] (.+)$/);' | grep -v _reset_vector | grep = | perl -ne 'print "{\"$1\", (char *)$2},\n" if(/(\w+) = (\w+)/)' | sort
|
||
|
# msp430-nm $* | perl -ne 'print ".global $2\n$2 = 0x$1\n" if(/([0-9a-f]+) [ABDRST] (.+)$/);' | grep -v ^_ | grep -v _reset_vector | grep = | perl -ne 'print "{\"$1\", (char *)$2},\n" if(/(\w+) = (\w+)/)' | sort
|
||
|
status=$?
|
||
|
fi
|
||
|
|
||
|
echo "{(void *)0, 0} };"
|
||
|
|
||
|
exit $status
|