If you pass PICO_BTSTACK_PATH into cmake to specify the location of the BTSTACK code, the sdk references the compile_gatt.py as ${PICO_SDK_PATH}/lib/btstack/tool/compile_gatt.py so it uses the wrong script. It should use ${PICO_BTSTACK_PATH}/tool/compile_gatt.py
If you pass PICO_BTSTACK_PATH into cmake to specify the location of the BTSTACK code, the sdk references the compile_gatt.py as ${PICO_SDK_PATH}/lib/btstack/tool/compile_gatt.py so it uses the wrong script. It should use ${PICO_BTSTACK_PATH}/tool/compile_gatt.py