摘要 |
PROBLEM TO BE SOLVED: To allocate only variables of a holding attribute to a non-volatile memory in memory allocation of internal variables of a user FB.SOLUTION: When compiling a user application 22, a compiler 21 collectively allocates all internal variables to a volatile memory 12 in each FB independently of a holding attribute or not, and further allocates holding attribute variables to a non-volatile memory 11. Further the compiler 21 generates instance initial value information 24 in which correspondence relation between an allocation address of the volatile memory 12 and an allocation address of the non-volatile memory 11 is recorded in each holding attribute variable. Further the compiler 21 generates an execution code for accessing an allocation area of the non-volatile memory 11 through an allocation area of the volatile memory 12 as to the holding attribute variable. |