├── LICENSE ├── README.md ├── main.c ├── main.h ├── msd_bootloader_samd21e15a_flash.hex ├── msd_bootloader_samd21e16a_flash.hex ├── msd_bootloader_samd21e17a_flash.hex ├── msd_bootloader_samd21e18a_flash.hex ├── msd_bootloader_samd21g15a_flash.hex ├── msd_bootloader_samd21g16a_flash.hex ├── msd_bootloader_samd21g17a_flash.hex ├── msd_bootloader_samd21g18a_flash.hex ├── msd_bootloader_samd21g18a_flash_Zero_Boot_Pin_D3.hex ├── msd_bootloader_samd21j15a_flash.hex ├── msd_bootloader_samd21j16a_flash.hex ├── msd_bootloader_samd21j17a_flash.hex ├── msd_bootloader_samd21j18a_flash.hex ├── mt-d21e ├── Board │ ├── board_config │ │ └── conf_board.h │ ├── board_init.c │ ├── debug_scripts │ │ └── gcc │ │ │ └── mt-d21_flash.gdb │ └── user_board.h ├── conf_access.h ├── conf_bootloader.h ├── conf_clocks.h ├── conf_extint.h ├── conf_sleepmgr.h ├── conf_usb.h └── gcc │ ├── Makefile │ ├── Makefile.sam.in │ ├── asf.h │ └── config.mk ├── ui.c ├── ui.h └── virtual_flash_mem ├── VirtualFAT.c ├── VirtualFAT.h ├── module_config └── conf_virtual_flash_mem.h ├── virtual_flash_mem.c └── virtual_flash_mem.h /LICENSE: -------------------------------------------------------------------------------- 1 | Portions of this code are copyright (c) 2009-2016 Justin Mattair (www.mattairtech.com) 2 | /* 3 | Copyright (c) 2014-2016 Justin Mattair (www.mattairtech.com) 4 | 5 | Permission to use, copy, modify, distribute, and sell this 6 | software and its documentation for any purpose is hereby granted 7 | without fee, provided that the above copyright notice appear in 8 | all copies and that both that the copyright notice and this 9 | permission notice and warranty disclaimer appear in supporting 10 | documentation, and that the name of the author not be used in 11 | advertising or publicity pertaining to distribution of the 12 | software without specific, written prior permission. 13 | 14 | The author disclaims all warranties with regard to this 15 | software, including all implied warranties of merchantability 16 | and fitness. In no event shall the author be liable for any 17 | special, indirect or consequential damages or any damages 18 | whatsoever resulting from loss of use, data or profits, whether 19 | in an action of contract, negligence or other tortious action, 20 | arising out of or in connection with the use or performance of 21 | this software. 22 | */ 23 | 24 | Portions of this code are copyright © 2003-2014, Atmel Corporation (http://www.atmel.com/): 25 | /** 26 | * \file 27 | * 28 | * \brief User Interface 29 | * 30 | * Copyright (c) 2014 Atmel Corporation. All rights reserved. 31 | * 32 | * \asf_license_start 33 | * 34 | * \page License 35 | * 36 | * Redistribution and use in source and binary forms, with or without 37 | * modification, are permitted provided that the following conditions are met: 38 | * 39 | * 1. Redistributions of source code must retain the above copyright notice, 40 | * this list of conditions and the following disclaimer. 41 | * 42 | * 2. Redistributions in binary form must reproduce the above copyright notice, 43 | * this list of conditions and the following disclaimer in the documentation 44 | * and/or other materials provided with the distribution. 45 | * 46 | * 3. The name of Atmel may not be used to endorse or promote products derived 47 | * from this software without specific prior written permission. 48 | * 49 | * 4. This software may only be redistributed and used in connection with an 50 | * Atmel microcontroller product. 51 | * 52 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 53 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 54 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 55 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 56 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 57 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 60 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 61 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 62 | * POSSIBILITY OF SUCH DAMAGE. 63 | * 64 | * \asf_license_stop 65 | * 66 | */ 67 | 68 | 69 | Portions of this code are copyright © 2003-2014, Dean Camera (www.fourwalledcubicle.com) 70 | Specifically, the virtual FAT implementation from his MSD bootloader is used in the MT-D21E bootloader: 71 | /* 72 | LUFA Library 73 | Copyright (C) Dean Camera, 2014. 74 | 75 | dean [at] fourwalledcubicle [dot] com 76 | www.lufa-lib.org 77 | */ 78 | 79 | /* 80 | Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) 81 | 82 | Permission to use, copy, modify, distribute, and sell this 83 | software and its documentation for any purpose is hereby granted 84 | without fee, provided that the above copyright notice appear in 85 | all copies and that both that the copyright notice and this 86 | permission notice and warranty disclaimer appear in supporting 87 | documentation, and that the name of the author not be used in 88 | advertising or publicity pertaining to distribution of the 89 | software without specific, written prior permission. 90 | 91 | The author disclaims all warranties with regard to this 92 | software, including all implied warranties of merchantability 93 | and fitness. In no event shall the author be liable for any 94 | special, indirect or consequential damages or any damages 95 | whatsoever resulting from loss of use, data or profits, whether 96 | in an action of contract, negligence or other tortious action, 97 | arising out of or in connection with the use or performance of 98 | this software. 99 | */ 100 | 101 | 102 | Portions of this code are Copyright (C) 2009-2012 ARM Limited. All rights reserved. 103 | 104 | * @note 105 | * Copyright (C) 2009-2012 ARM Limited. All rights reserved. 106 | * 107 | * @par 108 | * ARM Limited (ARM) is supplying this software for use with Cortex-M 109 | * processor based microcontrollers. This file can be freely distributed 110 | * within development tools that are supporting such ARM based processors. 111 | * 112 | * @par 113 | * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED 114 | * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF 115 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. 116 | * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR 117 | * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. 118 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SAMD-MSD-Bootloader 2 | 3 | USB MSD (Mass Storage Device) bootloader for Atmel SAMD21 chips 4 | 5 | A USB Mass Storage Class device (MSC or MSD) bootloader can be optionally installed. 6 | This will allow programming of the FLASH without an external programmer. Additionally, 7 | no special software is required on the host computer. The bootloader occupies the first 8 | 16KB of FLASH, leaving the rest for the user firmware. On the MT-D21E, the BOOTPROT fuse 9 | bits (2:0) are set 0x01, which will protect the first 16KB of FLASH from internal or 10 | external programming (from 0x00000000 to 0x00004000). 11 | 12 | If you need a bootloader with both CDC and MSD, see https://github.com/watterott/SAM-BAR. 13 | 14 | 15 | ## Configuring the Bootloader 16 | 17 | You can modify the button and LED pin assignments in mt-d21e/board/user_board.h. 18 | You can modify the the USB vendor ID, product ID, and other USB MSC class device strings 19 | in mt-d21e/conf_usb.h. 20 | 21 | 22 | ## Building the Bootloader 23 | 24 | The source code depends on Atmel ASF. I used the Atmel Standalone ARM Toolchain (gcc) 25 | for Linux to build. The Makefile is in mt-d21e/gcc (change to this directory before 26 | making). You will need to edit config.mk in this same directory. It is setup for the 27 | samd21e18a by default. You will need to edit the following: 28 | 29 | * PRJ_PATH 30 | * PART 31 | * TARGET_FLASH 32 | * LINKER_SCRIPT_FLASH 33 | * CPPFLAGS (the line with __SAMD21E18A__) 34 | 35 | You will need ASF 3.19+ installed in the directory indicated in config.mk (PRJ_PATH) 36 | (../../../../../opt/xdk-asf-3.19.0 on my system). The source code is setup such that 37 | it must be built within the ASF directory tree. In my case, I created a symbolic link 38 | in the xdk-asf-3.19.0 directory called 'SAMD-MSD-Bootloader', pointing to the source 39 | code in '/home/cygnus/SAMD-MSD-Bootloader'. 40 | 41 | 42 | ## Compiling Firmware to use the Bootloader 43 | 44 | Because the user firmware will begin executing at FLASH byte address 0x00004000, you 45 | must pass the following flag to the linker (typically LDFLAGS in your makefile): 46 | 47 | ``` 48 | -Wl,--section-start=.text=0x4000 49 | ``` 50 | 51 | Be sure to generate a binary (.bin) file. Many makefiles are set up to generate an elf, 52 | hex, and bin already. You will need to rename the binary file to FLASH.BIN. 53 | 54 | 55 | ## Entering the Bootloader and Programming the Firmware 56 | 57 | Enter the bootloader by pressing the bootloader button while powering up the board from 58 | USB. Or, hold the bootloader button while pressing and releasing reset. On the MT-D21E, 59 | the bootloader button must be connected to pin A27 via solder jumper J13 (this will 60 | already be soldered if you ordered the bootloader option). Note that when no user 61 | firmware is installed, the bootloader will not automatically run, so you must always use 62 | the bootloader button. When the bootloader is run for the first time, the host operating 63 | system may take a small amount of time to install drivers. Drivers are already included 64 | with the OS, so there is nothing more to download. 65 | 66 | Once loaded, the LED will begin blinking at 2Hz. Mount the “FLASH disk” if it is not 67 | mounted automatically. The only file on the entire volume will be FLASH.BIN. This file 68 | represents the entire FLASH contents and will always exist. The file date will always be 69 | the same upon mounting (2/14/1989). You can read this file simply by copying it to your 70 | hard drive. It will include the installed firmware plus 0xFF for the remainder of the 71 | file (up to the end of the FLASH). 72 | 73 | Program the FLASH by copying your new FLASH.BIN over the existing copy on the 74 | “FLASH disk”. On Windows, you can do this with a file manager. On OS X (and possibly 75 | Linux), you will need to use the cp command, which should already be present. Open up a 76 | console (Terminal on OS X) and type (adjust for your system): 77 | 78 | ``` 79 | cp FLASH.BIN '/run/media/cygnus/MT-D21E MSD' 80 | ``` 81 | 82 | Be sure to unmount the volume before running your new firmware, so that any disk caches 83 | are flushed. To run your firmware, simply reset or cycle power without pressing the 84 | bootloader button. 85 | 86 | 87 | ## Technical Notes 88 | 89 | First, this is an MSC device (MSD), which merely transfers 512 byte blocks of data 90 | between the host and the flash memory. MSC devices to not need any filesystem 91 | implementation. It is the host that needs to understand the filesystem. Some devices 92 | (cellphones) do implement FAT, but must unmount the filesystem from the phone OS before 93 | mounting to the computer OS using USB MSC (because it is simply a block device to the 94 | computer). Second, the flash memory must not actually contain any FAT structures (like 95 | the file allocation tables themselves). It can only contain the binary file that is 96 | transferred. 97 | 98 | With these two things in mind, a minimal FAT implementation was needed, with FAT 99 | structures stored in the bootloader itself rather than anywhere in the rest of the flash. 100 | That's where the Virtual Memory folder comes in. This code basically can tell the 101 | difference between the FAT structures and the user binary, and it inserts/removes the FAT 102 | portions from the 512 byte blocks. This piece of code is the core of this bootloader, and 103 | it was written by Dean Camera of LUFA (www.lufa-lib.org) for an MSC bootloader for AVR 104 | 8-bit devices. Brilliant! 105 | 106 | Note that ASF includes examples for an MSC based bootloader 107 | (sam0/applications/usb_msc_bootloader). However, this bootloader uses USB host mode to 108 | transfer data from a connected USB flash memory stick. I basically combined this ASF 109 | bootloader with the LUFA virtual memory code and some parts of another ASF example (USB 110 | MSC related). 111 | 112 | 113 | ### Boot Process 114 | 115 | The startup portion of the bootloader will run prior to executing your firmware. 116 | This startup code will enable the bootloader button pullup resistor, wait 8ms for the 117 | debouncing capacitor to charge (MT-D21E), then test the state of the button. If it is 118 | not pressed, the user firmware will be executed as follows: 119 | 120 | * The stack pointer location will be rebased to 0x00004000 121 | * The interrupt vector table will be rebased to (0x00004000 & SCB_VTOR_TBLOFF_Msk) 122 | * A jump will be perfomed to the user firmware reset vector. 123 | 124 | 125 | ## Bootloader Entry when USB is connected 126 | 127 | To enable running the bootloader if USB is connected (run application otherwise), 128 | set BOOT_TEST_VBUS_VALUE in main.h to a non-zero value that represents the voltage 129 | threshold.The value 0x0660 represents about 0.4V. When using the voltage divider on 130 | the MT-D21E (200K top resistor and 20K bottom resistor), this value is reached when 131 | the Vbus pin is at 4.4V. In order to prevent leakage current from one of the diodes 132 | from triggering a false Vbus > 4.4V condition, keep the diode below 70C (158F). 133 | 134 | ## Known Issues 135 | 136 | * You may need to delete the existing FLASH.BIN file prior to copying over the new one. 137 | * On some Linux systems, the bootloader does not work consistently. 138 | * When compiling, you will get warnings about inefficient access to unaligned struct 139 | members. These can be ignored, as gcc will generate code to access the members 140 | to avoid unaligned access. Do not add code that references these structs via a pointer. 141 | 142 | 143 | ## Legal 144 | 145 | See LICENSE 146 | -------------------------------------------------------------------------------- /main.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Main functions for MSC example 5 | * 6 | * Copyright (c) 2009-2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #include "main.h" 45 | 46 | static volatile bool main_b_msc_enable = false; 47 | struct adc_module adc_instance; 48 | 49 | void configure_adc(void) 50 | { 51 | struct adc_config config_adc; 52 | adc_get_config_defaults(&config_adc); 53 | 54 | config_adc.clock_prescaler = ADC_CLOCK_PRESCALER_DIV32; 55 | config_adc.positive_input = ADC_POSITIVE_INPUT_PIN7; 56 | config_adc.negative_input = ADC_NEGATIVE_INPUT_GND; 57 | 58 | adc_init(&adc_instance, ADC, &config_adc); 59 | adc_enable(&adc_instance); 60 | } 61 | 62 | /** 63 | * \brief Function for starting application 64 | * 65 | * This function will configure the WDT module and enable it. The LED is 66 | * kept toggling till WDT reset occurs. 67 | */ 68 | void start_application(void) 69 | { 70 | struct wdt_conf wdt_config; 71 | 72 | /* Turn off LED */ 73 | port_pin_set_output_level(BOOT_LED, false); 74 | 75 | /* Get WDT default configuration */ 76 | wdt_get_config_defaults(&wdt_config); 77 | 78 | /* Set the required clock source and timeout period */ 79 | wdt_config.clock_source = GCLK_GENERATOR_4; 80 | wdt_config.timeout_period = WDT_PERIOD_256CLK; 81 | 82 | /* Initialize and enable the Watchdog with the user settings */ 83 | wdt_set_config(&wdt_config); 84 | 85 | /* Turn ON LED after watchdog has initialized */ 86 | port_pin_set_output_level(BOOT_LED, true); 87 | 88 | while (1) { 89 | /* Wait for watchdog reset */ 90 | } 91 | } 92 | 93 | /** 94 | * \brief Function for checking whether to enter boot mode or application mode 95 | * 96 | * This function will check the state of BOOT_LOAD_PIN. If it is pressed, it 97 | * continues execution in bootloader mode. Else, it reads the first location 98 | * from the application section and checks whether it is 0xFFFFFFFF. If yes, 99 | * then the application section is empty and it waits indefinitely there. If 100 | * not, it jumps to the application and starts execution from there. 101 | * Access to direct peripheral registers are made in this routine to enable 102 | * quick decision on application or bootloader mode. 103 | */ 104 | void check_boot_mode(void) 105 | { 106 | uint32_t app_check_address; 107 | uint32_t *app_check_address_ptr; 108 | 109 | /* Check if WDT is locked */ 110 | if (!(WDT->CTRL.reg & WDT_CTRL_ALWAYSON)) { 111 | /* Disable the Watchdog module */ 112 | WDT->CTRL.reg &= ~WDT_CTRL_ENABLE; 113 | } 114 | 115 | delay_init(); 116 | 117 | volatile PortGroup *boot_port = (volatile PortGroup *)(&(PORT->Group[BOOT_LOAD_PIN / 32])); 118 | volatile bool boot_en; 119 | 120 | /* Enable the input mode in Boot GPIO Pin */ 121 | boot_port->DIRCLR.reg = GPIO_BOOT_PIN_MASK; 122 | boot_port->PINCFG[BOOT_LOAD_PIN & 0x1F].reg = PORT_PINCFG_INEN | PORT_PINCFG_PULLEN; 123 | boot_port->OUTSET.reg = GPIO_BOOT_PIN_MASK; 124 | delay_ms(8); // Allow 100nF debouncing capacitor to charge 125 | 126 | /* Read the BOOT_LOAD_PIN status */ 127 | boot_en = ((boot_port->IN.reg) & GPIO_BOOT_PIN_MASK); 128 | 129 | #if (BOOT_TEST_VBUS_VALUE != 0) 130 | uint16_t vbus_voltage; 131 | adc_start_conversion(&adc_instance); 132 | 133 | do { 134 | /* Wait for conversion to be done and read out result */ 135 | } while (adc_read(&adc_instance, &vbus_voltage) == STATUS_BUSY); 136 | 137 | /* Check the BOOT pin, vbus voltage, or the reset cause is Watchdog */ 138 | if (((boot_en) && (vbus_voltage < BOOT_TEST_VBUS_VALUE)) || (PM->RCAUSE.reg & PM_RCAUSE_WDT)) { 139 | #else 140 | /* Check the BOOT pin or the reset cause is Watchdog */ 141 | if ((boot_en) || (PM->RCAUSE.reg & PM_RCAUSE_WDT)) { 142 | #endif 143 | app_check_address = APP_START_ADDRESS; 144 | app_check_address_ptr = (uint32_t *) app_check_address; 145 | 146 | /* 147 | * Read the first location of application section 148 | * which contains the address of stack pointer. 149 | * If it is 0xFFFFFFFF then the application section is empty. 150 | */ 151 | if (*app_check_address_ptr == 0xFFFFFFFF) { 152 | while (1) { 153 | /* Wait indefinitely */ 154 | } 155 | } 156 | /* Pointer to the Application Section */ 157 | void (*application_code_entry)(void); 158 | 159 | /* Rebase the Stack Pointer */ 160 | __set_MSP(*(uint32_t *) APP_START_ADDRESS); 161 | 162 | /* Rebase the vector table base address */ 163 | SCB->VTOR = ((uint32_t) APP_START_ADDRESS & SCB_VTOR_TBLOFF_Msk); 164 | 165 | /* Load the Reset Handler address of the application */ 166 | application_code_entry = (void (*)(void))(unsigned *)(*(unsigned *)(APP_START_ADDRESS + 4)); 167 | 168 | /* Jump to user Reset Handler in the application */ 169 | application_code_entry(); 170 | } 171 | } 172 | 173 | 174 | /*! \brief Main function. Execution starts here. 175 | */ 176 | int main(void) 177 | { 178 | struct nvm_config config; 179 | 180 | /* Check switch state to enter boot mode or application mode */ 181 | #if (BOOT_TEST_VBUS_VALUE != 0) 182 | configure_adc(); 183 | #endif 184 | check_boot_mode(); 185 | 186 | irq_initialize_vectors(); 187 | cpu_irq_enable(); 188 | 189 | // Initialize the sleep manager 190 | sleepmgr_init(); 191 | system_init(); 192 | 193 | /* Get NVM default configuration and load the same */ 194 | nvm_get_config_defaults(&config); 195 | nvm_set_config(&config); 196 | 197 | /* Turn on LED */ 198 | port_pin_set_output_level(BOOT_LED, true); 199 | 200 | ui_init(); 201 | ui_powerdown(); 202 | 203 | // Start USB stack to authorize VBus monitoring 204 | udc_start(); 205 | 206 | // The main loop manages only the power mode 207 | // because the USB management is done by interrupt 208 | while (true) { 209 | if (main_b_msc_enable) { 210 | if (!udi_msc_process_trans()) { 211 | sleepmgr_enter_sleep(); 212 | } 213 | }else{ 214 | sleepmgr_enter_sleep(); 215 | } 216 | } 217 | 218 | start_application(); 219 | } 220 | 221 | void main_suspend_action(void) 222 | { 223 | ui_powerdown(); 224 | } 225 | 226 | void main_resume_action(void) 227 | { 228 | ui_wakeup(); 229 | } 230 | 231 | void main_sof_action(void) 232 | { 233 | if (!main_b_msc_enable) 234 | return; 235 | ui_process(udd_get_frame_number()); 236 | } 237 | 238 | bool main_msc_enable(void) 239 | { 240 | main_b_msc_enable = true; 241 | return true; 242 | } 243 | 244 | void main_msc_disable(void) 245 | { 246 | main_b_msc_enable = false; 247 | } 248 | 249 | /** 250 | * \mainpage ASF USB Device MSC 251 | * 252 | * \section intro Introduction 253 | * This example shows how to implement a USB Device Mass Storage 254 | * on Atmel MCU with USB module. 255 | * 256 | * \section startup Startup 257 | * The example uses all memories available on the board and connects these to 258 | * USB Device Mass Storage stack. After loading firmware, connect the board 259 | * (EVKxx,Xplain,...) to the USB Host. When connected to a USB host system 260 | * this application allows to display all available memories as a 261 | * removable disks in the Unix/Mac/Windows operating systems. 262 | * \note 263 | * This example uses the native MSC driver on Unix/Mac/Windows OS, except for Win98. 264 | * 265 | * \copydoc UI 266 | * 267 | * \section example About example 268 | * 269 | * The example uses the following module groups: 270 | * - Basic modules: 271 | * Startup, board, clock, interrupt, power management 272 | * - USB Device stack and MSC modules: 273 | *
services/usb/ 274 | *
services/usb/udc/ 275 | *
services/usb/class/msc/ 276 | * - Specific implementation: 277 | * - main.c, 278 | *
initializes clock 279 | *
initializes interrupt 280 | *
manages UI 281 | * - specific implementation for each target "./examples/product_board/": 282 | * - conf_foo.h configuration of each module 283 | * - ui.c implement of user's interface (leds) 284 | * 285 | * 1 The memory data transfers are done outside USB interrupt routine. 286 | * This is done in the MSC process ("udi_msc_process_trans()") called by main loop. 287 | */ 288 | -------------------------------------------------------------------------------- /main.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Declaration of main function used by MSC example 5 | * 6 | * Copyright (c) 2009-2011 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef _MAIN_H_ 45 | #define _MAIN_H_ 46 | 47 | #include 48 | //#include 49 | #include "ui.h" 50 | #include "mt-d21e/conf_usb.h" 51 | #include "mt-d21e/conf_bootloader.h" 52 | 53 | /* To enable running the bootloader if USB is connected (run application otherwise), 54 | * set BOOT_TEST_VBUS_VALUE to a non-zero value that represents the voltage threshold. 55 | * This value represents about 0.4V. When using the voltage divider on the MT-D21E 56 | * (200K top resistor and 20K bottom resistor), this value is reached when the 57 | * Vbus pin is at 4.4V. In order to prevent leakage current from one of the diodes 58 | * from triggering a false Vbus > 4.4V condition, keep the diode below 70C. 59 | */ 60 | //#define BOOT_TEST_VBUS_VALUE 0x0660 61 | #define BOOT_TEST_VBUS_VALUE 0 62 | 63 | void start_application(void); 64 | void configure_adc(void); 65 | void check_boot_mode(void); 66 | 67 | /*! \brief Called by MSC interface 68 | * Callback running when USB Host enable MSC interface 69 | * 70 | * \retval true if MSC startup is ok 71 | */ 72 | bool main_msc_enable(void); 73 | 74 | /*! \brief Called by MSC interface 75 | * Callback running when USB Host disable MSC interface 76 | */ 77 | void main_msc_disable(void); 78 | 79 | /*! \brief Called when a start of frame is received on USB line 80 | */ 81 | void main_sof_action(void); 82 | 83 | /*! \brief Enters the application in low power mode 84 | * Callback called when USB host sets USB line in suspend state 85 | */ 86 | void main_suspend_action(void); 87 | 88 | /*! \brief Called by UDD when the USB line exit of suspend state 89 | */ 90 | void main_resume_action(void); 91 | 92 | #endif // _MAIN_H_ 93 | -------------------------------------------------------------------------------- /msd_bootloader_samd21e15a_flash.hex: -------------------------------------------------------------------------------- 1 | :10000000280F0020A9320000A5320000A532000010 2 | :1000100000000000000000000000000000000000E0 3 | :10002000000000000000000000000000A5320000F9 4 | :100030000000000000000000A5320000A532000012 5 | :10004000A5320000A53200007D1C0000A532000092 6 | :1000500085160000A5320000A5320000252C000006 7 | :10006000A5320000A5320000A5320000A532000034 8 | :10007000A5320000A5320000A5320000A532000024 9 | :10008000A5320000A5320000A5320000A532000014 10 | :10009000A5320000A5320000A5320000A532000004 11 | :1000A000A5320000A5320000A5320000A5320000F4 12 | :1000B00008B5064B064803331B1A062B00D808BDAB 13 | :1000C000044B002BFBD09847F9E7C046F4360000FC 14 | :1000D000F43600000000000008B50748074B1B1A63 15 | :1000E0009B10DA0FD318591000D108BD044A002A1A 16 | :1000F000FBD09047F9E7C046F4360000F436000024 17 | :100100000000000010B5074C2378002B09D1FFF741 18 | :10011000CFFF054B002B02D0044800E000BF0123B5 19 | :10012000237010BD6401002000000000F4360000C0 20 | :1001300008B5094B002B03D00848094900E000BF6F 21 | :1001400008480368002B03D0074B002B00D09847CA 22 | :10015000FFF7C2FF08BDC04600000000F4360000F3 23 | :1001600068010020F43600000000000010B572B6EF 24 | :10017000BFF35F8F194A002313701948D9B20133B6 25 | :100180001818013800780028F7D0002905D101237C 26 | :100190001370BFF35F8F62B61FE072B6BFF35F8F5D 27 | :1001A000002313704B1EDBB2022B07D9032B0CD19B 28 | :1001B0000C4B042019690143196106E00949042424 29 | :1001C0000869A043086108494B7001231370BFF30D 30 | :1001D0005F8F62B6BFF34F8F30BF10BD5801002054 31 | :1001E0009404002000ED00E00004004013B5184B1B 32 | :1001F0001A68110603D41968FD220A401A7001F02A 33 | :100200009DF8144C144A80231B05062163600820C6 34 | :100210001170A36101F0ACF8226A6B461201D20F93 35 | :10022000DA7107331B78002B03D10C4B9B6B9A06BA 36 | :100230000CD58022D2011368591C00D1FEE783F34C 37 | :100240000888074B9A60074B1B68984713BDC04648 38 | :1002500000100040004400415B44004100040040A5 39 | :1002600000ED00E00440000013B5FFF7BFFF184B9E 40 | :1002700001221A70BFF35F8F62B6164B00241A7109 41 | :100280001C705C709C70DC7001F0EDFC6A46124BD7 42 | :10029000147054705B686846DB061B0F9370D47053 43 | :1002A000147101F07BF80D4B802252059A6100F029 44 | :1002B00039F800F03FF800F00BFE094B1B78002BDB 45 | :1002C00003D000F0E5FC0028F7D1FFF74FFFF4E77B 46 | :1002D00058010020940400200040004100440041E7 47 | :1002E0008001002008B500F025F808BD08B500F031 48 | :1002F00029F808BD08B5044B1B78002B03D001F08A 49 | :100300008DFF00F02BF808BD80010020014B01207B 50 | :100310001870704780010020014B00221A7070474E 51 | :1003200080010020024B802252059A617047C0462E 52 | :1003300000440041024B802252055A617047C0467A 53 | :1003400000440041024B802252059A617047C0462A 54 | :10035000004400417047704770477047002804D13F 55 | :100360008022064B52059A6107E0FA239B009842CF 56 | :1003700003D18022014B52055A617047004400416D 57 | :10038000024B1878431E98414000704781010020BD 58 | :10039000044B1A780223002A02D123230360131C82 59 | :1003A000181C704781010020002070470120704711 60 | :1003B00070B5051C0E1C0120242D17D84B190024E4 61 | :1003C000242B13D8A0B2B0420FD2401980B200F053 62 | :1003D000ABF88022012006499200002300F09CFC2B 63 | :1003E00001340028EED1012000E0002070BDC0469D 64 | :1003F00094020020F8B5051C0E1C0120242D16D8EF 65 | :100400004B190024242B12D8A7B20020B7420ED2D9 66 | :10041000802207499200031C00F07EFC002805D0D2 67 | :100420007F19B8B200F06CF80134EDE70120F8BD97 68 | :100430009402002043081B1810B5DBB2094AC40718 69 | :1004400008D5D45C0F2020400C012043D05409096A 70 | :10045000D31805E00F20D154D3180A0A8143114361 71 | :10046000597010BD94020020F7B5214B00915A330A 72 | :100470005D781A782D021543013DAD00ADB2A8425A 73 | :1004800035D32B1C1F339BB2984230D8451BE02339 74 | :100490006D025B00EB1801932C1C8023DB01E61836 75 | :1004A000009B144F002B06D07F1B3919301C4022B3 76 | :1004B00001F044F80BE0F3B2002B02D1301C01F044 77 | :1004C00075F87F1B3919301C402200F0EDFF019BAD 78 | :1004D00040349C42E1D1084B0849E818009B402277 79 | :1004E000002B02D001F02AF801E000F0DDFFF7BD9B 80 | :1004F0000000002094020020C041000054040020AD 81 | :1005000008B502280AD9032805D105496022054803 82 | :1005100003F004F802E00021FFF7A6FF08BDC04683 83 | :10052000940200200000002038B5234C8022051CD6 84 | :100530000021201C920003F033F8281E032836D82F 85 | :1005400002F0E4FE020F0F2F3E22201C1B4902F096 86 | :10055000E5FFFF2355225B00E254194BAA22E25427 87 | :1005600028E000201749FFF765FF01201649FFF733 88 | :1005700061FF164B00245A335D781A782D0215431B 89 | :10058000A3B25819E2B280B2072A03D0691C5918E5 90 | :1005900089B200E00C490134FFF74CFF082CEFD181 91 | :1005A00008E0201C0949602202F0B8FF02E00121A6 92 | :1005B000FFF75AFF38BDC046940200205C360000A9 93 | :1005C000FF010000F80F0000FF0F000000000020F6 94 | :1005D00073B501AC01250026211C1C206570A67096 95 | :1005E000257001F06DF8054B802252055A611B20E1 96 | :1005F000211C2670657001F063F873BD0044004152 97 | :100600000120704708B5031C0120002B01D1FFF722 98 | :10061000B7FE08BD021C08B50120002A02D1081C43 99 | :10062000FFF7B6FE08BD031C0020834201D1012064 100 | :100630004840704708B5031C0120002B01D1FFF78B 101 | :10064000B3FE08BD08B5031C0120002B01D1FFF744 102 | :10065000ADFE08BD002801D1014800E00020704730 103 | :100660009A360000F8B5071C0E1C151C0124FFF774 104 | :1006700071FE002F04D1301C291CFFF799FE041CC9 105 | :10068000FFF769FE201CF8BDF8B5071C0E1C151CF1 106 | :100690000124FFF761FE002F04D1301C291CFFF755 107 | :1006A000A9FE041CFFF759FE201CF8BD002070476E 108 | :1006B000431E9841034BC0B21870034B01221A70BD 109 | :1006C0007047C046990400206000002010B5054C1A 110 | :1006D0000021201C122202F063FFF02323700A2362 111 | :1006E000E37110BDA401002008B5FFF7EFFF024B36 112 | :1006F00000221A7308BDC0467800002008B5054BDB 113 | :1007000000221A70044A01231370044A1370FFF781 114 | :1007100003FE08BD9C01002060000020AC0000200A 115 | :1007200007B5074B022000930121064A1F2301F061 116 | :10073000B9FE002803D10220034901F089FE07BD5C 117 | :10074000B10A0000C40100202107000008B5FFF72E 118 | :10075000E7FF08BD134B70B500241C70124B134A01 119 | :100760001C7001231370124A1370FFF749FF114EDA 120 | :100770003070A04201D1002511E001383070FFF740 121 | :10078000C5FD051EF7D03378A34206D3201C0021F7 122 | :100790000134FFF748FFE4B2F5E7FFF7C1FF281C7B 123 | :1007A00070BDC0469C0100209D010020600000201B 124 | :1007B000AC0000208401002007B5074B8120009386 125 | :1007C0000021064A0D2301F06DFE002803D181208F 126 | :1007D000034901F03DFE07BD4D07000078000020F1 127 | :1007E000B907000038B5094B094C9A681D1C002A4E 128 | :1007F00006D0237B81207F2B00D8022001F09AFDB8 129 | :1008000064686C60FFF7D8FF38BDC04678000020F0 130 | :10081000C401002008B5064B1B78002B06D002202F 131 | :1008200001F088FD0220034901F012FE08BDC04618 132 | :100830009D0100201508000008B5064B1B78002B11 133 | :1008400006D0812001F076FD8120034901F000FEF1 134 | :1008500008BDC0469D0100203908000010B50C1CE1 135 | :10086000002807D1FFF740FF034B9A68141B9C60D8 136 | :10087000FFF7B8FF10BDC0467800002008B5184B40 137 | :1008800060211A7850B20A4000280FDA0020202A8E 138 | :1008900025D15A78FE2A22D1DA88012A1FD1598817 139 | :1008A00081421CD10F499A81996017E00020202ACB 140 | :1008B00015D15A78FF2A12D1DA8882420FD15B888B 141 | :1008C00083420CD1084B1870084B1870022001F0BD 142 | :1008D0008BFC812001F088FCFFF722FF012008BD7E 143 | :1008E000CC060020840100209D0100209C010020F6 144 | :1008F00038B5051C0C1CFFF7E9FE074B01221A73E3 145 | :10090000064B0022DA701A715A719A71220A9D7090 146 | :100910001A735C7338BDC04678000020A401002023 147 | :1009200008B5E82102208901FFF7E2FF08BD08B5FC 148 | :100930000620A0218140FFF7DBFF08BD08B5042099 149 | :100940000021FFF7D5FF08BD07B50B1C0649021CA7 150 | :1009500000918120012101F0A5FD002803D1FFF7BE 151 | :10096000EDFFFFF73FFF07BD5D08000008B59021D0 152 | :1009700005208901FFF7BCFF08BD000008B5094B41 153 | :100980001B7B594049B2002904DB074B9A680123BD 154 | :10099000824204D2FFF7EAFFFFF724FF0023181C6E 155 | :1009A00008BDC046C401002078000020F7B5214CE6 156 | :1009B000071C0021201C142202F0F2FD1E4E002F05 157 | :1009C00004D0231CF27D0833082502E0F27C231DAD 158 | :1009D0000425707C3F2101401C2901D03F2907D10B 159 | :1009E0001C2119700A2159700C350521D970EDB2FE 160 | :1009F0002B1C954200D9131CDBB2181C80210193DB 161 | :100A0000FFF7BCFF002813D0707BFFF713FE431ED7 162 | :100A10009841C001002F04D0023D2D022580E070D6 163 | :100A200002E0013D2570A070201C0199FFF78CFFAA 164 | :100A3000F7BDC04688010020C401002038B5051C60 165 | :100A4000164C0CD1607BFFF7F5FD002807D09C21E8 166 | :100A500007208901FFF74CFFFFF7C4FE1CE0104B95 167 | :100A6000627C291CDA70A27C9A70E27C5A70227D2A 168 | :100A70001A700C4BA27D5A70E27D1A7018884B1EBA 169 | :100A800099414002C901FFF779FF002804D0064BC5 170 | :100A900001221D70054B1A7038BDC046C4010020EC 171 | :100AA000A00100209E010020C00100209C01002028 172 | :100AB000F8B5002800D0D9E01F2905D16C496D4B4D 173 | :100AC0000A680C1C9A4207D06B4B01221A70FFF780 174 | :100AD000A1FEFFF7B1FEC9E04A7B0F231A40674B26 175 | :100AE0004A731B78934200D2AFE0654B8D689D60DE 176 | :100AF000CB7B1E2B00D1A5E00DD8122B2DD004D816 177 | :100B0000002B67D0032B18D0A5E01A2B5FD01B2B2E 178 | :100B100000D18EE09FE02A2B00D199E006D8252B4A 179 | :100B200064D00120282B00D192E094E02F2B00D13B 180 | :100B300099E001205A2B4AD08DE0CB7C1C1C122B53 181 | :100B400000D91224E4B2201C8021FFF717FF0028EF 182 | :100B500000D18BE04B48211C68E0CB7C1D1C242B72 183 | :100B600000D92425EDB2281C8021FFF707FF0028BB 184 | :100B70007CD0237C990768D1677C002F65D1607B8E 185 | :100B8000FFF760FD404E431E9841C0017070607BCE 186 | :100B9000FFF760FD411C301C1030102202F0BEFC3B 187 | :100BA0003B1C301CC118097CDAB2002905D022296F 188 | :100BB00003D00133102BF5D11A1C102A05D083184D 189 | :100BC000202101321974D2B2F7E7291C2EE0FFF779 190 | :100BD000EDFE4BE0101CFFF715FD022823D0032883 191 | :100BE0001ED000283FD0FFF7A9FE39E00820802161 192 | :100BF000FFF7C4FE002839D0607B244C211CFFF78E 193 | :100C000009FD02280FD003280AD00028EBD1226862 194 | :100C100080239B02636013BA2360201C082105E037 195 | :100C2000FFF785FE1CE0FFF77BFE19E0FFF78CFE67 196 | :100C30001CE0CB7C9D0716D501219943101CFFF7C2 197 | :100C4000F2FC10E0CB7C002B0DD0FFF78FFE07E00D 198 | :100C5000FFF7F4FE0AE0802105208901FFF748FE36 199 | :100C6000FFF7C0FD02E0FFF73FFDF9E7F8BDC04622 200 | :100C7000C4010020555342439D01002084010020FF 201 | :100C800078000020A401002088000020B801002086 202 | :100C900010B51B4A00231178181C99422ED0194C0C 203 | :100CA00013702370184B19491878194A194B0028EA 204 | :100CB00005D0487B11681A88FFF7D4FC04E0487B14 205 | :100CC00011681A88FFF7E0FC2378002B02D000237C 206 | :100CD000237012E0022809D0032804D0002808D18C 207 | :100CE000FFF702FD07E0FFF722FE04E0FFF718FE22 208 | :100CF00001E0FFF723FEFFF775FD012010BDC046A0 209 | :100D00009C010020AC000020C0010020C401002094 210 | :100D1000A00100209E010020F7B51A4D1E1C2B7863 211 | :100D20000F1C141C002B01D1002029E000232B7084 212 | :100D30000223002800D08123321E00D1124A0092E3 213 | :100D4000181C00213A1C231C01F0ACFB002802D126 214 | :100D500001232B7014E0002E0ED12B78002BFCD039 215 | :100D60000A4B1A78002ADFD1094A1B7891680120C2 216 | :100D70000C1B9460584003E0054B9A68141B9C6060 217 | :100D8000FEBDC04660000020B106000099040020AE 218 | :100D90007800002008B5034B58887F23184001F0E5 219 | :100DA00031FC08BDCC06002030B5144B1A78002366 220 | :100DB0009A4221D0124B1B681B681A79824201D8D3 221 | :100DC000002319E0DC789D780E4A24022C4313603E 222 | :100DD0001C199C420ED95D78042D08D19D7885425E 223 | :100DE00005D1DD788D4202D11360012304E01D7826 224 | :100DF0005B19EEE71360E3E7181C30BDEE0100203D 225 | :100E0000E8010020F0010020094B1B681B68DA781C 226 | :100E1000997812020A439B1802788018834205D9F8 227 | :100E20004278042A02D0052AF6D100E0002070475B 228 | :100E3000E801002038B5051CFFF7B6FF002801D1F6 229 | :100E4000002018E00C4B1C68201CFFF7DDFF041E7F 230 | :100E50000AD06279237912028078E1781A4301F08E 231 | :100E600005FA0028F0D1EBE7044BAD001B685B6886 232 | :100E7000EB581B68984738BDF0010020E8010020BE 233 | :100E800070B50021051CFFF78FFF041E19D00E4B13 234 | :100E9000AA001B685B68D658F3689847011C281C99 235 | :100EA000FFF782FF041E0CD0084B1D68281CFFF7BB 236 | :100EB000ABFF051E03D0807801F0B8F9F6E7736840 237 | :100EC0009847201C70BDC046E8010020F0010020BA 238 | :100ED00008B501F0F3FB08BD38B50C4B00241A78B7 239 | :100EE0001D1CA24205D100232B70094B01221A8040 240 | :100EF00038BD084B1B681B681B79A342F3D9201C23 241 | :100F00000134FFF7BDFFE4B2F3E7C046EE01002075 242 | :100F1000EC010020E801002010B50B4B00241B78E9 243 | :100F2000A3420FD0094B1B6819680A79A24209D95C 244 | :100F30005B68A200D3581B69002B00D0984701348E 245 | :100F4000E4B2EFE710BDC046EE010020E80100204A 246 | :100F5000F8B5A44C0023A38123616361237858B2C0 247 | :100F6000002803DAE288002A00D19FE160211940BD 248 | :100F700000D051E11F22002800DBA9E0E588002D08 249 | :100F800000D149E1134067D16378062B09D0082BC3 250 | :100F90005DD0002B00D03FE1022D00D03CE1924813 251 | :100FA00092E06088050A022D0CD006D8012D00D0F1 252 | :100FB00032E18E4B1868017840E0032D1FD00F2DD1 253 | :100FC00013D029E1894BC0B219684A7C824200D80B 254 | :100FD00022E15B68C000C058C178837809021943D8 255 | :100FE00001F020FBA26855702AE0804B9868002829 256 | :100FF00000D111E1C1788378090219431EE0C0B223 257 | :10100000032800D908E102F08BF9070004000A0068 258 | :101010004E010F21764A04E0764804210EE0764A1C 259 | :101020001621002375485D00D65C451901336E809A 260 | :10103000DDB28D42F6D349000231017001F0F2FABF 261 | :10104000E388A2899A4200D8CAE0A381C8E0012DB2 262 | :1010500000D0E1E06A4837E0012B25D163780A2B04 263 | :1010600000D0D9E0012D00D0D6E0654B1B78002BD5 264 | :1010700000D1D1E0634B26791F683A681379B342F7 265 | :1010800000D8C9E0301CFFF78FFE051E00D1C3E079 266 | :101090007B68B600F358DB6898475B4B01211870FA 267 | :1010A000181C01F0BFFA99E0022B00D0B4E063787D 268 | :1010B000002B00D0B0E0022D00D0ADE0207901F08F 269 | :1010C00031F9524B1880181C291C01F0ABFA87E04B 270 | :1010D00013404CD160780138082800D99CE002F018 271 | :1010E00015F90C9B9B9B059B9B9B1A00E388002B8F 272 | :1010F00000D091E0464B236172E0E388002B00D0E2 273 | :101100008AE06388012B00D086E0374B02211A88E1 274 | :101110008A431A8064E0E588002D00D07CE001F06D 275 | :1011200079FA002800D177E0304EA27831684B7C04 276 | :101130009A4271DCFFF7D0FEA378314A1370002B7E 277 | :101140004ED034492F4A5B187168DB00CB1813600E 278 | :10115000161C33681B681B79AB4241D9281C00213F 279 | :10116000FFF768FE002857D00135EDB2F1E7012BFB 280 | :1011700015D163780B2B4FD1E388002B4CD1204B3A 281 | :101180001B78002B48D025796688281CFFF778FE4D 282 | :10119000002841D0F1B2281CFFF74CFE1DE0022BC5 283 | :1011A0003AD16378012B02D0032B0AD034E0E388D4 284 | :1011B000002B31D16388002B2ED1207901F02EF93C 285 | :1011C0000BE0E388002B27D16388002B24D1207902 286 | :1011D00001F00AF8207901F0ADF8051C002D1BD0B4 287 | :1011E000012064E0CC060020EC010020B8000020C3 288 | :1011F0001301002054010020FC00002024010020E5 289 | :10120000EE010020E8010020F4010020E4010020AC 290 | :10121000950D0000FFFFFF1F22781F231340012BB5 291 | :101220001FD1234B1B78002B1BD0224B25791E6826 292 | :1012300032681379AB4214D9281C0021FFF7B4FDA2 293 | :1012400000280ED07368AA00D658F3689847011C8E 294 | :10125000281CFFF7A9FD002803D0B3689847002891 295 | :10126000BED122781F231340022B1FD1104B002424 296 | :101270001B78002B1AD00F4B1B6819680A79A24201 297 | :1012800014D95B68A200D558E9688847011C201C66 298 | :10129000FFF78AFD002809D0AB68984700289FD146 299 | :1012A0000134E4B2E7E70C21034ABAE60020F8BDB6 300 | :1012B000EE010020E8010020AF3600000A4B1A685A 301 | :1012C000002A0CD1EFF310800021084A884205D192 302 | :1012D00072B6BFF35F8F06480170012111701A6862 303 | :1012E00001321A607047C046F8010020FC0100205E 304 | :1012F00058010020084B1A68013A1A601B68002B3D 305 | :1013000009D1064B1B78002B05D0054B01221A7022 306 | :10131000BFF35F8F62B67047F8010020FC01002028 307 | :1013200058010020002806D0034B002258609A6024 308 | :101330001A68D103FCD5704710E000E008B5002022 309 | :1013400000F0A4FBFA21890001F0F4FF054BFA211B 310 | :101350001860890001F0EEFF034B05221860034B73 311 | :101360001A6008BD600100205C01002010E000E070 312 | :1013700010B5041C002C05D0034B013C1868FFF786 313 | :10138000D1FFF7E710BDC04660010020024B58694D 314 | :10139000012318407047C0460040004138B51D4B3E 315 | :1013A0000421DA691C4C0A43DA61A269202392B253 316 | :1013B000FF3313432383051CFFF7E8FF031C0520BD 317 | :1013C000002B25D0EA786B782978DB0192041A4348 318 | :1013D000C02309029B000B401343AA781E21520030 319 | :1013E0000A4029791343C022090492020A40134398 320 | :1013F0006360A268094B5203520F08219140198083 321 | :10140000A2685A806A781A71A069C005C00F0001ED 322 | :1014100038BDC0460004004000400041FE010020ED 323 | :10142000F8B51F4B041C5A881B880E1C5A431823FE 324 | :10143000914233D81B4D80236F68DB023B436B60C6 325 | :10144000AA69202392B2FF3313432B83FFF79EFF39 326 | :101450000523002822D0062C06D89C420BD2022C51 327 | :101460000DD0042C19D10AE0402C16D3412C06D9FA 328 | :10147000452C07D911E0AA691023D1050ED4B6086E 329 | :101480007600EE61A5231B021C432C80FFF77EFF34 330 | :101490000028FBD06F60002300E01723181CF8BD64 331 | :1014A000FE01002000400041F8B5214B0E1C151C28 332 | :1014B00059881A88041C51431823884235D8511E74 333 | :1014C000014232D1172395422FD8FFF75FFF052342 334 | :1014D00000282AD0174F184B3B80FFF757FF0028F2 335 | :1014E000FBD0BA69202392B2FF33134360083B83D9 336 | :1014F000400000239AB2AA420ED29AB26F1EB15C8B 337 | :10150000BA4201DB0A1C03E0B218527812020A4305 338 | :1015100019180A800233EDE700233F2D05D81A1C65 339 | :101520000420211CFFF77CFF031C181CF8BDC046DB 340 | :10153000FE0100200040004144A5FFFFF8B5194B13 341 | :101540000E1C19885B88141C4B43051C18229842FA 342 | :1015500025D84F1E074022D117228C421FD8FFF7F3 343 | :1015600015FF052200281AD00F4B20229969FF325F 344 | :1015700089B20A436D081A836D003B1C9AB2A242DD 345 | :101580000CD25A191188601E89B29AB2B1548242A3 346 | :1015900002DAB218090A51700233EFE70022101C78 347 | :1015A000F8BDC046FE0100200040004138B5104B98 348 | :1015B000041C1D885A8818236A43904215D8AD0030 349 | :1015C000013D054011D1FFF7E1FE052300280CD0B5 350 | :1015D000084B20229969FF3289B20A431A83A40872 351 | :1015E000054A6400DC611A802B1C181C38BDC046FB 352 | :1015F000FE0100200040004102A5FFFF024B1868D9 353 | :101600000004C00F7047C0460018004008B5054BE5 354 | :1016100002211A68D2B20A431A70FFF7EFFF0028BE 355 | :10162000FBD108BD0018004007B5124B40219A6954 356 | :1016300005200A439A6101A900230B7000F09CFA6F 357 | :10164000052000F05DFA0C4B01211A68D2B20A4362 358 | :101650001A70FFF7D3FF0028FBD1084B0022C318F4 359 | :1016600004301A604028F8D1054B10221A60FFF7A9 360 | :10167000CDFF07BD00040040001800409C0400207E 361 | :1016800000E100E010B50B4C0023237023780F2BF2 362 | :101690000FD8094A012110699940084206D011610A 363 | :1016A000064A9B009B58002B00D0984723780133B3 364 | :1016B000EBE710BDDC040020001800409C04002073 365 | :1016C00007B5802201AB1A700A785A704A789A706E 366 | :1016D0008A78191CDA7000F0B1FA07BD10B50C4B0E 367 | :1016E00002211A680A431A60196880229143094A44 368 | :1016F00089B29184101CC168064ACC06FBD5996852 369 | :101700000020D162596891621B689BB2938410BD1E 370 | :10171000040200200008004010B5082832D801F06B 371 | :10172000F5FD0831310505130B1629008020000254 372 | :101730002BE0164B186928E0154B186A154B8005ED 373 | :10174000800FC340181C20E0104B58691DE00F4C5F 374 | :1017500002232068184018D00D4BDB68DA06FBD551 375 | :1017600023685A0710D5002000F012FAA3689BB234 376 | :1017700058430AE0064B00201B6D5A0705D5034B62 377 | :10178000D86802E0002000E0034810BD04020020F9 378 | :101790000008004000127A00006CDC0270B50D4BAE 379 | :1017A00045781E6A817804780122402086431540DE 380 | :1017B000AD01301C0A402843D10180229043021C15 381 | :1017C0000A43054803212140090202400A431A62E4 382 | :1017D00070BDC04600080040FFFCFFFF30B5027A34 383 | :1017E000438992069B059B0D120C1A43124B81886C 384 | :1017F0005A604288C4791143827922430A4341786E 385 | :10180000C9010A431A600278042A0BD1047BC189FA 386 | :10181000058A0A48A40609042C4301402143996023 387 | :10182000196806E0202A06D1028A9A601968842283 388 | :10183000D2000A431A6030BD040200200000FF03FA 389 | :1018400008B508282CD801F061FD122B2B100B19BC 390 | :1018500005202300134B02211A6A0A431A6204E08E 391 | :10186000104B02219A690A439A61002019E00D4B3E 392 | :1018700002211A6992B20A431A82F6E7094B022141 393 | :101880005A6992B20A439A82EFE7FFF727FF08E00E 394 | :10189000044B5A6C0223D2B21A43034B1A70E4E78A 395 | :1018A000172008BD000800404408004010B5C223BE 396 | :1018B0002D4CDB00A3602D4B1E215A688AB08A4351 397 | :1018C00004210A435A6005A80023438083714370B2 398 | :1018D000072303733F232022C381254B02701A681C 399 | :1018E000920E3F2A00D11F22224B23491B689B05E1 400 | :1018F0009B0D8B4200D1214B43810823C371802370 401 | :101900005B0083801E4B02720382FFF767FF01A812 402 | :1019100000230122437082700370FFF73FFF06200F 403 | :10192000FFF78EFF00F038F8FFF7D8FEE2680E4BA5 404 | :10193000D106FBD59A8C80210A439A84114B00244E 405 | :101940001C7202A95C7207229C72201C01234B604E 406 | :101950004C704C720A700B7200F02EF8201C00F0D4 407 | :1019600079F80AB010BDC0460008004000400041B0 408 | :101970002460800028608000FF030000FF01000059 409 | :1019800080BBFFFF00040040024B18680004C00F3A 410 | :101990007047C046000C0040054B08219A690A4375 411 | :1019A0009A61044B01221A701A68D107FCD470475F 412 | :1019B00000040040000C004070B50C784B78240205 413 | :1019C000051C061C0443002B02D08023DB021C43B1 414 | :1019D0004B7A002B02D080231B031C434B68012B46 415 | :1019E00013D95E1E1E400222002E09D19A4202D255 416 | :1019F00001365200FAE7360280232E435B0303E0F0 417 | :101A00001E0280232E439B021C430B7A002B02D024 418 | :101A100080239B031C43FFF7B7FF0028FBD1FFF790 419 | :101A20004DFC0A4B1D70FFF7AFFF0028FBD1084D9E 420 | :101A3000AE60FFF7A9FF0028FBD16A6880235B0234 421 | :101A400013401C436C60FFF755FC70BD080C004050 422 | :101A5000000C004010B5041CFFF796FF0028FBD1D6 423 | :101A6000FFF72CFC074B1C70FFF78EFF0028FBD103 424 | :101A7000054B8022596852020A435A60FFF73AFC2C 425 | :101A800010BDC046040C0040000C0040F8B5071C17 426 | :101A9000FFF77AFF0028FBD1FFF710FC154B1F70F2 427 | :101AA0001E1CFFF771FF0028FBD1134D6868C004AE 428 | :101AB000C00EFFF731FE37706E68104BF602041C43 429 | :101AC000F60F1F70FFF760FF0028FBD1AD682D02F5 430 | :101AD0002D0CFFF70FFC002E07D1012D07D9201C7C 431 | :101AE000291C01F027FC041C01E00135EC40201CFE 432 | :101AF000F8BDC046040C0040000C0040080C00403B 433 | :101B000010B5041CFFF7DAFB054B80221C70054B57 434 | :101B1000D2011968090C0A435A80FFF7EBFB10BD8C 435 | :101B2000020C0040000C004038B5041CFFF7C6FB57 436 | :101B30000D4B0E4A1C700E4B0E4C1968588809014B 437 | :101B4000104058801868090F000C20405880101C65 438 | :101B50001C68074A6500FBD45388090203400B4305 439 | :101B60005380FFF7C7FB38BD020C0040FFF0FFFFBA 440 | :101B7000000C0040FFBFFFFF10B50C7824020443A7 441 | :101B8000FFF7D2FF014BA4B25C8010BD000C0040F7 442 | :101B900010B5041CFFF792FB054B1C70054B1C682D 443 | :101BA000FFF7A8FB2401240F201CFFF76FFF10BDD7 444 | :101BB000020C0040000C004030B5D47800239C4259 445 | :101BC0001BD11478802C03D0802324065B0223438E 446 | :101BD00054780225AC4309D19478002C02D180249A 447 | :101BE000A40201E0C024E402234341605478013C94 448 | :101BF000E4B2012C01D8104C2340A0248DB2E4059E 449 | :101C00002C431C438462D0240D0C24062C431C431B 450 | :101C10008462D478002C0DD15C0305D59378012B18 451 | :101C200001D1816100E041615378013BDBB2012BBE 452 | :101C300000D8816030BDC046FFFFFBFF08B5031C24 453 | :101C40000A1C4009D90903D10549C001401800E028 454 | :101C500000201F210B4001219940FFF7ADFF08BD77 455 | :101C600000440041704708B5FFF720FEFEF7B0FCC6 456 | :101C7000FFF7F8FFFFF7D8FC08BD000008B5044BDC 457 | :101C800001229A71034B1B68002B00D0984708BDB6 458 | :101C900000100040E0040020EFF3108072B6BFF3A4 459 | :101CA0005F8F034B00221A70434258417047C04671 460 | :101CB000580100200F2303405B00C00918180238A8 461 | :101CC00014235843014B18187047C04620020020C7 462 | :101CD000F0B58E7985B073B20D1C0F27301C002B28 463 | :101CE00046DAFFF7E7FF6D88C368028AED1883685C 464 | :101CF00037400197041C0292C560877C9D4221D029 465 | :101D00005E1B4B4AB6B2964206D9101C029901F0EE 466 | :101D1000B5FB474B5E1AB6B20023BA0706D5301C96 467 | :101D2000029901F04BFB8BB25A4253415A00A37CFB 468 | :101D300002218B4313436268A37452193D480199F1 469 | :101D4000331C0AE0B807C00F0AD0022362689F4321 470 | :101D500038480199A7745219002300F0F3FE64E09B 471 | :101D600001239F432368A774002B5ED0291C5AE0EF 472 | :101D7000FFF7A0FF038A37400193837C0297041C7E 473 | :101D80002F885A0710D5C268436801999B1880684C 474 | :101D9000039301F013FB0A1C0299274B01398901B7 475 | :101DA000C918039801F0BAFBE368FA18A368E26067 476 | :101DB0009A4200D9E360AA88BA422BD1E5689D42D5 477 | :101DC00028D05E1B1A4FB6B2BE4206D9381C019904 478 | :101DD00001F054FB7F1ABBB206E0301C019901F000 479 | :101DE000EDFA8BB2F61AB3B2019A124893420BD2B3 480 | :101DF000A37C04221343029AA374013A0E4B92016E 481 | :101E0000D2180299019B02E062680299521900F00F 482 | :101E1000BFFE0AE0A37C01229343A3742368002B36 483 | :101E200003D0E1680020321C984705B0F0BDC046E1 484 | :101E3000FF1F000064050020E404002010B5064CDC 485 | :101E4000064B0522201C80211A7000F03DFE201C4C 486 | :101E5000002100F046FE10BD640500207402002041 487 | :101E600037B5041CFFF738F8226801AD8023937260 488 | :101E7000281C00F027FD0323291C201C6B7000F098 489 | :101E800029FD201C174900F0A7FE201C002102227A 490 | :101E9000154B00F063FC00210A1C201C134B00F0C2 491 | :101EA0005DFC134B201C0021012200F057FC201C7C 492 | :101EB0000021022200F07AFC00210A1C201C00F004 493 | :101EC00075FC201C0021012200F070FC2368094AE7 494 | :101ED00019890A408021C9000A431A81064B002251 495 | :101EE0001A7037BDE406002031200000592300009D 496 | :101EF000311F0000FFF3FFFF7402002010B5084CF3 497 | :101F0000084B0322201C08491A7000F065FE074B9D 498 | :101F100000219A68201C0B1C00F014FE10BDC04666 499 | :101F20006405002074020020E4060020CC06002096 500 | :101F300008B589790C4B4AB2002A08DA1B78012BC4 501 | :101F400002D1FFF7DBFF0DE0042B0BD107E01A787D 502 | :101F5000022A02D104221A7004E0032A02D10348A3 503 | :101F600000F0B2FD08BDC0467402002064050020E8 504 | :101F7000F8B51D4D1D4E2B88B4891D4FE41AA4B22F 505 | :101F8000002C1BD11B4A11885B189BB21380F2886E 506 | :101F90009A4203D0184B1B78002B07D0174B042212 507 | :101FA000381C17491A7000F017FE1CE07369002BEB 508 | :101FB0000BD09847002808D02C80B4893F2C04D936 509 | :101FC0000D4B00221A70402402E00B4B01221A70C4 510 | :101FD0002B88B268381CD2180021231C00F0B2FDF7 511 | :101FE0002B88E4182C80F8BD70020020CC0600205D 512 | :101FF000640500201C0200207202002074020020F0 513 | :10200000E406002008B5FEF787FFFEF773F908BD68 514 | :10201000064B5A6A910605D4D968D0220A40D02AC4 515 | :10202000FAD102E0DA68D106FCD57047000800401A 516 | :1020300070B5284E0C1C3378002B06D0264B1B693C 517 | :10204000002B00D09847002333702388082B02D040 518 | :10205000FFF7F4FE3CE0214C1F4D2378A2782B7053 519 | :1020600063786B70E3781B02D3186B8063792279F5 520 | :102070001B02D318AB80E379A2791B02D318EB8043 521 | :10208000FEF766FF0028E3D02B787F2B0ED9144B88 522 | :1020900000211980134B221C19800223337012482F 523 | :1020A000402300F075FDFFF763FF11E0EB88002B84 524 | :1020B00002D1FFF723FF0BE0094B00211980094BE8 525 | :1020C0000948198001233370221C402300F060FD71 526 | :1020D00070BDC04674020020CC060020E40600203B 527 | :1020E0001C0200207002002064050020002805D09A 528 | :1020F000034B01221A70BFF35F8F62B67047C04670 529 | :1021000058010020F7B501AE041C1149301C04220F 530 | :1021100001F004FA0F4B1D78A54217D0002C08D00F 531 | :10212000375DFFF7B9FD0C4BDA5D0132DA55FFF789 532 | :10213000DDFF002D08D0755DFFF7AEFD064B5A5D43 533 | :10214000013A5A55FFF7D2FF024B1C70F7BDC0464B 534 | :10215000BC360000730200209404002010B5084C27 535 | :102160000621201C00F0ECFA201C042100F0E8FA03 536 | :102170000221201C00F0D4FA0220FFF7C3FF10BD9B 537 | :102180006405002010B5FFF743FF0C4C0221201C12 538 | :1021900000F0D6FA201C042100F0C2FA084A201CE4 539 | :1021A000062100F0ADFA0621201C00F0B9FA032048 540 | :1021B000FFF7A8FFFEF79AF810BDC046640500209F 541 | :1021C0005D21000010B5074C0421201C00F0B8FA76 542 | :1021D0000221201C00F0A4FA0120FFF793FFFEF774 543 | :1021E00081F810BD6405002038B5041C211C0A4884 544 | :1021F00000F045FC201CFFF75DFD827C031CD1072D 545 | :1022000008D501201D6882439A74002D02D0D96838 546 | :10221000221CA84738BDC04664050020024B1B683D 547 | :1022200018698004400D704764050020F7B501ADC2 548 | :10223000041C281C00F046FB201CFFF7D5FF0A4FAA 549 | :102240000026291C381CEE702C7000F043FB0F2177 550 | :10225000321C2140381C00F095FA381C321C211C1D 551 | :1022600000F0EAFAF7BDC04664050020F7B501ACFE 552 | :10227000061C201C0F1C151C00F024FB26700023DC 553 | :10228000082D1DD90123102D1AD90223202D17D96D 554 | :102290000323402D14D90423802D11D980235B0002 555 | :1022A0009D4201D805230BE080239B009D4201D86D 556 | :1022B000062305E0184B9D4201D900202BE007239F 557 | :1022C000301C6370FFF7F6FC0323391C05821940AC 558 | :1022D000012901D1022304E0022902D00329ECD113 559 | :1022E00004230E4D211C281CE37000F0F3FA041E99 560 | :1022F000E3D10F210A4B3140221C281C00F02EFA9A 561 | :10230000311C221C281C00F051FA281C311C01220F 562 | :1023100000F04CFA0120FEBDFF0300006405002020 563 | :10232000D11C000008B5011C014800F0BEFB08BD2F 564 | :10233000640500200F2310B50340041C0020022B6D 565 | :1023400007D80448211C00F0BFFB201CFFF74CFFFE 566 | :10235000012010BD64050020F8B52A4E3378012B0A 567 | :1023600043D1294A294C0D881788A38979198B42B2 568 | :1023700001DADD1BADB2A2682549D0192A1C01F093 569 | :10238000CDF8EF19204ABBB21380214F402D05D163 570 | :10239000204DE1882A88D218914209DCA381636923 571 | :1023A000002B02D0984700280BD0FFF7A7FD28E0AC 572 | :1023B000A2899A4212D16069002802D08047002881 573 | :1023C00004D105233370FFF7B5FF1AE00E4B1A88CE 574 | :1023D0002B88D3180C4A2B800023138000213A1C31 575 | :1023E00040230D4800F0D4FB0BE0022B02D1FFF795 576 | :1023F000BFFD06E0054B1B69002B00D0984700236A 577 | :102400003370F8BD7402002070020020CC0600205A 578 | :10241000E40600201C020020640500200F2370B594 579 | :102420000340061C0024022B0ED8FFF743FC311C8E 580 | :10243000051C064800F055FBAB7C0124DA0703D5E8 581 | :10244000A343AB742B689847201C70BD6405002023 582 | :10245000F7B50F23051C01910340022B01D900247D 583 | :102460001BE0FFF727FC837C061CDA07F7D40C4F30 584 | :10247000291C381C00F019FB041E06D0B37C012275 585 | :102480001343B374019B336007E0381C291C00F030 586 | :10249000E5FA041EE3D0019A9047201CFEBDC04619 587 | :1024A00064050020F0B51E1C0F2385B00340071CF7 588 | :1024B000029103920193022B01D9002597E0FFF7C7 589 | :1024C00031FF051EF9D1381CFFF7F4FB041CFFF7A0 590 | :1024D000E3FBA27CD10702D5FFF708FE87E00123CA 591 | :1024E0001A43A274002804D0424A1370BFF35F8FCE 592 | :1024F00062B60023E3600A9B039A0298A17C2360E2 593 | :102500000123626018400222984091430143042055 594 | :102510008143A17479B2A660002930DA002E1AD066 595 | :10252000354DB6B2AE4205D9218A281C00F0A6FF6F 596 | :102530006E1AB6B202990023994206D0218A301C45 597 | :1025400000F03CFF8BB25A4253415A00A37C022157 598 | :102550008B43134304E00299002909D0A37C9343E1 599 | :10256000A3740199039A331C244800F0EBFA3BE072 600 | :10257000A27C9A43A2740A9A002A08D10CE0002E89 601 | :102580000CD1A27C0A999A43A274002904D000209D 602 | :10259000011C3A1C0A9B9847012528E0164FB6B249 603 | :1025A000258ABE4206D9381C291C00F067FF7F1A15 604 | :1025B000BBB206E0301C291C00F000FF8BB2F61AFB 605 | :1025C000B3B20E48AB420BD2A37C04221343019A50 606 | :1025D000A374013A0A4B9201D21801992B1C01E015 607 | :1025E0000199039A00F0D4FA45424541EDB2281C06 608 | :1025F00005B0F0BD58010020FF1F00006405002059 609 | :10260000E4040020024B80221B681043987270473C 610 | :1026100064050020024B1B6898684002400E70471A 611 | :1026200064050020014B986099817047CC0600201A 612 | :1026300038B50320FFF766FD1A4C01252368201CDE 613 | :102640009A68042192B2AA431A81174A00F058F8F6 614 | :10265000201C0021154A00F053F8291C201C144AA4 615 | :1026600000F04EF8134A201C022100F049F8201C0B 616 | :10267000042100F055F8201C002100F051F8291C1D 617 | :10268000201C00F04DF8201C022100F049F80A4AF5 618 | :10269000201C062100F034F8201C062100F040F830 619 | :1026A00038BDC04664050020C5210000052000009B 620 | :1026B000611E0000852100005D21000073B5FFF759 621 | :1026C000EBFA01AC061C201C00F006FD0A4D0023AD 622 | :1026D0000A49221C281CA37000F006FD281C00F0EB 623 | :1026E00093FAFFF795FC0120FFF70CFDFFF7A0FF21 624 | :1026F000301CFFF7FBFC73BD640500200050004157 625 | :102700000B1C2E339B001A50044AAA235B0049007D 626 | :10271000895AC25A0A43C25200207047C03600008C 627 | :10272000064B49000268CB5A9383AB225200815A70 628 | :10273000194381520268002013837047C03600009D 629 | :10274000054BAB2252004900CB5A815A9943815222 630 | :102750000268002093827047C036000010B58C00DC 631 | :10276000A4183434A4000419411863605931044B8F 632 | :10277000FF3108789B5C03430B70002010BDC046FE 633 | :10278000CE36000010B58C00A418031C34345B183E 634 | :10279000A40004190449002059336060FF33895CA8 635 | :1027A0001A788A431A7010BDCE36000070B50F2318 636 | :1027B0000B40C41861341F4DFF342678AD5C35439F 637 | :1027C0002570002A0ED10268002B02D1FF320323AC 638 | :1027D0000FE05B01D31849B2FF330222002926DB48 639 | :1027E000012224E0012A0FD10268002B03D1FF321D 640 | :1027F0000C2393721CE05B01D31849B2FF3308220B 641 | :10280000002914DB042212E0022A05D102685B01D0 642 | :10281000D318FF3310220AE0032A09D102685B01B2 643 | :10282000D31849B2FF334022002900DB20229A72DC 644 | :10283000002070BDCE36000070B50F230B40C418C9 645 | :102840001F4D6134FF34AE5C2578B5432570002AF6 646 | :102850000ED10268002B02D1FF3203230FE05B018F 647 | :10286000D31849B2FF330222002926DB012224E0DB 648 | :10287000012A0FD10268002B03D1FF320C235372BF 649 | :102880001CE05B01D31849B2FF330822002914DB96 650 | :10289000042212E0022A05D102685B01D318FF333B 651 | :1028A00010220AE0032A09D102685B01D31849B259 652 | :1028B000FF334022002900DB20225A72002070BD25 653 | :1028C000CE36000000230370437083700123C37071 654 | :1028D00070470000F0B5021C0D78C8780F232B401C 655 | :1028E000ED09042800D998E0146800F00FFD0308F2 656 | :1028F000495D7A0008335B010020E054A9E05D01E6 657 | :102900006419FF3466781C20770700D0A1E067784F 658 | :102910007026374200D09CE01120607014680833A4 659 | :102920005B01E018402444711268D31880221A71A8 660 | :102930008A78484B002A08D05A195468802000062B 661 | :10294000044354605469204307E05A19506840001A 662 | :102950004008506050694000400850615D194C7853 663 | :10296000686807223C4B14401840240720436860E5 664 | :1029700049780A40696912070B4013436B6162E0B2 665 | :1029800058012418FF34002D07D0677870261C20CA 666 | :1029900037425ED16078202612E066781C207707E7 667 | :1029A00057D1607802262FE058012418FF34002DFB 668 | :1029B00010D0677870261C2037424AD160783026C4 669 | :1029C0003043607010681A1C08325201821880204F 670 | :1029D000107122E066781C2077073AD160780326D0 671 | :1029E00012E058012418FF34002D07D067787026B4 672 | :1029F0001C2037422DD160784026E1E766781C2004 673 | :102A0000770726D1607804263043607010681A1C5E 674 | :102A1000083252018218402050715B005D190D4B45 675 | :102A200048782D015B19072210405C680A4A0007AC 676 | :102A3000224002435A608878002806D059688022D4 677 | :102A400012060A435A60002003E05A6852005208F6 678 | :102A50005A60F0BD24070020FFFFFF8F0F220A40BD 679 | :102A600003680832520149B29858002901DA400639 680 | :102A700000E04007400F431E9841C0B270470F234B 681 | :102A80000B40026808335B0149B2D218002905DA0D 682 | :102A9000802111710268D318022204E04021517193 683 | :102AA0000268D3180122DA7170470F220A400368C6 684 | :102AB000083252019B1849B25868002901DA800295 685 | :102AC00000E0C002C00F70470F220A4003680832BE 686 | :102AD000520149B29B182022002900DB10225A71B2 687 | :102AE000704730B50F220A404CB201685301C91833 688 | :102AF000FF31CD79002C11DA2024254220D04C71F1 689 | :102B00000168CB18FF331C7A40210C4218D019728F 690 | :102B10000368083252019A18022310E0102425425B 691 | :102B20000ED04C710168CB18FF331C7A20210C4267 692 | :102B300006D019720368083252019A1801231371E2 693 | :102B400030BD000070B50D1C046808356D012E59AC 694 | :102B50001C247606760F14D00B4C490161180A61CB 695 | :102B60000C1C0A4A49690A4062619A046369920C22 696 | :102B70009B0B9B0313436361036800245D1980234F 697 | :102B80006B71201C70BDC04624070020FF3F00F081 698 | :102B900070B50D1C046808356D012E591C2476078C 699 | :102BA00013D00B4C49010A5161184C689A04094B27 700 | :102BB0001209234013434B604B6800249B0B9B037B 701 | :102BC0004B6003685D1940232B71201C70BDC0460B 702 | :102BD00024070020FF3F00F0094B0A4A196059689A 703 | :102BE0000A40802189020A435A605A68920B920374 704 | :102BF0005A6003684022FF3300205A717047C04674 705 | :102C000024070020FF3F00F0036802211A68D2B2B7 706 | :102C10000A431A70026813681B021B0E022BFAD0BB 707 | :102C200070470000F0B5D04E85B0346825682B6839 708 | :102C30001B06DB0F00D13FE1286A80B200F02AFCBE 709 | :102C4000071E1F2F00D9BDE0021C08325201AD182B 710 | :102C50006D6803202D0E054242D0C448012103684F 711 | :102C6000B9408B430360216803238818E119C371BD 712 | :102C7000A83189790120014232D0BD4B1F702168F3 713 | :102C80005058BC497A0180078A18800F5168012882 714 | :102C90000BD18904890C598051680901890C9980EC 715 | :102CA00053689B0B9B03536013E00901890C88B2A6 716 | :102CB000029059805168B0488904890C9980516804 717 | :102CC000084050600298002803D152689204920C88 718 | :102CD0005A80BB1C1B01E3185B68201CA449984761 719 | :102CE00004231D420CD0A14A01211068B940884339 720 | :102CF0001060326811683A1C083252018A18D37188 721 | :102D000008231D421ED0994A01211068B94088430A 722 | :102D100010603068FA18016852018A18D371C3191B 723 | :102D2000A8339B799A070DD5924A91497B01D31814 724 | :102D30000F7008335B68DB02DB0E4B703B01C3187E 725 | :102D40009B6A984710231D421FD0884A01211068B2 726 | :102D5000B9408843106030683A1C0168083252015B 727 | :102D60008A18D371C319A8339B795A070DD5804BA4 728 | :102D700080497A011F708A18526800211201920C52 729 | :102D80005A803B01C318DB6A984720231D4200D1BB 730 | :102D90009BE1764A01211568B94030688D43156082 731 | :102DA0003A1C066808325201B218D371C319A8330D 732 | :102DB0009B79190700D488E16D490F703F01C7194D 733 | :102DC0003B6B81E1EF690423BFB21F4208D0AB83A4 734 | :102DD000231CA5331B78DA0702D56368201C9847AB 735 | :102DE00008231F420CD0614A306800211160056839 736 | :102DF000AB83031CA5331B78990701D583689847DB 737 | :102E000040231F4209D0306802689383031CA53316 738 | :102E10001B78DD0601D54369984720231F4209D05E 739 | :102E2000306801688B83031CA5331B781A0701D512 740 | :102E30000369984710231F4209D030680568AB83A7 741 | :102E4000031CA5331B78590701D5C3689847802315 742 | :102E50001F420CD0454A30680021116002689383FC 743 | :102E6000031CA5331B789D0601D5836998478023F1 744 | :102E70005B001F420CD03D4A0021306811600168A0 745 | :102E80008B83031CA5331B785A0601D5C369984769 746 | :102E900080239B001F4200D117E1344A3068002193 747 | :102EA00011600568AB83031CA5331B787F2B00D80A 748 | :102EB0000BE1036A984708E12A6A92B20292002A5B 749 | :102EC0004BD1AB23ED695B00AA22E35A5200ADB2AD 750 | :102ED000A45A2B40029F1C40284B7A00D35A1D4213 751 | :102EE00002D03268126893831C420FD02449062F07 752 | :102EF00006D1204B9A68802312095B0013400B60B7 753 | :102F00003B1C30682E339B001B5898470137072F16 754 | :102F1000E2D1DAE01F1C0837B020009779014000A9 755 | :102F2000E7183E1859374919FF3730783F788C46F3 756 | :102F300049680190090E384060270840394221D184 757 | :102F40001027394239D10C2739424AD18E0700D097 758 | :102F50008DE00133082B00D1B7E002990126194119 759 | :102F6000DAB23142F5D0D5E7900200208402002089 760 | :102F70007C02002024070020FF3F00F0C036000044 761 | :102F80007802002059016D18FF352E7A40210E423B 762 | :102F900004D02972802149420A4304E02E7A20217C 763 | :102FA0000E4202D029724A498A716022104200D131 764 | :102FB0008BE01B01E318E03357E06146CF713278B4 765 | :102FC0003A4200D181E043495A018A1852681B01F4 766 | :102FD00092043F49E318920CDC330A801B68201CE2 767 | :102FE00072E059016D18FF352E7A08273E4220D035 768 | :102FF0002F72384D69188F6918256D18BE0305D5D5 769 | :10300000896902270902090EB943A9708021494242 770 | :103010000A432F49009F8A7121687E018E197268C8 771 | :10302000950152D40C2210424FD01B01E318D83323 772 | :103030001BE02E7A04273E42F4D02F72254D6918EA 773 | :103040008F6808256D18BE0305D589680227090217 774 | :10305000090EB943A9701E49009F8A7121687E013B 775 | :103060008E197268D501DDD52FE01B682AE05E015C 776 | :10307000AD19FF352F7A02210F420CD0297280251D 777 | :1030800013496D422A438A71124A96197269920451 778 | :10309000920C4A8010E0297A012739420CD00C4961 779 | :1030A0002F728A710B4A961972689204920C0A80E8 780 | :1030B00072681201920C8A80810706D00D331B01C1 781 | :1030C000E3185B680249201C984705B0F0BDC04674 782 | :1030D0008802002024070020002201230270437090 783 | :1030E0008270C37070470000F0B585B00192654AE8 784 | :1030F00000231360644A051C1060644A29600C1C9C 785 | :10310000D169202003AE01430120D1610627B070B0 786 | :10311000311C18207370F3703770FEF78FFD192083 787 | :10312000311C3770FEF78AFD01996A468B78381C8E 788 | :1031300002A91372FEF720FD381CFEF7E1FC23788C 789 | :103140000120034323702368D903FCD450490B6842 790 | :103150005A0B1F231A409A4200D105221A409001AF 791 | :10316000268D4C4A3240024322850868820C134067 792 | :103170001F2B00D11D23208D1F221340904303439A 793 | :1031800023850B680722DB0D1340934200D10323F4 794 | :103190001340218D1A03404B40480B4013432385B5 795 | :1031A00001997F230A782178D2010B401343019AB9 796 | :1031B0002370517801231940237804228900934316 797 | :1031C0000B43019923706062CB78012B04D12B68EB 798 | :1031D0000C211A898A4306E0002B05D12B680C24A8 799 | :1031E0001989A1430A431A8180220021520000F06C 800 | :1031F000D7F90023E918002204334A60202BF9D1C3 801 | :10320000A918002310324B628B62CB620B63802AB9 802 | :10321000F6D12A1CA43213705370E918081C00223E 803 | :10322000A630AE31013302700A70082BF5D1131CA1 804 | :10323000E918B831002204330A601C2BF8D1A91810 805 | :10324000081C0023D430E0311032036043608360F7 806 | :103250000B60802AF3D1AA225200AB52AB2252005B 807 | :10326000AB52AC20EA184000111861320020FF3246 808 | :10327000013308701070082BF3D1094B80221A60BB 809 | :1032800005B0F0BD84020020900200200004004040 810 | :10329000246080003FF8FFFFFF8FFFFF240700201E 811 | :1032A00000E100E0FEE700001148124910B5884235 812 | :1032B00001D0002301E0104B07E0104CCA18A242D5 813 | :1032C000F9D2C45804331460F7E70D4A191D043BC2 814 | :1032D000934203D200221A600B1CF6E7094A0A4BFC 815 | :1032E0007F218A439A6000F0F5F8FCF7BDFFFEE706 816 | :1032F000F436000000000020680100206401002076 817 | :10330000240800200000000000ED00E002B4714637 818 | :1033100049084900095C49008E4402BC7047C04618 819 | :1033200003B47146490840004900095A49008E44D7 820 | :1033300003BC7047002934D00123002210B4884216 821 | :103340002CD301242407A14204D2814202D20901D4 822 | :103350001B01F8E7E400A14204D2814202D24900F5 823 | :103360005B00F8E7884201D3401A1A434C08A04298 824 | :1033700002D3001B5C0822438C08A04202D3001B2E 825 | :103380009C082243CC08A04202D3001BDC08224345 826 | :10339000002803D01B0901D00909E3E7101C10BC69 827 | :1033A0007047002801D00020C04307B4024802A1A2 828 | :1033B0004018029003BDC046D90000000029F0D09B 829 | :1033C00003B5FFF7B9FF0EBC4243891A1847C04640 830 | :1033D000002941D010B4041C4C40A4460123002213 831 | :1033E000002900D54942002800D5404288422CD30C 832 | :1033F00001242407A14204D2814202D209011B0107 833 | :10340000F8E7E400A14204D2814202D249005B0005 834 | :10341000F8E7884201D3401A1A434C08A04202D36D 835 | :10342000001B5C0822438C08A04202D3001B9C08AE 836 | :103430002243CC08A04202D3001BDC082243002810 837 | :1034400003D01B0901D00909E3E7101C6446002CD6 838 | :1034500000D5404210BC7047002806D003DB002096 839 | :10346000C043400801E08020000607B4024802A1E2 840 | :103470004018029003BDC046190000000029EBD09F 841 | :1034800003B5FFF7A7FF0EBC4243891A1847C04691 842 | :103490007047C046414208401C2101231B0498424A 843 | :1034A00001D3000C10391B0A984201D3000A0839D5 844 | :1034B0001B09984201D30009043902A2105C401A8A 845 | :1034C0007047C0461B1C1D1D1E1E1E1E1F1F1F1FDA 846 | :1034D0001F1F1F1F70B50D4E0D4D0024AD1BAD10ED 847 | :1034E00005D0A300F35801349847A542F9D100F064 848 | :1034F000F1F8084E084D0024AD1BAD1005D0A30017 849 | :10350000F35801349847A542F9D170BDE036000068 850 | :10351000E0360000E0360000E4360000F0B50F2A87 851 | :1035200035D9031C0B439C0735D1161C103E3609B8 852 | :103530003501451910350C1C031C27681F6067688E 853 | :103540005F60A7689F60E7681034DF601033AB42AC 854 | :10355000F3D1731C1B01C518C9180F231340032B8B 855 | :103560001BD91C1FA4080134A4000023CE58EE5020 856 | :103570000433A342FAD1ED18C91803231A4005D029 857 | :103580000023CC5CEC5401339342FAD1F0BD051C0E 858 | :10359000002AF5D1FAE7051CF2E71A1CF8E7C04645 859 | :1035A000F0B54F464646C0B483B0830752D0541E90 860 | :1035B000002A4AD0CEB2031C032503E0621E002C71 861 | :1035C00043D0141C01335A1E16702B42F6D1032C23 862 | :1035D00033D9FF250D402A0215432A0415430F2C29 863 | :1035E0001AD9271C103F3F09B9463F01B84610279A 864 | :1035F000FF18BC4646461A1C664415605560956027 865 | :10360000D5601032B242F8D14F4601373F010F2248 866 | :10361000DB191440032C10D9271F1E1DBF0801966B 867 | :10362000BE00B446019E1A1C664420C2B242FCD1C0 868 | :103630000137BF000322DB191440002C05D0C9B2AA 869 | :103640001C1919700133A342FBD103B00CBC904686 870 | :103650009946F0BD031C141CB9E7C046EB3C906DC5 871 | :103660006B646F7366730000020401000210002493 872 | :1036700000F801002400200000000000000000000D 873 | :10368000000029785634124D542D44323145204DD6 874 | :1036900053444641543132202020224D542D44328F 875 | :1036A000314520426F6F746C6F6164657222003720 876 | :1036B00034383635313139353833300000030201C2 877 | :1036C0000400080070008000010000010002030CEB 878 | :1036D00010600000F8B5C046F8BC08BC9E467047B4 879 | :1036E00031010000F8B5C046F8BC08BC9E467047E2 880 | :0436F00005010000D0 881 | :1036F4004D542D44323145204D5344080000000000 882 | :1037040000000000000000000000000000000000B5 883 | :103714004146004C004100530048000F00262E0093 884 | :10372400420049004E0000000000000000000000BC 885 | :10373400464C41534820202042494E0000000000DE 886 | :1037440000000000000020084E12020000400000AB 887 | :103754000100000055070000FD0600007D08000080 888 | :10376400AD06000000000000555342530000000065 889 | :103774000000000000000000000003021F00000021 890 | :103784004D41545441495220000000000000000003 891 | :103794000000000000000000312E30300100000065 892 | :1037A400DC000020C4000020C8000020B00000207D 893 | :1037B400000000006400002012010002000000402C 894 | :1037C400D0160C0A000101020301000009022000C6 895 | :1037D400010100C032090400000208065000070578 896 | :1037E4008102400000070502024000004D542D44B0 897 | :1037F400323145204D534420426F6F746C6F6164C5 898 | :103804006572004D61747461697254656368204C1B 899 | :103814004C43000000030000000000000000000012 900 | :103824000000000000000000000000000000000094 901 | :103834000000000000000000000000000000000084 902 | :103844000000000004030904010000000800000057 903 | :04385400401F000011 904 | :04000003000032A91E 905 | :00000001FF 906 | -------------------------------------------------------------------------------- /msd_bootloader_samd21e16a_flash.hex: -------------------------------------------------------------------------------- 1 | :10000000280F0020A9320000A5320000A532000010 2 | :1000100000000000000000000000000000000000E0 3 | :10002000000000000000000000000000A5320000F9 4 | :100030000000000000000000A5320000A532000012 5 | :10004000A5320000A53200007D1C0000A532000092 6 | :1000500085160000A5320000A5320000252C000006 7 | :10006000A5320000A5320000A5320000A532000034 8 | :10007000A5320000A5320000A5320000A532000024 9 | :10008000A5320000A5320000A5320000A532000014 10 | :10009000A5320000A5320000A5320000A532000004 11 | :1000A000A5320000A5320000A5320000A5320000F4 12 | :1000B00008B5064B064803331B1A062B00D808BDAB 13 | :1000C000044B002BFBD09847F9E7C046F4360000FC 14 | :1000D000F43600000000000008B50748074B1B1A63 15 | :1000E0009B10DA0FD318591000D108BD044A002A1A 16 | :1000F000FBD09047F9E7C046F4360000F436000024 17 | :100100000000000010B5074C2378002B09D1FFF741 18 | :10011000CFFF054B002B02D0044800E000BF0123B5 19 | :10012000237010BD6401002000000000F4360000C0 20 | :1001300008B5094B002B03D00848094900E000BF6F 21 | :1001400008480368002B03D0074B002B00D09847CA 22 | :10015000FFF7C2FF08BDC04600000000F4360000F3 23 | :1001600068010020F43600000000000010B572B6EF 24 | :10017000BFF35F8F194A002313701948D9B20133B6 25 | :100180001818013800780028F7D0002905D101237C 26 | :100190001370BFF35F8F62B61FE072B6BFF35F8F5D 27 | :1001A000002313704B1EDBB2022B07D9032B0CD19B 28 | :1001B0000C4B042019690143196106E00949042424 29 | :1001C0000869A043086108494B7001231370BFF30D 30 | :1001D0005F8F62B6BFF34F8F30BF10BD5801002054 31 | :1001E0009404002000ED00E00004004013B5184B1B 32 | :1001F0001A68110603D41968FD220A401A7001F02A 33 | :100200009DF8144C144A80231B05062163600820C6 34 | :100210001170A36101F0ACF8226A6B461201D20F93 35 | :10022000DA7107331B78002B03D10C4B9B6B9A06BA 36 | :100230000CD58022D2011368591C00D1FEE783F34C 37 | :100240000888074B9A60074B1B68984713BDC04648 38 | :1002500000100040004400415B44004100040040A5 39 | :1002600000ED00E00440000013B5FFF7BFFF184B9E 40 | :1002700001221A70BFF35F8F62B6164B00241A7109 41 | :100280001C705C709C70DC7001F0EDFC6A46124BD7 42 | :10029000147054705B686846DB061B0F9370D47053 43 | :1002A000147101F07BF80D4B802252059A6100F029 44 | :1002B00039F800F03FF800F00BFE094B1B78002BDB 45 | :1002C00003D000F0E5FC0028F7D1FFF74FFFF4E77B 46 | :1002D00058010020940400200040004100440041E7 47 | :1002E0008001002008B500F025F808BD08B500F031 48 | :1002F00029F808BD08B5044B1B78002B03D001F08A 49 | :100300008DFF00F02BF808BD80010020014B01207B 50 | :100310001870704780010020014B00221A7070474E 51 | :1003200080010020024B802252059A617047C0462E 52 | :1003300000440041024B802252055A617047C0467A 53 | :1003400000440041024B802252059A617047C0462A 54 | :10035000004400417047704770477047002804D13F 55 | :100360008022064B52059A6107E0FA239B009842CF 56 | :1003700003D18022014B52055A617047004400416D 57 | :10038000024B1878431E98414000704781010020BD 58 | :10039000044B1A780223002A02D163230360131C42 59 | :1003A000181C704781010020002070470120704711 60 | :1003B00070B5051C0E1C0120642D17D84B190024A4 61 | :1003C000642B13D8A0B2B0420FD2401980B200F013 62 | :1003D000ABF88022012006499200002300F09CFC2B 63 | :1003E00001340028EED1012000E0002070BDC0469D 64 | :1003F00094020020F8B5051C0E1C0120642D16D8AF 65 | :100400004B190024642B12D8A7B20020B7420ED299 66 | :10041000802207499200031C00F07EFC002805D0D2 67 | :100420007F19B8B200F06CF80134EDE70120F8BD97 68 | :100430009402002043081B1810B5DBB2094AC40718 69 | :1004400008D5D45C0F2020400C012043D05409096A 70 | :10045000D31805E00F20D154D3180A0A8143114361 71 | :10046000597010BD94020020F7B5214B00915A330A 72 | :100470005D781A782D021543013DAD00ADB2A8425A 73 | :1004800035D32B1C5F339BB2984230D8451BE023F9 74 | :100490006D025B00EB1801932C1C8023DB01E61836 75 | :1004A000009B144F002B06D07F1B3919301C4022B3 76 | :1004B00001F044F80BE0F3B2002B02D1301C01F044 77 | :1004C00075F87F1B3919301C402200F0EDFF019BAD 78 | :1004D00040349C42E1D1084B0849E818009B402277 79 | :1004E000002B02D001F02AF801E000F0DDFFF7BD9B 80 | :1004F0000000002094020020C041000054040020AD 81 | :1005000008B502280AD9032805D105496022054803 82 | :1005100003F004F802E00021FFF7A6FF08BDC04683 83 | :10052000940200200000002038B5234C8022051CD6 84 | :100530000021201C920003F033F8281E032836D82F 85 | :1005400002F0E4FE020F0F2F3E22201C1B4902F096 86 | :10055000E5FFFF2355225B00E254194BAA22E25427 87 | :1005600028E000201749FFF765FF01201649FFF733 88 | :1005700061FF164B00245A335D781A782D0215431B 89 | :10058000A3B25819E2B280B2172A03D0691C5918D5 90 | :1005900089B200E00C490134FFF74CFF182CEFD171 91 | :1005A00008E0201C0949602202F0B8FF02E00121A6 92 | :1005B000FFF75AFF38BDC046940200205C360000A9 93 | :1005C000FF010000F80F0000FF0F000000000020F6 94 | :1005D00073B501AC01250026211C1C206570A67096 95 | :1005E000257001F06DF8054B802252055A611B20E1 96 | :1005F000211C2670657001F063F873BD0044004152 97 | :100600000120704708B5031C0120002B01D1FFF722 98 | :10061000B7FE08BD021C08B50120002A02D1081C43 99 | :10062000FFF7B6FE08BD031C0020834201D1012064 100 | :100630004840704708B5031C0120002B01D1FFF78B 101 | :10064000B3FE08BD08B5031C0120002B01D1FFF744 102 | :10065000ADFE08BD002801D1014800E00020704730 103 | :100660009A360000F8B5071C0E1C151C0124FFF774 104 | :1006700071FE002F04D1301C291CFFF799FE041CC9 105 | :10068000FFF769FE201CF8BDF8B5071C0E1C151CF1 106 | :100690000124FFF761FE002F04D1301C291CFFF755 107 | :1006A000A9FE041CFFF759FE201CF8BD002070476E 108 | :1006B000431E9841034BC0B21870034B01221A70BD 109 | :1006C0007047C046990400206000002010B5054C1A 110 | :1006D0000021201C122202F063FFF02323700A2362 111 | :1006E000E37110BDA401002008B5FFF7EFFF024B36 112 | :1006F00000221A7308BDC0467800002008B5054BDB 113 | :1007000000221A70044A01231370044A1370FFF781 114 | :1007100003FE08BD9C01002060000020AC0000200A 115 | :1007200007B5074B022000930121064A1F2301F061 116 | :10073000B9FE002803D10220034901F089FE07BD5C 117 | :10074000B10A0000C40100202107000008B5FFF72E 118 | :10075000E7FF08BD134B70B500241C70124B134A01 119 | :100760001C7001231370124A1370FFF749FF114EDA 120 | :100770003070A04201D1002511E001383070FFF740 121 | :10078000C5FD051EF7D03378A34206D3201C0021F7 122 | :100790000134FFF748FFE4B2F5E7FFF7C1FF281C7B 123 | :1007A00070BDC0469C0100209D010020600000201B 124 | :1007B000AC0000208401002007B5074B8120009386 125 | :1007C0000021064A0D2301F06DFE002803D181208F 126 | :1007D000034901F03DFE07BD4D07000078000020F1 127 | :1007E000B907000038B5094B094C9A681D1C002A4E 128 | :1007F00006D0237B81207F2B00D8022001F09AFDB8 129 | :1008000064686C60FFF7D8FF38BDC04678000020F0 130 | :10081000C401002008B5064B1B78002B06D002202F 131 | :1008200001F088FD0220034901F012FE08BDC04618 132 | :100830009D0100201508000008B5064B1B78002B11 133 | :1008400006D0812001F076FD8120034901F000FEF1 134 | :1008500008BDC0469D0100203908000010B50C1CE1 135 | :10086000002807D1FFF740FF034B9A68141B9C60D8 136 | :10087000FFF7B8FF10BDC0467800002008B5184B40 137 | :1008800060211A7850B20A4000280FDA0020202A8E 138 | :1008900025D15A78FE2A22D1DA88012A1FD1598817 139 | :1008A00081421CD10F499A81996017E00020202ACB 140 | :1008B00015D15A78FF2A12D1DA8882420FD15B888B 141 | :1008C00083420CD1084B1870084B1870022001F0BD 142 | :1008D0008BFC812001F088FCFFF722FF012008BD7E 143 | :1008E000CC060020840100209D0100209C010020F6 144 | :1008F00038B5051C0C1CFFF7E9FE074B01221A73E3 145 | :10090000064B0022DA701A715A719A71220A9D7090 146 | :100910001A735C7338BDC04678000020A401002023 147 | :1009200008B5E82102208901FFF7E2FF08BD08B5FC 148 | :100930000620A0218140FFF7DBFF08BD08B5042099 149 | :100940000021FFF7D5FF08BD07B50B1C0649021CA7 150 | :1009500000918120012101F0A5FD002803D1FFF7BE 151 | :10096000EDFFFFF73FFF07BD5D08000008B59021D0 152 | :1009700005208901FFF7BCFF08BD000008B5094B41 153 | :100980001B7B594049B2002904DB074B9A680123BD 154 | :10099000824204D2FFF7EAFFFFF724FF0023181C6E 155 | :1009A00008BDC046C401002078000020F7B5214CE6 156 | :1009B000071C0021201C142202F0F2FD1E4E002F05 157 | :1009C00004D0231CF27D0833082502E0F27C231DAD 158 | :1009D0000425707C3F2101401C2901D03F2907D10B 159 | :1009E0001C2119700A2159700C350521D970EDB2FE 160 | :1009F0002B1C954200D9131CDBB2181C80210193DB 161 | :100A0000FFF7BCFF002813D0707BFFF713FE431ED7 162 | :100A10009841C001002F04D0023D2D022580E070D6 163 | :100A200002E0013D2570A070201C0199FFF78CFFAA 164 | :100A3000F7BDC04688010020C401002038B5051C60 165 | :100A4000164C0CD1607BFFF7F5FD002807D09C21E8 166 | :100A500007208901FFF74CFFFFF7C4FE1CE0104B95 167 | :100A6000627C291CDA70A27C9A70E27C5A70227D2A 168 | :100A70001A700C4BA27D5A70E27D1A7018884B1EBA 169 | :100A800099414002C901FFF779FF002804D0064BC5 170 | :100A900001221D70054B1A7038BDC046C4010020EC 171 | :100AA000A00100209E010020C00100209C01002028 172 | :100AB000F8B5002800D0D9E01F2905D16C496D4B4D 173 | :100AC0000A680C1C9A4207D06B4B01221A70FFF780 174 | :100AD000A1FEFFF7B1FEC9E04A7B0F231A40674B26 175 | :100AE0004A731B78934200D2AFE0654B8D689D60DE 176 | :100AF000CB7B1E2B00D1A5E00DD8122B2DD004D816 177 | :100B0000002B67D0032B18D0A5E01A2B5FD01B2B2E 178 | :100B100000D18EE09FE02A2B00D199E006D8252B4A 179 | :100B200064D00120282B00D192E094E02F2B00D13B 180 | :100B300099E001205A2B4AD08DE0CB7C1C1C122B53 181 | :100B400000D91224E4B2201C8021FFF717FF0028EF 182 | :100B500000D18BE04B48211C68E0CB7C1D1C242B72 183 | :100B600000D92425EDB2281C8021FFF707FF0028BB 184 | :100B70007CD0237C990768D1677C002F65D1607B8E 185 | :100B8000FFF760FD404E431E9841C0017070607BCE 186 | :100B9000FFF760FD411C301C1030102202F0BEFC3B 187 | :100BA0003B1C301CC118097CDAB2002905D022296F 188 | :100BB00003D00133102BF5D11A1C102A05D083184D 189 | :100BC000202101321974D2B2F7E7291C2EE0FFF779 190 | :100BD000EDFE4BE0101CFFF715FD022823D0032883 191 | :100BE0001ED000283FD0FFF7A9FE39E00820802161 192 | :100BF000FFF7C4FE002839D0607B244C211CFFF78E 193 | :100C000009FD02280FD003280AD00028EBD1226862 194 | :100C100080239B02636013BA2360201C082105E037 195 | :100C2000FFF785FE1CE0FFF77BFE19E0FFF78CFE67 196 | :100C30001CE0CB7C9D0716D501219943101CFFF7C2 197 | :100C4000F2FC10E0CB7C002B0DD0FFF78FFE07E00D 198 | :100C5000FFF7F4FE0AE0802105208901FFF748FE36 199 | :100C6000FFF7C0FD02E0FFF73FFDF9E7F8BDC04622 200 | :100C7000C4010020555342439D01002084010020FF 201 | :100C800078000020A401002088000020B801002086 202 | :100C900010B51B4A00231178181C99422ED0194C0C 203 | :100CA00013702370184B19491878194A194B0028EA 204 | :100CB00005D0487B11681A88FFF7D4FC04E0487B14 205 | :100CC00011681A88FFF7E0FC2378002B02D000237C 206 | :100CD000237012E0022809D0032804D0002808D18C 207 | :100CE000FFF702FD07E0FFF722FE04E0FFF718FE22 208 | :100CF00001E0FFF723FEFFF775FD012010BDC046A0 209 | :100D00009C010020AC000020C0010020C401002094 210 | :100D1000A00100209E010020F7B51A4D1E1C2B7863 211 | :100D20000F1C141C002B01D1002029E000232B7084 212 | :100D30000223002800D08123321E00D1124A0092E3 213 | :100D4000181C00213A1C231C01F0ACFB002802D126 214 | :100D500001232B7014E0002E0ED12B78002BFCD039 215 | :100D60000A4B1A78002ADFD1094A1B7891680120C2 216 | :100D70000C1B9460584003E0054B9A68141B9C6060 217 | :100D8000FEBDC04660000020B106000099040020AE 218 | :100D90007800002008B5034B58887F23184001F0E5 219 | :100DA00031FC08BDCC06002030B5144B1A78002366 220 | :100DB0009A4221D0124B1B681B681A79824201D8D3 221 | :100DC000002319E0DC789D780E4A24022C4313603E 222 | :100DD0001C199C420ED95D78042D08D19D7885425E 223 | :100DE00005D1DD788D4202D11360012304E01D7826 224 | :100DF0005B19EEE71360E3E7181C30BDEE0100203D 225 | :100E0000E8010020F0010020094B1B681B68DA781C 226 | :100E1000997812020A439B1802788018834205D9F8 227 | :100E20004278042A02D0052AF6D100E0002070475B 228 | :100E3000E801002038B5051CFFF7B6FF002801D1F6 229 | :100E4000002018E00C4B1C68201CFFF7DDFF041E7F 230 | :100E50000AD06279237912028078E1781A4301F08E 231 | :100E600005FA0028F0D1EBE7044BAD001B685B6886 232 | :100E7000EB581B68984738BDF0010020E8010020BE 233 | :100E800070B50021051CFFF78FFF041E19D00E4B13 234 | :100E9000AA001B685B68D658F3689847011C281C99 235 | :100EA000FFF782FF041E0CD0084B1D68281CFFF7BB 236 | :100EB000ABFF051E03D0807801F0B8F9F6E7736840 237 | :100EC0009847201C70BDC046E8010020F0010020BA 238 | :100ED00008B501F0F3FB08BD38B50C4B00241A78B7 239 | :100EE0001D1CA24205D100232B70094B01221A8040 240 | :100EF00038BD084B1B681B681B79A342F3D9201C23 241 | :100F00000134FFF7BDFFE4B2F3E7C046EE01002075 242 | :100F1000EC010020E801002010B50B4B00241B78E9 243 | :100F2000A3420FD0094B1B6819680A79A24209D95C 244 | :100F30005B68A200D3581B69002B00D0984701348E 245 | :100F4000E4B2EFE710BDC046EE010020E80100204A 246 | :100F5000F8B5A44C0023A38123616361237858B2C0 247 | :100F6000002803DAE288002A00D19FE160211940BD 248 | :100F700000D051E11F22002800DBA9E0E588002D08 249 | :100F800000D149E1134067D16378062B09D0082BC3 250 | :100F90005DD0002B00D03FE1022D00D03CE1924813 251 | :100FA00092E06088050A022D0CD006D8012D00D0F1 252 | :100FB00032E18E4B1868017840E0032D1FD00F2DD1 253 | :100FC00013D029E1894BC0B219684A7C824200D80B 254 | :100FD00022E15B68C000C058C178837809021943D8 255 | :100FE00001F020FBA26855702AE0804B9868002829 256 | :100FF00000D111E1C1788378090219431EE0C0B223 257 | :10100000032800D908E102F08BF9070004000A0068 258 | :101010004E010F21764A04E0764804210EE0764A1C 259 | :101020001621002375485D00D65C451901336E809A 260 | :10103000DDB28D42F6D349000231017001F0F2FABF 261 | :10104000E388A2899A4200D8CAE0A381C8E0012DB2 262 | :1010500000D0E1E06A4837E0012B25D163780A2B04 263 | :1010600000D0D9E0012D00D0D6E0654B1B78002BD5 264 | :1010700000D1D1E0634B26791F683A681379B342F7 265 | :1010800000D8C9E0301CFFF78FFE051E00D1C3E079 266 | :101090007B68B600F358DB6898475B4B01211870FA 267 | :1010A000181C01F0BFFA99E0022B00D0B4E063787D 268 | :1010B000002B00D0B0E0022D00D0ADE0207901F08F 269 | :1010C00031F9524B1880181C291C01F0ABFA87E04B 270 | :1010D00013404CD160780138082800D99CE002F018 271 | :1010E00015F90C9B9B9B059B9B9B1A00E388002B8F 272 | :1010F00000D091E0464B236172E0E388002B00D0E2 273 | :101100008AE06388012B00D086E0374B02211A88E1 274 | :101110008A431A8064E0E588002D00D07CE001F06D 275 | :1011200079FA002800D177E0304EA27831684B7C04 276 | :101130009A4271DCFFF7D0FEA378314A1370002B7E 277 | :101140004ED034492F4A5B187168DB00CB1813600E 278 | :10115000161C33681B681B79AB4241D9281C00213F 279 | :10116000FFF768FE002857D00135EDB2F1E7012BFB 280 | :1011700015D163780B2B4FD1E388002B4CD1204B3A 281 | :101180001B78002B48D025796688281CFFF778FE4D 282 | :10119000002841D0F1B2281CFFF74CFE1DE0022BC5 283 | :1011A0003AD16378012B02D0032B0AD034E0E388D4 284 | :1011B000002B31D16388002B2ED1207901F02EF93C 285 | :1011C0000BE0E388002B27D16388002B24D1207902 286 | :1011D00001F00AF8207901F0ADF8051C002D1BD0B4 287 | :1011E000012064E0CC060020EC010020B8000020C3 288 | :1011F0001301002054010020FC00002024010020E5 289 | :10120000EE010020E8010020F4010020E4010020AC 290 | :10121000950D0000FFFFFF1F22781F231340012BB5 291 | :101220001FD1234B1B78002B1BD0224B25791E6826 292 | :1012300032681379AB4214D9281C0021FFF7B4FDA2 293 | :1012400000280ED07368AA00D658F3689847011C8E 294 | :10125000281CFFF7A9FD002803D0B3689847002891 295 | :10126000BED122781F231340022B1FD1104B002424 296 | :101270001B78002B1AD00F4B1B6819680A79A24201 297 | :1012800014D95B68A200D558E9688847011C201C66 298 | :10129000FFF78AFD002809D0AB68984700289FD146 299 | :1012A0000134E4B2E7E70C21034ABAE60020F8BDB6 300 | :1012B000EE010020E8010020AF3600000A4B1A685A 301 | :1012C000002A0CD1EFF310800021084A884205D192 302 | :1012D00072B6BFF35F8F06480170012111701A6862 303 | :1012E00001321A607047C046F8010020FC0100205E 304 | :1012F00058010020084B1A68013A1A601B68002B3D 305 | :1013000009D1064B1B78002B05D0054B01221A7022 306 | :10131000BFF35F8F62B67047F8010020FC01002028 307 | :1013200058010020002806D0034B002258609A6024 308 | :101330001A68D103FCD5704710E000E008B5002022 309 | :1013400000F0A4FBFA21890001F0F4FF054BFA211B 310 | :101350001860890001F0EEFF034B05221860034B73 311 | :101360001A6008BD600100205C01002010E000E070 312 | :1013700010B5041C002C05D0034B013C1868FFF786 313 | :10138000D1FFF7E710BDC04660010020024B58694D 314 | :10139000012318407047C0460040004138B51D4B3E 315 | :1013A0000421DA691C4C0A43DA61A269202392B253 316 | :1013B000FF3313432383051CFFF7E8FF031C0520BD 317 | :1013C000002B25D0EA786B782978DB0192041A4348 318 | :1013D000C02309029B000B401343AA781E21520030 319 | :1013E0000A4029791343C022090492020A40134398 320 | :1013F0006360A268094B5203520F08219140198083 321 | :10140000A2685A806A781A71A069C005C00F0001ED 322 | :1014100038BDC0460004004000400041FE010020ED 323 | :10142000F8B51F4B041C5A881B880E1C5A431823FE 324 | :10143000914233D81B4D80236F68DB023B436B60C6 325 | :10144000AA69202392B2FF3313432B83FFF79EFF39 326 | :101450000523002822D0062C06D89C420BD2022C51 327 | :101460000DD0042C19D10AE0402C16D3412C06D9FA 328 | :10147000452C07D911E0AA691023D1050ED4B6086E 329 | :101480007600EE61A5231B021C432C80FFF77EFF34 330 | :101490000028FBD06F60002300E01723181CF8BD64 331 | :1014A000FE01002000400041F8B5214B0E1C151C28 332 | :1014B00059881A88041C51431823884235D8511E74 333 | :1014C000014232D1172395422FD8FFF75FFF052342 334 | :1014D00000282AD0174F184B3B80FFF757FF0028F2 335 | :1014E000FBD0BA69202392B2FF33134360083B83D9 336 | :1014F000400000239AB2AA420ED29AB26F1EB15C8B 337 | :10150000BA4201DB0A1C03E0B218527812020A4305 338 | :1015100019180A800233EDE700233F2D05D81A1C65 339 | :101520000420211CFFF77CFF031C181CF8BDC046DB 340 | :10153000FE0100200040004144A5FFFFF8B5194B13 341 | :101540000E1C19885B88141C4B43051C18229842FA 342 | :1015500025D84F1E074022D117228C421FD8FFF7F3 343 | :1015600015FF052200281AD00F4B20229969FF325F 344 | :1015700089B20A436D081A836D003B1C9AB2A242DD 345 | :101580000CD25A191188601E89B29AB2B1548242A3 346 | :1015900002DAB218090A51700233EFE70022101C78 347 | :1015A000F8BDC046FE0100200040004138B5104B98 348 | :1015B000041C1D885A8818236A43904215D8AD0030 349 | :1015C000013D054011D1FFF7E1FE052300280CD0B5 350 | :1015D000084B20229969FF3289B20A431A83A40872 351 | :1015E000054A6400DC611A802B1C181C38BDC046FB 352 | :1015F000FE0100200040004102A5FFFF024B1868D9 353 | :101600000004C00F7047C0460018004008B5054BE5 354 | :1016100002211A68D2B20A431A70FFF7EFFF0028BE 355 | :10162000FBD108BD0018004007B5124B40219A6954 356 | :1016300005200A439A6101A900230B7000F09CFA6F 357 | :10164000052000F05DFA0C4B01211A68D2B20A4362 358 | :101650001A70FFF7D3FF0028FBD1084B0022C318F4 359 | :1016600004301A604028F8D1054B10221A60FFF7A9 360 | :10167000CDFF07BD00040040001800409C0400207E 361 | :1016800000E100E010B50B4C0023237023780F2BF2 362 | :101690000FD8094A012110699940084206D011610A 363 | :1016A000064A9B009B58002B00D0984723780133B3 364 | :1016B000EBE710BDDC040020001800409C04002073 365 | :1016C00007B5802201AB1A700A785A704A789A706E 366 | :1016D0008A78191CDA7000F0B1FA07BD10B50C4B0E 367 | :1016E00002211A680A431A60196880229143094A44 368 | :1016F00089B29184101CC168064ACC06FBD5996852 369 | :101700000020D162596891621B689BB2938410BD1E 370 | :10171000040200200008004010B5082832D801F06B 371 | :10172000F5FD0831310505130B1629008020000254 372 | :101730002BE0164B186928E0154B186A154B8005ED 373 | :10174000800FC340181C20E0104B58691DE00F4C5F 374 | :1017500002232068184018D00D4BDB68DA06FBD551 375 | :1017600023685A0710D5002000F012FAA3689BB234 376 | :1017700058430AE0064B00201B6D5A0705D5034B62 377 | :10178000D86802E0002000E0034810BD04020020F9 378 | :101790000008004000127A00006CDC0270B50D4BAE 379 | :1017A00045781E6A817804780122402086431540DE 380 | :1017B000AD01301C0A402843D10180229043021C15 381 | :1017C0000A43054803212140090202400A431A62E4 382 | :1017D00070BDC04600080040FFFCFFFF30B5027A34 383 | :1017E000438992069B059B0D120C1A43124B81886C 384 | :1017F0005A604288C4791143827922430A4341786E 385 | :10180000C9010A431A600278042A0BD1047BC189FA 386 | :10181000058A0A48A40609042C4301402143996023 387 | :10182000196806E0202A06D1028A9A601968842283 388 | :10183000D2000A431A6030BD040200200000FF03FA 389 | :1018400008B508282CD801F061FD122B2B100B19BC 390 | :1018500005202300134B02211A6A0A431A6204E08E 391 | :10186000104B02219A690A439A61002019E00D4B3E 392 | :1018700002211A6992B20A431A82F6E7094B022141 393 | :101880005A6992B20A439A82EFE7FFF727FF08E00E 394 | :10189000044B5A6C0223D2B21A43034B1A70E4E78A 395 | :1018A000172008BD000800404408004010B5C223BE 396 | :1018B0002D4CDB00A3602D4B1E215A688AB08A4351 397 | :1018C00004210A435A6005A80023438083714370B2 398 | :1018D000072303733F232022C381254B02701A681C 399 | :1018E000920E3F2A00D11F22224B23491B689B05E1 400 | :1018F0009B0D8B4200D1214B43810823C371802370 401 | :101900005B0083801E4B02720382FFF767FF01A812 402 | :1019100000230122437082700370FFF73FFF06200F 403 | :10192000FFF78EFF00F038F8FFF7D8FEE2680E4BA5 404 | :10193000D106FBD59A8C80210A439A84114B00244E 405 | :101940001C7202A95C7207229C72201C01234B604E 406 | :101950004C704C720A700B7200F02EF8201C00F0D4 407 | :1019600079F80AB010BDC0460008004000400041B0 408 | :101970002460800028608000FF030000FF01000059 409 | :1019800080BBFFFF00040040024B18680004C00F3A 410 | :101990007047C046000C0040054B08219A690A4375 411 | :1019A0009A61044B01221A701A68D107FCD470475F 412 | :1019B00000040040000C004070B50C784B78240205 413 | :1019C000051C061C0443002B02D08023DB021C43B1 414 | :1019D0004B7A002B02D080231B031C434B68012B46 415 | :1019E00013D95E1E1E400222002E09D19A4202D255 416 | :1019F00001365200FAE7360280232E435B0303E0F0 417 | :101A00001E0280232E439B021C430B7A002B02D024 418 | :101A100080239B031C43FFF7B7FF0028FBD1FFF790 419 | :101A20004DFC0A4B1D70FFF7AFFF0028FBD1084D9E 420 | :101A3000AE60FFF7A9FF0028FBD16A6880235B0234 421 | :101A400013401C436C60FFF755FC70BD080C004050 422 | :101A5000000C004010B5041CFFF796FF0028FBD1D6 423 | :101A6000FFF72CFC074B1C70FFF78EFF0028FBD103 424 | :101A7000054B8022596852020A435A60FFF73AFC2C 425 | :101A800010BDC046040C0040000C0040F8B5071C17 426 | :101A9000FFF77AFF0028FBD1FFF710FC154B1F70F2 427 | :101AA0001E1CFFF771FF0028FBD1134D6868C004AE 428 | :101AB000C00EFFF731FE37706E68104BF602041C43 429 | :101AC000F60F1F70FFF760FF0028FBD1AD682D02F5 430 | :101AD0002D0CFFF70FFC002E07D1012D07D9201C7C 431 | :101AE000291C01F027FC041C01E00135EC40201CFE 432 | :101AF000F8BDC046040C0040000C0040080C00403B 433 | :101B000010B5041CFFF7DAFB054B80221C70054B57 434 | :101B1000D2011968090C0A435A80FFF7EBFB10BD8C 435 | :101B2000020C0040000C004038B5041CFFF7C6FB57 436 | :101B30000D4B0E4A1C700E4B0E4C1968588809014B 437 | :101B4000104058801868090F000C20405880101C65 438 | :101B50001C68074A6500FBD45388090203400B4305 439 | :101B60005380FFF7C7FB38BD020C0040FFF0FFFFBA 440 | :101B7000000C0040FFBFFFFF10B50C7824020443A7 441 | :101B8000FFF7D2FF014BA4B25C8010BD000C0040F7 442 | :101B900010B5041CFFF792FB054B1C70054B1C682D 443 | :101BA000FFF7A8FB2401240F201CFFF76FFF10BDD7 444 | :101BB000020C0040000C004030B5D47800239C4259 445 | :101BC0001BD11478802C03D0802324065B0223438E 446 | :101BD00054780225AC4309D19478002C02D180249A 447 | :101BE000A40201E0C024E402234341605478013C94 448 | :101BF000E4B2012C01D8104C2340A0248DB2E4059E 449 | :101C00002C431C438462D0240D0C24062C431C431B 450 | :101C10008462D478002C0DD15C0305D59378012B18 451 | :101C200001D1816100E041615378013BDBB2012BBE 452 | :101C300000D8816030BDC046FFFFFBFF08B5031C24 453 | :101C40000A1C4009D90903D10549C001401800E028 454 | :101C500000201F210B4001219940FFF7ADFF08BD77 455 | :101C600000440041704708B5FFF720FEFEF7B0FCC6 456 | :101C7000FFF7F8FFFFF7D8FC08BD000008B5044BDC 457 | :101C800001229A71034B1B68002B00D0984708BDB6 458 | :101C900000100040E0040020EFF3108072B6BFF3A4 459 | :101CA0005F8F034B00221A70434258417047C04671 460 | :101CB000580100200F2303405B00C00918180238A8 461 | :101CC00014235843014B18187047C04620020020C7 462 | :101CD000F0B58E7985B073B20D1C0F27301C002B28 463 | :101CE00046DAFFF7E7FF6D88C368028AED1883685C 464 | :101CF00037400197041C0292C560877C9D4221D029 465 | :101D00005E1B4B4AB6B2964206D9101C029901F0EE 466 | :101D1000B5FB474B5E1AB6B20023BA0706D5301C96 467 | :101D2000029901F04BFB8BB25A4253415A00A37CFB 468 | :101D300002218B4313436268A37452193D480199F1 469 | :101D4000331C0AE0B807C00F0AD0022362689F4321 470 | :101D500038480199A7745219002300F0F3FE64E09B 471 | :101D600001239F432368A774002B5ED0291C5AE0EF 472 | :101D7000FFF7A0FF038A37400193837C0297041C7E 473 | :101D80002F885A0710D5C268436801999B1880684C 474 | :101D9000039301F013FB0A1C0299274B01398901B7 475 | :101DA000C918039801F0BAFBE368FA18A368E26067 476 | :101DB0009A4200D9E360AA88BA422BD1E5689D42D5 477 | :101DC00028D05E1B1A4FB6B2BE4206D9381C019904 478 | :101DD00001F054FB7F1ABBB206E0301C019901F000 479 | :101DE000EDFA8BB2F61AB3B2019A124893420BD2B3 480 | :101DF000A37C04221343029AA374013A0E4B92016E 481 | :101E0000D2180299019B02E062680299521900F00F 482 | :101E1000BFFE0AE0A37C01229343A3742368002B36 483 | :101E200003D0E1680020321C984705B0F0BDC046E1 484 | :101E3000FF1F000064050020E404002010B5064CDC 485 | :101E4000064B0522201C80211A7000F03DFE201C4C 486 | :101E5000002100F046FE10BD640500207402002041 487 | :101E600037B5041CFFF738F8226801AD8023937260 488 | :101E7000281C00F027FD0323291C201C6B7000F098 489 | :101E800029FD201C174900F0A7FE201C002102227A 490 | :101E9000154B00F063FC00210A1C201C134B00F0C2 491 | :101EA0005DFC134B201C0021012200F057FC201C7C 492 | :101EB0000021022200F07AFC00210A1C201C00F004 493 | :101EC00075FC201C0021012200F070FC2368094AE7 494 | :101ED00019890A408021C9000A431A81064B002251 495 | :101EE0001A7037BDE406002031200000592300009D 496 | :101EF000311F0000FFF3FFFF7402002010B5084CF3 497 | :101F0000084B0322201C08491A7000F065FE074B9D 498 | :101F100000219A68201C0B1C00F014FE10BDC04666 499 | :101F20006405002074020020E4060020CC06002096 500 | :101F300008B589790C4B4AB2002A08DA1B78012BC4 501 | :101F400002D1FFF7DBFF0DE0042B0BD107E01A787D 502 | :101F5000022A02D104221A7004E0032A02D10348A3 503 | :101F600000F0B2FD08BDC0467402002064050020E8 504 | :101F7000F8B51D4D1D4E2B88B4891D4FE41AA4B22F 505 | :101F8000002C1BD11B4A11885B189BB21380F2886E 506 | :101F90009A4203D0184B1B78002B07D0174B042212 507 | :101FA000381C17491A7000F017FE1CE07369002BEB 508 | :101FB0000BD09847002808D02C80B4893F2C04D936 509 | :101FC0000D4B00221A70402402E00B4B01221A70C4 510 | :101FD0002B88B268381CD2180021231C00F0B2FDF7 511 | :101FE0002B88E4182C80F8BD70020020CC0600205D 512 | :101FF000640500201C0200207202002074020020F0 513 | :10200000E406002008B5FEF787FFFEF773F908BD68 514 | :10201000064B5A6A910605D4D968D0220A40D02AC4 515 | :10202000FAD102E0DA68D106FCD57047000800401A 516 | :1020300070B5284E0C1C3378002B06D0264B1B693C 517 | :10204000002B00D09847002333702388082B02D040 518 | :10205000FFF7F4FE3CE0214C1F4D2378A2782B7053 519 | :1020600063786B70E3781B02D3186B8063792279F5 520 | :102070001B02D318AB80E379A2791B02D318EB8043 521 | :10208000FEF766FF0028E3D02B787F2B0ED9144B88 522 | :1020900000211980134B221C19800223337012482F 523 | :1020A000402300F075FDFFF763FF11E0EB88002B84 524 | :1020B00002D1FFF723FF0BE0094B00211980094BE8 525 | :1020C0000948198001233370221C402300F060FD71 526 | :1020D00070BDC04674020020CC060020E40600203B 527 | :1020E0001C0200207002002064050020002805D09A 528 | :1020F000034B01221A70BFF35F8F62B67047C04670 529 | :1021000058010020F7B501AE041C1149301C04220F 530 | :1021100001F004FA0F4B1D78A54217D0002C08D00F 531 | :10212000375DFFF7B9FD0C4BDA5D0132DA55FFF789 532 | :10213000DDFF002D08D0755DFFF7AEFD064B5A5D43 533 | :10214000013A5A55FFF7D2FF024B1C70F7BDC0464B 534 | :10215000BC360000730200209404002010B5084C27 535 | :102160000621201C00F0ECFA201C042100F0E8FA03 536 | :102170000221201C00F0D4FA0220FFF7C3FF10BD9B 537 | :102180006405002010B5FFF743FF0C4C0221201C12 538 | :1021900000F0D6FA201C042100F0C2FA084A201CE4 539 | :1021A000062100F0ADFA0621201C00F0B9FA032048 540 | :1021B000FFF7A8FFFEF79AF810BDC046640500209F 541 | :1021C0005D21000010B5074C0421201C00F0B8FA76 542 | :1021D0000221201C00F0A4FA0120FFF793FFFEF774 543 | :1021E00081F810BD6405002038B5041C211C0A4884 544 | :1021F00000F045FC201CFFF75DFD827C031CD1072D 545 | :1022000008D501201D6882439A74002D02D0D96838 546 | :10221000221CA84738BDC04664050020024B1B683D 547 | :1022200018698004400D704764050020F7B501ADC2 548 | :10223000041C281C00F046FB201CFFF7D5FF0A4FAA 549 | :102240000026291C381CEE702C7000F043FB0F2177 550 | :10225000321C2140381C00F095FA381C321C211C1D 551 | :1022600000F0EAFAF7BDC04664050020F7B501ACFE 552 | :10227000061C201C0F1C151C00F024FB26700023DC 553 | :10228000082D1DD90123102D1AD90223202D17D96D 554 | :102290000323402D14D90423802D11D980235B0002 555 | :1022A0009D4201D805230BE080239B009D4201D86D 556 | :1022B000062305E0184B9D4201D900202BE007239F 557 | :1022C000301C6370FFF7F6FC0323391C05821940AC 558 | :1022D000012901D1022304E0022902D00329ECD113 559 | :1022E00004230E4D211C281CE37000F0F3FA041E99 560 | :1022F000E3D10F210A4B3140221C281C00F02EFA9A 561 | :10230000311C221C281C00F051FA281C311C01220F 562 | :1023100000F04CFA0120FEBDFF0300006405002020 563 | :10232000D11C000008B5011C014800F0BEFB08BD2F 564 | :10233000640500200F2310B50340041C0020022B6D 565 | :1023400007D80448211C00F0BFFB201CFFF74CFFFE 566 | :10235000012010BD64050020F8B52A4E3378012B0A 567 | :1023600043D1294A294C0D881788A38979198B42B2 568 | :1023700001DADD1BADB2A2682549D0192A1C01F093 569 | :10238000CDF8EF19204ABBB21380214F402D05D163 570 | :10239000204DE1882A88D218914209DCA381636923 571 | :1023A000002B02D0984700280BD0FFF7A7FD28E0AC 572 | :1023B000A2899A4212D16069002802D08047002881 573 | :1023C00004D105233370FFF7B5FF1AE00E4B1A88CE 574 | :1023D0002B88D3180C4A2B800023138000213A1C31 575 | :1023E00040230D4800F0D4FB0BE0022B02D1FFF795 576 | :1023F000BFFD06E0054B1B69002B00D0984700236A 577 | :102400003370F8BD7402002070020020CC0600205A 578 | :10241000E40600201C020020640500200F2370B594 579 | :102420000340061C0024022B0ED8FFF743FC311C8E 580 | :10243000051C064800F055FBAB7C0124DA0703D5E8 581 | :10244000A343AB742B689847201C70BD6405002023 582 | :10245000F7B50F23051C01910340022B01D900247D 583 | :102460001BE0FFF727FC837C061CDA07F7D40C4F30 584 | :10247000291C381C00F019FB041E06D0B37C012275 585 | :102480001343B374019B336007E0381C291C00F030 586 | :10249000E5FA041EE3D0019A9047201CFEBDC04619 587 | :1024A00064050020F0B51E1C0F2385B00340071CF7 588 | :1024B000029103920193022B01D9002597E0FFF7C7 589 | :1024C00031FF051EF9D1381CFFF7F4FB041CFFF7A0 590 | :1024D000E3FBA27CD10702D5FFF708FE87E00123CA 591 | :1024E0001A43A274002804D0424A1370BFF35F8FCE 592 | :1024F00062B60023E3600A9B039A0298A17C2360E2 593 | :102500000123626018400222984091430143042055 594 | :102510008143A17479B2A660002930DA002E1AD066 595 | :10252000354DB6B2AE4205D9218A281C00F0A6FF6F 596 | :102530006E1AB6B202990023994206D0218A301C45 597 | :1025400000F03CFF8BB25A4253415A00A37C022157 598 | :102550008B43134304E00299002909D0A37C9343E1 599 | :10256000A3740199039A331C244800F0EBFA3BE072 600 | :10257000A27C9A43A2740A9A002A08D10CE0002E89 601 | :102580000CD1A27C0A999A43A274002904D000209D 602 | :10259000011C3A1C0A9B9847012528E0164FB6B249 603 | :1025A000258ABE4206D9381C291C00F067FF7F1A15 604 | :1025B000BBB206E0301C291C00F000FF8BB2F61AFB 605 | :1025C000B3B20E48AB420BD2A37C04221343019A50 606 | :1025D000A374013A0A4B9201D21801992B1C01E015 607 | :1025E0000199039A00F0D4FA45424541EDB2281C06 608 | :1025F00005B0F0BD58010020FF1F00006405002059 609 | :10260000E4040020024B80221B681043987270473C 610 | :1026100064050020024B1B6898684002400E70471A 611 | :1026200064050020014B986099817047CC0600201A 612 | :1026300038B50320FFF766FD1A4C01252368201CDE 613 | :102640009A68042192B2AA431A81174A00F058F8F6 614 | :10265000201C0021154A00F053F8291C201C144AA4 615 | :1026600000F04EF8134A201C022100F049F8201C0B 616 | :10267000042100F055F8201C002100F051F8291C1D 617 | :10268000201C00F04DF8201C022100F049F80A4AF5 618 | :10269000201C062100F034F8201C062100F040F830 619 | :1026A00038BDC04664050020C5210000052000009B 620 | :1026B000611E0000852100005D21000073B5FFF759 621 | :1026C000EBFA01AC061C201C00F006FD0A4D0023AD 622 | :1026D0000A49221C281CA37000F006FD281C00F0EB 623 | :1026E00093FAFFF795FC0120FFF70CFDFFF7A0FF21 624 | :1026F000301CFFF7FBFC73BD640500200050004157 625 | :102700000B1C2E339B001A50044AAA235B0049007D 626 | :10271000895AC25A0A43C25200207047C03600008C 627 | :10272000064B49000268CB5A9383AB225200815A70 628 | :10273000194381520268002013837047C03600009D 629 | :10274000054BAB2252004900CB5A815A9943815222 630 | :102750000268002093827047C036000010B58C00DC 631 | :10276000A4183434A4000419411863605931044B8F 632 | :10277000FF3108789B5C03430B70002010BDC046FE 633 | :10278000CE36000010B58C00A418031C34345B183E 634 | :10279000A40004190449002059336060FF33895CA8 635 | :1027A0001A788A431A7010BDCE36000070B50F2318 636 | :1027B0000B40C41861341F4DFF342678AD5C35439F 637 | :1027C0002570002A0ED10268002B02D1FF320323AC 638 | :1027D0000FE05B01D31849B2FF330222002926DB48 639 | :1027E000012224E0012A0FD10268002B03D1FF321D 640 | :1027F0000C2393721CE05B01D31849B2FF3308220B 641 | :10280000002914DB042212E0022A05D102685B01D0 642 | :10281000D318FF3310220AE0032A09D102685B01B2 643 | :10282000D31849B2FF334022002900DB20229A72DC 644 | :10283000002070BDCE36000070B50F230B40C418C9 645 | :102840001F4D6134FF34AE5C2578B5432570002AF6 646 | :102850000ED10268002B02D1FF3203230FE05B018F 647 | :10286000D31849B2FF330222002926DB012224E0DB 648 | :10287000012A0FD10268002B03D1FF320C235372BF 649 | :102880001CE05B01D31849B2FF330822002914DB96 650 | :10289000042212E0022A05D102685B01D318FF333B 651 | :1028A00010220AE0032A09D102685B01D31849B259 652 | :1028B000FF334022002900DB20225A72002070BD25 653 | :1028C000CE36000000230370437083700123C37071 654 | :1028D00070470000F0B5021C0D78C8780F232B401C 655 | :1028E000ED09042800D998E0146800F00FFD0308F2 656 | :1028F000495D7A0008335B010020E054A9E05D01E6 657 | :102900006419FF3466781C20770700D0A1E067784F 658 | :102910007026374200D09CE01120607014680833A4 659 | :102920005B01E018402444711268D31880221A71A8 660 | :102930008A78484B002A08D05A195468802000062B 661 | :10294000044354605469204307E05A19506840001A 662 | :102950004008506050694000400850615D194C7853 663 | :10296000686807223C4B14401840240720436860E5 664 | :1029700049780A40696912070B4013436B6162E0B2 665 | :1029800058012418FF34002D07D0677870261C20CA 666 | :1029900037425ED16078202612E066781C207707E7 667 | :1029A00057D1607802262FE058012418FF34002DFB 668 | :1029B00010D0677870261C2037424AD160783026C4 669 | :1029C0003043607010681A1C08325201821880204F 670 | :1029D000107122E066781C2077073AD160780326D0 671 | :1029E00012E058012418FF34002D07D067787026B4 672 | :1029F0001C2037422DD160784026E1E766781C2004 673 | :102A0000770726D1607804263043607010681A1C5E 674 | :102A1000083252018218402050715B005D190D4B45 675 | :102A200048782D015B19072210405C680A4A0007AC 676 | :102A3000224002435A608878002806D059688022D4 677 | :102A400012060A435A60002003E05A6852005208F6 678 | :102A50005A60F0BD24070020FFFFFF8F0F220A40BD 679 | :102A600003680832520149B29858002901DA400639 680 | :102A700000E04007400F431E9841C0B270470F234B 681 | :102A80000B40026808335B0149B2D218002905DA0D 682 | :102A9000802111710268D318022204E04021517193 683 | :102AA0000268D3180122DA7170470F220A400368C6 684 | :102AB000083252019B1849B25868002901DA800295 685 | :102AC00000E0C002C00F70470F220A4003680832BE 686 | :102AD000520149B29B182022002900DB10225A71B2 687 | :102AE000704730B50F220A404CB201685301C91833 688 | :102AF000FF31CD79002C11DA2024254220D04C71F1 689 | :102B00000168CB18FF331C7A40210C4218D019728F 690 | :102B10000368083252019A18022310E0102425425B 691 | :102B20000ED04C710168CB18FF331C7A20210C4267 692 | :102B300006D019720368083252019A1801231371E2 693 | :102B400030BD000070B50D1C046808356D012E59AC 694 | :102B50001C247606760F14D00B4C490161180A61CB 695 | :102B60000C1C0A4A49690A4062619A046369920C22 696 | :102B70009B0B9B0313436361036800245D1980234F 697 | :102B80006B71201C70BDC04624070020FF3F00F081 698 | :102B900070B50D1C046808356D012E591C2476078C 699 | :102BA00013D00B4C49010A5161184C689A04094B27 700 | :102BB0001209234013434B604B6800249B0B9B037B 701 | :102BC0004B6003685D1940232B71201C70BDC0460B 702 | :102BD00024070020FF3F00F0094B0A4A196059689A 703 | :102BE0000A40802189020A435A605A68920B920374 704 | :102BF0005A6003684022FF3300205A717047C04674 705 | :102C000024070020FF3F00F0036802211A68D2B2B7 706 | :102C10000A431A70026813681B021B0E022BFAD0BB 707 | :102C200070470000F0B5D04E85B0346825682B6839 708 | :102C30001B06DB0F00D13FE1286A80B200F02AFCBE 709 | :102C4000071E1F2F00D9BDE0021C08325201AD182B 710 | :102C50006D6803202D0E054242D0C448012103684F 711 | :102C6000B9408B430360216803238818E119C371BD 712 | :102C7000A83189790120014232D0BD4B1F702168F3 713 | :102C80005058BC497A0180078A18800F5168012882 714 | :102C90000BD18904890C598051680901890C9980EC 715 | :102CA00053689B0B9B03536013E00901890C88B2A6 716 | :102CB000029059805168B0488904890C9980516804 717 | :102CC000084050600298002803D152689204920C88 718 | :102CD0005A80BB1C1B01E3185B68201CA449984761 719 | :102CE00004231D420CD0A14A01211068B940884339 720 | :102CF0001060326811683A1C083252018A18D37188 721 | :102D000008231D421ED0994A01211068B94088430A 722 | :102D100010603068FA18016852018A18D371C3191B 723 | :102D2000A8339B799A070DD5924A91497B01D31814 724 | :102D30000F7008335B68DB02DB0E4B703B01C3187E 725 | :102D40009B6A984710231D421FD0884A01211068B2 726 | :102D5000B9408843106030683A1C0168083252015B 727 | :102D60008A18D371C319A8339B795A070DD5804BA4 728 | :102D700080497A011F708A18526800211201920C52 729 | :102D80005A803B01C318DB6A984720231D4200D1BB 730 | :102D90009BE1764A01211568B94030688D43156082 731 | :102DA0003A1C066808325201B218D371C319A8330D 732 | :102DB0009B79190700D488E16D490F703F01C7194D 733 | :102DC0003B6B81E1EF690423BFB21F4208D0AB83A4 734 | :102DD000231CA5331B78DA0702D56368201C9847AB 735 | :102DE00008231F420CD0614A306800211160056839 736 | :102DF000AB83031CA5331B78990701D583689847DB 737 | :102E000040231F4209D0306802689383031CA53316 738 | :102E10001B78DD0601D54369984720231F4209D05E 739 | :102E2000306801688B83031CA5331B781A0701D512 740 | :102E30000369984710231F4209D030680568AB83A7 741 | :102E4000031CA5331B78590701D5C3689847802315 742 | :102E50001F420CD0454A30680021116002689383FC 743 | :102E6000031CA5331B789D0601D5836998478023F1 744 | :102E70005B001F420CD03D4A0021306811600168A0 745 | :102E80008B83031CA5331B785A0601D5C369984769 746 | :102E900080239B001F4200D117E1344A3068002193 747 | :102EA00011600568AB83031CA5331B787F2B00D80A 748 | :102EB0000BE1036A984708E12A6A92B20292002A5B 749 | :102EC0004BD1AB23ED695B00AA22E35A5200ADB2AD 750 | :102ED000A45A2B40029F1C40284B7A00D35A1D4213 751 | :102EE00002D03268126893831C420FD02449062F07 752 | :102EF00006D1204B9A68802312095B0013400B60B7 753 | :102F00003B1C30682E339B001B5898470137072F16 754 | :102F1000E2D1DAE01F1C0837B020009779014000A9 755 | :102F2000E7183E1859374919FF3730783F788C46F3 756 | :102F300049680190090E384060270840394221D184 757 | :102F40001027394239D10C2739424AD18E0700D097 758 | :102F50008DE00133082B00D1B7E002990126194119 759 | :102F6000DAB23142F5D0D5E7900200208402002089 760 | :102F70007C02002024070020FF3F00F0C036000044 761 | :102F80007802002059016D18FF352E7A40210E423B 762 | :102F900004D02972802149420A4304E02E7A20217C 763 | :102FA0000E4202D029724A498A716022104200D131 764 | :102FB0008BE01B01E318E03357E06146CF713278B4 765 | :102FC0003A4200D181E043495A018A1852681B01F4 766 | :102FD00092043F49E318920CDC330A801B68201CE2 767 | :102FE00072E059016D18FF352E7A08273E4220D035 768 | :102FF0002F72384D69188F6918256D18BE0305D5D5 769 | :10300000896902270902090EB943A9708021494242 770 | :103010000A432F49009F8A7121687E018E197268C8 771 | :10302000950152D40C2210424FD01B01E318D83323 772 | :103030001BE02E7A04273E42F4D02F72254D6918EA 773 | :103040008F6808256D18BE0305D589680227090217 774 | :10305000090EB943A9701E49009F8A7121687E013B 775 | :103060008E197268D501DDD52FE01B682AE05E015C 776 | :10307000AD19FF352F7A02210F420CD0297280251D 777 | :1030800013496D422A438A71124A96197269920451 778 | :10309000920C4A8010E0297A012739420CD00C4961 779 | :1030A0002F728A710B4A961972689204920C0A80E8 780 | :1030B00072681201920C8A80810706D00D331B01C1 781 | :1030C000E3185B680249201C984705B0F0BDC04674 782 | :1030D0008802002024070020002201230270437090 783 | :1030E0008270C37070470000F0B585B00192654AE8 784 | :1030F00000231360644A051C1060644A29600C1C9C 785 | :10310000D169202003AE01430120D1610627B070B0 786 | :10311000311C18207370F3703770FEF78FFD192083 787 | :10312000311C3770FEF78AFD01996A468B78381C8E 788 | :1031300002A91372FEF720FD381CFEF7E1FC23788C 789 | :103140000120034323702368D903FCD450490B6842 790 | :103150005A0B1F231A409A4200D105221A409001AF 791 | :10316000268D4C4A3240024322850868820C134067 792 | :103170001F2B00D11D23208D1F221340904303439A 793 | :1031800023850B680722DB0D1340934200D10323F4 794 | :103190001340218D1A03404B40480B4013432385B5 795 | :1031A00001997F230A782178D2010B401343019AB9 796 | :1031B0002370517801231940237804228900934316 797 | :1031C0000B43019923706062CB78012B04D12B68EB 798 | :1031D0000C211A898A4306E0002B05D12B680C24A8 799 | :1031E0001989A1430A431A8180220021520000F06C 800 | :1031F000D7F90023E918002204334A60202BF9D1C3 801 | :10320000A918002310324B628B62CB620B63802AB9 802 | :10321000F6D12A1CA43213705370E918081C00223E 803 | :10322000A630AE31013302700A70082BF5D1131CA1 804 | :10323000E918B831002204330A601C2BF8D1A91810 805 | :10324000081C0023D430E0311032036043608360F7 806 | :103250000B60802AF3D1AA225200AB52AB2252005B 807 | :10326000AB52AC20EA184000111861320020FF3246 808 | :10327000013308701070082BF3D1094B80221A60BB 809 | :1032800005B0F0BD84020020900200200004004040 810 | :10329000246080003FF8FFFFFF8FFFFF240700201E 811 | :1032A00000E100E0FEE700001148124910B5884235 812 | :1032B00001D0002301E0104B07E0104CCA18A242D5 813 | :1032C000F9D2C45804331460F7E70D4A191D043BC2 814 | :1032D000934203D200221A600B1CF6E7094A0A4BFC 815 | :1032E0007F218A439A6000F0F5F8FCF7BDFFFEE706 816 | :1032F000F436000000000020680100206401002076 817 | :10330000240800200000000000ED00E002B4714637 818 | :1033100049084900095C49008E4402BC7047C04618 819 | :1033200003B47146490840004900095A49008E44D7 820 | :1033300003BC7047002934D00123002210B4884216 821 | :103340002CD301242407A14204D2814202D20901D4 822 | :103350001B01F8E7E400A14204D2814202D24900F5 823 | :103360005B00F8E7884201D3401A1A434C08A04298 824 | :1033700002D3001B5C0822438C08A04202D3001B2E 825 | :103380009C082243CC08A04202D3001BDC08224345 826 | :10339000002803D01B0901D00909E3E7101C10BC69 827 | :1033A0007047002801D00020C04307B4024802A1A2 828 | :1033B0004018029003BDC046D90000000029F0D09B 829 | :1033C00003B5FFF7B9FF0EBC4243891A1847C04640 830 | :1033D000002941D010B4041C4C40A4460123002213 831 | :1033E000002900D54942002800D5404288422CD30C 832 | :1033F00001242407A14204D2814202D209011B0107 833 | :10340000F8E7E400A14204D2814202D249005B0005 834 | :10341000F8E7884201D3401A1A434C08A04202D36D 835 | :10342000001B5C0822438C08A04202D3001B9C08AE 836 | :103430002243CC08A04202D3001BDC082243002810 837 | :1034400003D01B0901D00909E3E7101C6446002CD6 838 | :1034500000D5404210BC7047002806D003DB002096 839 | :10346000C043400801E08020000607B4024802A1E2 840 | :103470004018029003BDC046190000000029EBD09F 841 | :1034800003B5FFF7A7FF0EBC4243891A1847C04691 842 | :103490007047C046414208401C2101231B0498424A 843 | :1034A00001D3000C10391B0A984201D3000A0839D5 844 | :1034B0001B09984201D30009043902A2105C401A8A 845 | :1034C0007047C0461B1C1D1D1E1E1E1E1F1F1F1FDA 846 | :1034D0001F1F1F1F70B50D4E0D4D0024AD1BAD10ED 847 | :1034E00005D0A300F35801349847A542F9D100F064 848 | :1034F000F1F8084E084D0024AD1BAD1005D0A30017 849 | :10350000F35801349847A542F9D170BDE036000068 850 | :10351000E0360000E0360000E4360000F0B50F2A87 851 | :1035200035D9031C0B439C0735D1161C103E3609B8 852 | :103530003501451910350C1C031C27681F6067688E 853 | :103540005F60A7689F60E7681034DF601033AB42AC 854 | :10355000F3D1731C1B01C518C9180F231340032B8B 855 | :103560001BD91C1FA4080134A4000023CE58EE5020 856 | :103570000433A342FAD1ED18C91803231A4005D029 857 | :103580000023CC5CEC5401339342FAD1F0BD051C0E 858 | :10359000002AF5D1FAE7051CF2E71A1CF8E7C04645 859 | :1035A000F0B54F464646C0B483B0830752D0541E90 860 | :1035B000002A4AD0CEB2031C032503E0621E002C71 861 | :1035C00043D0141C01335A1E16702B42F6D1032C23 862 | :1035D00033D9FF250D402A0215432A0415430F2C29 863 | :1035E0001AD9271C103F3F09B9463F01B84610279A 864 | :1035F000FF18BC4646461A1C664415605560956027 865 | :10360000D5601032B242F8D14F4601373F010F2248 866 | :10361000DB191440032C10D9271F1E1DBF0801966B 867 | :10362000BE00B446019E1A1C664420C2B242FCD1C0 868 | :103630000137BF000322DB191440002C05D0C9B2AA 869 | :103640001C1919700133A342FBD103B00CBC904686 870 | :103650009946F0BD031C141CB9E7C046EB3C906DC5 871 | :103660006B646F7366730000020401000210006453 872 | :1036700000F801006400600000000000000000008D 873 | :10368000000029785634124D542D44323145204DD6 874 | :1036900053444641543132202020224D542D44328F 875 | :1036A000314520426F6F746C6F6164657222003720 876 | :1036B00034383635313139353833300000030201C2 877 | :1036C0000400080070008000010000010002030CEB 878 | :1036D00010600000F8B5C046F8BC08BC9E467047B4 879 | :1036E00031010000F8B5C046F8BC08BC9E467047E2 880 | :0436F00005010000D0 881 | :1036F4004D542D44323145204D5344080000000000 882 | :1037040000000000000000000000000000000000B5 883 | :103714004146004C004100530048000F00262E0093 884 | :10372400420049004E0000000000000000000000BC 885 | :10373400464C41534820202042494E0000000000DE 886 | :1037440000000000000020084E12020000C000002B 887 | :103754000100000055070000FD0600007D08000080 888 | :10376400AD06000000000000555342530000000065 889 | :103774000000000000000000000003021F00000021 890 | :103784004D41545441495220000000000000000003 891 | :103794000000000000000000312E30300100000065 892 | :1037A400DC000020C4000020C8000020B00000207D 893 | :1037B400000000006400002012010002000000402C 894 | :1037C400D0160C0A000101020301000009022000C6 895 | :1037D400010100C032090400000208065000070578 896 | :1037E4008102400000070502024000004D542D44B0 897 | :1037F400323145204D534420426F6F746C6F6164C5 898 | :103804006572004D61747461697254656368204C1B 899 | :103814004C43000000030000000000000000000012 900 | :103824000000000000000000000000000000000094 901 | :103834000000000000000000000000000000000084 902 | :103844000000000004030904010000000800000057 903 | :04385400401F000011 904 | :04000003000032A91E 905 | :00000001FF 906 | -------------------------------------------------------------------------------- /mt-d21e/Board/board_config/conf_board.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM D21 Xplained Pro board configuration. 5 | * 6 | * Copyright (c) 2013-2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef CONF_BOARD_H_INCLUDED 45 | #define CONF_BOARD_H_INCLUDED 46 | 47 | /* Enable USB VBUS detect */ 48 | // # define CONF_BOARD_USB_VBUS_DETECT 49 | 50 | #endif /* CONF_BOARD_H_INCLUDED */ 51 | -------------------------------------------------------------------------------- /mt-d21e/Board/board_init.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM D21 Xplained Pro board initialization 5 | * 6 | * Copyright (c) 2013-2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #include 45 | #include 46 | #include 47 | #include "user_board.h" 48 | 49 | #if defined(__GNUC__) 50 | void board_init(void) WEAK __attribute__((alias("system_board_init"))); 51 | #elif defined(__ICCARM__) 52 | void board_init(void); 53 | # pragma weak board_init=system_board_init 54 | #endif 55 | 56 | void system_board_init(void) 57 | { 58 | struct port_config pin_conf; 59 | port_get_config_defaults(&pin_conf); 60 | 61 | /* Configure LEDs as outputs, turn them off */ 62 | pin_conf.direction = PORT_PIN_DIR_OUTPUT; 63 | port_pin_set_config(LED0_PIN, &pin_conf); 64 | port_pin_set_output_level(LED0_PIN, LED0_INACTIVE); 65 | 66 | /* Set buttons as inputs */ 67 | pin_conf.direction = PORT_PIN_DIR_INPUT; 68 | pin_conf.input_pull = PORT_PIN_PULL_UP; 69 | port_pin_set_config(SWA_PIN, &pin_conf); 70 | } 71 | -------------------------------------------------------------------------------- /mt-d21e/Board/debug_scripts/gcc/mt-d21_flash.gdb: -------------------------------------------------------------------------------- 1 | #******************************************************* 2 | # 3 | # Connect to J-Link and debug application in flash. 4 | # 5 | 6 | # define 'reset' command 7 | define reset 8 | 9 | # Connect to the J-Link gdb server 10 | target remote localhost:2331 11 | 12 | # Reset the chip to get to a known state 13 | monitor reset 14 | 15 | # Select flash device 16 | # ATSAMD21E15A ATSAMD21E16A ATSAMD21E17A ATSAMD21E18A 17 | # ATSAMD21G15A ATSAMD21G16A ATSAMD21G17A ATSAMD21G18A 18 | # ATSAMD21J15A ATSAMD21J16A ATSAMD21J17A ATSAMD21J18A 19 | monitor flash device = ATSAMD21E18A 20 | 21 | # Enable flash download and flash breakpoints 22 | monitor flash download = 1 23 | 24 | # Load the program 25 | load 26 | 27 | # Initializing PC and stack pointer 28 | mon reg sp=(0x00000000) 29 | mon reg pc=(0x00000004) 30 | info reg 31 | 32 | # end of 'reset' command 33 | end 34 | -------------------------------------------------------------------------------- /mt-d21e/Board/user_board.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief MT-D21E board definition 5 | * 6 | * Copyright (c) 2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef MT_D21E_H_INCLUDED 45 | #define MT_D21E_H_INCLUDED 46 | 47 | #include 48 | #include 49 | 50 | #ifdef __cplusplus 51 | extern "C" { 52 | #endif 53 | 54 | /** 55 | * \ingroup group_common_boards 56 | * \defgroup MT_D21E_group MT-D21E board 57 | * 58 | * @{ 59 | */ 60 | 61 | void system_board_init(void); 62 | 63 | /** 64 | * \defgroup MT_D21E_features_group Features 65 | * 66 | * Symbols that describe features and capabilities of the board. 67 | * 68 | * @{ 69 | */ 70 | 71 | /** Name string macro */ 72 | #define BOARD_NAME "MT_D21E" 73 | 74 | /** \name Resonator definitions (SAMD MSD bootloader derives clock from USB) 75 | * @{ */ 76 | #define BOARD_FREQ_SLCK_XTAL (32768U) 77 | #define BOARD_FREQ_SLCK_BYPASS (32768U) 78 | #define BOARD_FREQ_MAINCK_XTAL 0 /* Not Mounted */ 79 | #define BOARD_FREQ_MAINCK_BYPASS 0 /* Not Mounted */ 80 | #define BOARD_MCK CHIP_FREQ_CPU_MAX 81 | #define BOARD_OSC_STARTUP_US 15625 82 | /** @} */ 83 | 84 | /** \name LED definitions 85 | * @{ */ 86 | #define LED0_PIN PIN_PA28 87 | #define LED0_ACTIVE true 88 | #define LED0_INACTIVE !LED0_ACTIVE 89 | /** @} */ 90 | 91 | /** \name SWA definitions (SAMD MSD bootloader entry button) 92 | * @{ */ 93 | #define SWA_PIN PIN_PA27 94 | #define SWA_ACTIVE false 95 | #define SWA_INACTIVE !SWA_ACTIVE 96 | #define SWA_EIC_PIN PIN_PA27A_EIC_EXTINT27 97 | #define SWA_EIC_MUX MUX_PA27A_EIC_EXTINT27 98 | #define SWA_EIC_PINMUX PINMUX_PA27A_EIC_EXTINT27 99 | #define SWA_EIC_LINE 27 100 | /** @} */ 101 | 102 | /** \name SWB definitions (unused in SAMD MSD bootloader) 103 | * @{ */ 104 | #define SWB_PIN PIN_PA31 105 | #define SWB_ACTIVE false 106 | #define SWB_INACTIVE !SWB_ACTIVE 107 | #define SWB_EIC_PIN PIN_PA31A_EIC_EXTINT31 108 | #define SWB_EIC_MUX MUX_PA31A_EIC_EXTINT31 109 | #define SWB_EIC_PINMUX PINMUX_PA31A_EIC_EXTINT31 110 | #define SWB_EIC_LINE 31 111 | /** @} */ 112 | 113 | /** 114 | * \name LED definitions 115 | * 116 | * Wrapper macros for LED, to ensure common naming across all Xplained Pro 117 | * 118 | * @{ */ 119 | #define LED_NAME "LED (blue)" 120 | #define LED_PIN LED0_PIN 121 | #define LED_ACTIVE LED0_ACTIVE 122 | #define LED_INACTIVE LED0_INACTIVE 123 | #define LED_GPIO LED0_PIN 124 | #define LED LED0_PIN 125 | 126 | /* These are unused in the SAMD MSD Bootloader */ 127 | #define LED_PWM4CTRL_MODULE TCC0 128 | #define LED_PWM4CTRL_CHANNEL 0 129 | #define LED_PWM4CTRL_OUTPUT 0 130 | #define LED_PWM4CTRL_PIN PIN_PA28E_TCC0_WO0 131 | #define LED_PWM4CTRL_MUX MUX_PA28E_TCC0_WO0 132 | #define LED_PWM4CTRL_PINMUX PINMUX_PA28E_TCC0_WO0 133 | /** @} */ 134 | 135 | /** Number of on-board LEDs */ 136 | #define LED_COUNT 1 137 | 138 | /** 139 | * \name Button A definitions 140 | * 141 | * Wrapper macros for button A 142 | * 143 | * @{ */ 144 | #define BUTTON_A_NAME "SWA" 145 | #define BUTTON_A_PIN SWA_PIN 146 | #define BUTTON_A_ACTIVE SWA_ACTIVE 147 | #define BUTTON_A_INACTIVE SWA_INACTIVE 148 | #define BUTTON_A_EIC_PIN SWA_EIC_PIN 149 | #define BUTTON_A_EIC_MUX SWA_EIC_MUX 150 | #define BUTTON_A_EIC_PINMUX SWA_EIC_PINMUX 151 | #define BUTTON_A_EIC_LINE SWA_EIC_LINE 152 | /** @} */ 153 | 154 | /** 155 | * \name Button B definitions 156 | * 157 | * Wrapper macros for button B 158 | * 159 | * @{ */ 160 | #define BUTTON_B_NAME "SWB" 161 | #define BUTTON_B_PIN SWB_PIN 162 | #define BUTTON_B_ACTIVE SWB_ACTIVE 163 | #define BUTTON_B_INACTIVE SWB_INACTIVE 164 | #define BUTTON_B_EIC_PIN SWB_EIC_PIN 165 | #define BUTTON_B_EIC_MUX SWB_EIC_MUX 166 | #define BUTTON_B_EIC_PINMUX SWB_EIC_PINMUX 167 | #define BUTTON_B_EIC_LINE SWB_EIC_LINE 168 | /** @} */ 169 | 170 | /** Number of on-board buttons */ 171 | #define BUTTON_COUNT 2 172 | 173 | 174 | /** \name USB definitions 175 | * @{ 176 | */ 177 | #define USB_ID 178 | #define USB_TARGET_DP_PIN PIN_PA25G_USB_DP 179 | #define USB_TARGET_DP_MUX MUX_PA25G_USB_DP 180 | #define USB_TARGET_DP_PINMUX PINMUX_PA25G_USB_DP 181 | #define USB_TARGET_DM_PIN PIN_PA24G_USB_DM 182 | #define USB_TARGET_DM_MUX MUX_PA24G_USB_DM 183 | #define USB_TARGET_DM_PINMUX PINMUX_PA24G_USB_DM 184 | 185 | /* These are unused in the SAMD MSD Bootloader */ 186 | #define USB_VBUS_PIN PIN_PA7 187 | #define USB_VBUS_EIC_LINE 7 188 | #define USB_VBUS_EIC_MUX MUX_PA7A_EIC_EXTINT7 189 | #define USB_VBUS_EIC_PINMUX PINMUX_PA7A_EIC_EXTINT7 190 | #define USB_ID_PIN PIN_PA03 191 | #define USB_ID_EIC_LINE 3 192 | #define USB_ID_EIC_MUX MUX_PA03A_EIC_EXTINT3 193 | #define USB_ID_EIC_PINMUX PINMUX_PA03A_EIC_EXTINT3 194 | /** @} */ 195 | 196 | 197 | /** @} */ 198 | 199 | 200 | /** 201 | * \brief Turns off the specified LEDs. 202 | * 203 | * \param led_gpio LED to turn off (LEDx_GPIO). 204 | * 205 | * \note The pins of the specified LEDs are set to GPIO output mode. 206 | */ 207 | #define LED_Off(led_gpio) port_pin_set_output_level(led_gpio,false) 208 | 209 | /** 210 | * \brief Turns on the specified LEDs. 211 | * 212 | * \param led_gpio LED to turn on (LEDx_GPIO). 213 | * 214 | * \note The pins of the specified LEDs are set to GPIO output mode. 215 | */ 216 | #define LED_On(led_gpio) port_pin_set_output_level(led_gpio,true) 217 | 218 | /** 219 | * \brief Toggles the specified LEDs. 220 | * 221 | * \param led_gpio LED to toggle (LEDx_GPIO). 222 | * 223 | * \note The pins of the specified LEDs are set to GPIO output mode. 224 | */ 225 | #define LED_Toggle(led_gpio) port_pin_toggle_output_level(led_gpio) 226 | 227 | /** @} */ 228 | 229 | #ifdef __cplusplus 230 | } 231 | #endif 232 | 233 | #endif /* MT_D21E_H_INCLUDED */ 234 | -------------------------------------------------------------------------------- /mt-d21e/conf_access.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Memory access control configuration file. 5 | * 6 | * Copyright (c) 2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef _CONF_ACCESS_H_ 45 | #define _CONF_ACCESS_H_ 46 | 47 | #include 48 | #include "Board/user_board.h" 49 | 50 | 51 | /*! \name Activation of Logical Unit Numbers 52 | */ 53 | //! @{ 54 | #define LUN_0 ENABLE //!< On-Chip Virtual Memory. 55 | #define LUN_1 DISABLE //!< AT45DBX Data Flash. 56 | #define LUN_2 DISABLE //!< SD/MMC Card over SPI. 57 | #define LUN_3 DISABLE //!< SD/MMC Card over MCI Slot 0. 58 | #define LUN_4 DISABLE 59 | #define LUN_5 DISABLE 60 | #define LUN_6 DISABLE 61 | #define LUN_7 DISABLE 62 | #define LUN_USB DISABLE //!< Host Mass-Storage Memory. 63 | //! @} 64 | 65 | /*! \name LUN 0 Definitions 66 | */ 67 | //! @{ 68 | #define VIRTUAL_FLASH_MEM LUN_0 69 | #define LUN_ID_VIRTUAL_FLASH_MEM LUN_ID_0 70 | #define LUN_0_INCLUDE "virtual_flash_mem.h" 71 | #define Lun_0_test_unit_ready virtual_test_unit_ready 72 | #define Lun_0_read_capacity virtual_read_capacity 73 | #define Lun_0_wr_protect virtual_wr_protect 74 | #define Lun_0_removal virtual_removal 75 | #define Lun_0_usb_read_10 virtual_usb_read_10 76 | #define Lun_0_usb_write_10 virtual_usb_write_10 77 | #define LUN_0_NAME "\"Mass-Storage Bootloader\"" 78 | //! @} 79 | 80 | /*! \name USB LUNs Definitions 81 | */ 82 | //! @{ 83 | #define MEM_USB LUN_USB 84 | #define LUN_ID_MEM_USB LUN_ID_USB 85 | #define LUN_USB_INCLUDE "host_mem.h" 86 | #define Lun_usb_test_unit_ready(lun) host_test_unit_ready(lun) 87 | #define Lun_usb_read_capacity(lun, nb_sect) host_read_capacity(lun, nb_sect) 88 | #define Lun_usb_read_sector_size(lun) host_read_sector_size(lun) 89 | #define Lun_usb_wr_protect(lun) host_wr_protect(lun) 90 | #define Lun_usb_removal() host_removal() 91 | #define Lun_usb_mem_2_ram(addr, ram) host_read_10_ram(addr, ram) 92 | #define Lun_usb_ram_2_mem(addr, ram) host_write_10_ram(addr, ram) 93 | #define LUN_USB_NAME "\"Host Mass-Storage Memory\"" 94 | //! @} 95 | 96 | /*! \name Actions Associated with Memory Accesses 97 | * 98 | * Write here the action to associate with each memory access. 99 | * 100 | * \warning Be careful not to waste time in order not to disturb the functions. 101 | */ 102 | //! @{ 103 | #define memory_start_read_action(nb_sectors) ui_start_read() 104 | #define memory_stop_read_action() ui_stop_read() 105 | #define memory_start_write_action(nb_sectors) ui_start_write() 106 | #define memory_stop_write_action() ui_stop_write() 107 | #include "../ui.h" 108 | //! @} 109 | 110 | /*! \name Activation of Interface Features 111 | */ 112 | //! @{ 113 | #define ACCESS_USB true //!< MEM <-> USB interface. 114 | #define ACCESS_MEM_TO_RAM false //!< MEM <-> RAM interface. 115 | #define ACCESS_STREAM false //!< Streaming MEM <-> MEM interface. 116 | #define ACCESS_STREAM_RECORD false //!< Streaming MEM <-> MEM interface in record mode. 117 | #define ACCESS_MEM_TO_MEM false //!< MEM <-> MEM interface. 118 | #define ACCESS_CODEC false //!< Codec interface. 119 | //! @} 120 | 121 | /*! \name Specific Options for Access Control 122 | */ 123 | //! @{ 124 | #define GLOBAL_WR_PROTECT false //!< Management of a global write protection. 125 | //! @} 126 | 127 | 128 | #endif // _CONF_ACCESS_H_ 129 | -------------------------------------------------------------------------------- /mt-d21e/conf_bootloader.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Bootloader configuration. 5 | * 6 | * Copyright (c) 2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | //! Configuration of the bootloader 45 | 46 | #ifndef CONF_BOOTLOADER_H_ 47 | #define CONF_BOOTLOADER_H_ 48 | 49 | #include "conf_board.h" 50 | 51 | #define APP_START_ADDRESS 0x00004000 52 | #define BOOT_LED LED_PIN 53 | #define BOOT_LOAD_PIN SWA_PIN 54 | #define GPIO_BOOT_PIN_MASK (1U << (BOOT_LOAD_PIN & 0x1F)) 55 | 56 | #endif /* CONF_BOOTLOADER_H_ */ 57 | -------------------------------------------------------------------------------- /mt-d21e/conf_clocks.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM D21 Clock configuration 5 | * 6 | * Copyright (C) 2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | #include 44 | 45 | #ifndef CONF_CLOCKS_H_INCLUDED 46 | # define CONF_CLOCKS_H_INCLUDED 47 | 48 | /* System clock bus configuration */ 49 | # define CONF_CLOCK_CPU_CLOCK_FAILURE_DETECT false 50 | # define CONF_CLOCK_FLASH_WAIT_STATES 2 51 | # define CONF_CLOCK_CPU_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1 52 | # define CONF_CLOCK_APBA_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1 53 | # define CONF_CLOCK_APBB_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1 54 | 55 | /* SYSTEM_CLOCK_SOURCE_OSC8M configuration - Internal 8MHz oscillator */ 56 | # define CONF_CLOCK_OSC8M_PRESCALER SYSTEM_OSC8M_DIV_1 57 | # define CONF_CLOCK_OSC8M_ON_DEMAND true 58 | # define CONF_CLOCK_OSC8M_RUN_IN_STANDBY false 59 | 60 | /* SYSTEM_CLOCK_SOURCE_XOSC configuration - External clock/oscillator */ 61 | # define CONF_CLOCK_XOSC_ENABLE false 62 | # define CONF_CLOCK_XOSC_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL 63 | # define CONF_CLOCK_XOSC_EXTERNAL_FREQUENCY 12000000UL 64 | # define CONF_CLOCK_XOSC_STARTUP_TIME SYSTEM_XOSC_STARTUP_32768 65 | # define CONF_CLOCK_XOSC_AUTO_GAIN_CONTROL true 66 | # define CONF_CLOCK_XOSC_ON_DEMAND true 67 | # define CONF_CLOCK_XOSC_RUN_IN_STANDBY false 68 | 69 | /* SYSTEM_CLOCK_SOURCE_XOSC32K configuration - External 32KHz crystal/clock oscillator */ 70 | # define CONF_CLOCK_XOSC32K_ENABLE false 71 | # define CONF_CLOCK_XOSC32K_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL 72 | # define CONF_CLOCK_XOSC32K_STARTUP_TIME SYSTEM_XOSC32K_STARTUP_65536 73 | # define CONF_CLOCK_XOSC32K_AUTO_AMPLITUDE_CONTROL false 74 | # define CONF_CLOCK_XOSC32K_ENABLE_1KHZ_OUPUT false 75 | # define CONF_CLOCK_XOSC32K_ENABLE_32KHZ_OUTPUT true 76 | # define CONF_CLOCK_XOSC32K_ON_DEMAND true 77 | # define CONF_CLOCK_XOSC32K_RUN_IN_STANDBY false 78 | 79 | /* SYSTEM_CLOCK_SOURCE_OSC32K configuration - Internal 32KHz oscillator */ 80 | # define CONF_CLOCK_OSC32K_ENABLE false 81 | # define CONF_CLOCK_OSC32K_STARTUP_TIME SYSTEM_OSC32K_STARTUP_130 82 | # define CONF_CLOCK_OSC32K_ENABLE_1KHZ_OUTPUT true 83 | # define CONF_CLOCK_OSC32K_ENABLE_32KHZ_OUTPUT true 84 | # define CONF_CLOCK_OSC32K_ON_DEMAND true 85 | # define CONF_CLOCK_OSC32K_RUN_IN_STANDBY false 86 | 87 | /* SYSTEM_CLOCK_SOURCE_DFLL configuration - Digital Frequency Locked Loop */ 88 | # define CONF_CLOCK_DFLL_ENABLE true 89 | # define CONF_CLOCK_DFLL_LOOP_MODE SYSTEM_CLOCK_DFLL_LOOP_MODE_USB_RECOVERY 90 | # define CONF_CLOCK_DFLL_ON_DEMAND true 91 | 92 | /* DFLL open loop mode configuration */ 93 | # define CONF_CLOCK_DFLL_COARSE_VALUE (0x1f / 4) 94 | # define CONF_CLOCK_DFLL_FINE_VALUE (0xff / 4) 95 | 96 | /* DFLL closed loop mode configuration */ 97 | # define CONF_CLOCK_DFLL_SOURCE_GCLK_GENERATOR GCLK_GENERATOR_1 98 | # define CONF_CLOCK_DFLL_MULTIPLY_FACTOR 6 99 | # define CONF_CLOCK_DFLL_QUICK_LOCK true 100 | # define CONF_CLOCK_DFLL_TRACK_AFTER_FINE_LOCK true 101 | # define CONF_CLOCK_DFLL_KEEP_LOCK_ON_WAKEUP true 102 | # define CONF_CLOCK_DFLL_ENABLE_CHILL_CYCLE true 103 | # define CONF_CLOCK_DFLL_MAX_COARSE_STEP_SIZE (0x1f / 4) 104 | # define CONF_CLOCK_DFLL_MAX_FINE_STEP_SIZE (0xff / 4) 105 | 106 | /* SYSTEM_CLOCK_SOURCE_DPLL configuration - Digital Phase-Locked Loop */ 107 | # define CONF_CLOCK_DPLL_ENABLE false 108 | # define CONF_CLOCK_DPLL_ON_DEMAND true 109 | # define CONF_CLOCK_DPLL_RUN_IN_STANDBY false 110 | # define CONF_CLOCK_DPLL_LOCK_BYPASS false 111 | # define CONF_CLOCK_DPLL_WAKE_UP_FAST false 112 | # define CONF_CLOCK_DPLL_LOW_POWER_ENABLE false 113 | 114 | # define CONF_CLOCK_DPLL_LOCK_TIME SYSTEM_CLOCK_SOURCE_DPLL_LOCK_TIME_NO_TIMEOUT 115 | # define CONF_CLOCK_DPLL_REFERENCE_CLOCK SYSTEM_CLOCK_SOURCE_DPLL_REFERENCE_CLOCK_REF0 116 | # define CONF_CLOCK_DPLL_FILTER SYSTEM_CLOCK_SOURCE_DPLL_FILTER_DEFAULT 117 | 118 | # define CONF_CLOCK_DPLL_REFERENCE_FREQUENCY 32768 119 | # define CONF_CLOCK_DPLL_REFEREMCE_DIVIDER 1 120 | # define CONF_CLOCK_DPLL_OUTPUT_FREQUENCY 48000000 121 | 122 | /* Set this to true to configure the GCLK when running clocks_init. If set to 123 | * false, none of the GCLK generators will be configured in clocks_init(). */ 124 | # define CONF_CLOCK_CONFIGURE_GCLK true 125 | 126 | /* Configure GCLK generator 0 (Main Clock) */ 127 | # define CONF_CLOCK_GCLK_0_ENABLE true 128 | # define CONF_CLOCK_GCLK_0_RUN_IN_STANDBY true 129 | # define CONF_CLOCK_GCLK_0_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_DFLL 130 | # define CONF_CLOCK_GCLK_0_PRESCALER 1 131 | # define CONF_CLOCK_GCLK_0_OUTPUT_ENABLE false 132 | 133 | /* Configure GCLK generator 1 */ 134 | # define CONF_CLOCK_GCLK_1_ENABLE false 135 | # define CONF_CLOCK_GCLK_1_RUN_IN_STANDBY false 136 | # define CONF_CLOCK_GCLK_1_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M 137 | # define CONF_CLOCK_GCLK_1_PRESCALER 1 138 | # define CONF_CLOCK_GCLK_1_OUTPUT_ENABLE false 139 | 140 | /* Configure GCLK generator 2 (RTC) */ 141 | # define CONF_CLOCK_GCLK_2_ENABLE false 142 | # define CONF_CLOCK_GCLK_2_RUN_IN_STANDBY false 143 | # define CONF_CLOCK_GCLK_2_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC32K 144 | # define CONF_CLOCK_GCLK_2_PRESCALER 32 145 | # define CONF_CLOCK_GCLK_2_OUTPUT_ENABLE false 146 | 147 | /* Configure GCLK generator 3 */ 148 | # define CONF_CLOCK_GCLK_3_ENABLE false 149 | # define CONF_CLOCK_GCLK_3_RUN_IN_STANDBY false 150 | # define CONF_CLOCK_GCLK_3_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M 151 | # define CONF_CLOCK_GCLK_3_PRESCALER 1 152 | # define CONF_CLOCK_GCLK_3_OUTPUT_ENABLE false 153 | 154 | /* Configure GCLK generator 4 */ 155 | # define CONF_CLOCK_GCLK_4_ENABLE false 156 | # define CONF_CLOCK_GCLK_4_RUN_IN_STANDBY false 157 | # define CONF_CLOCK_GCLK_4_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M 158 | # define CONF_CLOCK_GCLK_4_PRESCALER 1 159 | # define CONF_CLOCK_GCLK_4_OUTPUT_ENABLE false 160 | 161 | /* Configure GCLK generator 5 */ 162 | # define CONF_CLOCK_GCLK_5_ENABLE false 163 | # define CONF_CLOCK_GCLK_5_RUN_IN_STANDBY false 164 | # define CONF_CLOCK_GCLK_5_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M 165 | # define CONF_CLOCK_GCLK_5_PRESCALER 1 166 | # define CONF_CLOCK_GCLK_5_OUTPUT_ENABLE false 167 | 168 | /* Configure GCLK generator 6 */ 169 | # define CONF_CLOCK_GCLK_6_ENABLE false 170 | # define CONF_CLOCK_GCLK_6_RUN_IN_STANDBY false 171 | # define CONF_CLOCK_GCLK_6_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M 172 | # define CONF_CLOCK_GCLK_6_PRESCALER 1 173 | # define CONF_CLOCK_GCLK_6_OUTPUT_ENABLE false 174 | 175 | /* Configure GCLK generator 7 */ 176 | # define CONF_CLOCK_GCLK_7_ENABLE false 177 | # define CONF_CLOCK_GCLK_7_RUN_IN_STANDBY false 178 | # define CONF_CLOCK_GCLK_7_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M 179 | # define CONF_CLOCK_GCLK_7_PRESCALER 1 180 | # define CONF_CLOCK_GCLK_7_OUTPUT_ENABLE false 181 | 182 | #endif /* CONF_CLOCKS_H_INCLUDED */ 183 | 184 | -------------------------------------------------------------------------------- /mt-d21e/conf_extint.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM D21 External Interrupt Driver Configuration Header 5 | * 6 | * Copyright (C) 2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | #ifndef CONF_EXTINT_H_INCLUDED 44 | #define CONF_EXTINT_H_INCLUDED 45 | 46 | # define EXTINT_CLOCK_SOURCE GCLK_GENERATOR_0 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /mt-d21e/conf_sleepmgr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Sleep manager configuration 5 | * 6 | * Copyright (c) 2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef CONF_SLEEPMGR_H_INCLUDED 45 | #define CONF_SLEEPMGR_H_INCLUDED 46 | 47 | #define CONFIG_SLEEPMGR_ENABLE 48 | 49 | #endif /* CONF_SLEEPMGR_H_INCLUDED */ 50 | -------------------------------------------------------------------------------- /mt-d21e/conf_usb.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief USB configuration file 5 | * 6 | * Copyright (c) 2009-2012 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef _CONF_USB_H_ 45 | #define _CONF_USB_H_ 46 | 47 | #include "compiler.h" 48 | 49 | 50 | /** 51 | * USB Device Configuration 52 | * @{ 53 | */ 54 | 55 | //! USB Device string definitions (Optional) 56 | #define USB_DEVICE_MANUFACTURE_NAME "MattairTech LLC" 57 | #define USB_DEVICE_PRODUCT_NAME "MT-D21E MSD Bootloader" 58 | #define USB_DEVICE_SERIAL_NAME "748651195830" // Disk SN for MSC 59 | 60 | //! USB Vendor ID and Product ID 61 | #define USB_DEVICE_VENDOR_ID 0x16D0 62 | #define USB_DEVICE_PRODUCT_ID 0x0A0C 63 | 64 | //! Device definition (mandatory) 65 | #define USB_DEVICE_MAJOR_VERSION 1 66 | #define USB_DEVICE_MINOR_VERSION 0 67 | #define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA) 68 | #define USB_DEVICE_ATTR \ 69 | (USB_CONFIG_ATTR_SELF_POWERED) 70 | // (USB_CONFIG_ATTR_BUS_POWERED) 71 | // (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED) 72 | // (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED) 73 | 74 | #define VOLUMELABEL "MT-D21E MSD" 75 | 76 | /** 77 | * Device speeds support 78 | * Low speed not supported by MSC 79 | * @{ 80 | */ 81 | //! To authorize the High speed 82 | #if (UC3A3||UC3A4) 83 | # define USB_DEVICE_HS_SUPPORT 84 | #elif (SAM3XA||SAM3U) 85 | # define USB_DEVICE_HS_SUPPORT 86 | #endif 87 | //@} 88 | 89 | 90 | /** 91 | * USB Device Callbacks definitions (Optional) 92 | * @{ 93 | */ 94 | #define UDC_VBUS_EVENT(b_vbus_high) 95 | // extern void user_callback_vbus_action(bool b_vbus_high); 96 | #define UDC_SOF_EVENT() main_sof_action() 97 | // extern void user_callback_sof_action(void); 98 | #define UDC_SUSPEND_EVENT() main_suspend_action() 99 | // extern void user_callback_suspend_action(void); 100 | #define UDC_RESUME_EVENT() main_resume_action() 101 | // extern void user_callback_resume_action(void); 102 | //! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature 103 | // #define UDC_REMOTEWAKEUP_ENABLE() user_callback_remotewakeup_enable() 104 | // extern void user_callback_remotewakeup_enable(void); 105 | // #define UDC_REMOTEWAKEUP_DISABLE() user_callback_remotewakeup_disable() 106 | // extern void user_callback_remotewakeup_disable(void); 107 | //! When a extra string descriptor must be supported 108 | //! other than manufacturer, product and serial string 109 | // #define UDC_GET_EXTRA_STRING() 110 | //@} 111 | 112 | //@} 113 | 114 | 115 | /** 116 | * USB Interface Configuration 117 | * @{ 118 | */ 119 | 120 | /** 121 | * Configuration of MSC interface 122 | * @{ 123 | */ 124 | 125 | //! Vendor name and Product version of MSC interface 126 | #define UDI_MSC_GLOBAL_VENDOR_ID \ 127 | 'M', 'A', 'T', 'T', 'A', 'I', 'R', ' ' 128 | #define UDI_MSC_GLOBAL_PRODUCT_VERSION \ 129 | '1', '.', '0', '0' 130 | 131 | //! Interface callback definition 132 | #define UDI_MSC_ENABLE_EXT() main_msc_enable() 133 | #define UDI_MSC_DISABLE_EXT() main_msc_disable() 134 | //#define UDI_MSC_NOTIFY_TRANS_EXT() 135 | /* 136 | * #define UDI_MSC_ENABLE_EXT() my_callback_msc_enable() 137 | * extern bool my_callback_msc_enable(void); 138 | * #define UDI_MSC_DISABLE_EXT() my_callback_msc_disable() 139 | * extern void my_callback_msc_disable(void); 140 | * #define UDI_MSC_NOTIFY_TRANS_EXT() msc_notify_trans() 141 | * extern void msc_notify_trans(void) { 142 | */ 143 | //@} 144 | 145 | //@} 146 | 147 | 148 | /** 149 | * USB Device Driver Configuration 150 | * @{ 151 | */ 152 | //@} 153 | 154 | //! The includes of classes and other headers must be done at the end of this file to avoid compile error 155 | #include "udi_msc_conf.h" 156 | #include "../main.h" 157 | 158 | #endif // _CONF_USB_H_ 159 | -------------------------------------------------------------------------------- /mt-d21e/gcc/Makefile: -------------------------------------------------------------------------------- 1 | # List of available make goals: 2 | # 3 | # all Default target, builds the project 4 | # clean Clean up the project 5 | # rebuild Rebuild the project 6 | # 7 | # 8 | # doc Build the documentation 9 | # cleandoc Clean up the documentation 10 | # rebuilddoc Rebuild the documentation 11 | # 12 | # Copyright (c) 2011 Atmel Corporation. All rights reserved. 13 | # 14 | # \asf_license_start 15 | # 16 | # \page License 17 | # 18 | # Redistribution and use in source and binary forms, with or without 19 | # modification, are permitted provided that the following conditions are met: 20 | # 21 | # 1. Redistributions of source code must retain the above copyright notice, 22 | # this list of conditions and the following disclaimer. 23 | # 24 | # 2. Redistributions in binary form must reproduce the above copyright notice, 25 | # this list of conditions and the following disclaimer in the documentation 26 | # and/or other materials provided with the distribution. 27 | # 28 | # 3. The name of Atmel may not be used to endorse or promote products derived 29 | # from this software without specific prior written permission. 30 | # 31 | # 4. This software may only be redistributed and used in connection with an 32 | # Atmel microcontroller product. 33 | # 34 | # THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 35 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 36 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 37 | # EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 38 | # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 39 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 40 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 41 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 42 | # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 43 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 44 | # POSSIBILITY OF SUCH DAMAGE. 45 | # 46 | # \asf_license_stop 47 | # 48 | 49 | # Include the common Makefile, which will also include the project specific 50 | # config.mk file. 51 | MAKEFILE_PATH = Makefile.sam.in 52 | include $(MAKEFILE_PATH) 53 | -------------------------------------------------------------------------------- /mt-d21e/gcc/Makefile.sam.in: -------------------------------------------------------------------------------- 1 | # List of available make goals: 2 | # 3 | # all Default target, builds the project 4 | # clean Clean up the project 5 | # rebuild Rebuild the project 6 | # debug_flash Builds the project and debug in flash 7 | # debug_sram Builds the project and debug in sram 8 | # 9 | # doc Build the documentation 10 | # cleandoc Clean up the documentation 11 | # rebuilddoc Rebuild the documentation 12 | # 13 | # \file 14 | # 15 | # Copyright (c) 2011 - 2014 Atmel Corporation. All rights reserved. 16 | # 17 | # \asf_license_start 18 | # 19 | # \page License 20 | # 21 | # Redistribution and use in source and binary forms, with or without 22 | # modification, are permitted provided that the following conditions are met: 23 | # 24 | # 1. Redistributions of source code must retain the above copyright notice, 25 | # this list of conditions and the following disclaimer. 26 | # 27 | # 2. Redistributions in binary form must reproduce the above copyright notice, 28 | # this list of conditions and the following disclaimer in the documentation 29 | # and/or other materials provided with the distribution. 30 | # 31 | # 3. The name of Atmel may not be used to endorse or promote products derived 32 | # from this software without specific prior written permission. 33 | # 34 | # 4. This software may only be redistributed and used in connection with an 35 | # Atmel microcontroller product. 36 | # 37 | # THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 38 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 39 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 40 | # EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 41 | # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 42 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 43 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 44 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 45 | # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 46 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 47 | # POSSIBILITY OF SUCH DAMAGE. 48 | # 49 | # \asf_license_stop 50 | # 51 | 52 | # Include the config.mk file from the current working path, e.g., where the 53 | # user called make. 54 | include config.mk 55 | 56 | # Tool to use to generate documentation from the source code 57 | DOCGEN ?= doxygen 58 | 59 | # Look for source files relative to the top-level source directory 60 | VPATH := $(PRJ_PATH) 61 | 62 | # Output target file 63 | project_type := $(PROJECT_TYPE) 64 | 65 | # Output target file 66 | ifeq ($(project_type),flash) 67 | target := $(TARGET_FLASH) 68 | linker_script := $(PRJ_PATH)/$(LINKER_SCRIPT_FLASH) 69 | debug_script := $(PRJ_PATH)/$(DEBUG_SCRIPT_FLASH) 70 | else 71 | target := $(TARGET_SRAM) 72 | linker_script := $(PRJ_PATH)/$(LINKER_SCRIPT_SRAM) 73 | debug_script := $(PRJ_PATH)/$(DEBUG_SCRIPT_SRAM) 74 | endif 75 | 76 | # Output project name (target name minus suffix) 77 | project := $(basename $(target)) 78 | 79 | # Output target file (typically ELF or static library) 80 | ifeq ($(suffix $(target)),.a) 81 | target_type := lib 82 | else 83 | ifeq ($(suffix $(target)),.elf) 84 | target_type := elf 85 | else 86 | $(error "Target type $(target_type) is not supported") 87 | endif 88 | endif 89 | 90 | # Allow override of operating system detection. The user can add OS=Linux or 91 | # OS=Windows on the command line to explicit set the host OS. 92 | # 93 | # This allows to work around broken uname utility on certain systems. 94 | ifdef OS 95 | ifeq ($(strip $(OS)), Linux) 96 | os_type := Linux 97 | endif 98 | ifeq ($(strip $(OS)), Windows) 99 | os_type := windows32_64 100 | endif 101 | endif 102 | 103 | os_type ?= $(strip $(shell uname)) 104 | 105 | ifeq ($(os_type),windows32) 106 | os := Windows 107 | else 108 | ifeq ($(os_type),windows64) 109 | os := Windows 110 | else 111 | ifeq ($(os_type),windows32_64) 112 | os ?= Windows 113 | else 114 | ifeq ($(os_type),) 115 | os := Windows 116 | else 117 | # Default to Linux style operating system. Both Cygwin and mingw are fully 118 | # compatible (for this Makefile) with Linux. 119 | os := Linux 120 | endif 121 | endif 122 | endif 123 | endif 124 | 125 | # Output documentation directory and configuration file. 126 | docdir := ../doxygen/html 127 | doccfg := ../doxygen/doxyfile.doxygen 128 | 129 | CROSS ?= arm-none-eabi- 130 | AR := $(CROSS)ar 131 | AS := $(CROSS)as 132 | CC := $(CROSS)gcc 133 | CPP := $(CROSS)gcc -E 134 | CXX := $(CROSS)g++ 135 | LD := $(CROSS)g++ 136 | NM := $(CROSS)nm 137 | OBJCOPY := $(CROSS)objcopy 138 | OBJDUMP := $(CROSS)objdump 139 | SIZE := $(CROSS)size 140 | GDB := $(CROSS)gdb 141 | 142 | RM := rm 143 | ifeq ($(os),Windows) 144 | RMDIR := rmdir /S /Q 145 | else 146 | RMDIR := rmdir -p --ignore-fail-on-non-empty 147 | endif 148 | 149 | # On Windows, we need to override the shell to force the use of cmd.exe 150 | ifeq ($(os),Windows) 151 | SHELL := cmd 152 | endif 153 | 154 | # Strings for beautifying output 155 | MSG_CLEAN_FILES = "RM *.o *.d" 156 | MSG_CLEAN_DIRS = "RMDIR $(strip $(clean-dirs))" 157 | MSG_CLEAN_DOC = "RMDIR $(docdir)" 158 | MSG_MKDIR = "MKDIR $(dir $@)" 159 | 160 | MSG_INFO = "INFO " 161 | MSG_PREBUILD = "PREBUILD $(PREBUILD_CMD)" 162 | MSG_POSTBUILD = "POSTBUILD $(POSTBUILD_CMD)" 163 | 164 | MSG_ARCHIVING = "AR $@" 165 | MSG_ASSEMBLING = "AS $@" 166 | MSG_BINARY_IMAGE = "OBJCOPY $@" 167 | MSG_COMPILING = "CC $@" 168 | MSG_COMPILING_CXX = "CXX $@" 169 | MSG_EXTENDED_LISTING = "OBJDUMP $@" 170 | MSG_IHEX_IMAGE = "OBJCOPY $@" 171 | MSG_LINKING = "LN $@" 172 | MSG_PREPROCESSING = "CPP $@" 173 | MSG_SIZE = "SIZE $@" 174 | MSG_SYMBOL_TABLE = "NM $@" 175 | 176 | MSG_GENERATING_DOC = "DOXYGEN $(docdir)" 177 | 178 | # Don't use make's built-in rules and variables 179 | MAKEFLAGS += -rR 180 | 181 | # Don't print 'Entering directory ...' 182 | MAKEFLAGS += --no-print-directory 183 | 184 | # Function for reversing the order of a list 185 | reverse = $(if $(1),$(call reverse,$(wordlist 2,$(words $(1)),$(1)))) $(firstword $(1)) 186 | 187 | # Hide command output by default, but allow the user to override this 188 | # by adding V=1 on the command line. 189 | # 190 | # This is inspired by the Kbuild system used by the Linux kernel. 191 | ifdef V 192 | ifeq ("$(origin V)", "command line") 193 | VERBOSE = $(V) 194 | endif 195 | endif 196 | ifndef VERBOSE 197 | VERBOSE = 0 198 | endif 199 | 200 | ifeq ($(VERBOSE), 1) 201 | Q = 202 | else 203 | Q = @ 204 | endif 205 | 206 | arflags-gnu-y := $(ARFLAGS) 207 | asflags-gnu-y := $(ASFLAGS) 208 | cflags-gnu-y := $(CFLAGS) 209 | cxxflags-gnu-y := $(CXXFLAGS) 210 | cppflags-gnu-y := $(CPPFLAGS) 211 | cpuflags-gnu-y := 212 | dbgflags-gnu-y := $(DBGFLAGS) 213 | libflags-gnu-y := $(foreach LIB,$(LIBS),-l$(LIB)) 214 | ldflags-gnu-y := $(LDFLAGS) 215 | flashflags-gnu-y := 216 | clean-files := 217 | clean-dirs := 218 | 219 | clean-files += $(wildcard $(target) $(project).map) 220 | clean-files += $(wildcard $(project).hex $(project).bin) 221 | clean-files += $(wildcard $(project).lss $(project).sym) 222 | clean-files += $(wildcard $(build)) 223 | 224 | # Use pipes instead of temporary files for communication between processes 225 | cflags-gnu-y += -pipe 226 | asflags-gnu-y += -pipe 227 | ldflags-gnu-y += -pipe 228 | 229 | # Archiver flags. 230 | arflags-gnu-y += rcs 231 | 232 | # Always enable warnings. And be very careful about implicit 233 | # declarations. 234 | cflags-gnu-y += -Wall -Wstrict-prototypes -Wmissing-prototypes 235 | cflags-gnu-y += -Werror-implicit-function-declaration 236 | cxxflags-gnu-y += -Wall 237 | # IAR doesn't allow arithmetic on void pointers, so warn about that. 238 | cflags-gnu-y += -Wpointer-arith 239 | cxxflags-gnu-y += -Wpointer-arith 240 | 241 | # Preprocessor flags. 242 | cppflags-gnu-y += $(foreach INC,$(addprefix $(PRJ_PATH)/,$(INC_PATH)),-I$(INC)) 243 | asflags-gnu-y += $(foreach INC,$(addprefix $(PRJ_PATH)/,$(INC_PATH)),'-Wa,-I$(INC)') 244 | 245 | # CPU specific flags. 246 | cpuflags-gnu-y += -mcpu=$(ARCH) -mthumb -D=__$(PART)__ 247 | 248 | # Dependency file flags. 249 | depflags = -MD -MP -MQ $@ 250 | 251 | # Debug specific flags. 252 | ifdef BUILD_DEBUG_LEVEL 253 | dbgflags-gnu-y += -g$(BUILD_DEBUG_LEVEL) 254 | else 255 | dbgflags-gnu-y += -g3 256 | endif 257 | 258 | # Optimization specific flags. 259 | ifdef BUILD_OPTIMIZATION 260 | optflags-gnu-y = -O$(BUILD_OPTIMIZATION) 261 | else 262 | optflags-gnu-y = $(OPTIMIZATION) 263 | endif 264 | 265 | # Always preprocess assembler files. 266 | asflags-gnu-y += -x assembler-with-cpp 267 | # Compile C files using the GNU99 standard. 268 | cflags-gnu-y += -std=gnu99 269 | # Compile C++ files using the GNU++98 standard. 270 | cxxflags-gnu-y += -std=gnu++98 271 | 272 | # Don't use strict aliasing (very common in embedded applications). 273 | cflags-gnu-y += -fno-strict-aliasing 274 | cxxflags-gnu-y += -fno-strict-aliasing 275 | 276 | # Separate each function and data into its own separate section to allow 277 | # garbage collection of unused sections. 278 | cflags-gnu-y += -ffunction-sections -fdata-sections 279 | cxxflags-gnu-y += -ffunction-sections -fdata-sections 280 | 281 | # Various cflags. 282 | cflags-gnu-y += -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int 283 | cflags-gnu-y += -Wmain -Wparentheses 284 | cflags-gnu-y += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused 285 | cflags-gnu-y += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef 286 | cflags-gnu-y += -Wshadow -Wbad-function-cast -Wwrite-strings 287 | cflags-gnu-y += -Wsign-compare -Waggregate-return 288 | cflags-gnu-y += -Wmissing-declarations 289 | cflags-gnu-y += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations 290 | cflags-gnu-y += -Wpacked -Wredundant-decls -Wnested-externs -Wlong-long 291 | cflags-gnu-y += -Wunreachable-code 292 | cflags-gnu-y += -Wcast-align 293 | cflags-gnu-y += --param max-inline-insns-single=500 294 | 295 | # To reduce application size use only integer printf function. 296 | cflags-gnu-y += -Dprintf=iprintf 297 | 298 | # Use newlib-nano to reduce application size 299 | ldflags-gnu-y += --specs=nano.specs 300 | 301 | # Garbage collect unreferred sections when linking. 302 | ldflags-gnu-y += -Wl,--gc-sections 303 | 304 | # Use the linker script if provided by the project. 305 | ifneq ($(strip $(linker_script)),) 306 | ldflags-gnu-y += -Wl,-T $(linker_script) 307 | endif 308 | 309 | # Output a link map file and a cross reference table 310 | ldflags-gnu-y += -Wl,-Map=$(project).map,--cref 311 | 312 | # Add library search paths relative to the top level directory. 313 | ldflags-gnu-y += $(foreach _LIB_PATH,$(addprefix $(PRJ_PATH)/,$(LIB_PATH)),-L$(_LIB_PATH)) 314 | 315 | a_flags = $(cpuflags-gnu-y) $(depflags) $(cppflags-gnu-y) $(asflags-gnu-y) -D__ASSEMBLY__ 316 | c_flags = $(cpuflags-gnu-y) $(dbgflags-gnu-y) $(depflags) $(optflags-gnu-y) $(cppflags-gnu-y) $(cflags-gnu-y) 317 | cxx_flags= $(cpuflags-gnu-y) $(dbgflags-gnu-y) $(depflags) $(optflags-gnu-y) $(cppflags-gnu-y) $(cxxflags-gnu-y) 318 | l_flags = -Wl,--entry=Reset_Handler -Wl,--cref $(cpuflags-gnu-y) $(optflags-gnu-y) $(ldflags-gnu-y) 319 | ar_flags = $(arflags-gnu-y) 320 | 321 | # Source files list and part informations must already be included before 322 | # running this makefile 323 | 324 | # If a custom build directory is specified, use it -- force trailing / in directory name. 325 | ifdef BUILD_DIR 326 | build-dir := $(dir $(BUILD_DIR))$(if $(notdir $(BUILD_DIR)),$(notdir $(BUILD_DIR))/) 327 | else 328 | build-dir = 329 | endif 330 | 331 | # Create object files list from source files list. 332 | obj-y := $(addprefix $(build-dir), $(addsuffix .o,$(basename $(CSRCS) $(ASSRCS)))) 333 | # Create dependency files list from source files list. 334 | dep-files := $(wildcard $(foreach f,$(obj-y),$(basename $(f)).d)) 335 | 336 | clean-files += $(wildcard $(obj-y)) 337 | clean-files += $(dep-files) 338 | 339 | clean-dirs += $(call reverse,$(sort $(wildcard $(dir $(obj-y))))) 340 | 341 | # Default target. 342 | .PHONY: all 343 | ifeq ($(project_type),all) 344 | all: 345 | $(MAKE) all PROJECT_TYPE=flash 346 | $(MAKE) all PROJECT_TYPE=sram 347 | else 348 | ifeq ($(target_type),lib) 349 | all: $(target) $(project).lss $(project).sym 350 | else 351 | ifeq ($(target_type),elf) 352 | all: prebuild $(target) $(project).lss $(project).sym $(project).hex $(project).bin postbuild 353 | endif 354 | endif 355 | endif 356 | 357 | prebuild: 358 | ifneq ($(strip $(PREBUILD_CMD)),) 359 | @echo $(MSG_PREBUILD) 360 | $(Q)$(PREBUILD_CMD) 361 | endif 362 | 363 | postbuild: 364 | ifneq ($(strip $(POSTBUILD_CMD)),) 365 | @echo $(MSG_POSTBUILD) 366 | $(Q)$(POSTBUILD_CMD) 367 | endif 368 | 369 | # Clean up the project. 370 | .PHONY: clean 371 | clean: 372 | @$(if $(strip $(clean-files)),echo $(MSG_CLEAN_FILES)) 373 | $(if $(strip $(clean-files)),$(Q)$(RM) $(clean-files),) 374 | @$(if $(strip $(clean-dirs)),echo $(MSG_CLEAN_DIRS)) 375 | # Remove created directories, and make sure we only remove existing 376 | # directories, since recursive rmdir might help us a bit on the way. 377 | ifeq ($(os),Windows) 378 | $(Q)$(if $(strip $(clean-dirs)), \ 379 | $(RMDIR) $(strip $(subst /,\,$(clean-dirs)))) 380 | else 381 | $(Q)$(if $(strip $(clean-dirs)), \ 382 | for directory in $(strip $(clean-dirs)); do \ 383 | if [ -d "$$directory" ]; then \ 384 | $(RMDIR) $$directory; \ 385 | fi \ 386 | done \ 387 | ) 388 | endif 389 | 390 | # Rebuild the project. 391 | .PHONY: rebuild 392 | rebuild: clean all 393 | 394 | # Debug the project in flash. 395 | .PHONY: debug_flash 396 | debug_flash: all 397 | $(GDB) -x "$(PRJ_PATH)/$(DEBUG_SCRIPT_FLASH)" -ex "reset" -readnow -se $(TARGET_FLASH) 398 | 399 | # Debug the project in sram. 400 | .PHONY: debug_sram 401 | debug_sram: all 402 | $(GDB) -x "$(PRJ_PATH)/$(DEBUG_SCRIPT_SRAM)" -ex "reset" -readnow -se $(TARGET_SRAM) 403 | 404 | .PHONY: objfiles 405 | objfiles: $(obj-y) 406 | 407 | # Create object files from C source files. 408 | $(build-dir)%.o: %.c $(MAKEFILE_PATH) config.mk 409 | $(Q)test -d $(dir $@) || echo $(MSG_MKDIR) 410 | ifeq ($(os),Windows) 411 | $(Q)test -d $(patsubst %/,%,$(dir $@)) || mkdir $(subst /,\,$(dir $@)) 412 | else 413 | $(Q)test -d $(dir $@) || mkdir -p $(dir $@) 414 | endif 415 | @echo $(MSG_COMPILING) 416 | $(Q)$(CC) $(c_flags) -c $< -o $@ 417 | 418 | # Create object files from C++ source files. 419 | $(build-dir)%.o: %.cpp $(MAKEFILE_PATH) config.mk 420 | $(Q)test -d $(dir $@) || echo $(MSG_MKDIR) 421 | ifeq ($(os),Windows) 422 | $(Q)test -d $(patsubst %/,%,$(dir $@)) || mkdir $(subst /,\,$(dir $@)) 423 | else 424 | $(Q)test -d $(dir $@) || mkdir -p $(dir $@) 425 | endif 426 | @echo $(MSG_COMPILING_CXX) 427 | $(Q)$(CXX) $(cxx_flags) -c $< -o $@ 428 | 429 | # Preprocess and assemble: create object files from assembler source files. 430 | $(build-dir)%.o: %.S $(MAKEFILE_PATH) config.mk 431 | $(Q)test -d $(dir $@) || echo $(MSG_MKDIR) 432 | ifeq ($(os),Windows) 433 | $(Q)test -d $(patsubst %/,%,$(dir $@)) || mkdir $(subst /,\,$(dir $@)) 434 | else 435 | $(Q)test -d $(dir $@) || mkdir -p $(dir $@) 436 | endif 437 | @echo $(MSG_ASSEMBLING) 438 | $(Q)$(CC) $(a_flags) -c $< -o $@ 439 | 440 | # Include all dependency files to add depedency to all header files in use. 441 | include $(dep-files) 442 | 443 | ifeq ($(target_type),lib) 444 | # Archive object files into an archive 445 | $(target): $(MAKEFILE_PATH) config.mk $(obj-y) 446 | @echo $(MSG_ARCHIVING) 447 | $(Q)$(AR) $(ar_flags) $@ $(obj-y) 448 | @echo $(MSG_SIZE) 449 | $(Q)$(SIZE) -Bxt $@ 450 | else 451 | ifeq ($(target_type),elf) 452 | # Link the object files into an ELF file. Also make sure the target is rebuilt 453 | # if the common Makefile.sam.in or project config.mk is changed. 454 | $(target): $(linker_script) $(MAKEFILE_PATH) config.mk $(obj-y) 455 | @echo $(MSG_LINKING) 456 | $(Q)$(LD) $(l_flags) $(obj-y) $(libflags-gnu-y) -o $@ 457 | @echo $(MSG_SIZE) 458 | $(Q)$(SIZE) -Ax $@ 459 | $(Q)$(SIZE) -Bx $@ 460 | endif 461 | endif 462 | 463 | # Create extended function listing from target output file. 464 | %.lss: $(target) 465 | @echo $(MSG_EXTENDED_LISTING) 466 | $(Q)$(OBJDUMP) -h -S $< > $@ 467 | 468 | # Create symbol table from target output file. 469 | %.sym: $(target) 470 | @echo $(MSG_SYMBOL_TABLE) 471 | $(Q)$(NM) -n $< > $@ 472 | 473 | # Create Intel HEX image from ELF output file. 474 | %.hex: $(target) 475 | @echo $(MSG_IHEX_IMAGE) 476 | $(Q)$(OBJCOPY) -O ihex $(flashflags-gnu-y) $< $@ 477 | 478 | # Create binary image from ELF output file. 479 | %.bin: $(target) 480 | @echo $(MSG_BINARY_IMAGE) 481 | $(Q)$(OBJCOPY) -O binary $< $@ 482 | 483 | # Provide information about the detected host operating system. 484 | .SECONDARY: info-os 485 | info-os: 486 | @echo $(MSG_INFO)$(os) build host detected 487 | 488 | # Build Doxygen generated documentation. 489 | .PHONY: doc 490 | doc: 491 | @echo $(MSG_GENERATING_DOC) 492 | $(Q)cd $(dir $(doccfg)) && $(DOCGEN) $(notdir $(doccfg)) 493 | 494 | # Clean Doxygen generated documentation. 495 | .PHONY: cleandoc 496 | cleandoc: 497 | @$(if $(wildcard $(docdir)),echo $(MSG_CLEAN_DOC)) 498 | $(Q)$(if $(wildcard $(docdir)),$(RM) --recursive $(docdir)) 499 | 500 | # Rebuild the Doxygen generated documentation. 501 | .PHONY: rebuilddoc 502 | rebuilddoc: cleandoc doc 503 | -------------------------------------------------------------------------------- /mt-d21e/gcc/asf.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Autogenerated API include file for the Atmel Software Framework (ASF) 5 | * 6 | * Copyright (c) 2012 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef ASF_H 45 | #define ASF_H 46 | 47 | /* 48 | * This file includes all API header files for the selected drivers from ASF. 49 | * Note: There might be duplicate includes required by more than one driver. 50 | * 51 | * The file is automatically generated and will be re-written when 52 | * running the ASF driver selector tool. Any changes will be discarded. 53 | */ 54 | 55 | // From module: ADC - Analog-to-Digital Converter (Polled APIs) 56 | #include 57 | 58 | // From module: Common SAM0 compiler driver 59 | #include 60 | #include 61 | 62 | // From module: Delay routines 63 | #include 64 | 65 | // From module: EXTINT - External Interrupt (Callback APIs) 66 | #include 67 | #include 68 | 69 | // From module: Generic board support 70 | #include 71 | 72 | // From module: Interrupt management - SAM implementation 73 | #include 74 | 75 | // From module: NVM - Non-Volatile Memory 76 | #include 77 | 78 | // From module: Memory Control Access Interface 79 | #include 80 | 81 | // From module: PORT - GPIO Pin Control 82 | #include 83 | 84 | // From module: Part identification macros 85 | #include 86 | 87 | // From module: SAM D21/R21 USB Dual role interface 88 | #include 89 | 90 | // From module: SYSTEM - Clock Management for SAMD21 91 | #include 92 | #include 93 | 94 | // From module: SYSTEM - Core System Driver 95 | #include 96 | 97 | // From module: SYSTEM - I/O Pin Multiplexer 98 | #include 99 | 100 | // From module: SYSTEM - Interrupt Driver 101 | #include 102 | 103 | // From module: WDT - Watchdog Timer (Callback APIs) 104 | #include 105 | #include 106 | 107 | // From module: Sleep manager - SAMD implementation 108 | #include 109 | #include 110 | 111 | // From module: USB - Universal Serial Bus 112 | #include 113 | 114 | // From module: USB Device MSC (Single Interface Device) 115 | #include 116 | 117 | // From module: USB Device Stack Core (Common API) 118 | #include 119 | #include 120 | 121 | // From module: USB MSC Protocol 122 | #include 123 | 124 | // From module: Virtual Memory in RAM 125 | //#include 126 | 127 | #endif // ASF_H 128 | -------------------------------------------------------------------------------- /mt-d21e/gcc/config.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2011 Atmel Corporation. All rights reserved. 3 | # 4 | # \asf_license_start 5 | # 6 | # \page License 7 | # 8 | # Redistribution and use in source and binary forms, with or without 9 | # modification, are permitted provided that the following conditions are met: 10 | # 11 | # 1. Redistributions of source code must retain the above copyright notice, 12 | # this list of conditions and the following disclaimer. 13 | # 14 | # 2. Redistributions in binary form must reproduce the above copyright notice, 15 | # this list of conditions and the following disclaimer in the documentation 16 | # and/or other materials provided with the distribution. 17 | # 18 | # 3. The name of Atmel may not be used to endorse or promote products derived 19 | # from this software without specific prior written permission. 20 | # 21 | # 4. This software may only be redistributed and used in connection with an 22 | # Atmel microcontroller product. 23 | # 24 | # THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 25 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 26 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 27 | # EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 28 | # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 32 | # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 33 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34 | # POSSIBILITY OF SUCH DAMAGE. 35 | # 36 | # \asf_license_stop 37 | # 38 | 39 | # Path to top level ASF directory relative to this project directory. 40 | PRJ_PATH = ../../../../../opt/xdk-asf-3.19.0 41 | 42 | # Target CPU architecture: cortex-m3, cortex-m4 43 | ARCH = cortex-m0plus 44 | 45 | # Target part: 46 | # samd21e15a samd21e16a samd21e17a samd21e18a 47 | # samd21g15a samd21g16a samd21g17a samd21g18a 48 | # samd21j15a samd21j16a samd21j17a samd21j18a 49 | PART = samd21e18a 50 | 51 | # Application target name. Given with suffix .a for library and .elf for a 52 | # standalone application. 53 | TARGET_FLASH = msd_bootloader_samd21e18a_flash.elf 54 | 55 | # List of C source files. 56 | CSRCS = \ 57 | SAMD-MSD-Bootloader/main.c \ 58 | SAMD-MSD-Bootloader/ui.c \ 59 | SAMD-MSD-Bootloader/virtual_flash_mem/virtual_flash_mem.c \ 60 | SAMD-MSD-Bootloader/virtual_flash_mem/VirtualFAT.c \ 61 | SAMD-MSD-Bootloader/mt-d21e/Board/board_init.c \ 62 | common/services/sleepmgr/samd/sleepmgr.c \ 63 | common/services/storage/ctrl_access/ctrl_access.c \ 64 | common/services/usb/class/msc/device/udi_msc.c \ 65 | common/services/usb/class/msc/device/udi_msc_desc.c \ 66 | common/services/usb/udc/udc.c \ 67 | common/utils/interrupt/interrupt_sam_nvic.c \ 68 | common2/services/delay/sam0/systick_counter.c \ 69 | sam0/drivers/nvm/nvm.c \ 70 | sam0/drivers/extint/extint.c \ 71 | sam0/drivers/extint/extint_callback.c \ 72 | sam0/drivers/adc/adc.c \ 73 | sam0/drivers/port/port.c \ 74 | sam0/drivers/system/clock/clock_samd21_r21/clock.c \ 75 | sam0/drivers/system/clock/clock_samd21_r21/gclk.c \ 76 | sam0/drivers/system/interrupt/system_interrupt.c \ 77 | sam0/drivers/system/pinmux/pinmux.c \ 78 | sam0/drivers/system/system.c \ 79 | sam0/drivers/wdt/wdt.c \ 80 | sam0/drivers/wdt/wdt_callback.c \ 81 | sam0/drivers/usb/stack_interface/usb_device_udd.c \ 82 | sam0/drivers/usb/stack_interface/usb_dual.c \ 83 | sam0/drivers/usb/usb.c \ 84 | sam0/utils/cmsis/samd21/source/gcc/startup_samd21.c \ 85 | sam0/utils/cmsis/samd21/source/system_samd21.c \ 86 | sam0/utils/syscalls/gcc/syscalls.c 87 | 88 | # List of assembler source files. 89 | ASSRCS = 90 | 91 | # List of include paths. 92 | INC_PATH = \ 93 | SAMD-MSD-Bootloader \ 94 | SAMD-MSD-Bootloader/mt-d21e \ 95 | SAMD-MSD-Bootloader/mt-d21e/gcc \ 96 | SAMD-MSD-Bootloader/mt-d21e/Board \ 97 | SAMD-MSD-Bootloader/mt-d21e/Board/board_config \ 98 | SAMD-MSD-Bootloader/virtual_flash_mem \ 99 | SAMD-MSD-Bootloader/virtual_flash_mem/module_config \ 100 | common/boards \ 101 | common/services/sleepmgr \ 102 | common/services/storage/ctrl_access \ 103 | common/services/usb \ 104 | common/services/usb/class/msc \ 105 | common/services/usb/class/msc/device \ 106 | common/services/usb/udc \ 107 | common/utils \ 108 | common2/services/delay \ 109 | common2/services/delay/sam0 \ 110 | sam0/boards \ 111 | sam0/drivers/nvm \ 112 | sam0/drivers/extint \ 113 | sam0/drivers/adc \ 114 | sam0/drivers/port \ 115 | sam0/drivers/system \ 116 | sam0/drivers/system/clock \ 117 | sam0/drivers/system/clock/clock_samd21_r21 \ 118 | sam0/drivers/system/interrupt \ 119 | sam0/drivers/system/interrupt/system_interrupt_samd21 \ 120 | sam0/drivers/system/pinmux \ 121 | sam0/drivers/wdt \ 122 | sam0/drivers/usb \ 123 | sam0/drivers/usb/stack_interface \ 124 | sam0/utils \ 125 | sam0/utils/cmsis/samd21/include \ 126 | sam0/utils/cmsis/samd21/source \ 127 | sam0/utils/header_files \ 128 | sam0/utils/preprocessor \ 129 | thirdparty/CMSIS/Include \ 130 | thirdparty/CMSIS/Lib/GCC 131 | 132 | # Additional search paths for libraries. 133 | LIB_PATH = \ 134 | thirdparty/CMSIS/Lib/GCC 135 | 136 | # List of libraries to use during linking. 137 | LIBS = \ 138 | arm_cortexM0l_math 139 | 140 | # Path relative to top level directory pointing to a linker script. 141 | # samd21e15a samd21e16a samd21e17a samd21e18a 142 | # samd21g15a samd21g16a samd21g17a samd21g18a 143 | # samd21j15a samd21j16a samd21j17a samd21j18a 144 | LINKER_SCRIPT_FLASH = sam0/utils/linker_scripts/samd21/gcc/samd21e18a_flash.ld 145 | 146 | # Path relative to top level directory pointing to a linker script. 147 | DEBUG_SCRIPT_FLASH = SAMD-MSD-Bootloader/mt-d21e/Board/debug_scripts/gcc/mt-d21_flash.gdb 148 | 149 | # Project type parameter: all, sram or flash (flash only for SAMD MSD Bootloader) 150 | PROJECT_TYPE = flash 151 | 152 | # Additional options for debugging. By default the common Makefile.in will 153 | # add -g3. 154 | DBGFLAGS = 155 | 156 | # Application optimization used during compilation and linking: 157 | # -O0, -O1, -O2, -O3 or -Os (was -O1) 158 | OPTIMIZATION = -Os 159 | 160 | # Extra flags to use when archiving. 161 | ARFLAGS = 162 | 163 | # Extra flags to use when assembling. 164 | ASFLAGS = 165 | 166 | # Extra flags to use when compiling. 167 | #CFLAGS = -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections 168 | CFLAGS = 169 | 170 | # Extra flags to use when preprocessing. 171 | # 172 | # Preprocessor symbol definitions 173 | # To add a definition use the format "-D name[=definition]". 174 | # To cancel a definition use the format "-U name". 175 | # 176 | # The most relevant symbols to define for the preprocessor are: 177 | # BOARD Target board in use, see boards/board.h for a list. 178 | # EXT_BOARD Optional extension board in use, see boards/board.h for a list. 179 | # 180 | # __SAMD21E15A__ __SAMD21E16A__ __SAMD21E17A__ __SAMD21E18A__ 181 | # __SAMD21G15A__ __SAMD21G16A__ __SAMD21G17A__ __SAMD21G18A__ 182 | # __SAMD21J15A__ __SAMD21J16A__ __SAMD21J17A__ __SAMD21J18A__ 183 | CPPFLAGS = \ 184 | -D ACCESS_USB_ENABLED \ 185 | -D ADC_CALLBACK_MODE=false \ 186 | -D ARM_MATH_CM0=true \ 187 | -D BOARD=USER_BOARD \ 188 | -D EXTINT_CALLBACK_MODE=true \ 189 | -D UDD_ENABLE \ 190 | -D USB_DEVICE_LPM_SUPPORT \ 191 | -D VIRTUAL_MEMORY_ENABLE \ 192 | -D WDT_CALLBACK_MODE=true \ 193 | -D SYSTICK_MODE \ 194 | -D __SAMD21E18A__ 195 | 196 | # Extra flags to use when linking 197 | LDFLAGS = \ 198 | \ 199 | -Wl,--defsym,STACK_SIZE=0x700 \ 200 | -Wl,--defsym,__stack_size__=0x700 201 | 202 | # Pre- and post-build commands 203 | PREBUILD_CMD = 204 | POSTBUILD_CMD = -------------------------------------------------------------------------------- /ui.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief User Interface 5 | * 6 | * Copyright (c) 2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #include 45 | #include "ui.h" 46 | #include "Board/user_board.h" 47 | 48 | void ui_init(void) 49 | { 50 | /* Initialize LED */ 51 | LED_On(LED_PIN); 52 | } 53 | 54 | void ui_powerdown(void) 55 | { 56 | LED_Off(LED_PIN); 57 | } 58 | 59 | void ui_wakeup(void) 60 | { 61 | LED_On(LED_PIN); 62 | } 63 | 64 | void ui_start_read(void) 65 | { 66 | } 67 | 68 | void ui_stop_read(void) 69 | { 70 | } 71 | 72 | void ui_start_write(void) 73 | { 74 | } 75 | 76 | void ui_stop_write(void) 77 | { 78 | } 79 | 80 | void ui_process(uint16_t framenumber) 81 | { 82 | if (0 == framenumber) { 83 | LED_On(LED_PIN); 84 | } 85 | if (1000 == framenumber) { 86 | LED_Off(LED_PIN); 87 | } 88 | } 89 | 90 | 91 | /** 92 | * \defgroup UI User Interface 93 | * 94 | * Human interface on SAM D21 Xplained Pro 95 | * - LED0 blinks when USB host has checked and enabled MSC interface 96 | * 97 | */ 98 | -------------------------------------------------------------------------------- /ui.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Common User Interface for MSC application 5 | * 6 | * Copyright (c) 2009-2011 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef _UI_H_ 45 | #define _UI_H_ 46 | 47 | //! \brief Initializes the user interface 48 | void ui_init(void); 49 | 50 | //! \brief Enters the user interface in power down mode 51 | void ui_powerdown(void); 52 | 53 | //! \brief Exits the user interface of power down mode 54 | void ui_wakeup(void); 55 | 56 | //! \name Callback to show the MSC read and write access 57 | //! @{ 58 | void ui_start_read(void); 59 | void ui_stop_read(void); 60 | void ui_start_write(void); 61 | void ui_stop_write(void); 62 | //! @} 63 | 64 | /*! \brief This process is called each 1ms 65 | * It is called only if the USB interface is enabled. 66 | * 67 | * \param framenumber Current frame number 68 | */ 69 | void ui_process(uint16_t framenumber); 70 | 71 | #endif // _UI_H_ 72 | -------------------------------------------------------------------------------- /virtual_flash_mem/VirtualFAT.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2014. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * 33 | * Virtualized FAT12 filesystem implementation, to perform self-programming 34 | * in response to read and write requests to the virtual filesystem by the 35 | * host PC. 36 | */ 37 | 38 | #define INCLUDE_FROM_VIRTUAL_FAT_C 39 | #include "VirtualFAT.h" 40 | 41 | extern uint8_t BlockBuffer[]; 42 | 43 | 44 | /** FAT filesystem boot sector block, must be the first sector on the physical 45 | * disk so that the host can identify the presence of a FAT filesystem. This 46 | * block is truncated; normally a large bootstrap section is located near the 47 | * end of the block for booting purposes however as this is not meant to be a 48 | * bootable disk it is omitted for space reasons. 49 | * 50 | * \note When returning the boot block to the host, the magic signature 0xAA55 51 | * must be added to the very end of the block to identify it as a boot 52 | * block. 53 | */ 54 | static const FATBootBlock_t BootBlock = 55 | { 56 | .Bootstrap = {0xEB, 0x3C, 0x90}, 57 | .Description = "mkdosfs", 58 | .SectorSize = SECTOR_SIZE_BYTES, 59 | .SectorsPerCluster = SECTOR_PER_CLUSTER, 60 | .ReservedSectors = 1, 61 | .FATCopies = 2, 62 | .RootDirectoryEntries = (SECTOR_SIZE_BYTES / sizeof(FATDirectoryEntry_t)), 63 | .TotalSectors16 = LUN_MEDIA_BLOCKS, 64 | .MediaDescriptor = 0xF8, 65 | .SectorsPerFAT = 1, 66 | .SectorsPerTrack = (LUN_MEDIA_BLOCKS % 64), 67 | .Heads = (LUN_MEDIA_BLOCKS / 64), 68 | .HiddenSectors = 0, 69 | .TotalSectors32 = 0, 70 | .PhysicalDriveNum = 0, 71 | .ExtendedBootRecordSig = 0x29, 72 | .VolumeSerialNumber = 0x12345678, 73 | .VolumeLabel = VOLUMELABEL, 74 | .FilesystemIdentifier = "FAT12 ", 75 | }; 76 | 77 | /** FAT 8.3 style directory entry, for the virtual FLASH contents file. */ 78 | static FATDirectoryEntry_t FirmwareFileEntries[] = 79 | { 80 | /* Root volume label entry; disk label is contained in the Filename and 81 | * Extension fields (concatenated) with a special attribute flag - other 82 | * fields are ignored. Should be the same as the label in the boot block. 83 | */ 84 | [DISK_FILE_ENTRY_VolumeID] = 85 | { 86 | .MSDOS_Directory = 87 | { 88 | .Name = VOLUMELABEL, 89 | .Attributes = FAT_FLAG_VOLUME_NAME, 90 | .Reserved = {0}, 91 | .CreationTime = 0, 92 | .CreationDate = 0, 93 | .StartingCluster = 0, 94 | .Reserved2 = 0, 95 | } 96 | }, 97 | 98 | /* VFAT Long File Name entry for the virtual firmware file; required to 99 | * prevent corruption from systems that are unable to detect the device 100 | * as being a legacy MSDOS style FAT12 volume. */ 101 | [DISK_FILE_ENTRY_FLASH_LFN] = 102 | { 103 | .VFAT_LongFileName = 104 | { 105 | .Ordinal = 1 | FAT_ORDINAL_LAST_ENTRY, 106 | .Attribute = FAT_FLAG_LONG_FILE_NAME, 107 | .Reserved1 = 0, 108 | .Reserved2 = 0, 109 | 110 | .Checksum = FAT_CHECKSUM('F','L','A','S','H',' ',' ',' ','B','I','N'), 111 | 112 | .Unicode1 = 'F', 113 | .Unicode2 = 'L', 114 | .Unicode3 = 'A', 115 | .Unicode4 = 'S', 116 | .Unicode5 = 'H', 117 | .Unicode6 = '.', 118 | .Unicode7 = 'B', 119 | .Unicode8 = 'I', 120 | .Unicode9 = 'N', 121 | .Unicode10 = 0, 122 | .Unicode11 = 0, 123 | .Unicode12 = 0, 124 | .Unicode13 = 0, 125 | } 126 | }, 127 | 128 | /* MSDOS file entry for the virtual Firmware image. */ 129 | [DISK_FILE_ENTRY_FLASH_MSDOS] = 130 | { 131 | .MSDOS_File = 132 | { 133 | .Filename = "FLASH ", 134 | .Extension = "BIN", 135 | .Attributes = 0, 136 | .Reserved = {0}, 137 | .CreationTime = FAT_TIME(1, 1, 0), 138 | .CreationDate = FAT_DATE(14, 2, 1989), 139 | .StartingCluster = 2, 140 | .FileSizeBytes = FLASH_FILE_SIZE_BYTES, 141 | } 142 | }, 143 | }; 144 | 145 | /** Starting cluster of the virtual FLASH.BIN file on disk, tracked so that the 146 | * offset from the start of the data sector can be determined. On Windows 147 | * systems files are usually replaced using the original file's disk clusters, 148 | * while Linux appears to overwrite with an offset which must be compensated for. 149 | */ 150 | static const uint16_t* FLASHFileStartCluster = &FirmwareFileEntries[DISK_FILE_ENTRY_FLASH_MSDOS].MSDOS_File.StartingCluster; 151 | 152 | /** Updates a FAT12 cluster entry in the FAT file table with the specified next 153 | * chain index. If the cluster is the last in the file chain, the magic value 154 | * \c 0xFFF should be used. 155 | * 156 | * \note FAT data cluster indexes are offset by 2, so that cluster 2 is the 157 | * first file data cluster on the disk. See the FAT specification. 158 | * 159 | * \param[in] Index Index of the cluster entry to update 160 | * \param[in] ChainEntry Next cluster index in the file chain 161 | */ 162 | static void UpdateFAT12ClusterEntry(const uint16_t Index, 163 | const uint16_t ChainEntry) 164 | { 165 | /* Calculate the starting offset of the cluster entry in the FAT12 table */ 166 | uint8_t FATOffset = (Index + (Index >> 1)); 167 | bool UpperNibble = ((Index & 1) != 0); 168 | 169 | /* Check if the start of the entry is at an upper nibble of the byte, fill 170 | * out FAT12 entry as required */ 171 | if (UpperNibble) 172 | { 173 | BlockBuffer[FATOffset] = (BlockBuffer[FATOffset] & 0x0F) | ((ChainEntry & 0x0F) << 4); 174 | BlockBuffer[FATOffset + 1] = (ChainEntry >> 4); 175 | } 176 | else 177 | { 178 | BlockBuffer[FATOffset] = ChainEntry; 179 | BlockBuffer[FATOffset + 1] = (BlockBuffer[FATOffset] & 0xF0) | (ChainEntry >> 8); 180 | } 181 | } 182 | 183 | /** Updates a FAT12 cluster chain in the FAT file table with a linear chain of 184 | * the specified length. 185 | * 186 | * \note FAT data cluster indexes are offset by 2, so that cluster 2 is the 187 | * first file data cluster on the disk. See the FAT specification. 188 | * 189 | * \param[in] Index Index of the start of the cluster chain to update 190 | * \param[in] ChainLength Length of the chain to write, in clusters 191 | */ 192 | static void UpdateFAT12ClusterChain(const uint16_t Index, 193 | const uint8_t ChainLength) 194 | { 195 | for (uint8_t i = 0; i < ChainLength; i++) 196 | { 197 | uint16_t CurrentCluster = Index + i; 198 | uint16_t NextCluster = CurrentCluster + 1; 199 | 200 | /* Mark last cluster as end of file */ 201 | if (i == (ChainLength - 1)) 202 | NextCluster = 0xFFF; 203 | 204 | UpdateFAT12ClusterEntry(CurrentCluster, NextCluster); 205 | } 206 | } 207 | 208 | /** Reads or writes a block of data from/to the physical device FLASH using a 209 | * block buffer stored in RAM, if the requested block is within the virtual 210 | * firmware file's sector ranges in the emulated FAT file system. 211 | * 212 | * \param[in] BlockNumber Physical disk block to read from/write to 213 | * \param[in,out] BlockBuffer Pointer to the start of the block buffer in RAM 214 | * \param[in] Read If \c true, the requested block is read, if 215 | * \c false, the requested block is written 216 | */ 217 | static void ReadWriteFLASHFileBlock(const uint16_t BlockNumber, 218 | const bool Read) 219 | { 220 | uint16_t FileStartBlock = DISK_BLOCK_DataStartBlock + (*FLASHFileStartCluster - 2) * SECTOR_PER_CLUSTER; 221 | uint16_t FileEndBlock = FileStartBlock + (FILE_SECTORS(FLASH_FILE_SIZE_BYTES) - 1); 222 | 223 | /* Range check the write request - abort if requested block is not within the 224 | * virtual firmware file sector range */ 225 | if (!((BlockNumber >= FileStartBlock) && (BlockNumber <= FileEndBlock))) 226 | return; 227 | 228 | uint32_t FlashAddress = (uint32_t)(BlockNumber - FileStartBlock) * SECTOR_SIZE_BYTES; 229 | FlashAddress += APP_START_ADDRESS; 230 | uint16_t len = SECTOR_SIZE_BYTES; 231 | uint32_t offset = 0; 232 | 233 | while (len > NVMCTRL_PAGE_SIZE) { 234 | /* Read or write one page data from/to flash */ 235 | if (Read) { 236 | /* Read out the mapped block of data from the device's FLASH */ 237 | nvm_read_buffer(FlashAddress, BlockBuffer + offset, NVMCTRL_PAGE_SIZE); 238 | } else { 239 | /* Check if it is first page of a row */ 240 | if ((FlashAddress & 0xFF) == 0) { 241 | /* Erase row */ 242 | nvm_erase_row(FlashAddress); 243 | } 244 | /* Write the data to flash */ 245 | nvm_write_buffer(FlashAddress, BlockBuffer + offset, NVMCTRL_PAGE_SIZE); 246 | } 247 | /* Increment the address to be programmed */ 248 | FlashAddress += NVMCTRL_PAGE_SIZE; 249 | /* Increment the offset of the buffer containing data */ 250 | offset += NVMCTRL_PAGE_SIZE; 251 | /* Decrement the length */ 252 | len -= NVMCTRL_PAGE_SIZE; 253 | } 254 | 255 | /* Check if there is data remaining */ 256 | if (len > 0) { 257 | if (Read) { 258 | /* Read out the mapped block of data from the device's FLASH */ 259 | nvm_read_buffer(FlashAddress, BlockBuffer + offset, len); 260 | } else { 261 | /* Write the data to flash */ 262 | nvm_write_buffer(FlashAddress, BlockBuffer + offset, len); 263 | } 264 | } 265 | 266 | 267 | } 268 | 269 | /** Writes a block of data to the virtual FAT filesystem, from the USB Mass 270 | * Storage interface. 271 | * 272 | * \param[in] BlockNumber Index of the block to write. 273 | */ 274 | void VirtualFAT_WriteBlock(const uint16_t BlockNumber) 275 | { 276 | switch (BlockNumber) 277 | { 278 | case DISK_BLOCK_BootBlock: 279 | case DISK_BLOCK_FATBlock1: 280 | case DISK_BLOCK_FATBlock2: 281 | /* Ignore writes to the boot and FAT blocks */ 282 | 283 | break; 284 | 285 | case DISK_BLOCK_RootFilesBlock: 286 | /* Copy over the updated directory entries */ 287 | memcpy(FirmwareFileEntries, BlockBuffer, sizeof(FirmwareFileEntries)); 288 | 289 | break; 290 | 291 | default: 292 | ReadWriteFLASHFileBlock(BlockNumber, false); 293 | 294 | break; 295 | } 296 | } 297 | 298 | /** Reads a block of data from the virtual FAT filesystem, and sends it to the 299 | * host via the USB Mass Storage interface. 300 | * 301 | * \param[in] BlockNumber Index of the block to read. 302 | */ 303 | void VirtualFAT_ReadBlock(const uint16_t BlockNumber) 304 | { 305 | memset(BlockBuffer, 0x00, SECTOR_SIZE_BYTES); 306 | 307 | switch (BlockNumber) 308 | { 309 | case DISK_BLOCK_BootBlock: 310 | memcpy(BlockBuffer, &BootBlock, sizeof(FATBootBlock_t)); 311 | 312 | /* Add the magic signature to the end of the block */ 313 | BlockBuffer[SECTOR_SIZE_BYTES - 2] = 0x55; 314 | BlockBuffer[SECTOR_SIZE_BYTES - 1] = 0xAA; 315 | 316 | break; 317 | 318 | case DISK_BLOCK_FATBlock1: 319 | case DISK_BLOCK_FATBlock2: 320 | /* Cluster 0: Media type/Reserved */ 321 | UpdateFAT12ClusterEntry(0, 0xF00 | BootBlock.MediaDescriptor); 322 | 323 | /* Cluster 1: Reserved */ 324 | UpdateFAT12ClusterEntry(1, 0xFFF); 325 | 326 | /* Cluster 2 onwards: Cluster chain of FLASH.BIN */ 327 | UpdateFAT12ClusterChain(*FLASHFileStartCluster, FILE_CLUSTERS(FLASH_FILE_SIZE_BYTES)); 328 | 329 | break; 330 | 331 | case DISK_BLOCK_RootFilesBlock: 332 | memcpy(BlockBuffer, FirmwareFileEntries, sizeof(FirmwareFileEntries)); 333 | 334 | break; 335 | 336 | default: 337 | ReadWriteFLASHFileBlock(BlockNumber, true); 338 | 339 | break; 340 | } 341 | } 342 | -------------------------------------------------------------------------------- /virtual_flash_mem/VirtualFAT.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2014. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #ifndef _VIRTUALFAT_H_ 32 | #define _VIRTUALFAT_H_ 33 | 34 | /* Includes: */ 35 | #include 36 | #include 37 | 38 | #include "virtual_flash_mem.h" 39 | #include "conf_bootloader.h" 40 | #include "conf_usb.h" 41 | 42 | /* Macros: */ 43 | /** Size of the virtual FLASH.BIN file in bytes. */ 44 | #define FLASH_FILE_SIZE_BYTES (FLASH_SIZE - APP_START_ADDRESS) 45 | 46 | /** Number of sectors that comprise a single logical disk cluster. */ 47 | #define SECTOR_PER_CLUSTER 4 48 | 49 | /** Size of a single logical sector on the disk. */ 50 | #define SECTOR_SIZE_BYTES VMEM_SECTOR_SIZE 51 | 52 | /** Size of a logical cluster on the disk, in bytes */ 53 | #define CLUSTER_SIZE_BYTES (SECTOR_PER_CLUSTER * SECTOR_SIZE_BYTES) 54 | 55 | /** Number of sectors required to store a given size in bytes. 56 | * 57 | * \param[in] size Size of the data that needs to be stored 58 | * 59 | * \return Number of sectors required to store the given data on the disk. 60 | */ 61 | #define FILE_SECTORS(size) ((size / SECTOR_SIZE_BYTES) + ((size % SECTOR_SIZE_BYTES) ? 1 : 0)) 62 | 63 | /** Number of clusters required to store a given size in bytes. 64 | * 65 | * \param[in] size Size of the data that needs to be stored 66 | * 67 | * \return Number of clusters required to store the given data on the disk. 68 | */ 69 | #define FILE_CLUSTERS(size) ((size / CLUSTER_SIZE_BYTES) + ((size % CLUSTER_SIZE_BYTES) ? 1 : 0)) 70 | 71 | /** Total number of logical sectors/blocks on the disk. */ 72 | //#define LUN_MEDIA_BLOCKS (FILE_SECTORS(FLASH_FILE_SIZE_BYTES) + 32) 73 | #define LUN_MEDIA_BLOCKS (FILE_SECTORS(FLASH_FILE_SIZE_BYTES)) + 4 74 | 75 | /** Converts a given time in HH:MM:SS format to a FAT filesystem time. 76 | * 77 | * \note The minimum seconds resolution of FAT is 2, thus odd seconds 78 | * will be truncated to the previous integer multiple of 2 seconds. 79 | * 80 | * \param[in] hh Hours (0-23) 81 | * \param[in] mm Minutes (0-59) 82 | * \param[in] ss Seconds (0-59) 83 | * 84 | * \return Given time encoded as a FAT filesystem timestamp 85 | */ 86 | #define FAT_TIME(hh, mm, ss) ((hh << 11) | (mm << 5) | (ss >> 1)) 87 | 88 | /** Converts a given date in DD/MM/YYYY format to a FAT filesystem date. 89 | * 90 | * \param[in] dd Days in the month (1-31) 91 | * \param[in] mm Months in the year (1-12) 92 | * \param[in] yyyy Year (1980 - 2107) 93 | * 94 | * \return Given date encoded as a FAT filesystem datestamp 95 | */ 96 | #define FAT_DATE(dd, mm, yyyy) (((yyyy - 1980) << 9) | (mm << 5) | (dd << 0)) 97 | 98 | /** Bit-rotates a given 8-bit value once to the right. 99 | * 100 | * \param x Value to rotate right once 101 | * 102 | * \return Bit-rotated input value, rotated once to the right. 103 | */ 104 | #define _ROT8(x) ((((x) & 0xFE) >> 1) | (((x) & 1) ? 0x80 : 0x00)) 105 | 106 | /** Computes the LFN entry checksum of a MSDOS 8.3 format file entry, 107 | * to associate a LFN entry with its short file entry. 108 | * 109 | * \param n0 MSDOS Filename character 1 110 | * \param n1 MSDOS Filename character 2 111 | * \param n2 MSDOS Filename character 3 112 | * \param n3 MSDOS Filename character 4 113 | * \param n4 MSDOS Filename character 5 114 | * \param n5 MSDOS Filename character 6 115 | * \param n6 MSDOS Filename character 7 116 | * \param n7 MSDOS Filename character 8 117 | * \param e0 MSDOS Extension character 1 118 | * \param e1 MSDOS Extension character 2 119 | * \param e2 MSDOS Extension character 3 120 | * 121 | * \return LFN checksum of the given MSDOS 8.3 filename. 122 | */ 123 | #define FAT_CHECKSUM(n0, n1, n2, n3, n4, n5, n6, n7, e0, e1, e2) \ 124 | (uint8_t)(_ROT8(_ROT8(_ROT8(_ROT8(_ROT8(_ROT8(_ROT8(_ROT8(_ROT8(_ROT8(n0)+n1)+n2)+n3)+n4)+n5)+n6)+n7)+e0)+e1)+e2) 125 | 126 | /** \name FAT Filesystem Flags */ 127 | //@{ 128 | /** FAT attribute flag to indicate a read-only file. */ 129 | #define FAT_FLAG_READONLY (1 << 0) 130 | 131 | /** FAT attribute flag to indicate a hidden file. */ 132 | #define FAT_FLAG_HIDDEN (1 << 1) 133 | 134 | /** FAT attribute flag to indicate a system file. */ 135 | #define FAT_FLAG_SYSTEM (1 << 2) 136 | 137 | /** FAT attribute flag to indicate a Volume name entry. */ 138 | #define FAT_FLAG_VOLUME_NAME (1 << 3) 139 | 140 | /** FAT attribute flag to indicate a directory entry. */ 141 | #define FAT_FLAG_DIRECTORY (1 << 4) 142 | 143 | /** FAT attribute flag to indicate a file ready for archiving. */ 144 | #define FAT_FLAG_ARCHIVE (1 << 5) 145 | 146 | /** FAT pseudo-attribute flag to indicate a Long File Name entry. */ 147 | #define FAT_FLAG_LONG_FILE_NAME 0x0F 148 | 149 | /** Ordinal flag marker for FAT Long File Name entries to mark the last entry. */ 150 | #define FAT_ORDINAL_LAST_ENTRY (1 << 6) 151 | //@} 152 | 153 | /* Enums: */ 154 | /** Enum for the Root FAT file entry indexes on the disk. This can be used 155 | * to retrieve the current contents of a known directory entry. 156 | */ 157 | enum 158 | { 159 | /** Volume ID directory entry, giving the name of the virtual disk. */ 160 | DISK_FILE_ENTRY_VolumeID = 0, 161 | /** Long File Name FAT file entry of the virtual FLASH.BIN image file. */ 162 | DISK_FILE_ENTRY_FLASH_LFN = 1, 163 | /** Legacy MSDOS FAT file entry of the virtual FLASH.BIN image file. */ 164 | DISK_FILE_ENTRY_FLASH_MSDOS = 2, 165 | }; 166 | 167 | /** Enum for the physical disk blocks of the virtual disk. */ 168 | enum 169 | { 170 | /** Boot sector disk block. */ 171 | DISK_BLOCK_BootBlock = 0, 172 | /** First copy of the FAT table block. */ 173 | DISK_BLOCK_FATBlock1 = 1, 174 | /** Second copy of the FAT table block. */ 175 | DISK_BLOCK_FATBlock2 = 2, 176 | /** Root file and directory entries block. */ 177 | DISK_BLOCK_RootFilesBlock = 3, 178 | /** Start block of the disk data section. */ 179 | DISK_BLOCK_DataStartBlock = 4, 180 | }; 181 | 182 | /* Type Definitions: */ 183 | /** FAT boot block structure definition, used to identify the core 184 | * parameters of a FAT file system stored on a disk. 185 | * 186 | * \note This definition is truncated to save space; the magic signature 187 | * \c 0xAA55 must be appended to the very end of the block for it 188 | * to be detected by the host as a valid boot block. 189 | */ 190 | typedef struct __attribute__((__packed__)) 191 | { 192 | uint8_t Bootstrap[3]; 193 | uint8_t Description[8]; 194 | uint16_t SectorSize; 195 | uint8_t SectorsPerCluster; 196 | uint16_t ReservedSectors; 197 | uint8_t FATCopies; 198 | uint16_t RootDirectoryEntries; 199 | uint16_t TotalSectors16; 200 | uint8_t MediaDescriptor; 201 | uint16_t SectorsPerFAT; 202 | uint16_t SectorsPerTrack; 203 | uint16_t Heads; 204 | uint32_t HiddenSectors; 205 | uint32_t TotalSectors32; 206 | uint16_t PhysicalDriveNum; 207 | uint8_t ExtendedBootRecordSig; 208 | uint32_t VolumeSerialNumber; 209 | uint8_t VolumeLabel[11]; 210 | uint8_t FilesystemIdentifier[8]; 211 | /* uint8_t BootstrapProgram[448]; */ 212 | /* uint16_t MagicSignature; */ 213 | } FATBootBlock_t; 214 | 215 | /** FAT directory entry structure, for the various kinds of File and 216 | * directory descriptors on a FAT disk. 217 | */ 218 | typedef union __attribute__((__packed__)) 219 | { 220 | /** VFAT Long File Name file entry. */ 221 | struct __attribute__((__packed__)) 222 | { 223 | uint8_t Ordinal; 224 | uint16_t Unicode1; 225 | uint16_t Unicode2; 226 | uint16_t Unicode3; 227 | uint16_t Unicode4; 228 | uint16_t Unicode5; 229 | uint8_t Attribute; 230 | uint8_t Reserved1; 231 | uint8_t Checksum; 232 | uint16_t Unicode6; 233 | uint16_t Unicode7; 234 | uint16_t Unicode8; 235 | uint16_t Unicode9; 236 | uint16_t Unicode10; 237 | uint16_t Unicode11; 238 | uint16_t Reserved2; 239 | uint16_t Unicode12; 240 | uint16_t Unicode13; 241 | } VFAT_LongFileName; 242 | 243 | /** Legacy FAT MSDOS 8.3 file entry. */ 244 | struct __attribute__((__packed__)) 245 | { 246 | uint8_t Filename[8]; 247 | uint8_t Extension[3]; 248 | uint8_t Attributes; 249 | uint8_t Reserved[10]; 250 | uint16_t CreationTime; 251 | uint16_t CreationDate; 252 | uint16_t StartingCluster; 253 | uint32_t FileSizeBytes; 254 | } MSDOS_File; 255 | 256 | /** Legacy FAT MSDOS (sub-)directory entry. */ 257 | struct __attribute__((__packed__)) 258 | { 259 | uint8_t Name[11]; 260 | uint8_t Attributes; 261 | uint8_t Reserved[10]; 262 | uint16_t CreationTime; 263 | uint16_t CreationDate; 264 | uint16_t StartingCluster; 265 | uint32_t Reserved2; 266 | } MSDOS_Directory; 267 | } FATDirectoryEntry_t; 268 | 269 | /* Function Prototypes: */ 270 | #if defined(INCLUDE_FROM_VIRTUAL_FAT_C) 271 | static void UpdateFAT12ClusterEntry(const uint16_t Index, 272 | const uint16_t ChainEntry); 273 | 274 | static void UpdateFAT12ClusterChain(const uint16_t StartIndex, 275 | const uint8_t ChainLength); 276 | 277 | static void ReadWriteFLASHFileBlock(const uint16_t BlockNumber, 278 | const bool Read); 279 | #endif 280 | 281 | void VirtualFAT_WriteBlock(const uint16_t BlockNumber); 282 | void VirtualFAT_ReadBlock(const uint16_t BlockNumber); 283 | 284 | #endif 285 | -------------------------------------------------------------------------------- /virtual_flash_mem/module_config/conf_virtual_flash_mem.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * 3 | * \file 4 | * 5 | * \brief Virtual memory configuration file. 6 | * 7 | * This file contains the possible external configuration of the AT45DBX. 8 | * 9 | * Copyright (c) 2009 Atmel Corporation. All rights reserved. 10 | * 11 | * \asf_license_start 12 | * 13 | * \page License 14 | * 15 | * Redistribution and use in source and binary forms, with or without 16 | * modification, are permitted provided that the following conditions are met: 17 | * 18 | * 1. Redistributions of source code must retain the above copyright notice, 19 | * this list of conditions and the following disclaimer. 20 | * 21 | * 2. Redistributions in binary form must reproduce the above copyright notice, 22 | * this list of conditions and the following disclaimer in the documentation 23 | * and/or other materials provided with the distribution. 24 | * 25 | * 3. The name of Atmel may not be used to endorse or promote products derived 26 | * from this software without specific prior written permission. 27 | * 28 | * 4. This software may only be redistributed and used in connection with an 29 | * Atmel microcontroller product. 30 | * 31 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 32 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 33 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 34 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 35 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 40 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | * POSSIBILITY OF SUCH DAMAGE. 42 | * 43 | * \asf_license_stop 44 | * 45 | ******************************************************************************/ 46 | 47 | 48 | #ifndef _CONF_VIRTUAL_MEM_H_ 49 | #define _CONF_VIRTUAL_MEM_H_ 50 | 51 | #include 52 | 53 | #ifndef VMEM_NB_SECTOR 54 | //#warning Enter the size of Virtual Memory on internal RAM (unit 512B), using default value 4KB 55 | //! Size of Virtual Memory on internal RAM (unit 512B) 56 | #define VMEM_NB_SECTOR ((FLASH_SIZE - APP_START_ADDRESS) / 512) + 4 57 | #endif 58 | 59 | //! Choose which interface to set up, USB or RAM 60 | #define ACCESS_USB true 61 | 62 | #endif // _CONF_VIRTUAL_MEM_H_ 63 | -------------------------------------------------------------------------------- /virtual_flash_mem/virtual_flash_mem.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Management of the virtual memory. 5 | * 6 | * Copyright (c) 2009 - 2013 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | /** 45 | * \defgroup group_common_components_memory_virtual_mem Virtual Memory in RAM 46 | * 47 | * The component manages a disk on a volatile memory (internal RAM). 48 | * This can be connected to a File System management or a USB Device 49 | * Mass Storage Interface via the service Memory Control Access. 50 | * 51 | * \{ 52 | */ 53 | 54 | //_____ I N C L U D E S ___________________________________________________ 55 | 56 | #include "conf_access.h" 57 | #include "conf_virtual_flash_mem.h" 58 | 59 | 60 | #if VIRTUAL_FLASH_MEM == ENABLE 61 | 62 | #include "virtual_flash_mem.h" 63 | 64 | 65 | #ifndef VMEM_NB_SECTOR 66 | # error Define VMEM_NB_SECTOR in conf_virtual_flash_mem.h file 67 | #endif 68 | 69 | //_____ M A C R O S ________________________________________________________ 70 | 71 | //_____ P R I V A T E D E C L A R A T I O N S ____________________________ 72 | 73 | 74 | //_____ D E F I N I T I O N S ______________________________________________ 75 | 76 | /* File Data Buffer */ 77 | COMPILER_WORD_ALIGNED 78 | uint8_t BlockBuffer[VMEM_SECTOR_SIZE]; 79 | 80 | bool b_vmem_unloaded = false; 81 | 82 | //_____ D E C L A R A T I O N S ____________________________________________ 83 | 84 | //! This function tests memory state, and starts memory initialization 85 | //! @return Ctrl_status 86 | //! It is ready -> CTRL_GOOD 87 | //! Memory unplug -> CTRL_NO_PRESENT 88 | //! Not initialized or changed -> CTRL_BUSY 89 | //! An error occurred -> CTRL_FAIL 90 | Ctrl_status virtual_test_unit_ready(void) 91 | { 92 | return b_vmem_unloaded ? CTRL_NO_PRESENT : CTRL_GOOD; 93 | } 94 | 95 | 96 | //! This function returns the address of the last valid sector 97 | //! @param uint32_t_nb_sector Pointer to number of sectors (sector=512 bytes) 98 | //! @return Ctrl_status 99 | //! It is ready -> CTRL_GOOD 100 | //! Memory unplug -> CTRL_NO_PRESENT 101 | //! Not initialized or changed -> CTRL_BUSY 102 | //! An error occurred -> CTRL_FAIL 103 | Ctrl_status virtual_read_capacity(uint32_t *uint32_t_nb_sector) 104 | { 105 | if (b_vmem_unloaded) { 106 | return CTRL_NO_PRESENT; 107 | } 108 | 109 | if (VMEM_NB_SECTOR<8) { 110 | *uint32_t_nb_sector = 8-1; 111 | } else { 112 | *uint32_t_nb_sector = VMEM_NB_SECTOR- 1; 113 | } 114 | return CTRL_GOOD; 115 | } 116 | 117 | 118 | //! This function returns the write-protected mode 119 | //! 120 | //! @return true if the memory is protected 121 | //! 122 | bool virtual_wr_protect(void) 123 | { 124 | return false; 125 | } 126 | 127 | 128 | //! This function informs about the memory type 129 | //! 130 | //! @return true if the memory is removable 131 | //! 132 | bool virtual_removal(void) 133 | { 134 | return true; 135 | } 136 | 137 | 138 | //! This function unloads/loads the memory 139 | //! 140 | //! @return true if the memory is unloaded 141 | //! 142 | bool virtual_unload(bool unload) 143 | { 144 | b_vmem_unloaded = unload; 145 | return true; 146 | } 147 | 148 | //------------ SPECIFIC FUNCTIONS FOR TRANSFER BY USB ------------------------- 149 | 150 | #if ACCESS_USB == true 151 | 152 | #include "udi_msc.h" 153 | 154 | //! This function transfers the data between memory and USB MSC interface 155 | //! 156 | //! @param addr Sector address to start read 157 | //! @param nb_sector Number of sectors to transfer (sector=512 bytes) 158 | //! @param b_read Memory to USB, if true 159 | //! 160 | //! @return Ctrl_status 161 | //! It is ready -> CTRL_GOOD 162 | //! Memory unplug -> CTRL_NO_PRESENT 163 | //! Not initialized or changed -> CTRL_BUSY 164 | //! An error occurred -> CTRL_FAIL 165 | //! 166 | static Ctrl_status virtual_usb_trans(uint32_t addr, uint16_t nb_sector, bool b_read) 167 | { 168 | if ((addr > VMEM_NB_SECTOR) || (addr + nb_sector > VMEM_NB_SECTOR)) { 169 | return CTRL_FAIL; 170 | } 171 | 172 | for (uint16_t i = 0; i < nb_sector; i++) 173 | { 174 | if (b_read) { 175 | VirtualFAT_ReadBlock(addr + i); 176 | if (!udi_msc_trans_block(b_read, BlockBuffer, VMEM_SECTOR_SIZE, NULL)) { 177 | return CTRL_FAIL; // transfer aborted 178 | } 179 | } else { 180 | if (!udi_msc_trans_block(b_read, BlockBuffer, VMEM_SECTOR_SIZE, NULL)) { 181 | return CTRL_FAIL; // transfer aborted 182 | } 183 | VirtualFAT_WriteBlock(addr + i); 184 | } 185 | } 186 | 187 | return CTRL_GOOD; 188 | } 189 | 190 | //! This function transfers the memory data to the USB MSC interface 191 | //! 192 | //! @param addr Sector address to start read 193 | //! @param nb_sector Number of sectors to transfer (sector=512 bytes) 194 | //! 195 | //! @return Ctrl_status 196 | //! It is ready -> CTRL_GOOD 197 | //! Memory unplug -> CTRL_NO_PRESENT 198 | //! Not initialized or changed -> CTRL_BUSY 199 | //! An error occurred -> CTRL_FAIL 200 | //! 201 | Ctrl_status virtual_usb_read_10(uint32_t addr, uint16_t nb_sector) 202 | { 203 | return virtual_usb_trans(addr, nb_sector, true); 204 | } 205 | 206 | 207 | //! This function transfers the USB MSC data to the memory 208 | //! 209 | //! @param addr Sector address to start write 210 | //! @param nb_sector Number of sectors to transfer (sector=512 bytes) 211 | //! 212 | //! @return Ctrl_status 213 | //! It is ready -> CTRL_GOOD 214 | //! Memory unplug -> CTRL_NO_PRESENT 215 | //! Not initialized or changed -> CTRL_BUSY 216 | //! An error occurred -> CTRL_FAIL 217 | //! 218 | Ctrl_status virtual_usb_write_10(uint32_t addr, uint16_t nb_sector) 219 | { 220 | return virtual_usb_trans(addr, nb_sector, false); 221 | } 222 | 223 | #endif // ACCESS_USB == true 224 | 225 | #endif // VIRTUAL_MEM == ENABLE 226 | 227 | /** 228 | * \} 229 | */ 230 | -------------------------------------------------------------------------------- /virtual_flash_mem/virtual_flash_mem.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Management of the virtual memory. 5 | * 6 | * This file manages the virtual memory. 7 | * 8 | * Copyright (c) 2009 - 2013 Atmel Corporation. All rights reserved. 9 | * 10 | * \asf_license_start 11 | * 12 | * \page License 13 | * 14 | * Redistribution and use in source and binary forms, with or without 15 | * modification, are permitted provided that the following conditions are met: 16 | * 17 | * 1. Redistributions of source code must retain the above copyright notice, 18 | * this list of conditions and the following disclaimer. 19 | * 20 | * 2. Redistributions in binary form must reproduce the above copyright notice, 21 | * this list of conditions and the following disclaimer in the documentation 22 | * and/or other materials provided with the distribution. 23 | * 24 | * 3. The name of Atmel may not be used to endorse or promote products derived 25 | * from this software without specific prior written permission. 26 | * 27 | * 4. This software may only be redistributed and used in connection with an 28 | * Atmel microcontroller product. 29 | * 30 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 31 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 32 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 33 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 34 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 35 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 36 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 37 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 38 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 39 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 40 | * POSSIBILITY OF SUCH DAMAGE. 41 | * 42 | * \asf_license_stop 43 | * 44 | */ 45 | 46 | #ifndef _VIRTUAL_FLASH_MEM_H_ 47 | #define _VIRTUAL_FLASH_MEM_H_ 48 | 49 | 50 | #include "conf_access.h" 51 | 52 | #if VIRTUAL_FLASH_MEM == ENABLE 53 | 54 | #include "ctrl_access.h" 55 | 56 | #include "VirtualFAT.h" 57 | 58 | 59 | #ifdef __cplusplus 60 | extern "C" { 61 | #endif 62 | 63 | //_____ D E F I N I T I O N S ______________________________________________ 64 | 65 | #define VMEM_SECTOR_SIZE 512 66 | 67 | 68 | //---- CONTROL FUNCTIONS ---- 69 | 70 | extern Ctrl_status virtual_test_unit_ready(void); 71 | extern Ctrl_status virtual_read_capacity(uint32_t *u32_nb_sector); 72 | extern bool virtual_wr_protect(void); 73 | extern bool virtual_removal(void); 74 | extern bool virtual_unload(bool unload); 75 | 76 | 77 | //---- ACCESS DATA FUNCTIONS ---- 78 | 79 | // USB interface 80 | #if ACCESS_USB == true 81 | extern Ctrl_status virtual_usb_read_10 (uint32_t addr, uint16_t nb_sector); 82 | extern Ctrl_status virtual_usb_write_10(uint32_t addr, uint16_t nb_sector); 83 | #endif 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | 89 | #endif 90 | 91 | #endif // _VIRTUAL_FLASH_MEM_H_ 92 | --------------------------------------------------------------------------------