The present invention discloses an embedded system. The embedded system comprises a flash memory controller, a CPU and a flash memory chip. The flash memory controller is respectively connected with the CPU and the flash memory chip, and the flash memory controller comprises a flash memory system bus interface; a main control unit, which is connected with the flash memory system bus interface; and a flash memory control unit, which is respectively connected with the flash memory system bus interface, the main control unit and the flash memory chip, is used for encrypting program data corresponding to a data write instruction to obtain the program data ciphertext and writing the program data ciphertext to the flash memory chip according to the received data write instruction and the corresponding address, and is further used for, according to the received data write instruction and the corresponding address, reading the program data ciphertext stored in the flash memory chip, decrypting the program data ciphertext to obtain the corresponding program data, and providing the program data for the CPU to execute. According to the technical scheme of the present invention, the program data can be effectively protected from being stolen, so that safe storage of the program data can be realized fundamentally.