CHDK Forum
CHDK Development => General Discussion and Assistance => Topic started by: srsa_4c on 13 / March / 2020, 17:30:44
-
Detection of DIGIC version (for finsig_vxworks, finsig_dryos). It currently only adds a commented
define makefile variable to stubs_entry.S. It should probably go in camera_info somewhere, but I'm not sure. A possible use could be this (https://chdk.setepontos.com/index.php?topic=13875.msg142052#msg142052).
edit:
Perhaps adding a DIGIC define to platform_camera.h would make more sense.
edit2:
Alternative v2 version with output suitable for platform_camera.h. I have a script that can transfer the #define from stubs_entry.S to platform_camera.h, so no manual file editing would be necessary.
-
Detection of DIGIC version (for finsig_vxworks, finsig_dryos). It currently only adds a commented define makefile variable to stubs_entry.S. It should probably go in camera_info somewhere, but I'm not sure. A possible use could be this (https://chdk.setepontos.com/index.php?topic=13875.msg142052#msg142052).
edit:
Perhaps adding a DIGIC define to platform_camera.h would make more sense.
edit2:
Alternative v2 version with output suitable for platform_camera.h. I have a script that can transfer the #define from stubs_entry.S to platform_camera.h, so no manual file editing would be necessary.
Thanks for doing this.
I'm open to be convinced otherwise, but my initial reaction is that it would make sense to have it as a makefile.inc value.
edit:
Split since there are two options.
-
I'm open to be convinced otherwise, but my initial reaction is that it would make sense to have it as a makefile.inc value.
v1 would allow using 'DIGIC' in makefiles (to eventually sanitize the current situation with THUMB_FW and DIGIC7, I guess), and also in source with a makefile modification. v2 would be limited to c/asm source.
If you're ok with v1, you can check it in after a stubs rebuild (or tell me to do it). I'll then copy the line from stubs_entry.S to makefile.inc for each affected port, and also make a manual makefile.inc change for D6 and D7 ports.
-
v1 would allow using 'DIGIC' in makefiles (to eventually sanitize the current situation with THUMB_FW and DIGIC7, I guess), and also in source with a makefile modification.
Yeah, that was my thinking. MEMBASEADDR could be set by default too.
If you're ok with v1, you can check it in after a stubs rebuild (or tell me to do it).
Checked in.
I'll then copy the line from stubs_entry.S to makefile.inc for each affected port, and also make a manual makefile.inc change for D6 and D7 ports.
Thanks again.
For consistency, I added a digic line the finsig_thumb2 output as well.
-
For consistency, I added a digic line the finsig_thumb2 output as well.
Thanks, that reduced the number of hand-edited files to two. I could have committed this, but chose to put the patch here.
You seem to be missing the ixus1000_sd4500 102c dump (the related change is in this patch).
The other note is that the <D6 sigfinders output the makefile.inc values with C-style comments. I checked and found a few cases where such comments made it into makefile.inc (PowerShot N, N FB). I don't know whether that's a problem or not. Probably not.
The script I used (below) "fixed" the comment to use #.
#!/bin/bash
curdir=`pwd` # current working directory
directory="platform"
find $directory -mindepth 3 -type d -print0 | while read -d $'\0' file
do
cd "$file"
if [ -e stubs_entry.S ] ; then
s1=`grep -E "DIGIC =" stubs_entry.S`
s2=`grep -E "^DIGIC =" ../../makefile.inc`
if [ -n "$s1" ] ; then
echo "$file"
if [ -z "$s2" ] ; then
echo "$file"
echo -e "$s1\n" | sed -e 's/^\/\/ */\n/' -e 's/\/\/ /# /' >> ../../makefile.inc
else
echo "$file already done"
fi
else
echo "$file nope"
fi
fi
cd "$curdir"
done
exit 0
-
The other note is that the <D6 sigfinders output the makefile.inc values with C-style comments. I checked and found a few cases where such comments made it into makefile.inc (PowerShot N, N FB). I don't know whether that's a problem or not. Probably not.
It can definitely cause problems, C style comments will become part of the value. We should also use # everywhere.
Technically, there should be no space between the value and the #, otherwise the space becomes part of the value, which works ok for command line parameters but not ifeq.
Thanks for catching the missing dump.
I modified the script to strip the spaces and checked in. sx270 and sx275 added manually
-
Here's a quick patch to make the digic version available as a define, as well as camera_info and lua get_buildinfo. Posted as a patch since I wasn't sure if you're working on something similar.
-
I wasn't sure if you're working on something similar.
I'm not working on anything related to to this, feel free to add.
-
I'm not working on anything related to to this, feel free to add.
Added in r5451
-
:-* Hi, that´s a nice feature, could be pasted to the lib/uBasic files...
// tokenizer.c
{"get_digic", TOKENIZER_GET_DIGIC},
// tokenizer.h
TOKENIZER_GET_DIGIC,
// ubasic.c / factor
case TOKENIZER_GET_DIGIC:
accept(TOKENIZER_GET_DIGIC);
r = camera_info.cam_digic;
break;
-
:-* Hi, that´s a nice feature, could be pasted to the lib/uBasic files...
Thanks, added in 5494