A Joint Source/Channel Approach to Strengthen Embedded Programmable Devices against Flash Memory Errors