Hello,
I'd like to ask you about a possibility to stop Keil from downloading Code to a wrong device.
Background is, we often work on Multi-MCU-Projects, with more than one debug adapter and different chip types at the same time. So, it sometimes happens that the Programmer mixes up the debug adapters or something, and ends up loading the firmware to the wrong chip, with more or less severe results.
Does anybody maybe know a way to prevent this from happening? Can we somehow do a "Pre-Download-Check" if the device matches the device which is set in the project settings? Or is there a possibility to "mark" the devices permanently?
It maybe would even be sufficient to stop the code from executing on the wrong device.
Best Regards,
Tobias
An idea is to simply disconnect any unused Debug Adapter, which at least prevents any severe consequences
That's not always possible or convenient. In multi-MCU projects, as Tobi says, it is often necessary to be connected to multiple targets at once.
But I'm not sure how any IDE could really automate this - it really does just come down to user diligence, I think.
EDIT
Mind you, programmers usually check a "device ID" in the chip before they'll allow downloading - so it should be possible to prevent downloading to a chip other than the one specified in the Project.
But this still doesn't help if you're working on a system with multiple instances of the same chip.
Hello Andy,
yes, you're right, we need to debug more than one chip at once. Do you have any idea how to get the information regarding the Chip ID out of the debug adaptor? I was thinking about writing a small program which is executed by Keil after build/rebuild, since Keil doesn't seem to support any kind of check on it's own. Unfortunately i can't find any documentation regarding how to communicate with the debug adaptors "outside" from Keil.