Author Topic: SX200IS Compilation problem.  (Read 876 times)

Offline Microfunguy

  • Developers
  • Guru Member
  • ****
  • Posts: 3027
    • StereoData Maker
SX200IS Compilation problem.
« on: 30 / October / 2009, 20:44:20 »
There are five 'sub_' entries missing from the auto-generated 'stubs_auto.s'  file so the compiler gives error messages.


What can be causing this  ?


Offline fudgey

  • Global Moderator
  • Guru Member
  • *****
  • Posts: 1690
  • a570is
Re: SX200IS Compilation problem.
« Reply #1 on: 30 / October / 2009, 21:30:06 »
In trunk chdk? Rev 825 builds sx200is 100c fine for me.

But you should be able to fix it by placing sx200is fw dump as platform/sx200is/sub/100c/PRIMARY.BIN and running make to regenerate that file. Incorrect timestamps or something like that could be confusing make, that could probably be fixed by deleting the old file. If still in doubt, revert to a clean trunk.

Offline Microfunguy

  • Developers
  • Guru Member
  • ****
  • Posts: 3027
    • StereoData Maker
Re: SX200IS Compilation problem.
« Reply #2 on: 30 / October / 2009, 22:11:31 »
In trunk chdk?

I copied all of rev 824 sx200is folder to my own build (and sx200is loader).

Quote
But you should be able to fix it by placing sx200is fw dump as platform/sx200is/sub/100c/PRIMARY.BIN and running make to regenerate that file.

I run gmake PLATFORM=sx200is PLATFORMSUB=100c fir and PRIMARY.BIN is still 4,096KB.
I get the same five entries missing.

Offline reyalp

  • Guru Member
  • ******
  • Posts: 4492
Re: SX200IS Compilation problem.
« Reply #3 on: 31 / October / 2009, 01:13:30 »
Can you list the missing entries ?

Did check whether they exist in the version in SVN ? I would guess they must, since the autobuild works, which means something is going wrong in the code that generates it on your end.
Don't forget what the H stands for.

Offline Microfunguy

  • Developers
  • Guru Member
  • ****
  • Posts: 3027
    • StereoData Maker
Re: SX200IS Compilation problem.
« Reply #4 on: 31 / October / 2009, 01:22:32 »
Can you list the missing entries ?

Sure ...

FF821BCC
FF821BD0
FF829090
FF81EFB0
FF91572C

Quote
Did check whether they exist in the version in SVN ?

they are all in boot.c and are all nullsubs (trunk 824)


Quote
something is going wrong in the code that generates it on your end.

I have replaced the Tools folder with the latest trunk version but that makes no difference.

I do not use the CHDK Makefile or Makefile.inc.


Difficult to see how that affects it.

Offline reyalp

  • Guru Member
  • ******
  • Posts: 4492
Re: SX200IS Compilation problem.
« Reply #5 on: 31 / October / 2009, 01:25:53 »
I do not use the CHDK Makefile or Makefile.inc.
A bunch of the sed stuff that generates stubs_auto.S is in the makefile in CHDK.

edit:
Quote
Quote
Did check whether they exist in the version in SVN ?

they are all in boot.c and are all nullsubs (trunk 824)
No, I meant whether they are in the stubs_auto.S in CHDK SVN

edit:
which they are of course. If they are all nullsubs, you can just comment them out and save a bit of space ;)
« Last Edit: 31 / October / 2009, 01:29:31 by reyalp »
Don't forget what the H stands for.

Offline Microfunguy

  • Developers
  • Guru Member
  • ****
  • Posts: 3027
    • StereoData Maker
Re: SX200IS Compilation problem.
« Reply #6 on: 31 / October / 2009, 01:48:56 »
Well, it is a bit worrying not knowing why it happens, the Make files are complicated enough as it is.

Are you referring to the 'sed' in  makefile_sub.inc ?

CHDK has :-         sed 's/.*B[[:alpha:]]*[[:space:]][[:space:]]*sub_\\([0-9A-Fa-f]*\\).*/\\1/' | \

I have:        sed 's/.*sub_\\([0-9A-Fa-f]*\\).*/\\1/' | \

replacing my version with the CHDK version makes no difference.
« Last Edit: 31 / October / 2009, 02:03:33 by Microfunguy »

Offline reyalp

  • Guru Member
  • ******
  • Posts: 4492
Re: SX200IS Compilation problem.
« Reply #7 on: 31 / October / 2009, 02:37:12 »
Quote
I have:        sed 's/.*sub_\\([0-9A-Fa-f]*\\).*/\\1/' | \
this will get caught by the commented. // nullsub_...

I suspect your stubs_auto.S didn't get rebuilt after you made the change. The CHDK one was changed for this very reason.
Don't forget what the H stands for.

Offline Microfunguy

  • Developers
  • Guru Member
  • ****
  • Posts: 3027
    • StereoData Maker
Re: SX200IS Compilation problem.
« Reply #8 on: 31 / October / 2009, 02:40:23 »
Well done !

You posted seconds before I was about to.

Removing those comments solved the problem.

I have looked at a 'sed' reference but can you explain exactly what my version does ?



« Last Edit: 31 / October / 2009, 02:41:58 by Microfunguy »

CHDK Forum

Re: SX200IS Compilation problem.
« Reply #8 on: 31 / October / 2009, 02:40:23 »

Offline reyalp

  • Guru Member
  • ******
  • Posts: 4492
Re: SX200IS Compilation problem.
« Reply #9 on: 31 / October / 2009, 02:53:32 »
.* matches anything preceding sub_. Since sed is greedy, that gobbles up the "B sub_FF123456" all the way through the comment and null. The \([0-9A-Fa-f]*\) matches 0 or more times, so it captures an empty string, which via the \1 replaces the output.

The CHDK version should really use at least a \+ for the capture, but it at least explicitly looks for the B
Don't forget what the H stands for.

Offline Microfunguy

  • Developers
  • Guru Member
  • ****
  • Posts: 3027
    • StereoData Maker
Re: SX200IS Compilation problem.
« Reply #10 on: 31 / October / 2009, 03:02:20 »
OK, thanks.
Guess I will have to find-out more about sed, grep and awk.
Someone wants me to port SDM to SX200IS.
Having looked at the CHDK code I am not looking forward to this.

The handling of bitmap and viewport buffers looks fairly messy.

I assume it is correct but will try drawing some test patterns to check.


 


SimplePortal 2.3.3 © 2008-2010, SimplePortal