The program is almost written. The chief engineer asked me to implement the online upgrade function of the program. What kind of IAP is there? I thought it was an ISP,
After being bored for a while, I realized that IAP is application programmable, that is, the program is upgraded through its own Upgrade Code,
The upgrade program can be provided through serial port, USB, USB flash disk and so on. Okay, I got to know something about it.
The prompt shows that the program needs to be divided into two sections, one section of the main code, and the other section is the Upgrade Program.
During the upgrade, only part of the running program is upgraded, while the Upgrade Program remains unchanged, to prevent the system from being erased and suspended,
We also need to have a deep understanding of the program address or something.
I use 430 and the compiler is ccs4.0. You can use the CMD file to manage the segment address.
Don't understand. Find the information. After searching for half a day, I tried it for half a day and finally succeeded. In the CMD file, I defined a new segment. updata
Use the following macro # pragma code_section (iapupdata, ". updata") to specify the Upgrade Program to. updata.
From the map file, we can see that the address of the function is the address of the segment we define. Then enter the upgrade Mode
The program jumps to this address to run the program and erase the main program.
I know more about the address or something. I would have needed a host computer test program, but I don't know the host computer.