Bizarre symbol names from pst.dat in Simple
DavidZemon
Posts: 2,973
I'm adding support for .dat files to PropWare (this will allow use of FDSerial from PropWare projects). The line that copies pst.dat to pst.dat.o looks like:
Unfortunately, that yields some very ugly symbols in pst.dat.o, as propeller-elf-nm shows:
Is there an easy way to fix this? How does SimpleIDE do this?
David
/opt/parallax/bin/propeller-elf-objcopy -O elf32-propeller -I binary -B propeller /home/david/External/Kits/Embedded/Parallax/Library/PropWare/simple/pst.dat CMakeFiles/Simple_cog.dir/__/pst.dat.oWhich seems to match up pretty well with line 66 of a file in propgcc.
Unfortunately, that yields some very ugly symbols in pst.dat.o, as propeller-elf-nm shows:
pst.dat.o: 00000150 D _binary__home_david_External_Kits_Embedded_Parallax_Library_PropWare_simple_pst_dat_end 00000150 A _binary__home_david_External_Kits_Embedded_Parallax_Library_PropWare_simple_pst_dat_size 00000000 D _binary__home_david_External_Kits_Embedded_Parallax_Library_PropWare_simple_pst_dat_start
Is there an easy way to fix this? How does SimpleIDE do this?
David
Comments
Make a simpleide project and find out.
Thanks for the tips. I should be able to figure out something from here.
@David Betz:
Unfortunately that's not an option (it'd require some serious hacking). I'm using CMake for this and therefore don't have control over the directory.
I agree - there really ought to be. But... that won't be good at all for me. I'm going to need the path name in there. I compile this object once for each memory model and the path will be the easiest way for me to determine the current model. I'm going to end up writing a script that parses the nm output.
I could more quickly hard code the options for this file - but this needs to be a template for any dat file, not just pst.dat
Ha ha :P oh yes. Your Makefiles in propgcc have been a huge help though. PropWare would not have gotten started without them as templates.
I most definitely had the syntax wrong. That explains everything. I'm not touching it now though; having the Python script copy the file to a temp directory turned out to be waayy easier than the three step process of: run objcopy, examine output with nm, run objcopy again.