1.6 development planning thread - page 3 - General Discussion and Assistance - CHDK Forum

1.6 development planning thread

  • 68 Replies
  • 16931 Views
*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: 1.6 development planning thread
« Reply #20 on: 05 / December / 2020, 16:01:27 »
Advertisements
Although not strictly necessary, having many compiler warnings (OPT_WARNINGS) when building annoyed me so I set about cleaning it up.

This did highlight one code issue - an invalid NULL_SUB value in the G16 1.01b port.

All cameras should now build cleanly with GCC4 or GCC5. D6 and D7 should also build cleanly with GCC9.

I suggest that OPT_WARNINGS should be turned on by default - any thoughts?

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 reyalp

  • ******
  • 14121
Re: 1.6 development planning thread
« Reply #21 on: 05 / December / 2020, 16:19:52 »
I suggest that OPT_WARNINGS should be turned on by default - any thoughts?
I would say, if it doesn't produce an unmanageable volume of warnings (which from a quick test, it doesn't), the warnings should be enabled unconditionally. The reason it was an option was that the volume of mostly harmless warnings made it hard to spot new, more serious ones.
Don't forget what the H stands for.

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: 1.6 development planning thread
« Reply #22 on: 05 / December / 2020, 17:33:59 »
With the last toolchain provided by whim (gcc451_493_host481) produces our Windows compiler GUI only some warnings, tested with trunk 5659 and sx220. The GUI generates a localbuildconf.inc based on the buildconf.inc with the possibility to change all options. Therefore changes should not be too extensive.

Here is the error log:
Code: [Select]
elfflt.c:25:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
 const static unsigned char elf_magic_header[] =
 ^
finsig_vxworks.c: In function 'match_bitmap_buffer2':
finsig_vxworks.c:4597:97: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 if (isLDR_PC(fw,k2) && isLDR(fw,k2+1) && (((fwval(fw,k2+1) & 0x000F0000) >> 16) == reg))
                                                                                                 ^
finsig_vxworks.c: In function 'find_key_vals':
finsig_vxworks.c:5481:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
         if (k >= 0)
         ^
finsig_dryos.c: In function 'match_bitmap_buffer2':
finsig_dryos.c:5579:97: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 if (isLDR_PC(fw,k2) && isLDR(fw,k2+1) && (((fwval(fw,k2+1) & 0x000F0000) >> 16) == reg))
                                                                                                 ^
finsig_dryos.c: In function 'find_key_vals':
finsig_dryos.c:7291:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
         if (k >= 0)
         ^
finsig_dryos.c: In function 'match_registerproc2':
finsig_dryos.c:7612:66: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                                ((fwval(fw,k3) & 0x000f0000)>>16) == (fwRd(fw,k1)) ) // check register match
                                                                  ^
code_gen.c: In function 'op_FUNC':
code_gen.c:900:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (p->func_len != ((p->func_end - p->func_start) / 4 + 1)) chk_args(-1,"FUNC start/end/length mismatch",p);

msl
CHDK-DE:  CHDK-DE links

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: 1.6 development planning thread
« Reply #23 on: 05 / December / 2020, 19:43:39 »
With the last toolchain provided by whim (gcc451_493_host481) produces our Windows compiler GUI only some warnings, tested with trunk 5659 and sx220. The GUI generates a localbuildconf.inc based on the buildconf.inc with the possibility to change all options. Therefore changes should not be too extensive.


Thanks, they should be fixed in 5661.
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 philmoz

  • *****
  • 3450
    • Photos
Re: 1.6 development planning thread
« Reply #24 on: 06 / December / 2020, 15:28:44 »
Is there any reason to keep the top level 'script' folder and all the (very very) old .bas scripts in it?


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 reyalp

  • ******
  • 14121
Re: 1.6 development planning thread
« Reply #25 on: 06 / December / 2020, 16:54:23 »
Is there any reason to keep the top level 'script' folder and all the (very very) old .bas scripts in it?
IMHO, no.
Don't forget what the H stands for.

Re: 1.6 development planning thread
« Reply #26 on: 06 / December / 2020, 16:56:20 »
Is there any reason to keep the top level 'script' folder and all the (very very) old .bas scripts in it?
IMHO, no.
I'd bet $100 that nobody would even notice.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: 1.6 development planning thread
« Reply #27 on: 07 / December / 2020, 12:54:20 »
 :D Updated 0xFACE, ...
All lifetime is a loan from eternity.


*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: 1.6 development planning thread
« Reply #28 on: 07 / December / 2020, 18:43:37 »
Building with GCC9  :xmas


It seems the problem with newer GCC versions is that -march=armv4 is deprecated so it gets ignored in our build.


Changing to ARCHFLAGS+=-march=armv4t in platform/makefile_platform.inc and platform/makefile_sub.inc fixes the build with GCC9.


I need to see if this affects building with GCC4 or GCC5.


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 reyalp

  • ******
  • 14121
Re: 1.6 development planning thread
« Reply #29 on: 07 / December / 2020, 20:37:42 »
Changing to ARCHFLAGS+=-march=armv4t in platform/makefile_platform.inc and platform/makefile_sub.inc fixes the build with GCC9.
Have you checked to verify it doesn't break interworking? Like https://chdk.setepontos.com/index.php?topic=12115.msg118896#msg118896

This might not be obvious from just running a build, since many cams return with a thumb safe sequence *most* of the time.

I also noticed attributes and pragmas allow control of some of these settings. It's possible we could do the whole stubs and wrappers thing in a cleaner way with current compilers.
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal