Hi Wanglanjun,
If you are using the JLINK to erase the entire chip, I think you can do the partition again, you can try it.
About the copy function api to RAM, in IAR, you can use keyword __ramfunc .
Actually, when you already do the masserase, then you run your code, and do the flash partition, it should has no problem, I don't know how you process your second partition on your side, could you provide more details about it? But if in your project, and when you run the code, you want to do the second partition, you need to do the flash erase, as you know, all your code is running in the flash, if you want do the chip erase, then you need to copy the code to the RAM at first, otherwise your app code will be erased.
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------