IRC logs for #openrisc Monday, 2012-12-24

olofkI need a component that parses an or1k ELF file and gives me the memory contents. Where should I look?00:39
olofkI could use objdump or objcopy (never learn which is which tool), but I would prefer to have it as a library function00:40
olofkI tried to rip it out from or1ksim too, but it was more integrated in the code than I had hoped for00:40
olofk_franck_: A GDB question, in the current version, GDB refuses to read SPRs that aren't defined in the GDB code. Will the XML stuff fix that?00:52
blueCmdolofk: it's probably objcopy -O binary input.elf output.bin you want to emulate then01:23
olofkYeah, I figured that out by looking at some makefile. I'll probably do a first version that calls it directly01:24
blueCmdsorry, don't know any libraries but you might want to look at objcopy - it shouldn't be that hard to parse the ELF header and find the correct section I would think.01:24
blueCmdolofk: sounds like a good idea01:24
olofkThe GNU toolchain seems to be notoriously bad at providing libraries for their tools01:25
blueCmdhm perhaps bfd contains what you're after. all binutils share things via "binary file descriptor"-thing. it seems that there is a thing called libbfd01:26
olofkHmm.. that could be worth a look01:26
olofkHey, it's Christmas eve here now. Merry christmas to everyone in the GMT+[1:] timezones who celebrate christmas eve01:29
olofkAll you others will have to wait01:29
blueCmdolofk: indeed, merry xmas to you too!01:36
* blueCmd chuckled at the 1:01:36
olofkOh well. Time for bed. orpsocv3's elf loader will have to wait another day01:46
_franck_olofk: for new SPR, on GDB side, you won't change anything.10:23
_franck_but you would have to recompile your GDB server (because the XML file doesn't know the new SPR address)10:24
_franck_I'm thinking of adding a TCL command to openocd to add SPR register definition at run time10:25
_franck_for now, the XML is generated dynamicaly from the openocd register list. So adding a register a run time will do the trick10:26
olofkWhat's the syntax for adding a register? Still a bit green on the openocd side11:23
_franck_well for now, on the current openocd version there is no such a feature11:31
olofkah..11:34
olofkI noticed the problem when I tried to add support for the version registers in the new arch spec11:35
_franck_however, you can use openocd "readspr" command from the telnet console11:42
_franck_see or1k.c11:43
olofkHmm.. IIRC correctly, readspr refused to read registers that weren't defined. Is that changed?11:44
_franck_don't know never used or looked at the code11:44
_franck_a quick look at the code let me think if it's not in the reglist it read it from the hardware11:45
olofkI have to investigate that again11:45
olofkStupid C question... what's the best way to call an external program? I want to call or1k-elf-objcopy to convert a elf to a bin13:35
jeremybennettolofk: How do you mean - from within another program?13:43
jeremybennettYou can use the system(3) call. But it sounds more like you should be linking in the BFD library and using the API directly.13:44
olofkjeremybennett: Yes, using the API directly would be better in the long run, but I'm doing a quick and dirty fix now so that I can do a proper release13:53
olofkIt would actually be nice in a way to avoid using both BFD and objcopy directly, since that would be the only dependency on the toolchain13:54
jeremybennettOK - use the system(3) call. If you want to convert between file formats, you are going to have to use something that knows about the file formats, so you are stuck with the tool chain one way or another!13:55
olofkYes, the alternative would be to include a static copy of something, but that has it's own set of problems13:56
olofkjeremybennett: Are you planning to go the dvclub thing? It seemed to be right up your alley13:56
jeremybennettYes we are heavily involved with both Wilson Snyder and Atmel.14:02
jeremybennettI hope it will encourage more people to pay for commercial Verilator support.14:02
olofkIndeed14:02
jeremybennettYou may have noticed my name on one or two recent Verilator patches. It has been my main piece of work this year.14:03
olofkAhh.. I knew that you were interested in verilator, but I didn't know you were an actibe contributor14:03
olofkI'm thinking of taking a trip over there. Looks like a good place to meet some interesting people. I saw that people from TVS will be there too. I remember you talked about them during my orpsoc presentation14:05
olofkIt turns out to be completely impossible to google for TVS. :)14:07
olofkIs this the right TVS? http://testandverification.com/14:09
olofkI had to search for "tvs -tv -television -televisions" to find relevant results :)14:09
jeremybennettthat's them14:09
olofkOh well. Time for christmas lunch with the family. Apparently that's more important than ORPSoC ;)14:11
jeremybennetthappy christmas14:12
olofkSame to you. Make sure to include checksums on all your christmas gifts to avoid packet loss14:14
jeremybennett:)14:28
stekernheh, good one14:33
stekernmerry christmas all14:34
olofkalright! orpsocv3 got an ELF loader for the RTL simulators now22:32

Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!