Undefined reference - page 2 - General Discussion and Assistance - CHDK Forum supplierdeeply

Undefined reference

  • 21 Replies
  • 4528 Views
Re: Undefined reference
« Reply #10 on: 15 / April / 2014, 09:48:12 »
Advertisements
Unfortunately I could not try that because I am on Windows 7 and there grep does not exist. :-(

I am on Windows XP.
It will horrify developers who love obscure Linux tools but I just use Windows Search.

You have to modify registry settings to make sure files with normally unsupported extensions (such as .S) are searched.

Cannot remember the details, you will need to search for that.

Re: Undefined reference
« Reply #11 on: 15 / April / 2014, 10:53:07 »
Hi waterwingz and Microfunguy,

thanks again for your help!
I think I will give Cygwin and wingrep a chance ;-)

@waterwingz:

I started to analyse your patch for middle terminal, but have a few questions:

1. The patch you provided on which version of trunk I can apply it to?

2. What tool you use to apply a patch - or do I have to do it manually?

3. You wrote that you have the HP timer stuff in the dev trunk.
I am a littlebit confused now, what is the dev trunk and current trunk for you?

4. Is your batt mid term code currently working with the HP timer or not?
Since I need very short reaction time on sending a pulse to the S110 I think I will need the HP timer as well.

5.
Quote
...replaces the use of  USB port with the battery middle terminal...

Does this mean the battery mid terminal will trigger taking a picture like the USB port does?
How you set the mid terminal to high / low? Do you have certain resistor values for the two states?


2 x IXUS 860IS 100c
2 x Powershot S110 103a

Re: Undefined reference
« Reply #12 on: 15 / April / 2014, 11:36:21 »
1. The patch you provided on which version of trunk I can apply it to?
As mentioned,  it's for the dev (or unstable 1.3.0 trunk).  But there have been enough changes that it will not apply cleanly anymore.    I can fix that for you if you are interested in trying it as is.   Or if you can wait a few days,  I'll have a more complete version suitable for inclusion in the main 1.3.0 build.

Quote
2. What tool you use to apply a patch - or do I have to do it manually?
I just use the "obscure"  patch command.  Cygwin will have a version of it that you can try.  For Windows use,  there is a winmerge program you can google for.  (http://winmerge.org/)

Update :  if you are using TortoiseSVN on your Windows machine (recommended) then this might help : http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-dug-patch.html

Quote
3. You wrote that you have the HP timer stuff in the dev trunk.
I am a littlebit confused now, what is the dev trunk and current trunk for you?
Dev = unstable = 1.3.0   Current = stable = 1.2.0

Quote
4. Is your batt mid term code currently working with the HP timer or not?
Since I need very short reaction time on sending a pulse to the S110 I think I will need the HP timer as well.
Not yet.  Should be no problem - just need the time to get it added.

Quote
Does this mean the battery mid terminal will trigger taking a picture like the USB port does?
Yes

Quote
How you set the mid terminal to high / low? Do you have certain resistor values for the two states?
My current thinking is to use a #define in platform_camera.h

« Last Edit: 15 / April / 2014, 12:03:47 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Undefined reference
« Reply #13 on: 15 / April / 2014, 21:46:04 »
Here's an updated version of the A/D channel 5 patch (uses A/D 5 rather than USB 5v to trigger a shot). Patch for the current 1.3.0 3419 trunk.  I've added the necessary changes for the S110 (in addition to the G10 and SX200is) for your convenience.

@philmoz :  when you get a moment,  would you please add GetAdChValue to stubs_entry.S for the dev trunk?  TIA.

Update : v5 now attached - works better with ptp
« Last Edit: 15 / April / 2014, 22:56:21 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


Re: Undefined reference
« Reply #14 on: 16 / April / 2014, 04:37:02 »
Hi waterwingz,

thanks a lot for your help!

Quote
Or if you can wait a few days,  I'll have a more complete version suitable for inclusion in the main 1.3.0 build.

I think I will wait the few days since I can other things to first like creating the software on my microcontroller, study your code and also get familiar with TortoiseSVN. So I can wayt no problem.

Quote
...replaces the use of  USB port with the battery middle terminal...

Quote
Does this mean the battery mid terminal will trigger taking a picture like the USB port does?
How you set the mid terminal to high / low? Do you have certain resistor values for the two states?

Sorry for beeing unprecise, I wanted to know the technical / hardware part.
What circuit / resistor do you use to trigger the battery middle terminal? Do you apply a digital value like e.g.

1000 Ohms equals low
1500 Ohms equals high

Or do you 'send' any analog value to the batteries middle terminal using PWM or similar?
2 x IXUS 860IS 100c
2 x Powershot S110 103a

*

Offline philmoz

  • *****
  • 3291
    • Photos
Re: Undefined reference
« Reply #15 on: 16 / April / 2014, 05:44:18 »
@philmoz :  when you get a moment,  would you please add GetAdChValue to stubs_entry.S for the dev trunk?  TIA.

Added in revision 3420.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: Undefined reference
« Reply #16 on: 16 / April / 2014, 05:48:36 »

I think I will give Cygwin and wingrep a chance ;-)

Good luck !

Code: [Select]
COOKIE="16i"$(mcookie | tr 'a-z' 'A-Z')"p" && dc -e $COOKIE | cut -b -12

Re: Undefined reference
« Reply #17 on: 16 / April / 2014, 09:06:25 »
Hi,

@microfunguy:

Quote
Good luck !

Code: [Select]
COOKIE="16i"$(mcookie | tr 'a-z' 'A-Z')"p" && dc -e $COOKIE | cut -b -12

Don't know what you want to tell me   :-[


@waterwingz:

Quote
Try using grep -r main.c to get some idea of how the whole CHDK build goes together.

I installed cygwin and tried grep -r main.c but not sure what I can get from the provided information, see attached image.


BTW: how to insert inline images in this forum's threads?


2 x IXUS 860IS 100c
2 x Powershot S110 103a


Re: Undefined reference
« Reply #18 on: 16 / April / 2014, 09:58:43 »

Don't know what you want to tell me   :-[

Exactly ! :)

Re: Undefined reference
« Reply #19 on: 16 / April / 2014, 10:01:07 »
Sorry for being unprecise, I wanted to know the technical / hardware part.
What circuit / resistor do you use to trigger the battery middle terminal? Do you apply a digital value like
That's up to you - the code won't care.  It just assumes "On" for a resistance below a certain value and "Off" otherwise.   You probably need to read through this thread :  Battery third (temp) terminal as multipurpose analogue input and maybe use circuit "A" from this post : http://chdk.setepontos.com/index.php?topic=10385.msg109169#msg109169

Quote
I installed cygwin and tried grep -r main.c but not sure what I can get from the provided information, see attached image.
The fourth line shows you where main.c is included in the Makefile.  Once you know that, you should be able to figure out where to insert your testcode.c filename so that it gets included too.

Quote
BTW: how to insert inline images in this forum's threads?
Store them on an image hosting side ( eg imgur.com ) and use the Insert Image button from the edit toolbar to embed the resulting URL.
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics