Senin, 17 Maret 2008

ImageCraft V7 Symbol Importing for MSP430static

by Travis Goodspeed <travis at utk.edu>
at the Extreme Measurement Communications Center
of the Oak Ridge National Laboratory

I just committed r38 of msp430static which adds support for importing symbols from ImageCraft V7 for MSP430. A short example follows.

I'll use the following C code, but any will suffice.
void main(){
int x=0xFFFF;
x+=1;
x+=0xFFFF;
x+=abs(5);
}
Compiling it yields many files. The two of interest are FOO.hex and FOO.mp. The former is imported by converting it to msp430-elf and dumping the resulting ELF file.
karen% msp430-objcopy -I ihex -O elf32-msp430  FOO.hex foo.exe
karen% msp430-objdump -D foo.exe | m4s init
karen%
Symbols are then imported with the .symbols.import.ic7 macro.
karen% m4s .symbols.import.ic7 <FOO.mp
karen%

At this point, msp430static knows the name of every function in my image. Here is the callgraph of my program above.


Note that my examples are in Linux. ICC 7 works perfectly as both an IDE and compiler under Wine.

Tidak ada komentar:

Posting Komentar

Meraih Jackpot Besar: Strategi dan Tips Bermain Slot dengan Agen Slot Gacor

  Meraih Jackpot Besar: Strategi dan Tips Bermain Slot dengan Agen Slot Gacor Halo, para pecinta judi online! Apakah Anda sedang mencari car...