mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
14 lines
583 B
Bash
Executable File
14 lines
583 B
Bash
Executable File
#!/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
|