Dear @lpcxpresso_supp ,
Thanks for you long answer and for explaining why things go awry with the "Edit CPU" functionality. I agree, that I'd like to see more "complete" SDKs. As an example, I don't see any reason why LPC5526 is provided in a separate SDK than LPC5528 although these two CPUs are completely identical except for the memory layout. I'm convinced that this exacerbates problems that already exist.
However, I beg to disagree. I did not shift the use case.
First, from a users perspective "Edit MCU" should just work™ whether both CPUs are in the same SDK or not. The burden to handle haphazard complexity cannot be shifted onto the shoulders of the user. Of course, "Edit MCU" cannot switch between distant CPUs families but at least between close family members (LPC5528 and LPC5526 or even LPC5526 and LPC5536) a switch should be possible.
Second, download LPC5526 SDK and import an example based on LPC55S28. Now switch CPU to LPC5526. With IDE 11.8 the SDK components are now tracked, however, the example project will not compile. This happens although the example goes to great lengths to keep device specific definitions out of the users code. For example it does not include "LPC5528.h" in the main() file. So why does it not compile? As I mentioned in my last posting, the preprocessor macro that defines the processor is set on the command line. Because Neither "Edit CPU" nor "Change Package" touches this, the code has no valid CPU defines.
Third, don't argue with "The IDE will not change your 'main.c'.". I did not add the include for "LPC5528.h" but the New Project wizard did. Why did the New Project wizard do this? I have no idea. This is up to the decisions made by NXP. As the examples clearly show, it's easy to keep device specific code separate from user's code, e.g., by moving those includes to, e.g., board.h. Again, don't make the users responsible for a complexity that NXP created.
Last, I know that I can manually change settings and includes, linker scripts, memory layout, etc. But that's arduous and error prone. Therefore we have an IDE. An IDE is supposed to make developer's work easier. Therefore, "Edit MCU" function exists, although I don't understand why you offer a functionality that's so obviously broken.
You write "we're currently not planning to invest more time and resources to address such a use case.". What do you mean? What is a use case where "Edit MCU" actually works?
Thanks for listening.
Daniel