There are two known issues that can affect your ability to connect a debugger to Juno.
Linaro release 14.10 onwards enables `cpuidle' by default in the kernel. This can prevent DS-5 from reliably connecting to the Juno as power is being removed from clusters and cores depending on the current workload; powering down the Cortex-A57/A72 cluster can prevent DS-5 from establishing a reliable JTAG connection even to any remaining Cortex-A53 cores. This can also result in the debugger being unable to interrupt running cores.
To prevent this, you can disable `cpuidle' from the terminal like so:
for i in 0 1 2 3 4 5; do
for j in 0 1 2; do
echo 1 > /sys/devices/system/cpu/cpu$i/cpuidle/state$j/disable;
Note: The above must be run as root; OpenEmbedded and BusyBox login as root by default byt Android users will need to elevate to root by running `$ su'.
A number of users have reported issues when using the DS-5 debug configuration "Juno Arm Development Platform (r1) - Bare Metal Debug - Debug Cortex-A57/Cortex-A53 SMP". To connect to all cores on Juno r1 you can instead safely use the r0 equivalent connection.
The Juno board may hang when a DS-5 debug session is closed using the disconnect button. This happens because some debug signals are deasserted and the SCP takes this to mean that the debug subsystem logic can be powered down. Powering down the debug when components of the trace system have been active (even just to configure them) will cause it to hang irrecoverably; one must power cycle the board to be able to debug it again.
There are two workarounds; the one you choose will depend on whether you need trace utilities.
If you only want to be able to start/stop debug and do not intend to use any trace utilities (ETM program flow trace, STM system `printf' style trace, etc) then you can configure your DS-5 debug connection to not use trace.
In the DTSL options of your Juno debug configuration:
You can use `csat' to maintain an open connection to the debug logic which will prevent the aforementioned signals from being deasserted. The `csat' utility can be found at `/path/to/DS-5/bin/csat'.
chain dev=ARMCS-DP,ARMCS-DP clk=A
Note: Replace `protocol:id' with the identifier of your DSTREAM, for example `usb:000010'.
You will now be able to use DS-5 as normal and disconnect/reconnect without issue.