I agree with Chris. Let me add that you need to coordinate with the Architect, to make sure the walls are thick enough to accomodate a flush mounted panel.
I'm assuming your Q relates to a 1-family dwelling, and if so, I would say "no". If the panelboard is proposed to be mounted within the wall of a legally required exitway in some other type of occupancy that requires a fire-resistance rating, then the answer would be "not permitted by building code." Depends on your area. Always consult with the AHJ.