OK - I completely agree that it has no sense to try to access all the symbols, but if you read the bottom of the topic, you will see a "semi-automatic" solution to create a symbol table from the project source files thanks to a script executed at compile time. This script seems to create a new C file containing a structure with all the interesting symbols.
Based on this, I have tried to add a Pre-Build step in my project with commands lines like these ones:
nm $@ | awk 'BEGIN{ print "#include <stdio.h>"; print "#include \"reflect.h\""; print "struct sym_table_t gbl_sym_table[]={" }
{ if(NF==3){print "{\"" $$3 "\", (void*)0x" $$1 "},"}} END{print "{NULL,NULL} };"}' > .reflect.real.c gcc -c .reflect.real.c -o .reflect.real.o gcc -o $@ $^ .reflect.real.o
I get errors, because LPCxpresso is not able to find the "nm" utility...
Do you know how it would be possible to create this "reflect.c" file in an LPCxpresso Pre-Build step ?
Thank you,
Michel