Understanding entry.s and blobs.s files - General Discussion and Assistance - CHDK Forum

Understanding entry.s and blobs.s files

  • 4 Replies
  • 2060 Views
*

srpenney

Understanding entry.s and blobs.s files
« on: 18 / September / 2008, 14:57:56 »
Advertisements
Hey folks,

I'm new to CHDK as a developer (in that I'm still reading through the source).  I've used it on my camera for a while now and it's great! 

I'm getting a little hung up finding the "start" of CHDK.  I'm fairly certain that the entry.s file in the loader folder kicks everything off.  Unfortunately I'm not quite sure how to interpret it.  I've made some educated guesses (e.g. it holds some assembly source in some cases).  I don't quite get the '.' notation and would like to know where I can find some reference on this language(?) and it's use.

Thanks,

Steve

*

Offline DataGhost

  • ****
  • 314
  • EOS 40D, S5IS
    • DataGhost.com
Re: Understanding entry.s and blobs.s files
« Reply #1 on: 18 / September / 2008, 16:00:30 »
You're going to have to read up on assembler syntax for that. Basically, the entry.s is the first thing executed and calls a C function. The blobs.s file includes binary files (INCBIN) between two labels which are used to calculate (when linking the final thing) the proper offset and filesize required to copy the program into camera memory.

You'll want to search for ARM document DUI0068, it's a nice thing to get started with ASM. As for the '.-notation', I didn't really see that covered in that document (I may be wrong) so I can't help you with that. I don't know how I learned the meaning of those directives but I just do, when I see them.

*

Online reyalp

  • ******
  • 12793
Re: Understanding entry.s and blobs.s files
« Reply #2 on: 18 / September / 2008, 16:50:48 »
You can find links to the various arm docs here Developer Technical Documents - CHDK Wiki
Don't forget what the H stands for.

*

srpenney

Re: Understanding entry.s and blobs.s files
« Reply #3 on: 19 / September / 2008, 08:22:09 »
... Basically, the entry.s is the first thing executed and calls a C function. The blobs.s file includes binary files (INCBIN) between two labels which are used to calculate (when linking the final thing) the proper offset and filesize required to copy the program into camera memory.
I was suspecting that the enrty.s file was the "start" point but what got me hung up was the fact that, for a given model (i.e. sub-folder in the loader folder) there are two entry.s files.  Each of which has a statement ".section .entry".  Of these two how is it possible to determine which one is used (or takes precedence).

You'll want to search for ARM document DUI0068, it's a nice thing to get started with ASM. As for the '.-notation', I didn't really see that covered in that document (I may be wrong) so I can't help you with that. I don't know how I learned the meaning of those directives but I just do, when I see them.
Thanks for the reference, I'll have a look at that today and familiarize myself with some of the assembler statements.  I had been using this document: http://www.arm.com/miscPDFs/14128.pdf but it doesn't discuss entry.s files.  The more I thought about it I came to the conclusion that it would more than likely be found in the compiler documentation because it's related to gcc (I think I read that on a linux forum somewhere in searching for entry.s). 

Thanks for the references!

Cheers,


*

srpenney

Re: Understanding entry.s and blobs.s files
« Reply #4 on: 19 / September / 2008, 08:26:56 »
You can find links to the various arm docs here Developer Technical Documents - CHDK Wiki

Thanks.  I don't know how I missed that link when searching the site.  Once I saw your post I went back to where I thought this info should be and sure enough, it was there.   :-[

Thanks again,

 

Related Topics