Windows 8 and 10 have added a ‘feature’ to scan and index devices attached to the host machine. This means that bootloaders or MSD (Mass Storage Device) programming implementations on evaluation boards developed in the Windows 7 age might not be prepared for that. Up to the point that it can impact the bootloader as outlined in “Bricking and Recovering OpenSDA Boards in Windows 8 and 10“. So far one of the easiest way to get out that situation was to use a Windows 7 machine. But if you only have a Windows 10 machine available, this article describes the needed steps to update the bootloader with Windows 10 host machines.
‘OpenSDA’ is the debug circuit and debug firmware used on many of the Freescale/NXP evaluation boards
If it happens that your Windows 10 machine is affecting the bootloader, then the OpenSDA LED will blink an error code.
💡 see https://mcuoneclipse.com/2016/08/01/bricking_and_recovering_opensda_boards_in_windows_8_and_10/ for a list of error codes.
Check the version of the bootloader on the board which is available in bootloader mode:
💡 to enter bootloader mode, power the board with the RESET button pressed.
Open the SDA_INFO.HTM of the board:
If it is NOT showing the required 1.11 version, you have to upgrade the bootloader first.
To do this, unplug/disconnect the board from the host PC.
Next we have to stop/disable several Windows 10 services which interfere with the bootloader.
Disable/stop Windows Services
The issue is that Windows talks to the OpenSDA bootloader and confuses it. Windows Services doing this are the ‘Storage Service’ which scans storage devices and the ‘Windows Search’ service which tries to index the device for faster access.
First, use the computer management console (click on the Windows symbol in the task bar, then type ‘computer management’):
Otherwise you can find it here:
In the console, STOP the Storage Service:
Next, DISABLE the Windows Search Service: For this, use the ‘Properties’ context menu on that service and disable it for the startup (so it won’t run again):
Finally, STOP that service as well:
Note and update: some other applications might use that Windows Storage Service. Make sure you re-enable it after you have updated your board, otherwise you might see some strange error messages. See this community post for details.
Now with these services stopped, we can update the bootloader to V1.11. The updated bootloader is available from the P&E web site (http://www.pemicro.com/opensda/):
Download that file and extract it. Extract the ‘OpenSDA_Bootloader_Update*.zip’ inside that zip file as well.
Then update the bootloader (see “Step-by-Step: Updating OSBDM/OSJTAG Debug Firmware“):
- Power the Board with the RESET button pressed on the OpenSDA USB port
- Copy the BOOTUPDATEAPP_Pemicro_v111.SDA to the board drive
- It might be necessary for Windows that you ‘safe remove’ the device here.
- Unplug the board/cable
- Plug it in again in a normal way (no buttons pressed!)
- Unplug it again and this time plug it in with the RESET button pressed to get it into Bootloader mode. The green LED should blink now with about 1 Hz.
Check now the SDA_INFO.HTM again, it should show the new bootloader version:
Congratulations, now the bootloader is ‘Windows 10 aware’ :-).
This is kind of optional, if you like to keep windows searching and optimizing your drives.
We can re-enable the ‘Windows Search’ service again in the management console. For this, set it back in the properties to ‘automatic’:
Then start the service again:
Loading Debug Firmware
The last step is to load/update the OpenSDA debug firmware (e.g. Segger or P&E). To load the P&E firmware, while the board is in Bootloader mode, e.g. copy the matching firmware to your board. E.g. for my FRDM-KL46Z board it is:
Note: It might be necessary for Windows that you ‘safe remove’ the device and not simply unplug the board after you have copied a file.
Here again I can verify with the SDA_INFO.HTM if that firmware has been properly loaded:
Windows 10 tries to talk to the OpenSDA bootloader/debug app and might confuse it and basically can brick the device. Usually a Windows 7 machine was necessary to recover such a board. With the above steps (disabling services, updating bootloader) it is now possible to update the bootloader to make it work properly in a Windows 10 environment.
- Bricking and Recovering OpenSDA Boards in Windows 8 and 10
- NXP OpenSDA: http://www.nxp.com/opensda
- Adding a Delay to the ARM DAPLink Bootloader
- P&E Binaries: http://www.pemicro.com/opensda/
- Step-by-Step: Updating OSBDM/OSJTAG Debug Firmware