Is there any reason for not using the MCC code configurator ? I am learning the dsPIC33EV256GM002 and this seems to be very powerful to create the initialisation code.
Where to start? ;-)
I am sure there will be other opinions.
I had high hopes for MCC, I used it at the start for a few projects but I lost patience with it, and so here are my issues with MCC...
o It's very buggy: do you really want to be trying to debug and patch machine-generated code?
o It makes it very difficult to maintain code:
---the generated code is not properly segregated from user code;
---it's too easy to accidentally wipe your own code when you need to make changes;
---the peripheral register bit fields aren't properly documented by the generated code;
---maintenance between versions of MCC is very problematic, and there are very frequent releases.
o You still need to know at a hardware and register level how each non-complex peripheral works anyway, so MCC is just something extra you have to learn how to use.
o You are forced into a directory and file structure dreamt up by the guy who wrote it, it's unlikely to be a structure you'll like.
o The generated code for non-complex peripherals is not built for performance, it's built for generic use.
o The generated code for non-complex peripherals is over-complicated for most implementations.
The only reason I'd use MCC now is for complex peripherals like USB. Everything else I'm bare metal, and use and write my own libraries that are fit for purpose. While you'll apparently be able to get a blinky going from scratch quite quickly (although I bet I'd be able to hand code it quicker), anything with any non-trivial application that needs maintaining, and is built incrementally rather than top-down, will be very difficult.
In short, for non-complex peripherals, MCC is merely a crutch that might appear to get you started quickly, but I guarantee that you'll lose patience with it if you're doing anything serious. It is not a replacement for reading a device's data sheet and its errata, in fact it's something extra you have to deal with, I think unnecessarily. If its code quality were better and you could be sure of being able to help you maintain code without it overwriting your own, I might feel better about it!