Man charged after 'gun found in knapsack'