First question: Why the "p" as last parameter?? Omit that, and you are done!
But now the problems start to grow, read:
http://digistump.com/wiki/digix/tutorials/programmingThis function only works, while an Arduino program is loaded AND running. The speed change down to 1200 is registered by a piece of the Arduino code and reachts on that with a virtual key press on ERASE and RESET.
After that, the DigiX/DUE is in BOSSA-mode and can be accessed via bossac. BUT as the BOSSA-mode has another VID/PID it appears as a new COM-port on Windows (and sometimes in Linux as well). The uploading bossa needs to know that com port.
Arduino developers are having huge problems in detecting that port, as the Port name also changes its number, as soon, as you use another USB port on your computer.
If you read this thread:
http://digistump.com/board/index.php/topic,1277.0.html you will understand some of those problems.
Right now the IDE does the following: It scans all available COM-ports and stores those. Than it triggers the reset with 1200 baud and starts scanning COM-ports again. That COM-port, which is appearing new after reset is chosen to be used as BOSSA-port.
That is all, you need to do on your own, as that is not part of bossac, but part of the IDE.