For professional type use, your major options are IAR, Keil or Rowley CrossWorks. Keil is owned by ARM, which may or may not give them a slight advantage. I'd say the performance between IAR and Keil is nearly identical. Rowley is bargain of the 3. Rowley also let's you use cheaper debuggers, such as the J-link. You might be able to use the J-link with IAR as well, but I think Keil forces you to use their Ulink products, which can be a bit more expensive. As far as support, I believe Rowley is purely through their website. IAR and Keil offer 1 year or so of phone support. From what I've been told, Keil seems to offer better support in the US, while IAR is more focused on Europe. I've used Keil without any issues and support was good. That being said, any of these 3 will probably perform just as well.
This is the best method I have come up with recently:
In the build options, select create batch file.
When you initiate a build from the IDE, a batch file along with several text files are created based on the options set in the IDE. You need to track these IDE generated files in source control:
- *.bat
- *.ini
- *.__i
- *._ia
- *.lnp
- *.sct
Then foo.bat can be launched from a build script.
While this does create extra files that need to tracked in source control if you want to build reliably from the generated batch file, it does remove the need to rely on the Keil project file (foo.uvproj) and the IDE. I find it easier to compare differences, and thus track changes, to the generated text files (*.__i) that contain compiler flags than to the .uvproj file. Additionally, the batch file calls the various tools, armasm, armcc, armlink, directly. This gives you the direct output of each of those steps as well as a seemingly better potential for migrating a project to a different tool chain in the future if necessary.
I realize this answer sounds a lot like my original question, but I genuinely don't know of a better way of running a scripted build with Keil's tools. I asked to see what might come up from others. I don't completely disagree with the answer from @digikata, but I prefer to have compiler flags and the memory map in an easier format for tracking and to use more unix-style tools for compilation rather than launching an all-in-one compilation with the IDE. I think the all-in-one compilation from the IDE works well at my workstation, but not for the build server.
EDIT: The build server runs on Windows Server 2003. I must confess that I have relented to using the IDE command line interface rather than a batch file. This just became too difficult to manage.
Best Answer
Erasing the full chip would be faster, but if you need to retain part of the contents (for example, if you have a custom bootloader or some data stored at a particular address) then you can erase individual sectors which you wish to change, for example erase an old main program and load a new one in its place.
Beware that sectors can be somewhat larger than you might at times find convenient. On some MCUs they are also not all the same size, but may be smaller in some regions to give more fine grained flexibility.