The key to CHDK is knowing Your personal camera's FIRMWARE number.
It's not enough that it's an SX40. But an SX40 with firmware type G needs one CHDK version
Firmwark type 'K' needs another CHDK version and so on.
Once you settle your FIRMWARE number version you then download CHDK that's shown with that version.
That's the hardest part of it.