Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
update_yml.py
00001 # 00002 # DAPLink Interface Firmware 00003 # Copyright (c) 2009-2018, ARM Limited, All Rights Reserved 00004 # SPDX-License-Identifier: Apache-2.0 00005 # 00006 # Licensed under the Apache License, Version 2.0 (the "License"); you may 00007 # not use this file except in compliance with the License. 00008 # You may obtain a copy of the License at 00009 # 00010 # http://www.apache.org/licenses/LICENSE-2.0 00011 # 00012 # Unless required by applicable law or agreed to in writing, software 00013 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 00014 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 # See the License for the specific language governing permissions and 00016 # limitations under the License. 00017 # 00018 00019 import yaml 00020 00021 #classes needed to generate update.yml files 00022 class TargetList(list): 00023 def sort(self, *args, **kwargs): 00024 pass 00025 00026 class InstructionList(unicode): 00027 def sort(self, *args, **kwargs): 00028 pass 00029 00030 #Remove the sorting by default 00031 yaml.add_representer(TargetList, yaml.representer.SafeRepresenter.represent_dict) 00032 #needed block style for the instruction steps 00033 yaml.add_representer(InstructionList, lambda dumper, data: dumper.represent_scalar(u'tag:yaml.org,2002:str', data, style='|') ) 00034 00035 00036 #instruction steps for firmware 00037 InstructionsText = { 00038 'default':TargetList([ 00039 ('windows', InstructionList( 00040 '1. Download the firmware file.\n' 00041 '2. While holding down the boards reset button, connect the boards USB debug port to the computer. It should enumerate and mount as `BOOTLOADER` or `MAINTENANCE`. For boards that enumerate as `BOOTLOADER` [see our blog to determine if an update for the DAPLink bootloader is available.](https://os.mbed.com/blog/entry/DAPLink-bootloader-update/)\n' 00042 '3. Drag-and-drop the firmware file onto the mounted drive.\n' 00043 '4. Wait for the file copy operation to complete.\n' 00044 '5. Power cycle the board. It will now enumerate and mount as `DAPLINK` or the name of the board.\n' 00045 )), 00046 ('osx', InstructionList( 00047 '1. Download the firmware file.\n' 00048 '2. While holding down the boards reset button, connect the boards USB debug port to the computer. It should enumerate as `BOOTLOADER` or `MAINTENANCE`. For boards that enumerate as `BOOTLOADER` [see our blog to determine if an update for the DAPLink bootloader is available.](https://os.mbed.com/blog/entry/DAPLink-bootloader-update/)\n' 00049 '3. In a terminal execute\n' 00050 ' - `sudo mount -u -w -o sync /Volumes/MAINTENANCE ; cp -X <path to firmware file> /Volumes/MAINTENANCE/`\n' 00051 ' - Note: If your drive does not mount as `MAINTENANCE` make sure to change this to match the name of the mounted disk attached to your system.\n' 00052 '4. Wait for the file copy operation to complete.\n' 00053 '5. Power cycle the board. It will now enumerate and mount as `DAPLINK` or the name of the board.\n' 00054 )), 00055 ('linux', InstructionList( 00056 '1. Download the firmware file.\n' 00057 '2. While holding down the boards reset button, connect the boards USB debug port to the computer. It should enumerate as `BOOTLOADER` or `MAINTENANCE`. For boards that enumerate as `BOOTLOADER` [see our blog to determine if an update for the DAPLink bootloader is available.](https://os.mbed.com/blog/entry/DAPLink-bootloader-update/)\n' 00058 '3. In a terminal execute\n' 00059 ' - `cp <path to firmware file> <MAINTENANCE> && sync`\n' 00060 ' - Note: make sure to change `MAINTENANCE` to the name of the mount point of the drive on your system.\n' 00061 '4. Power cycle the board. It will now enumerate and mount as `DAPLINK` or the name of the board.\n' 00062 )) 00063 ]), 00064 'lpc11u35':TargetList([ 00065 ('windows', InstructionList( 00066 '1. Download the firmware file.\n' 00067 '2. While holding down the boards reset button, connect the boards USB debug port to the computer. It should enumerate and mount as `CRP DISABLD`\n' 00068 '3. Delete the file named `firmware.bin`\n' 00069 '4. Wait for the file copy operation to complete.\n' 00070 '5. Power cycle the board. It will now enumerate and mount as `DAPLINK` or the name of the board.\n' 00071 )), 00072 ('osx', InstructionList( 00073 '1. Download the firmware file.\n' 00074 '2. While holding down the boards reset button, connect the boards USB debug port to the computer. It should enumerate and mount as `CRP DISABLD`\n' 00075 '3. Delete the file named `firmware.bin`' 00076 '4. In a terminal execute\n' 00077 ' - `sudo mount -u -w -o sync /Volumes/CRP\ DISABLD ; rm /Volumes/CRP\ DISABLD/firmware.bin && cp -X <path to firmware file> /Volumes/CRP\ DISABLD/`\n' 00078 '5. Wait for the file copy operation to complete.\n' 00079 '6. Power cycle the board. It will now enumerate and mount as `DAPLINK` or the name of the board.\n' 00080 )), 00081 ('linux', InstructionList( 00082 '1. Download the firmware file.\n' 00083 '2. While holding down the boards reset button, connect the boards USB debug port to the computer. It should enumerate and mount as `CRP DISABLD`\n' 00084 '3. Delete the file named `firmware.bin`\n' 00085 '4. In a terminal execute\n' 00086 ' - `cp <path to firmware file> <CRP DISABLD> && sync`\n' 00087 ' - Note: make sure to change `CRP DISABLD` to the name of the mount point on your system.\n' 00088 '5. Power cycle the board. It will now enumerate and mount as `DAPLINK` or the name of the board.\n' 00089 )) 00090 ]) 00091 00092 }
Generated on Tue Jul 12 2022 15:37:26 by
1.7.2