changelog of trunk including comments / devtalk - page 15 - General Discussion and Assistance - CHDK Forum supplierdeeply

changelog of trunk including comments / devtalk

  • 299 Replies
  • 227651 Views
*

Offline reyalp

  • ******
  • 14080
Re: changelog of trunk including comments / devtalk
« Reply #140 on: 03 / September / 2013, 22:11:42 »
Advertisements
In changeset 3073 I added defines for cameras where raw doesn't work in auto or iso3200 modes. I know there's more cameras that should have these, so post if it applies to yours. There's also probably some other modes similar to ISO3200.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: changelog of trunk including comments / devtalk
« Reply #141 on: 21 / November / 2013, 21:07:51 »
Revision 3241 notes.

Modules were being linked with the GCC library (-lgcc) which meant a copy of some library code was being included in every module. This has been removed and the modules now use the GCC library code from the core CHDK.

Required inclusion of the '__gnu_thumb1_case_uqi' and '__gnu_thumb1_case_uhi' functions in the module build as these are always called using short calls, so can't be linked from the module to core. Added in the, previously unused, libc library so they are only included when needed by each module.

Interworking turned off for modules as it is not needed, reduces the build size of the modules slightly.

Histogram converted to a module.

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)

*

Offline srsa_4c

  • ******
  • 4451
Re: changelog of trunk including comments / devtalk
« Reply #142 on: 26 / December / 2013, 18:24:42 »
Modules were being linked with the GCC library (-lgcc) which meant a copy of some library code was being included in every module. This has been removed and the modules now use the GCC library code from the core CHDK.

Required inclusion of the '__gnu_thumb1_case_uqi' and '__gnu_thumb1_case_uhi' functions in the module build as these are always called using short calls, so can't be linked from the module to core. Added in the, previously unused, libc library so they are only included when needed by each module.
I'm getting
Code: [Select]
elf2flt unknown symbol: '__gnu_thumb1_case_shi'when compiling one of my modules. I must be doing something none of the official modules do. Any idea what this function is? Some kind of signed half integer operation?

Another question:

In case I'd like to try adapting some third party code into a module, would it be possible to build selected modules the old way (in order to avoid adding previously-not-encountered libgcc functions to the export list)?
« Last Edit: 26 / December / 2013, 18:57:12 by srsa_4c »

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: changelog of trunk including comments / devtalk
« Reply #143 on: 26 / December / 2013, 18:55:06 »
Modules were being linked with the GCC library (-lgcc) which meant a copy of some library code was being included in every module. This has been removed and the modules now use the GCC library code from the core CHDK.

Required inclusion of the '__gnu_thumb1_case_uqi' and '__gnu_thumb1_case_uhi' functions in the module build as these are always called using short calls, so can't be linked from the module to core. Added in the, previously unused, libc library so they are only included when needed by each module.
I'm getting
Code: [Select]
elf2flt unknown symbol: '__gnu_thumb1_case_shi'when compiling one of my modules. I must be doing something none of the official modules do. Any idea what this function is? Some kind of signed half integer operation?

The __gnu_thumb1_case_??? instructions are used to implement a 'switch' statement in the C code.

If you modify the modules/Makefile you can generate the dump files for each module.
Do this with your module in version 1.2, and then you can cut and paste the source for __gnu_thumb1_case_shi into the thumb1_case.S file (lib/libc).

Alternatively put the affected switch code somewhere in the core C code and copy the result from the main.bin.dump output.

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)


*

Offline srsa_4c

  • ******
  • 4451
Re: changelog of trunk including comments / devtalk
« Reply #144 on: 26 / December / 2013, 19:06:02 »
The __gnu_thumb1_case_??? instructions are used to implement a 'switch' statement in the C code.

If you modify the modules/Makefile you can generate the dump files for each module.
Do this with your module in version 1.2, and then you can cut and paste the source for __gnu_thumb1_case_shi into the thumb1_case.S file (lib/libc).

Alternatively put the affected switch code somewhere in the core C code and copy the result from the main.bin.dump output.
Thanks, I'll try that.

In case I'd like to try adapting some third party code into a module, would it be possible to build selected modules the old way (in order to avoid adding previously-not-encountered libgcc functions to the export list)?
Is this possible somehow?

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: changelog of trunk including comments / devtalk
« Reply #145 on: 26 / December / 2013, 19:32:28 »
In case I'd like to try adapting some third party code into a module, would it be possible to build selected modules the old way (in order to avoid adding previously-not-encountered libgcc functions to the export list)?
Is this possible somehow?

You would need to create a custom target in the makefile that included '-lgcc' in the link options.

If you copy the generic %.flt target to a mymodule.flt target and add -lgcc after $(LDLIBS) it might work.

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)

*

Offline srsa_4c

  • ******
  • 4451
Re: changelog of trunk including comments / devtalk
« Reply #146 on: 27 / December / 2013, 18:21:21 »
You would need to create a custom target in the makefile that included '-lgcc' in the link options.

If you copy the generic %.flt target to a mymodule.flt target and add -lgcc after $(LDLIBS) it might work.
Thanks for the advice, it's working.

*

Offline reyalp

  • ******
  • 14080
Re: changelog of trunk including comments / devtalk
« Reply #147 on: 28 / December / 2013, 19:27:06 »
Don't forget what the H stands for.


*

Offline reyalp

  • ******
  • 14080
Re: changelog of trunk including comments / devtalk
« Reply #148 on: 31 / December / 2013, 18:23:46 »
Related to http://chdk.setepontos.com/index.php?topic=10617.msg108560#msg108560

In trunk changeset 3294 I modified PAUSE_FOR_FILE_COUNTER to only pause if the new counter isn't the previous counter + 1, or is unknown.

I used +1 rather than checking if they are equal because there are potentially cases where the last_fc value might not be up to date.

I think this is OK, but verification on other PAUSE_FOR_FILE_COUNTER cameras would be appreciated.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: changelog of trunk including comments / devtalk
« Reply #149 on: 31 / December / 2013, 18:47:26 »
Related to http://chdk.setepontos.com/index.php?topic=10617.msg108560#msg108560

In trunk changeset 3294 I modified PAUSE_FOR_FILE_COUNTER to only pause if the new counter isn't the previous counter + 1, or is unknown.

I used +1 rather than checking if they are equal because there are potentially cases where the last_fc value might not be up to date.

I think this is OK, but verification on other PAUSE_FOR_FILE_COUNTER cameras would be appreciated.

On all my cameras the bottom four bits of get_file_counter() are always 0 so 'fc != last_fc + 1' is always true.

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)

 

Related Topics