ARM GAS  /tmp/ccnfjbri.s 			page 1


   1              		.cpu cortex-m7
   2              		.arch armv7e-m
   3              		.fpu fpv5-d16
   4              		.eabi_attribute 28, 1
   5              		.eabi_attribute 20, 1
   6              		.eabi_attribute 21, 1
   7              		.eabi_attribute 23, 3
   8              		.eabi_attribute 24, 1
   9              		.eabi_attribute 25, 1
  10              		.eabi_attribute 26, 1
  11              		.eabi_attribute 30, 1
  12              		.eabi_attribute 34, 1
  13              		.eabi_attribute 18, 4
  14              		.file	"File_Handling.c"
  15              		.text
  16              	.Ltext0:
  17              		.cfi_sections	.debug_frame
  18              		.file 1 "Src/File_Handling.c"
  19              		.section	.text.Send_Uart,"ax",%progbits
  20              		.align	1
  21              		.global	Send_Uart
  22              		.syntax unified
  23              		.thumb
  24              		.thumb_func
  26              	Send_Uart:
  27              	.LVL0:
  28              	.LFB1186:
   1:Src/File_Handling.c **** /*
   2:Src/File_Handling.c ****  * File_Handling_RTOS.c
   3:Src/File_Handling.c ****  *
   4:Src/File_Handling.c ****  *  Created on: 14-May-2020
   5:Src/File_Handling.c ****  *      Author: Controllerstech
   6:Src/File_Handling.c ****  */
   7:Src/File_Handling.c **** 
   8:Src/File_Handling.c **** #include <File_Handling.h>
   9:Src/File_Handling.c **** #include "stm32f7xx_hal.h"
  10:Src/File_Handling.c **** 
  11:Src/File_Handling.c **** #define UART USART1
  12:Src/File_Handling.c **** 
  13:Src/File_Handling.c **** 
  14:Src/File_Handling.c **** 
  15:Src/File_Handling.c **** /* =============================>>>>>>>> NO CHANGES AFTER THIS LINE ===============================
  16:Src/File_Handling.c **** 
  17:Src/File_Handling.c **** FATFS fs;  // file system
  18:Src/File_Handling.c **** FIL fil; // File
  19:Src/File_Handling.c **** FILINFO fno;
  20:Src/File_Handling.c **** extern FRESULT fresult;  // result
  21:Src/File_Handling.c **** extern unsigned long sizeoffile;
  22:Src/File_Handling.c **** UINT br, bw;  // File read/write count
  23:Src/File_Handling.c **** 
  24:Src/File_Handling.c **** /**** capacity related *****/
  25:Src/File_Handling.c **** FATFS *pfs;
  26:Src/File_Handling.c **** DWORD fre_clust;
  27:Src/File_Handling.c **** uint32_t total, free_space;
  28:Src/File_Handling.c **** 
  29:Src/File_Handling.c **** 
  30:Src/File_Handling.c **** void Send_Uart (char *string)
ARM GAS  /tmp/ccnfjbri.s 			page 2


  31:Src/File_Handling.c **** {
  29              		.loc 1 31 1 view -0
  30              		.cfi_startproc
  31              		@ args = 0, pretend = 0, frame = 0
  32              		@ frame_needed = 0, uses_anonymous_args = 0
  33              		@ link register save eliminated.
  32:Src/File_Handling.c **** 	//HAL_UART_Transmit(UART, (uint8_t *)string, strlen (string), HAL_MAX_DELAY);
  33:Src/File_Handling.c **** }
  34              		.loc 1 33 1 view .LVU1
  35 0000 7047     		bx	lr
  36              		.cfi_endproc
  37              	.LFE1186:
  39              		.section	.text.Mount_SD,"ax",%progbits
  40              		.align	1
  41              		.global	Mount_SD
  42              		.syntax unified
  43              		.thumb
  44              		.thumb_func
  46              	Mount_SD:
  47              	.LVL1:
  48              	.LFB1187:
  34:Src/File_Handling.c **** 
  35:Src/File_Handling.c **** 
  36:Src/File_Handling.c **** 
  37:Src/File_Handling.c **** int Mount_SD (const TCHAR* path)
  38:Src/File_Handling.c **** {
  49              		.loc 1 38 1 view -0
  50              		.cfi_startproc
  51              		@ args = 0, pretend = 0, frame = 0
  52              		@ frame_needed = 0, uses_anonymous_args = 0
  53              		.loc 1 38 1 is_stmt 0 view .LVU3
  54 0000 08B5     		push	{r3, lr}
  55              	.LCFI0:
  56              		.cfi_def_cfa_offset 8
  57              		.cfi_offset 3, -8
  58              		.cfi_offset 14, -4
  59 0002 0146     		mov	r1, r0
  39:Src/File_Handling.c **** 	fresult = f_mount(&fs, path, 1);
  60              		.loc 1 39 2 is_stmt 1 view .LVU4
  61              		.loc 1 39 12 is_stmt 0 view .LVU5
  62 0004 0122     		movs	r2, #1
  63 0006 0548     		ldr	r0, .L6
  64              	.LVL2:
  65              		.loc 1 39 12 view .LVU6
  66 0008 FFF7FEFF 		bl	f_mount
  67              	.LVL3:
  68              		.loc 1 39 10 discriminator 1 view .LVU7
  69 000c 044B     		ldr	r3, .L6+4
  70 000e 1870     		strb	r0, [r3]
  40:Src/File_Handling.c **** 	if (fresult != FR_OK) return 1;
  71              		.loc 1 40 2 is_stmt 1 view .LVU8
  72              		.loc 1 40 5 is_stmt 0 view .LVU9
  73 0010 08B1     		cbz	r0, .L4
  74              		.loc 1 40 31 discriminator 1 view .LVU10
  75 0012 0120     		movs	r0, #1
  76              	.L2:
  41:Src/File_Handling.c **** 	else return 0;
ARM GAS  /tmp/ccnfjbri.s 			page 3


  42:Src/File_Handling.c **** }
  77              		.loc 1 42 1 view .LVU11
  78 0014 08BD     		pop	{r3, pc}
  79              	.L4:
  41:Src/File_Handling.c **** 	else return 0;
  80              		.loc 1 41 14 view .LVU12
  81 0016 0020     		movs	r0, #0
  82 0018 FCE7     		b	.L2
  83              	.L7:
  84 001a 00BF     		.align	2
  85              	.L6:
  86 001c 00000000 		.word	fs
  87 0020 00000000 		.word	fresult
  88              		.cfi_endproc
  89              	.LFE1187:
  91              		.section	.text.Unmount_SD,"ax",%progbits
  92              		.align	1
  93              		.global	Unmount_SD
  94              		.syntax unified
  95              		.thumb
  96              		.thumb_func
  98              	Unmount_SD:
  99              	.LVL4:
 100              	.LFB1188:
  43:Src/File_Handling.c **** 
  44:Src/File_Handling.c **** int Unmount_SD (const TCHAR* path)
  45:Src/File_Handling.c **** {
 101              		.loc 1 45 1 is_stmt 1 view -0
 102              		.cfi_startproc
 103              		@ args = 0, pretend = 0, frame = 0
 104              		@ frame_needed = 0, uses_anonymous_args = 0
 105              		.loc 1 45 1 is_stmt 0 view .LVU14
 106 0000 08B5     		push	{r3, lr}
 107              	.LCFI1:
 108              		.cfi_def_cfa_offset 8
 109              		.cfi_offset 3, -8
 110              		.cfi_offset 14, -4
 111 0002 0146     		mov	r1, r0
  46:Src/File_Handling.c **** 	fresult = f_mount(NULL, path, 1);
 112              		.loc 1 46 2 is_stmt 1 view .LVU15
 113              		.loc 1 46 12 is_stmt 0 view .LVU16
 114 0004 0122     		movs	r2, #1
 115 0006 0020     		movs	r0, #0
 116              	.LVL5:
 117              		.loc 1 46 12 view .LVU17
 118 0008 FFF7FEFF 		bl	f_mount
 119              	.LVL6:
 120              		.loc 1 46 10 discriminator 1 view .LVU18
 121 000c 034B     		ldr	r3, .L12
 122 000e 1870     		strb	r0, [r3]
  47:Src/File_Handling.c **** 	if (fresult == FR_OK) return 0;//Send_Uart ("SD CARD UNMOUNTED successfully...\n\n\n");
 123              		.loc 1 47 2 is_stmt 1 view .LVU19
 124              		.loc 1 47 5 is_stmt 0 view .LVU20
 125 0010 08B1     		cbz	r0, .L10
  48:Src/File_Handling.c **** 	return 1;//else Send_Uart("ERROR!!! in UNMOUNTING SD CARD\n\n\n");
 126              		.loc 1 48 9 view .LVU21
 127 0012 0120     		movs	r0, #1
ARM GAS  /tmp/ccnfjbri.s 			page 4


 128              	.L8:
  49:Src/File_Handling.c **** }
 129              		.loc 1 49 1 view .LVU22
 130 0014 08BD     		pop	{r3, pc}
 131              	.L10:
  47:Src/File_Handling.c **** 	if (fresult == FR_OK) return 0;//Send_Uart ("SD CARD UNMOUNTED successfully...\n\n\n");
 132              		.loc 1 47 31 discriminator 1 view .LVU23
 133 0016 0020     		movs	r0, #0
 134 0018 FCE7     		b	.L8
 135              	.L13:
 136 001a 00BF     		.align	2
 137              	.L12:
 138 001c 00000000 		.word	fresult
 139              		.cfi_endproc
 140              	.LFE1188:
 142              		.section	.rodata.Scan_SD.str1.4,"aMS",%progbits,1
 143              		.align	2
 144              	.LC0:
 145 0000 53595354 		.ascii	"SYSTEM~1\000"
 145      454D7E31 
 145      00
 146 0009 000000   		.align	2
 147              	.LC1:
 148 000c 4469723A 		.ascii	"Dir: %s\015\012\000"
 148      2025730D 
 148      0A00
 149 0016 0000     		.align	2
 150              	.LC2:
 151 0018 2F257300 		.ascii	"/%s\000"
 152              		.align	2
 153              	.LC3:
 154 001c 46696C65 		.ascii	"File: %s/%s\012\000"
 154      3A202573 
 154      2F25730A 
 154      00
 155              		.section	.text.Scan_SD,"ax",%progbits
 156              		.align	1
 157              		.global	Scan_SD
 158              		.syntax unified
 159              		.thumb
 160              		.thumb_func
 162              	Scan_SD:
 163              	.LVL7:
 164              	.LFB1189:
  50:Src/File_Handling.c **** 
  51:Src/File_Handling.c **** /* Start node to be scanned (***also used as work area***) */
  52:Src/File_Handling.c **** FRESULT Scan_SD (char* pat)
  53:Src/File_Handling.c **** {
 165              		.loc 1 53 1 is_stmt 1 view -0
 166              		.cfi_startproc
 167              		@ args = 0, pretend = 0, frame = 48
 168              		@ frame_needed = 0, uses_anonymous_args = 0
 169              		.loc 1 53 1 is_stmt 0 view .LVU25
 170 0000 70B5     		push	{r4, r5, r6, lr}
 171              	.LCFI2:
 172              		.cfi_def_cfa_offset 16
 173              		.cfi_offset 4, -16
ARM GAS  /tmp/ccnfjbri.s 			page 5


 174              		.cfi_offset 5, -12
 175              		.cfi_offset 6, -8
 176              		.cfi_offset 14, -4
 177 0002 8CB0     		sub	sp, sp, #48
 178              	.LCFI3:
 179              		.cfi_def_cfa_offset 64
 180 0004 0546     		mov	r5, r0
  54:Src/File_Handling.c ****     DIR dir;
 181              		.loc 1 54 5 is_stmt 1 view .LVU26
  55:Src/File_Handling.c ****     UINT i;
 182              		.loc 1 55 5 view .LVU27
  56:Src/File_Handling.c ****     char *path = malloc(20*sizeof (char));
 183              		.loc 1 56 5 view .LVU28
 184              		.loc 1 56 18 is_stmt 0 view .LVU29
 185 0006 1420     		movs	r0, #20
 186              	.LVL8:
 187              		.loc 1 56 18 view .LVU30
 188 0008 FFF7FEFF 		bl	malloc
 189              	.LVL9:
 190 000c 0446     		mov	r4, r0
 191              	.LVL10:
  57:Src/File_Handling.c ****     sprintf (path, "%s",pat);
 192              		.loc 1 57 5 is_stmt 1 view .LVU31
 193 000e 2946     		mov	r1, r5
 194 0010 FFF7FEFF 		bl	strcpy
 195              	.LVL11:
  58:Src/File_Handling.c **** 
  59:Src/File_Handling.c ****     fresult = f_opendir(&dir, path);                       /* Open the directory */
 196              		.loc 1 59 5 view .LVU32
 197              		.loc 1 59 15 is_stmt 0 view .LVU33
 198 0014 2146     		mov	r1, r4
 199 0016 6846     		mov	r0, sp
 200 0018 FFF7FEFF 		bl	f_opendir
 201              	.LVL12:
 202              		.loc 1 59 13 discriminator 1 view .LVU34
 203 001c 264B     		ldr	r3, .L21
 204 001e 1870     		strb	r0, [r3]
  60:Src/File_Handling.c ****     if (fresult == FR_OK)
 205              		.loc 1 60 5 is_stmt 1 view .LVU35
 206              		.loc 1 60 8 is_stmt 0 view .LVU36
 207 0020 0028     		cmp	r0, #0
 208 0022 42D1     		bne	.L16
 209 0024 0BE0     		b	.L15
 210              	.LVL13:
 211              	.L18:
 212              	.LBB2:
  61:Src/File_Handling.c ****     {
  62:Src/File_Handling.c ****         for (;;)
  63:Src/File_Handling.c ****         {
  64:Src/File_Handling.c ****             fresult = f_readdir(&dir, &fno);                   /* Read a directory item */
  65:Src/File_Handling.c ****             if (fresult != FR_OK || fno.fname[0] == 0) break;  /* Break on error or end of dir */
  66:Src/File_Handling.c ****             if (fno.fattrib & AM_DIR)     /* It is a directory */
  67:Src/File_Handling.c ****             {
  68:Src/File_Handling.c ****             	if (!(strcmp ("SYSTEM~1", fno.fname))) continue;
  69:Src/File_Handling.c ****             	char *buf = malloc(30*sizeof(char));
  70:Src/File_Handling.c ****             	sprintf (buf, "Dir: %s\r\n", fno.fname);
  71:Src/File_Handling.c ****             	Send_Uart(buf);
ARM GAS  /tmp/ccnfjbri.s 			page 6


  72:Src/File_Handling.c ****             	free(buf);
  73:Src/File_Handling.c ****                 i = strlen(path);
  74:Src/File_Handling.c ****                 sprintf(&path[i], "/%s", fno.fname);
  75:Src/File_Handling.c ****                 fresult = Scan_SD(path);                     /* Enter the directory */
  76:Src/File_Handling.c ****                 if (fresult != FR_OK) break;
  77:Src/File_Handling.c ****                 path[i] = 0;
  78:Src/File_Handling.c ****             }
  79:Src/File_Handling.c ****             else
  80:Src/File_Handling.c ****             {   /* It is a file. */
  81:Src/File_Handling.c ****            	   char *buf = malloc(30*sizeof(char));
 213              		.loc 1 81 16 is_stmt 1 view .LVU37
 214              		.loc 1 81 28 is_stmt 0 view .LVU38
 215 0026 1E20     		movs	r0, #30
 216 0028 FFF7FEFF 		bl	malloc
 217              	.LVL14:
 218 002c 0546     		mov	r5, r0
 219              	.LVL15:
  82:Src/File_Handling.c ****                sprintf(buf,"File: %s/%s\n", path, fno.fname);
 220              		.loc 1 82 16 is_stmt 1 view .LVU39
 221 002e 234B     		ldr	r3, .L21+4
 222 0030 2246     		mov	r2, r4
 223 0032 2349     		ldr	r1, .L21+8
 224 0034 FFF7FEFF 		bl	sprintf
 225              	.LVL16:
  83:Src/File_Handling.c ****                Send_Uart(buf);
 226              		.loc 1 83 16 view .LVU40
  84:Src/File_Handling.c ****                free(buf);
 227              		.loc 1 84 16 view .LVU41
 228 0038 2846     		mov	r0, r5
 229 003a FFF7FEFF 		bl	free
 230              	.LVL17:
 231              	.L15:
 232              		.loc 1 84 16 is_stmt 0 view .LVU42
 233              	.LBE2:
  62:Src/File_Handling.c ****         {
 234              		.loc 1 62 9 is_stmt 1 view .LVU43
  64:Src/File_Handling.c ****             if (fresult != FR_OK || fno.fname[0] == 0) break;  /* Break on error or end of dir */
 235              		.loc 1 64 13 view .LVU44
  64:Src/File_Handling.c ****             if (fresult != FR_OK || fno.fname[0] == 0) break;  /* Break on error or end of dir */
 236              		.loc 1 64 23 is_stmt 0 view .LVU45
 237 003e 2149     		ldr	r1, .L21+12
 238 0040 6846     		mov	r0, sp
 239 0042 FFF7FEFF 		bl	f_readdir
 240              	.LVL18:
  64:Src/File_Handling.c ****             if (fresult != FR_OK || fno.fname[0] == 0) break;  /* Break on error or end of dir */
 241              		.loc 1 64 21 discriminator 1 view .LVU46
 242 0046 1C4B     		ldr	r3, .L21
 243 0048 1870     		strb	r0, [r3]
  65:Src/File_Handling.c ****             if (fno.fattrib & AM_DIR)     /* It is a directory */
 244              		.loc 1 65 13 is_stmt 1 view .LVU47
  65:Src/File_Handling.c ****             if (fno.fattrib & AM_DIR)     /* It is a directory */
 245              		.loc 1 65 16 is_stmt 0 view .LVU48
 246 004a 58BB     		cbnz	r0, .L17
  65:Src/File_Handling.c ****             if (fno.fattrib & AM_DIR)     /* It is a directory */
 247              		.loc 1 65 46 discriminator 1 view .LVU49
 248 004c 1D4B     		ldr	r3, .L21+12
 249 004e 5B7A     		ldrb	r3, [r3, #9]	@ zero_extendqisi2
ARM GAS  /tmp/ccnfjbri.s 			page 7


  65:Src/File_Handling.c ****             if (fno.fattrib & AM_DIR)     /* It is a directory */
 250              		.loc 1 65 34 discriminator 1 view .LVU50
 251 0050 43B3     		cbz	r3, .L17
  66:Src/File_Handling.c ****             {
 252              		.loc 1 66 13 is_stmt 1 view .LVU51
  66:Src/File_Handling.c ****             {
 253              		.loc 1 66 20 is_stmt 0 view .LVU52
 254 0052 1C4B     		ldr	r3, .L21+12
 255 0054 1B7A     		ldrb	r3, [r3, #8]	@ zero_extendqisi2
  66:Src/File_Handling.c ****             {
 256              		.loc 1 66 16 view .LVU53
 257 0056 13F0100F 		tst	r3, #16
 258 005a E4D0     		beq	.L18
 259              	.LBB3:
  68:Src/File_Handling.c ****             	char *buf = malloc(30*sizeof(char));
 260              		.loc 1 68 14 is_stmt 1 view .LVU54
  68:Src/File_Handling.c ****             	char *buf = malloc(30*sizeof(char));
 261              		.loc 1 68 20 is_stmt 0 view .LVU55
 262 005c 1749     		ldr	r1, .L21+4
 263 005e 1A48     		ldr	r0, .L21+16
 264 0060 FFF7FEFF 		bl	strcmp
 265              	.LVL19:
  68:Src/File_Handling.c ****             	char *buf = malloc(30*sizeof(char));
 266              		.loc 1 68 17 discriminator 1 view .LVU56
 267 0064 0028     		cmp	r0, #0
 268 0066 EAD0     		beq	.L15
  69:Src/File_Handling.c ****             	sprintf (buf, "Dir: %s\r\n", fno.fname);
 269              		.loc 1 69 14 is_stmt 1 view .LVU57
  69:Src/File_Handling.c ****             	sprintf (buf, "Dir: %s\r\n", fno.fname);
 270              		.loc 1 69 26 is_stmt 0 view .LVU58
 271 0068 1E20     		movs	r0, #30
 272 006a FFF7FEFF 		bl	malloc
 273              	.LVL20:
 274 006e 0546     		mov	r5, r0
 275              	.LVL21:
  70:Src/File_Handling.c ****             	Send_Uart(buf);
 276              		.loc 1 70 14 is_stmt 1 view .LVU59
 277 0070 124E     		ldr	r6, .L21+4
 278 0072 3246     		mov	r2, r6
 279 0074 1549     		ldr	r1, .L21+20
 280 0076 FFF7FEFF 		bl	sprintf
 281              	.LVL22:
  71:Src/File_Handling.c ****             	free(buf);
 282              		.loc 1 71 14 view .LVU60
  72:Src/File_Handling.c ****                 i = strlen(path);
 283              		.loc 1 72 14 view .LVU61
 284 007a 2846     		mov	r0, r5
 285 007c FFF7FEFF 		bl	free
 286              	.LVL23:
  73:Src/File_Handling.c ****                 sprintf(&path[i], "/%s", fno.fname);
 287              		.loc 1 73 17 view .LVU62
  73:Src/File_Handling.c ****                 sprintf(&path[i], "/%s", fno.fname);
 288              		.loc 1 73 21 is_stmt 0 view .LVU63
 289 0080 2046     		mov	r0, r4
 290 0082 FFF7FEFF 		bl	strlen
 291              	.LVL24:
 292 0086 0546     		mov	r5, r0
ARM GAS  /tmp/ccnfjbri.s 			page 8


 293              	.LVL25:
  74:Src/File_Handling.c ****                 fresult = Scan_SD(path);                     /* Enter the directory */
 294              		.loc 1 74 17 is_stmt 1 view .LVU64
 295 0088 3246     		mov	r2, r6
 296 008a 1149     		ldr	r1, .L21+24
 297 008c 2018     		adds	r0, r4, r0
 298              	.LVL26:
  74:Src/File_Handling.c ****                 fresult = Scan_SD(path);                     /* Enter the directory */
 299              		.loc 1 74 17 is_stmt 0 view .LVU65
 300 008e FFF7FEFF 		bl	sprintf
 301              	.LVL27:
  75:Src/File_Handling.c ****                 if (fresult != FR_OK) break;
 302              		.loc 1 75 17 is_stmt 1 view .LVU66
  75:Src/File_Handling.c ****                 if (fresult != FR_OK) break;
 303              		.loc 1 75 27 is_stmt 0 view .LVU67
 304 0092 2046     		mov	r0, r4
 305 0094 FFF7FEFF 		bl	Scan_SD
 306              	.LVL28:
  75:Src/File_Handling.c ****                 if (fresult != FR_OK) break;
 307              		.loc 1 75 25 discriminator 1 view .LVU68
 308 0098 074B     		ldr	r3, .L21
 309 009a 1870     		strb	r0, [r3]
  76:Src/File_Handling.c ****                 path[i] = 0;
 310              		.loc 1 76 17 is_stmt 1 view .LVU69
  76:Src/File_Handling.c ****                 path[i] = 0;
 311              		.loc 1 76 20 is_stmt 0 view .LVU70
 312 009c 10B9     		cbnz	r0, .L17
  77:Src/File_Handling.c ****             }
 313              		.loc 1 77 17 is_stmt 1 view .LVU71
  77:Src/File_Handling.c ****             }
 314              		.loc 1 77 25 is_stmt 0 view .LVU72
 315 009e 0023     		movs	r3, #0
 316 00a0 6355     		strb	r3, [r4, r5]
 317              	.LBE3:
 318 00a2 CCE7     		b	.L15
 319              	.LVL29:
 320              	.L17:
  85:Src/File_Handling.c ****             }
  86:Src/File_Handling.c ****         }
  87:Src/File_Handling.c ****         f_closedir(&dir);
 321              		.loc 1 87 9 is_stmt 1 view .LVU73
 322 00a4 6846     		mov	r0, sp
 323 00a6 FFF7FEFF 		bl	f_closedir
 324              	.LVL30:
 325              	.L16:
  88:Src/File_Handling.c ****     }
  89:Src/File_Handling.c ****     free(path);
 326              		.loc 1 89 5 view .LVU74
 327 00aa 2046     		mov	r0, r4
 328 00ac FFF7FEFF 		bl	free
 329              	.LVL31:
  90:Src/File_Handling.c ****     return fresult;
 330              		.loc 1 90 5 view .LVU75
  91:Src/File_Handling.c **** }
 331              		.loc 1 91 1 is_stmt 0 view .LVU76
 332 00b0 014B     		ldr	r3, .L21
 333 00b2 1878     		ldrb	r0, [r3]	@ zero_extendqisi2
ARM GAS  /tmp/ccnfjbri.s 			page 9


 334 00b4 0CB0     		add	sp, sp, #48
 335              	.LCFI4:
 336              		.cfi_def_cfa_offset 16
 337              		@ sp needed
 338 00b6 70BD     		pop	{r4, r5, r6, pc}
 339              	.LVL32:
 340              	.L22:
 341              		.loc 1 91 1 view .LVU77
 342              		.align	2
 343              	.L21:
 344 00b8 00000000 		.word	fresult
 345 00bc 09000000 		.word	fno+9
 346 00c0 1C000000 		.word	.LC3
 347 00c4 00000000 		.word	fno
 348 00c8 00000000 		.word	.LC0
 349 00cc 0C000000 		.word	.LC1
 350 00d0 18000000 		.word	.LC2
 351              		.cfi_endproc
 352              	.LFE1189:
 354              		.section	.rodata.Format_SD.str1.4,"aMS",%progbits,1
 355              		.align	2
 356              	.LC4:
 357 0000 2F00     		.ascii	"/\000"
 358              		.section	.text.Format_SD,"ax",%progbits
 359              		.align	1
 360              		.global	Format_SD
 361              		.syntax unified
 362              		.thumb
 363              		.thumb_func
 365              	Format_SD:
 366              	.LFB1190:
  92:Src/File_Handling.c **** 
  93:Src/File_Handling.c **** /* Only supports removing files from home directory */
  94:Src/File_Handling.c **** FRESULT Format_SD (void)
  95:Src/File_Handling.c **** {
 367              		.loc 1 95 1 is_stmt 1 view -0
 368              		.cfi_startproc
 369              		@ args = 0, pretend = 0, frame = 48
 370              		@ frame_needed = 0, uses_anonymous_args = 0
 371 0000 10B5     		push	{r4, lr}
 372              	.LCFI5:
 373              		.cfi_def_cfa_offset 8
 374              		.cfi_offset 4, -8
 375              		.cfi_offset 14, -4
 376 0002 8CB0     		sub	sp, sp, #48
 377              	.LCFI6:
 378              		.cfi_def_cfa_offset 56
  96:Src/File_Handling.c ****     DIR dir;
 379              		.loc 1 96 5 view .LVU79
  97:Src/File_Handling.c ****     char *path = malloc(20*sizeof (char));
 380              		.loc 1 97 5 view .LVU80
 381              		.loc 1 97 18 is_stmt 0 view .LVU81
 382 0004 1420     		movs	r0, #20
 383 0006 FFF7FEFF 		bl	malloc
 384              	.LVL33:
 385 000a 0446     		mov	r4, r0
 386              	.LVL34:
ARM GAS  /tmp/ccnfjbri.s 			page 10


  98:Src/File_Handling.c ****     sprintf (path, "%s","/");
 387              		.loc 1 98 5 is_stmt 1 view .LVU82
 388 000c 1A4B     		ldr	r3, .L30
 389 000e 1B88     		ldrh	r3, [r3]	@ unaligned
 390 0010 0380     		strh	r3, [r0]	@ unaligned
  99:Src/File_Handling.c **** 
 100:Src/File_Handling.c ****     fresult = f_opendir(&dir, path);                       /* Open the directory */
 391              		.loc 1 100 5 view .LVU83
 392              		.loc 1 100 15 is_stmt 0 view .LVU84
 393 0012 0146     		mov	r1, r0
 394 0014 6846     		mov	r0, sp
 395              	.LVL35:
 396              		.loc 1 100 15 view .LVU85
 397 0016 FFF7FEFF 		bl	f_opendir
 398              	.LVL36:
 399              		.loc 1 100 13 discriminator 1 view .LVU86
 400 001a 184B     		ldr	r3, .L30+4
 401 001c 1870     		strb	r0, [r3]
 101:Src/File_Handling.c ****     if (fresult == FR_OK)
 402              		.loc 1 101 5 is_stmt 1 view .LVU87
 403              		.loc 1 101 8 is_stmt 0 view .LVU88
 404 001e 18BB     		cbnz	r0, .L25
 405 0020 04E0     		b	.L24
 406              	.L27:
 102:Src/File_Handling.c ****     {
 103:Src/File_Handling.c ****         for (;;)
 104:Src/File_Handling.c ****         {
 105:Src/File_Handling.c ****             fresult = f_readdir(&dir, &fno);                   /* Read a directory item */
 106:Src/File_Handling.c ****             if (fresult != FR_OK || fno.fname[0] == 0) break;  /* Break on error or end of dir */
 107:Src/File_Handling.c ****             if (fno.fattrib & AM_DIR)     /* It is a directory */
 108:Src/File_Handling.c ****             {
 109:Src/File_Handling.c ****             	if (!(strcmp ("SYSTEM~1", fno.fname))) continue;
 110:Src/File_Handling.c ****             	fresult = f_unlink(fno.fname);
 111:Src/File_Handling.c ****             	if (fresult == FR_DENIED) continue;
 112:Src/File_Handling.c ****             }
 113:Src/File_Handling.c ****             else
 114:Src/File_Handling.c ****             {   /* It is a file. */
 115:Src/File_Handling.c ****                fresult = f_unlink(fno.fname);
 407              		.loc 1 115 16 is_stmt 1 view .LVU89
 408              		.loc 1 115 26 is_stmt 0 view .LVU90
 409 0022 1748     		ldr	r0, .L30+8
 410 0024 FFF7FEFF 		bl	f_unlink
 411              	.LVL37:
 412              		.loc 1 115 24 discriminator 1 view .LVU91
 413 0028 144B     		ldr	r3, .L30+4
 414 002a 1870     		strb	r0, [r3]
 415              	.L24:
 103:Src/File_Handling.c ****         {
 416              		.loc 1 103 9 is_stmt 1 view .LVU92
 105:Src/File_Handling.c ****             if (fresult != FR_OK || fno.fname[0] == 0) break;  /* Break on error or end of dir */
 417              		.loc 1 105 13 view .LVU93
 105:Src/File_Handling.c ****             if (fresult != FR_OK || fno.fname[0] == 0) break;  /* Break on error or end of dir */
 418              		.loc 1 105 23 is_stmt 0 view .LVU94
 419 002c 1549     		ldr	r1, .L30+12
 420 002e 6846     		mov	r0, sp
 421 0030 FFF7FEFF 		bl	f_readdir
 422              	.LVL38:
ARM GAS  /tmp/ccnfjbri.s 			page 11


 105:Src/File_Handling.c ****             if (fresult != FR_OK || fno.fname[0] == 0) break;  /* Break on error or end of dir */
 423              		.loc 1 105 21 discriminator 1 view .LVU95
 424 0034 114B     		ldr	r3, .L30+4
 425 0036 1870     		strb	r0, [r3]
 106:Src/File_Handling.c ****             if (fno.fattrib & AM_DIR)     /* It is a directory */
 426              		.loc 1 106 13 is_stmt 1 view .LVU96
 106:Src/File_Handling.c ****             if (fno.fattrib & AM_DIR)     /* It is a directory */
 427              		.loc 1 106 16 is_stmt 0 view .LVU97
 428 0038 98B9     		cbnz	r0, .L26
 106:Src/File_Handling.c ****             if (fno.fattrib & AM_DIR)     /* It is a directory */
 429              		.loc 1 106 46 discriminator 1 view .LVU98
 430 003a 124B     		ldr	r3, .L30+12
 431 003c 5B7A     		ldrb	r3, [r3, #9]	@ zero_extendqisi2
 106:Src/File_Handling.c ****             if (fno.fattrib & AM_DIR)     /* It is a directory */
 432              		.loc 1 106 34 discriminator 1 view .LVU99
 433 003e 83B1     		cbz	r3, .L26
 107:Src/File_Handling.c ****             {
 434              		.loc 1 107 13 is_stmt 1 view .LVU100
 107:Src/File_Handling.c ****             {
 435              		.loc 1 107 20 is_stmt 0 view .LVU101
 436 0040 104B     		ldr	r3, .L30+12
 437 0042 1B7A     		ldrb	r3, [r3, #8]	@ zero_extendqisi2
 107:Src/File_Handling.c ****             {
 438              		.loc 1 107 16 view .LVU102
 439 0044 13F0100F 		tst	r3, #16
 440 0048 EBD0     		beq	.L27
 109:Src/File_Handling.c ****             	fresult = f_unlink(fno.fname);
 441              		.loc 1 109 14 is_stmt 1 view .LVU103
 109:Src/File_Handling.c ****             	fresult = f_unlink(fno.fname);
 442              		.loc 1 109 20 is_stmt 0 view .LVU104
 443 004a 0D49     		ldr	r1, .L30+8
 444 004c 0E48     		ldr	r0, .L30+16
 445 004e FFF7FEFF 		bl	strcmp
 446              	.LVL39:
 109:Src/File_Handling.c ****             	fresult = f_unlink(fno.fname);
 447              		.loc 1 109 17 discriminator 1 view .LVU105
 448 0052 0028     		cmp	r0, #0
 449 0054 EAD0     		beq	.L24
 110:Src/File_Handling.c ****             	if (fresult == FR_DENIED) continue;
 450              		.loc 1 110 14 is_stmt 1 view .LVU106
 110:Src/File_Handling.c ****             	if (fresult == FR_DENIED) continue;
 451              		.loc 1 110 24 is_stmt 0 view .LVU107
 452 0056 0A48     		ldr	r0, .L30+8
 453 0058 FFF7FEFF 		bl	f_unlink
 454              	.LVL40:
 110:Src/File_Handling.c ****             	if (fresult == FR_DENIED) continue;
 455              		.loc 1 110 22 discriminator 1 view .LVU108
 456 005c 074B     		ldr	r3, .L30+4
 457 005e 1870     		strb	r0, [r3]
 111:Src/File_Handling.c ****             }
 458              		.loc 1 111 14 is_stmt 1 view .LVU109
 111:Src/File_Handling.c ****             }
 459              		.loc 1 111 40 discriminator 1 view .LVU110
 460 0060 E4E7     		b	.L24
 461              	.L26:
 116:Src/File_Handling.c ****             }
 117:Src/File_Handling.c ****         }
ARM GAS  /tmp/ccnfjbri.s 			page 12


 118:Src/File_Handling.c ****         f_closedir(&dir);
 462              		.loc 1 118 9 view .LVU111
 463 0062 6846     		mov	r0, sp
 464 0064 FFF7FEFF 		bl	f_closedir
 465              	.LVL41:
 466              	.L25:
 119:Src/File_Handling.c ****     }
 120:Src/File_Handling.c ****     free(path);
 467              		.loc 1 120 5 view .LVU112
 468 0068 2046     		mov	r0, r4
 469 006a FFF7FEFF 		bl	free
 470              	.LVL42:
 121:Src/File_Handling.c ****     return fresult;
 471              		.loc 1 121 5 view .LVU113
 122:Src/File_Handling.c **** }
 472              		.loc 1 122 1 is_stmt 0 view .LVU114
 473 006e 034B     		ldr	r3, .L30+4
 474 0070 1878     		ldrb	r0, [r3]	@ zero_extendqisi2
 475 0072 0CB0     		add	sp, sp, #48
 476              	.LCFI7:
 477              		.cfi_def_cfa_offset 8
 478              		@ sp needed
 479 0074 10BD     		pop	{r4, pc}
 480              	.LVL43:
 481              	.L31:
 482              		.loc 1 122 1 view .LVU115
 483 0076 00BF     		.align	2
 484              	.L30:
 485 0078 00000000 		.word	.LC4
 486 007c 00000000 		.word	fresult
 487 0080 09000000 		.word	fno+9
 488 0084 00000000 		.word	fno
 489 0088 00000000 		.word	.LC0
 490              		.cfi_endproc
 491              	.LFE1190:
 493              		.section	.text.Write_File,"ax",%progbits
 494              		.align	1
 495              		.global	Write_File
 496              		.syntax unified
 497              		.thumb
 498              		.thumb_func
 500              	Write_File:
 501              	.LVL44:
 502              	.LFB1191:
 123:Src/File_Handling.c **** 
 124:Src/File_Handling.c **** 
 125:Src/File_Handling.c **** 
 126:Src/File_Handling.c **** 
 127:Src/File_Handling.c **** FRESULT Write_File (char *name, char *data)
 128:Src/File_Handling.c **** {
 503              		.loc 1 128 1 is_stmt 1 view -0
 504              		.cfi_startproc
 505              		@ args = 0, pretend = 0, frame = 0
 506              		@ frame_needed = 0, uses_anonymous_args = 0
 507              		.loc 1 128 1 is_stmt 0 view .LVU117
 508 0000 70B5     		push	{r4, r5, r6, lr}
 509              	.LCFI8:
ARM GAS  /tmp/ccnfjbri.s 			page 13


 510              		.cfi_def_cfa_offset 16
 511              		.cfi_offset 4, -16
 512              		.cfi_offset 5, -12
 513              		.cfi_offset 6, -8
 514              		.cfi_offset 14, -4
 515 0002 0446     		mov	r4, r0
 516 0004 0D46     		mov	r5, r1
 129:Src/File_Handling.c **** 
 130:Src/File_Handling.c **** 	/**** check whether the file exists or not ****/
 131:Src/File_Handling.c **** 	fresult = f_stat (name, &fno);
 517              		.loc 1 131 2 is_stmt 1 view .LVU118
 518              		.loc 1 131 12 is_stmt 0 view .LVU119
 519 0006 1249     		ldr	r1, .L37
 520              	.LVL45:
 521              		.loc 1 131 12 view .LVU120
 522 0008 FFF7FEFF 		bl	f_stat
 523              	.LVL46:
 524              		.loc 1 131 10 discriminator 1 view .LVU121
 525 000c 114B     		ldr	r3, .L37+4
 526 000e 1870     		strb	r0, [r3]
 132:Src/File_Handling.c **** 	if (fresult != FR_OK)
 527              		.loc 1 132 2 is_stmt 1 view .LVU122
 528              		.loc 1 132 5 is_stmt 0 view .LVU123
 529 0010 08B1     		cbz	r0, .L33
 530              	.LBB4:
 133:Src/File_Handling.c **** 	{
 134:Src/File_Handling.c **** 		char *buf = malloc(100*sizeof(char));
 531              		.loc 1 134 3 is_stmt 1 view .LVU124
 135:Src/File_Handling.c **** 		//sprintf (buf, "ERROR!!! *%s* does not exists\n\n", name);
 136:Src/File_Handling.c **** 		//Send_Uart (buf);
 137:Src/File_Handling.c **** 	    free(buf);
 532              		.loc 1 137 6 view .LVU125
 138:Src/File_Handling.c **** 	    return fresult;
 533              		.loc 1 138 6 view .LVU126
 534              		.loc 1 138 13 is_stmt 0 view .LVU127
 535 0012 C0B2     		uxtb	r0, r0
 536              	.LVL47:
 537              	.L34:
 538              		.loc 1 138 13 view .LVU128
 539              	.LBE4:
 139:Src/File_Handling.c **** 	}
 140:Src/File_Handling.c **** 
 141:Src/File_Handling.c **** 	else
 142:Src/File_Handling.c **** 	{
 143:Src/File_Handling.c **** 	    /* Create a file with read write access and open it */
 144:Src/File_Handling.c **** 	    fresult = f_open(&fil, name, FA_OPEN_EXISTING | FA_WRITE);
 145:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 146:Src/File_Handling.c **** 	    {
 147:Src/File_Handling.c **** 	    	char *buf = malloc(100*sizeof(char));
 148:Src/File_Handling.c **** 	    	//sprintf (buf, "ERROR!!! No. %d in opening file *%s*\n\n", fresult, name);
 149:Src/File_Handling.c **** 	    	//Send_Uart(buf);
 150:Src/File_Handling.c **** 	        free(buf);
 151:Src/File_Handling.c **** 	        return fresult;
 152:Src/File_Handling.c **** 	    }
 153:Src/File_Handling.c **** 
 154:Src/File_Handling.c **** 	    else
 155:Src/File_Handling.c **** 	    {
ARM GAS  /tmp/ccnfjbri.s 			page 14


 156:Src/File_Handling.c **** 	    	fresult = f_write(&fil, data, strlen(data), &bw);
 157:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 158:Src/File_Handling.c **** 	    	{
 159:Src/File_Handling.c **** 	    		char *buf = malloc(100*sizeof(char));
 160:Src/File_Handling.c **** 	    		//sprintf (buf, "ERROR!!! No. %d while writing to the FILE *%s*\n\n", fresult, name);
 161:Src/File_Handling.c **** 	    		//Send_Uart(buf);
 162:Src/File_Handling.c **** 	    		free(buf);
 163:Src/File_Handling.c **** 	    	}
 164:Src/File_Handling.c **** 
 165:Src/File_Handling.c **** 	    	/* Close file */
 166:Src/File_Handling.c **** 	    	fresult = f_close(&fil);
 167:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 168:Src/File_Handling.c **** 	    	{
 169:Src/File_Handling.c **** 	    		char *buf = malloc(100*sizeof(char));
 170:Src/File_Handling.c **** 	    		//sprintf (buf, "ERROR!!! No. %d in closing file *%s* after writing it\n\n", fresult, name);
 171:Src/File_Handling.c **** 	    		//Send_Uart(buf);
 172:Src/File_Handling.c **** 	    		free(buf);
 173:Src/File_Handling.c **** 	    	}
 174:Src/File_Handling.c **** 	    	else
 175:Src/File_Handling.c **** 	    	{
 176:Src/File_Handling.c **** 	    		char *buf = malloc(100*sizeof(char));
 177:Src/File_Handling.c **** 	    		//sprintf (buf, "File *%s* is WRITTEN and CLOSED successfully\n", name);
 178:Src/File_Handling.c **** 	    		//Send_Uart(buf);
 179:Src/File_Handling.c **** 	    		free(buf);
 180:Src/File_Handling.c **** 	    	}
 181:Src/File_Handling.c **** 	    }
 182:Src/File_Handling.c **** 	    return fresult;
 183:Src/File_Handling.c **** 	}
 184:Src/File_Handling.c **** }
 540              		.loc 1 184 1 view .LVU129
 541 0014 70BD     		pop	{r4, r5, r6, pc}
 542              	.LVL48:
 543              	.L33:
 144:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 544              		.loc 1 144 6 is_stmt 1 view .LVU130
 144:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 545              		.loc 1 144 16 is_stmt 0 view .LVU131
 546 0016 0222     		movs	r2, #2
 547 0018 2146     		mov	r1, r4
 548 001a 0F48     		ldr	r0, .L37+8
 549 001c FFF7FEFF 		bl	f_open
 550              	.LVL49:
 144:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 551              		.loc 1 144 14 discriminator 1 view .LVU132
 552 0020 0C4B     		ldr	r3, .L37+4
 553 0022 1870     		strb	r0, [r3]
 145:Src/File_Handling.c **** 	    {
 554              		.loc 1 145 6 is_stmt 1 view .LVU133
 145:Src/File_Handling.c **** 	    {
 555              		.loc 1 145 9 is_stmt 0 view .LVU134
 556 0024 08B1     		cbz	r0, .L35
 557              	.LBB5:
 147:Src/File_Handling.c **** 	    	//sprintf (buf, "ERROR!!! No. %d in opening file *%s*\n\n", fresult, name);
 558              		.loc 1 147 7 is_stmt 1 view .LVU135
 150:Src/File_Handling.c **** 	        return fresult;
 559              		.loc 1 150 10 view .LVU136
 151:Src/File_Handling.c **** 	    }
ARM GAS  /tmp/ccnfjbri.s 			page 15


 560              		.loc 1 151 10 view .LVU137
 151:Src/File_Handling.c **** 	    }
 561              		.loc 1 151 17 is_stmt 0 view .LVU138
 562 0026 C0B2     		uxtb	r0, r0
 563 0028 F4E7     		b	.L34
 564              	.L35:
 565              	.LBE5:
 156:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 566              		.loc 1 156 7 is_stmt 1 view .LVU139
 156:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 567              		.loc 1 156 17 is_stmt 0 view .LVU140
 568 002a 2846     		mov	r0, r5
 569 002c FFF7FEFF 		bl	strlen
 570              	.LVL50:
 571 0030 0246     		mov	r2, r0
 156:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 572              		.loc 1 156 17 discriminator 1 view .LVU141
 573 0032 094E     		ldr	r6, .L37+8
 574 0034 094B     		ldr	r3, .L37+12
 575 0036 2946     		mov	r1, r5
 576 0038 3046     		mov	r0, r6
 577 003a FFF7FEFF 		bl	f_write
 578              	.LVL51:
 156:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 579              		.loc 1 156 15 discriminator 2 view .LVU142
 580 003e 054C     		ldr	r4, .L37+4
 581              	.LVL52:
 156:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 582              		.loc 1 156 15 discriminator 2 view .LVU143
 583 0040 2070     		strb	r0, [r4]
 157:Src/File_Handling.c **** 	    	{
 584              		.loc 1 157 7 is_stmt 1 view .LVU144
 159:Src/File_Handling.c **** 	    		//sprintf (buf, "ERROR!!! No. %d while writing to the FILE *%s*\n\n", fresult, name);
 585              		.loc 1 159 8 view .LVU145
 162:Src/File_Handling.c **** 	    	}
 586              		.loc 1 162 8 view .LVU146
 166:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 587              		.loc 1 166 7 view .LVU147
 166:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 588              		.loc 1 166 17 is_stmt 0 view .LVU148
 589 0042 3046     		mov	r0, r6
 590 0044 FFF7FEFF 		bl	f_close
 591              	.LVL53:
 166:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 592              		.loc 1 166 15 discriminator 1 view .LVU149
 593 0048 2070     		strb	r0, [r4]
 167:Src/File_Handling.c **** 	    	{
 594              		.loc 1 167 7 is_stmt 1 view .LVU150
 176:Src/File_Handling.c **** 	    		//sprintf (buf, "File *%s* is WRITTEN and CLOSED successfully\n", name);
 595              		.loc 1 176 8 view .LVU151
 179:Src/File_Handling.c **** 	    	}
 596              		.loc 1 179 8 view .LVU152
 182:Src/File_Handling.c **** 	}
 597              		.loc 1 182 6 view .LVU153
 182:Src/File_Handling.c **** 	}
 598              		.loc 1 182 13 is_stmt 0 view .LVU154
 599 004a C0B2     		uxtb	r0, r0
ARM GAS  /tmp/ccnfjbri.s 			page 16


 600 004c E2E7     		b	.L34
 601              	.L38:
 602 004e 00BF     		.align	2
 603              	.L37:
 604 0050 00000000 		.word	fno
 605 0054 00000000 		.word	fresult
 606 0058 00000000 		.word	fil
 607 005c 00000000 		.word	bw
 608              		.cfi_endproc
 609              	.LFE1191:
 611              		.section	.text.Write_File_byte,"ax",%progbits
 612              		.align	1
 613              		.global	Write_File_byte
 614              		.syntax unified
 615              		.thumb
 616              		.thumb_func
 618              	Write_File_byte:
 619              	.LVL54:
 620              	.LFB1192:
 185:Src/File_Handling.c **** 
 186:Src/File_Handling.c **** FRESULT Write_File_byte (char *name, uint8_t *data, unsigned int bytesize)
 187:Src/File_Handling.c **** {
 621              		.loc 1 187 1 is_stmt 1 view -0
 622              		.cfi_startproc
 623              		@ args = 0, pretend = 0, frame = 0
 624              		@ frame_needed = 0, uses_anonymous_args = 0
 625              		.loc 1 187 1 is_stmt 0 view .LVU156
 626 0000 F8B5     		push	{r3, r4, r5, r6, r7, lr}
 627              	.LCFI9:
 628              		.cfi_def_cfa_offset 24
 629              		.cfi_offset 3, -24
 630              		.cfi_offset 4, -20
 631              		.cfi_offset 5, -16
 632              		.cfi_offset 6, -12
 633              		.cfi_offset 7, -8
 634              		.cfi_offset 14, -4
 635 0002 0446     		mov	r4, r0
 636 0004 0D46     		mov	r5, r1
 637 0006 1646     		mov	r6, r2
 188:Src/File_Handling.c **** 
 189:Src/File_Handling.c **** 	/**** check whether the file exists or not ****/
 190:Src/File_Handling.c **** 	fresult = f_stat (name, &fno);
 638              		.loc 1 190 2 is_stmt 1 view .LVU157
 639              		.loc 1 190 12 is_stmt 0 view .LVU158
 640 0008 1049     		ldr	r1, .L44
 641              	.LVL55:
 642              		.loc 1 190 12 view .LVU159
 643 000a FFF7FEFF 		bl	f_stat
 644              	.LVL56:
 645              		.loc 1 190 10 discriminator 1 view .LVU160
 646 000e 104B     		ldr	r3, .L44+4
 647 0010 1870     		strb	r0, [r3]
 191:Src/File_Handling.c **** 	if (fresult != FR_OK)
 648              		.loc 1 191 2 is_stmt 1 view .LVU161
 649              		.loc 1 191 5 is_stmt 0 view .LVU162
 650 0012 08B1     		cbz	r0, .L40
 651              	.LBB6:
ARM GAS  /tmp/ccnfjbri.s 			page 17


 192:Src/File_Handling.c **** 	{
 193:Src/File_Handling.c **** 		char *buf = malloc(100*sizeof(char));
 652              		.loc 1 193 3 is_stmt 1 view .LVU163
 194:Src/File_Handling.c **** 		//sprintf (buf, "ERROR!!! *%s* does not exists\n\n", name);
 195:Src/File_Handling.c **** 		//Send_Uart (buf);
 196:Src/File_Handling.c **** 	    free(buf);
 653              		.loc 1 196 6 view .LVU164
 197:Src/File_Handling.c **** 	    return fresult;
 654              		.loc 1 197 6 view .LVU165
 655              		.loc 1 197 13 is_stmt 0 view .LVU166
 656 0014 C0B2     		uxtb	r0, r0
 657              	.LVL57:
 658              	.L41:
 659              		.loc 1 197 13 view .LVU167
 660              	.LBE6:
 198:Src/File_Handling.c **** 	}
 199:Src/File_Handling.c **** 
 200:Src/File_Handling.c **** 	else
 201:Src/File_Handling.c **** 	{
 202:Src/File_Handling.c **** 	    /* Create a file with read write access and open it */
 203:Src/File_Handling.c **** 	    fresult = f_open(&fil, name, FA_OPEN_EXISTING | FA_WRITE);
 204:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 205:Src/File_Handling.c **** 	    {
 206:Src/File_Handling.c **** 	    	char *buf = malloc(100*sizeof(char));
 207:Src/File_Handling.c **** 	    	//sprintf (buf, "ERROR!!! No. %d in opening file *%s*\n\n", fresult, name);
 208:Src/File_Handling.c **** 	    	//Send_Uart(buf);
 209:Src/File_Handling.c **** 	        free(buf);
 210:Src/File_Handling.c **** 	        return fresult;
 211:Src/File_Handling.c **** 	    }
 212:Src/File_Handling.c **** 
 213:Src/File_Handling.c **** 	    else
 214:Src/File_Handling.c **** 	    {
 215:Src/File_Handling.c **** 	    	fresult = f_write(&fil, data, bytesize, &bw);
 216:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 217:Src/File_Handling.c **** 	    	{
 218:Src/File_Handling.c **** 	    		char *buf = malloc(100*sizeof(char));
 219:Src/File_Handling.c **** 	    		//sprintf (buf, "ERROR!!! No. %d while writing to the FILE *%s*\n\n", fresult, name);
 220:Src/File_Handling.c **** 	    		//Send_Uart(buf);
 221:Src/File_Handling.c **** 	    		free(buf);
 222:Src/File_Handling.c **** 	    	}
 223:Src/File_Handling.c **** 
 224:Src/File_Handling.c **** 	    	/* Close file */
 225:Src/File_Handling.c **** 	    	fresult = f_close(&fil);
 226:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 227:Src/File_Handling.c **** 	    	{
 228:Src/File_Handling.c **** 	    		char *buf = malloc(100*sizeof(char));
 229:Src/File_Handling.c **** 	    		//sprintf (buf, "ERROR!!! No. %d in closing file *%s* after writing it\n\n", fresult, name);
 230:Src/File_Handling.c **** 	    		//Send_Uart(buf);
 231:Src/File_Handling.c **** 	    		free(buf);
 232:Src/File_Handling.c **** 	    	}
 233:Src/File_Handling.c **** 	    	else
 234:Src/File_Handling.c **** 	    	{
 235:Src/File_Handling.c **** 	    		char *buf = malloc(100*sizeof(char));
 236:Src/File_Handling.c **** 	    		//sprintf (buf, "File *%s* is WRITTEN and CLOSED successfully\n", name);
 237:Src/File_Handling.c **** 	    		//Send_Uart(buf);
 238:Src/File_Handling.c **** 	    		free(buf);
 239:Src/File_Handling.c **** 	    	}
ARM GAS  /tmp/ccnfjbri.s 			page 18


 240:Src/File_Handling.c **** 	    }
 241:Src/File_Handling.c **** 	    return fresult;
 242:Src/File_Handling.c **** 	}
 243:Src/File_Handling.c **** }
 661              		.loc 1 243 1 view .LVU168
 662 0016 F8BD     		pop	{r3, r4, r5, r6, r7, pc}
 663              	.LVL58:
 664              	.L40:
 203:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 665              		.loc 1 203 6 is_stmt 1 view .LVU169
 203:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 666              		.loc 1 203 16 is_stmt 0 view .LVU170
 667 0018 0222     		movs	r2, #2
 668 001a 2146     		mov	r1, r4
 669 001c 0D48     		ldr	r0, .L44+8
 670 001e FFF7FEFF 		bl	f_open
 671              	.LVL59:
 203:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 672              		.loc 1 203 14 discriminator 1 view .LVU171
 673 0022 0B4B     		ldr	r3, .L44+4
 674 0024 1870     		strb	r0, [r3]
 204:Src/File_Handling.c **** 	    {
 675              		.loc 1 204 6 is_stmt 1 view .LVU172
 204:Src/File_Handling.c **** 	    {
 676              		.loc 1 204 9 is_stmt 0 view .LVU173
 677 0026 08B1     		cbz	r0, .L42
 678              	.LBB7:
 206:Src/File_Handling.c **** 	    	//sprintf (buf, "ERROR!!! No. %d in opening file *%s*\n\n", fresult, name);
 679              		.loc 1 206 7 is_stmt 1 view .LVU174
 209:Src/File_Handling.c **** 	        return fresult;
 680              		.loc 1 209 10 view .LVU175
 210:Src/File_Handling.c **** 	    }
 681              		.loc 1 210 10 view .LVU176
 210:Src/File_Handling.c **** 	    }
 682              		.loc 1 210 17 is_stmt 0 view .LVU177
 683 0028 C0B2     		uxtb	r0, r0
 684 002a F4E7     		b	.L41
 685              	.L42:
 686              	.LBE7:
 215:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 687              		.loc 1 215 7 is_stmt 1 view .LVU178
 215:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 688              		.loc 1 215 17 is_stmt 0 view .LVU179
 689 002c 094F     		ldr	r7, .L44+8
 690 002e 0A4B     		ldr	r3, .L44+12
 691 0030 3246     		mov	r2, r6
 692 0032 2946     		mov	r1, r5
 693 0034 3846     		mov	r0, r7
 694 0036 FFF7FEFF 		bl	f_write
 695              	.LVL60:
 215:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 696              		.loc 1 215 15 discriminator 1 view .LVU180
 697 003a 054C     		ldr	r4, .L44+4
 698              	.LVL61:
 215:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 699              		.loc 1 215 15 discriminator 1 view .LVU181
 700 003c 2070     		strb	r0, [r4]
ARM GAS  /tmp/ccnfjbri.s 			page 19


 216:Src/File_Handling.c **** 	    	{
 701              		.loc 1 216 7 is_stmt 1 view .LVU182
 218:Src/File_Handling.c **** 	    		//sprintf (buf, "ERROR!!! No. %d while writing to the FILE *%s*\n\n", fresult, name);
 702              		.loc 1 218 8 view .LVU183
 221:Src/File_Handling.c **** 	    	}
 703              		.loc 1 221 8 view .LVU184
 225:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 704              		.loc 1 225 7 view .LVU185
 225:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 705              		.loc 1 225 17 is_stmt 0 view .LVU186
 706 003e 3846     		mov	r0, r7
 707 0040 FFF7FEFF 		bl	f_close
 708              	.LVL62:
 225:Src/File_Handling.c **** 	    	if (fresult != FR_OK)
 709              		.loc 1 225 15 discriminator 1 view .LVU187
 710 0044 2070     		strb	r0, [r4]
 226:Src/File_Handling.c **** 	    	{
 711              		.loc 1 226 7 is_stmt 1 view .LVU188
 235:Src/File_Handling.c **** 	    		//sprintf (buf, "File *%s* is WRITTEN and CLOSED successfully\n", name);
 712              		.loc 1 235 8 view .LVU189
 238:Src/File_Handling.c **** 	    	}
 713              		.loc 1 238 8 view .LVU190
 241:Src/File_Handling.c **** 	}
 714              		.loc 1 241 6 view .LVU191
 241:Src/File_Handling.c **** 	}
 715              		.loc 1 241 13 is_stmt 0 view .LVU192
 716 0046 C0B2     		uxtb	r0, r0
 717 0048 E5E7     		b	.L41
 718              	.L45:
 719 004a 00BF     		.align	2
 720              	.L44:
 721 004c 00000000 		.word	fno
 722 0050 00000000 		.word	fresult
 723 0054 00000000 		.word	fil
 724 0058 00000000 		.word	bw
 725              		.cfi_endproc
 726              	.LFE1192:
 728              		.section	.rodata.Read_File.str1.4,"aMS",%progbits,1
 729              		.align	2
 730              	.LC5:
 731 0000 45525252 		.ascii	"ERRROR!!! *%s* does not exists\012\012\000"
 731      4F522121 
 731      21202A25 
 731      732A2064 
 731      6F657320 
 732 0021 000000   		.align	2
 733              	.LC6:
 734 0024 4552524F 		.ascii	"ERROR!!! No. %d in opening file *%s*\012\012\000"
 734      52212121 
 734      204E6F2E 
 734      20256420 
 734      696E206F 
 735 004b 00       		.align	2
 736              	.LC7:
 737 004c 4552524F 		.ascii	"ERROR!!! No. %d in reading file *%s*\012\012\000"
 737      52212121 
 737      204E6F2E 
ARM GAS  /tmp/ccnfjbri.s 			page 20


 737      20256420 
 737      696E2072 
 738 0073 00       		.align	2
 739              	.LC8:
 740 0074 4552524F 		.ascii	"ERROR!!! No. %d in closing file *%s*\012\012\000"
 740      52212121 
 740      204E6F2E 
 740      20256420 
 740      696E2063 
 741 009b 00       		.align	2
 742              	.LC9:
 743 009c 46696C65 		.ascii	"File *%s* CLOSED successfully\012\000"
 743      202A2573 
 743      2A20434C 
 743      4F534544 
 743      20737563 
 744              		.section	.text.Read_File,"ax",%progbits
 745              		.align	1
 746              		.global	Read_File
 747              		.syntax unified
 748              		.thumb
 749              		.thumb_func
 751              	Read_File:
 752              	.LVL63:
 753              	.LFB1193:
 244:Src/File_Handling.c **** 
 245:Src/File_Handling.c **** FRESULT Read_File (char *name)
 246:Src/File_Handling.c **** {
 754              		.loc 1 246 1 is_stmt 1 view -0
 755              		.cfi_startproc
 756              		@ args = 0, pretend = 0, frame = 0
 757              		@ frame_needed = 0, uses_anonymous_args = 0
 758              		.loc 1 246 1 is_stmt 0 view .LVU194
 759 0000 70B5     		push	{r4, r5, r6, lr}
 760              	.LCFI10:
 761              		.cfi_def_cfa_offset 16
 762              		.cfi_offset 4, -16
 763              		.cfi_offset 5, -12
 764              		.cfi_offset 6, -8
 765              		.cfi_offset 14, -4
 766 0002 0446     		mov	r4, r0
 247:Src/File_Handling.c **** 	/**** check whether the file exists or not ****/
 248:Src/File_Handling.c **** 	fresult = f_stat (name, &fno);
 767              		.loc 1 248 2 is_stmt 1 view .LVU195
 768              		.loc 1 248 12 is_stmt 0 view .LVU196
 769 0004 3749     		ldr	r1, .L55
 770 0006 FFF7FEFF 		bl	f_stat
 771              	.LVL64:
 772              		.loc 1 248 10 discriminator 1 view .LVU197
 773 000a 374B     		ldr	r3, .L55+4
 774 000c 1870     		strb	r0, [r3]
 249:Src/File_Handling.c **** 	if (fresult != FR_OK)
 775              		.loc 1 249 2 is_stmt 1 view .LVU198
 776              		.loc 1 249 5 is_stmt 0 view .LVU199
 777 000e B8B9     		cbnz	r0, .L54
 778              	.LBB8:
 250:Src/File_Handling.c **** 	{
ARM GAS  /tmp/ccnfjbri.s 			page 21


 251:Src/File_Handling.c **** 		char *buf = malloc(100*sizeof(char));
 252:Src/File_Handling.c **** 		sprintf (buf, "ERRROR!!! *%s* does not exists\n\n", name);
 253:Src/File_Handling.c **** 		Send_Uart (buf);
 254:Src/File_Handling.c **** 		free(buf);
 255:Src/File_Handling.c **** 	    return fresult;
 256:Src/File_Handling.c **** 	}
 257:Src/File_Handling.c **** 
 258:Src/File_Handling.c **** 	else
 259:Src/File_Handling.c **** 	{
 260:Src/File_Handling.c **** 		/* Open file to read */
 261:Src/File_Handling.c **** 		fresult = f_open(&fil, name, FA_READ);
 779              		.loc 1 261 3 is_stmt 1 view .LVU200
 780              		.loc 1 261 13 is_stmt 0 view .LVU201
 781 0010 0122     		movs	r2, #1
 782 0012 2146     		mov	r1, r4
 783 0014 3548     		ldr	r0, .L55+8
 784 0016 FFF7FEFF 		bl	f_open
 785              	.LVL65:
 786 001a 0546     		mov	r5, r0
 787              		.loc 1 261 11 discriminator 1 view .LVU202
 788 001c 324B     		ldr	r3, .L55+4
 789 001e 1870     		strb	r0, [r3]
 262:Src/File_Handling.c **** 
 263:Src/File_Handling.c **** 		if (fresult != FR_OK)
 790              		.loc 1 263 3 is_stmt 1 view .LVU203
 791              		.loc 1 263 6 is_stmt 0 view .LVU204
 792 0020 E0B1     		cbz	r0, .L49
 793              	.LBB9:
 264:Src/File_Handling.c **** 		{
 265:Src/File_Handling.c **** 			char *buf = malloc(100*sizeof(char));
 794              		.loc 1 265 4 is_stmt 1 view .LVU205
 795              		.loc 1 265 16 is_stmt 0 view .LVU206
 796 0022 6420     		movs	r0, #100
 797 0024 FFF7FEFF 		bl	malloc
 798              	.LVL66:
 799 0028 0646     		mov	r6, r0
 800              	.LVL67:
 266:Src/File_Handling.c **** 			sprintf (buf, "ERROR!!! No. %d in opening file *%s*\n\n", fresult, name);
 801              		.loc 1 266 4 is_stmt 1 view .LVU207
 802 002a 2346     		mov	r3, r4
 803 002c 2A46     		mov	r2, r5
 804 002e 3049     		ldr	r1, .L55+12
 805 0030 FFF7FEFF 		bl	sprintf
 806              	.LVL68:
 267:Src/File_Handling.c **** 		    Send_Uart(buf);
 807              		.loc 1 267 7 view .LVU208
 268:Src/File_Handling.c **** 		    free(buf);
 808              		.loc 1 268 7 view .LVU209
 809 0034 3046     		mov	r0, r6
 810 0036 FFF7FEFF 		bl	free
 811              	.LVL69:
 269:Src/File_Handling.c **** 		    return fresult;
 812              		.loc 1 269 7 view .LVU210
 813              		.loc 1 269 14 is_stmt 0 view .LVU211
 814 003a 2B4B     		ldr	r3, .L55+4
 815 003c 1878     		ldrb	r0, [r3]	@ zero_extendqisi2
 816 003e 0CE0     		b	.L48
ARM GAS  /tmp/ccnfjbri.s 			page 22


 817              	.LVL70:
 818              	.L54:
 819              		.loc 1 269 14 view .LVU212
 820              	.LBE9:
 821              	.LBE8:
 822              	.LBB13:
 251:Src/File_Handling.c **** 		sprintf (buf, "ERRROR!!! *%s* does not exists\n\n", name);
 823              		.loc 1 251 3 is_stmt 1 view .LVU213
 251:Src/File_Handling.c **** 		sprintf (buf, "ERRROR!!! *%s* does not exists\n\n", name);
 824              		.loc 1 251 15 is_stmt 0 view .LVU214
 825 0040 6420     		movs	r0, #100
 826 0042 FFF7FEFF 		bl	malloc
 827              	.LVL71:
 828 0046 0546     		mov	r5, r0
 829              	.LVL72:
 252:Src/File_Handling.c **** 		Send_Uart (buf);
 830              		.loc 1 252 3 is_stmt 1 view .LVU215
 831 0048 2246     		mov	r2, r4
 832 004a 2A49     		ldr	r1, .L55+16
 833 004c FFF7FEFF 		bl	sprintf
 834              	.LVL73:
 253:Src/File_Handling.c **** 		free(buf);
 835              		.loc 1 253 3 view .LVU216
 254:Src/File_Handling.c **** 	    return fresult;
 836              		.loc 1 254 3 view .LVU217
 837 0050 2846     		mov	r0, r5
 838 0052 FFF7FEFF 		bl	free
 839              	.LVL74:
 255:Src/File_Handling.c **** 	}
 840              		.loc 1 255 6 view .LVU218
 255:Src/File_Handling.c **** 	}
 841              		.loc 1 255 13 is_stmt 0 view .LVU219
 842 0056 244B     		ldr	r3, .L55+4
 843 0058 1878     		ldrb	r0, [r3]	@ zero_extendqisi2
 844              	.LVL75:
 845              	.L48:
 255:Src/File_Handling.c **** 	}
 846              		.loc 1 255 13 view .LVU220
 847              	.LBE13:
 270:Src/File_Handling.c **** 		}
 271:Src/File_Handling.c **** 
 272:Src/File_Handling.c **** 		/* Read data from the file
 273:Src/File_Handling.c **** 		* see the function details for the arguments */
 274:Src/File_Handling.c **** 
 275:Src/File_Handling.c **** 		char *buffer = malloc(sizeof(f_size(&fil)));
 276:Src/File_Handling.c **** 		fresult = f_read (&fil, buffer, f_size(&fil), &br);
 277:Src/File_Handling.c **** 		if (fresult != FR_OK)
 278:Src/File_Handling.c **** 		{
 279:Src/File_Handling.c **** 			char *buf = malloc(100*sizeof(char));
 280:Src/File_Handling.c **** 			free(buffer);
 281:Src/File_Handling.c **** 		 	sprintf (buf, "ERROR!!! No. %d in reading file *%s*\n\n", fresult, name);
 282:Src/File_Handling.c **** 		  	Send_Uart(buffer);
 283:Src/File_Handling.c **** 		  	free(buf);
 284:Src/File_Handling.c **** 		}
 285:Src/File_Handling.c **** 
 286:Src/File_Handling.c **** 		else
 287:Src/File_Handling.c **** 		{
ARM GAS  /tmp/ccnfjbri.s 			page 23


 288:Src/File_Handling.c **** 			Send_Uart(buffer);
 289:Src/File_Handling.c **** 			free(buffer);
 290:Src/File_Handling.c **** 
 291:Src/File_Handling.c **** 			/* Close file */
 292:Src/File_Handling.c **** 			fresult = f_close(&fil);
 293:Src/File_Handling.c **** 			if (fresult != FR_OK)
 294:Src/File_Handling.c **** 			{
 295:Src/File_Handling.c **** 				char *buf = malloc(100*sizeof(char));
 296:Src/File_Handling.c **** 				sprintf (buf, "ERROR!!! No. %d in closing file *%s*\n\n", fresult, name);
 297:Src/File_Handling.c **** 				Send_Uart(buf);
 298:Src/File_Handling.c **** 				free(buf);
 299:Src/File_Handling.c **** 			}
 300:Src/File_Handling.c **** 			else
 301:Src/File_Handling.c **** 			{
 302:Src/File_Handling.c **** 				char *buf = malloc(100*sizeof(char));
 303:Src/File_Handling.c **** 				sprintf (buf, "File *%s* CLOSED successfully\n", name);
 304:Src/File_Handling.c **** 				Send_Uart(buf);
 305:Src/File_Handling.c **** 				free(buf);
 306:Src/File_Handling.c **** 			}
 307:Src/File_Handling.c **** 		}
 308:Src/File_Handling.c **** 	    return fresult;
 309:Src/File_Handling.c **** 	}
 310:Src/File_Handling.c **** }
 848              		.loc 1 310 1 view .LVU221
 849 005a 70BD     		pop	{r4, r5, r6, pc}
 850              	.LVL76:
 851              	.L49:
 852              	.LBB14:
 275:Src/File_Handling.c **** 		fresult = f_read (&fil, buffer, f_size(&fil), &br);
 853              		.loc 1 275 3 is_stmt 1 view .LVU222
 275:Src/File_Handling.c **** 		fresult = f_read (&fil, buffer, f_size(&fil), &br);
 854              		.loc 1 275 18 is_stmt 0 view .LVU223
 855 005c 0420     		movs	r0, #4
 856 005e FFF7FEFF 		bl	malloc
 857              	.LVL77:
 858 0062 0546     		mov	r5, r0
 859              	.LVL78:
 276:Src/File_Handling.c **** 		if (fresult != FR_OK)
 860              		.loc 1 276 3 is_stmt 1 view .LVU224
 276:Src/File_Handling.c **** 		if (fresult != FR_OK)
 861              		.loc 1 276 35 is_stmt 0 view .LVU225
 862 0064 2148     		ldr	r0, .L55+8
 863              	.LVL79:
 276:Src/File_Handling.c **** 		if (fresult != FR_OK)
 864              		.loc 1 276 13 view .LVU226
 865 0066 244B     		ldr	r3, .L55+20
 866 0068 C268     		ldr	r2, [r0, #12]
 867 006a 2946     		mov	r1, r5
 868 006c FFF7FEFF 		bl	f_read
 869              	.LVL80:
 276:Src/File_Handling.c **** 		if (fresult != FR_OK)
 870              		.loc 1 276 11 discriminator 1 view .LVU227
 871 0070 1D4B     		ldr	r3, .L55+4
 872 0072 1870     		strb	r0, [r3]
 277:Src/File_Handling.c **** 		{
 873              		.loc 1 277 3 is_stmt 1 view .LVU228
 277:Src/File_Handling.c **** 		{
ARM GAS  /tmp/ccnfjbri.s 			page 24


 874              		.loc 1 277 6 is_stmt 0 view .LVU229
 875 0074 98B1     		cbz	r0, .L50
 876              	.LBB10:
 279:Src/File_Handling.c **** 			free(buffer);
 877              		.loc 1 279 4 is_stmt 1 view .LVU230
 279:Src/File_Handling.c **** 			free(buffer);
 878              		.loc 1 279 16 is_stmt 0 view .LVU231
 879 0076 6420     		movs	r0, #100
 880 0078 FFF7FEFF 		bl	malloc
 881              	.LVL81:
 882 007c 0646     		mov	r6, r0
 883              	.LVL82:
 280:Src/File_Handling.c **** 		 	sprintf (buf, "ERROR!!! No. %d in reading file *%s*\n\n", fresult, name);
 884              		.loc 1 280 4 is_stmt 1 view .LVU232
 885 007e 2846     		mov	r0, r5
 886              	.LVL83:
 280:Src/File_Handling.c **** 		 	sprintf (buf, "ERROR!!! No. %d in reading file *%s*\n\n", fresult, name);
 887              		.loc 1 280 4 is_stmt 0 view .LVU233
 888 0080 FFF7FEFF 		bl	free
 889              	.LVL84:
 281:Src/File_Handling.c **** 		  	Send_Uart(buffer);
 890              		.loc 1 281 5 is_stmt 1 view .LVU234
 891 0084 2346     		mov	r3, r4
 892 0086 184A     		ldr	r2, .L55+4
 893 0088 1278     		ldrb	r2, [r2]	@ zero_extendqisi2
 894 008a 1C49     		ldr	r1, .L55+24
 895 008c 3046     		mov	r0, r6
 896 008e FFF7FEFF 		bl	sprintf
 897              	.LVL85:
 282:Src/File_Handling.c **** 		  	free(buf);
 898              		.loc 1 282 6 view .LVU235
 283:Src/File_Handling.c **** 		}
 899              		.loc 1 283 6 view .LVU236
 900 0092 3046     		mov	r0, r6
 901 0094 FFF7FEFF 		bl	free
 902              	.LVL86:
 903              	.L51:
 283:Src/File_Handling.c **** 		}
 904              		.loc 1 283 6 is_stmt 0 view .LVU237
 905              	.LBE10:
 308:Src/File_Handling.c **** 	}
 906              		.loc 1 308 6 is_stmt 1 view .LVU238
 308:Src/File_Handling.c **** 	}
 907              		.loc 1 308 13 is_stmt 0 view .LVU239
 908 0098 134B     		ldr	r3, .L55+4
 909 009a 1878     		ldrb	r0, [r3]	@ zero_extendqisi2
 910 009c DDE7     		b	.L48
 911              	.LVL87:
 912              	.L50:
 288:Src/File_Handling.c **** 			free(buffer);
 913              		.loc 1 288 4 is_stmt 1 view .LVU240
 289:Src/File_Handling.c **** 
 914              		.loc 1 289 4 view .LVU241
 915 009e 2846     		mov	r0, r5
 916 00a0 FFF7FEFF 		bl	free
 917              	.LVL88:
 292:Src/File_Handling.c **** 			if (fresult != FR_OK)
ARM GAS  /tmp/ccnfjbri.s 			page 25


 918              		.loc 1 292 4 view .LVU242
 292:Src/File_Handling.c **** 			if (fresult != FR_OK)
 919              		.loc 1 292 14 is_stmt 0 view .LVU243
 920 00a4 1148     		ldr	r0, .L55+8
 921 00a6 FFF7FEFF 		bl	f_close
 922              	.LVL89:
 923 00aa 0546     		mov	r5, r0
 924              	.LVL90:
 292:Src/File_Handling.c **** 			if (fresult != FR_OK)
 925              		.loc 1 292 12 discriminator 1 view .LVU244
 926 00ac 0E4B     		ldr	r3, .L55+4
 927 00ae 1870     		strb	r0, [r3]
 293:Src/File_Handling.c **** 			{
 928              		.loc 1 293 4 is_stmt 1 view .LVU245
 293:Src/File_Handling.c **** 			{
 929              		.loc 1 293 7 is_stmt 0 view .LVU246
 930 00b0 60B1     		cbz	r0, .L52
 931              	.LBB11:
 295:Src/File_Handling.c **** 				sprintf (buf, "ERROR!!! No. %d in closing file *%s*\n\n", fresult, name);
 932              		.loc 1 295 5 is_stmt 1 view .LVU247
 295:Src/File_Handling.c **** 				sprintf (buf, "ERROR!!! No. %d in closing file *%s*\n\n", fresult, name);
 933              		.loc 1 295 17 is_stmt 0 view .LVU248
 934 00b2 6420     		movs	r0, #100
 935 00b4 FFF7FEFF 		bl	malloc
 936              	.LVL91:
 937 00b8 0646     		mov	r6, r0
 938              	.LVL92:
 296:Src/File_Handling.c **** 				Send_Uart(buf);
 939              		.loc 1 296 5 is_stmt 1 view .LVU249
 940 00ba 2346     		mov	r3, r4
 941 00bc 2A46     		mov	r2, r5
 942 00be 1049     		ldr	r1, .L55+28
 943 00c0 FFF7FEFF 		bl	sprintf
 944              	.LVL93:
 297:Src/File_Handling.c **** 				free(buf);
 945              		.loc 1 297 5 view .LVU250
 298:Src/File_Handling.c **** 			}
 946              		.loc 1 298 5 view .LVU251
 947 00c4 3046     		mov	r0, r6
 948 00c6 FFF7FEFF 		bl	free
 949              	.LVL94:
 950              	.LBE11:
 951 00ca E5E7     		b	.L51
 952              	.LVL95:
 953              	.L52:
 954              	.LBB12:
 302:Src/File_Handling.c **** 				sprintf (buf, "File *%s* CLOSED successfully\n", name);
 955              		.loc 1 302 5 view .LVU252
 302:Src/File_Handling.c **** 				sprintf (buf, "File *%s* CLOSED successfully\n", name);
 956              		.loc 1 302 17 is_stmt 0 view .LVU253
 957 00cc 6420     		movs	r0, #100
 958 00ce FFF7FEFF 		bl	malloc
 959              	.LVL96:
 960 00d2 0546     		mov	r5, r0
 961              	.LVL97:
 303:Src/File_Handling.c **** 				Send_Uart(buf);
 962              		.loc 1 303 5 is_stmt 1 view .LVU254
ARM GAS  /tmp/ccnfjbri.s 			page 26


 963 00d4 2246     		mov	r2, r4
 964 00d6 0B49     		ldr	r1, .L55+32
 965 00d8 FFF7FEFF 		bl	sprintf
 966              	.LVL98:
 304:Src/File_Handling.c **** 				free(buf);
 967              		.loc 1 304 5 view .LVU255
 305:Src/File_Handling.c **** 			}
 968              		.loc 1 305 5 view .LVU256
 969 00dc 2846     		mov	r0, r5
 970 00de FFF7FEFF 		bl	free
 971              	.LVL99:
 972 00e2 D9E7     		b	.L51
 973              	.L56:
 974              		.align	2
 975              	.L55:
 976 00e4 00000000 		.word	fno
 977 00e8 00000000 		.word	fresult
 978 00ec 00000000 		.word	fil
 979 00f0 24000000 		.word	.LC6
 980 00f4 00000000 		.word	.LC5
 981 00f8 00000000 		.word	br
 982 00fc 4C000000 		.word	.LC7
 983 0100 74000000 		.word	.LC8
 984 0104 9C000000 		.word	.LC9
 985              	.LBE12:
 986              	.LBE14:
 987              		.cfi_endproc
 988              	.LFE1193:
 990              		.section	.rodata.Seek_Read_File.str1.4,"aMS",%progbits,1
 991              		.align	2
 992              	.LC10:
 993 0000 4552524F 		.ascii	"ERROR!!! Can't seek the file:   *%s*\012\012\000"
 993      52212121 
 993      2043616E 
 993      27742073 
 993      65656B20 
 994              		.section	.text.Seek_Read_File,"ax",%progbits
 995              		.align	1
 996              		.global	Seek_Read_File
 997              		.syntax unified
 998              		.thumb
 999              		.thumb_func
 1001              	Seek_Read_File:
 1002              	.LVL100:
 1003              	.LFB1194:
 311:Src/File_Handling.c **** 
 312:Src/File_Handling.c **** FRESULT Seek_Read_File (char *name, uint8_t *data, unsigned int bytesize, unsigned long goto_label)
 313:Src/File_Handling.c **** {
 1004              		.loc 1 313 1 view -0
 1005              		.cfi_startproc
 1006              		@ args = 0, pretend = 0, frame = 0
 1007              		@ frame_needed = 0, uses_anonymous_args = 0
 1008              		.loc 1 313 1 is_stmt 0 view .LVU258
 1009 0000 2DE9F041 		push	{r4, r5, r6, r7, r8, lr}
 1010              	.LCFI11:
 1011              		.cfi_def_cfa_offset 24
 1012              		.cfi_offset 4, -24
ARM GAS  /tmp/ccnfjbri.s 			page 27


 1013              		.cfi_offset 5, -20
 1014              		.cfi_offset 6, -16
 1015              		.cfi_offset 7, -12
 1016              		.cfi_offset 8, -8
 1017              		.cfi_offset 14, -4
 1018 0004 0446     		mov	r4, r0
 1019 0006 0F46     		mov	r7, r1
 1020 0008 9046     		mov	r8, r2
 1021 000a 1D46     		mov	r5, r3
 314:Src/File_Handling.c **** 	/**** check whether the file exists or not ****/
 315:Src/File_Handling.c **** 	fresult = f_stat (name, &fno);
 1022              		.loc 1 315 2 is_stmt 1 view .LVU259
 1023              		.loc 1 315 12 is_stmt 0 view .LVU260
 1024 000c 4349     		ldr	r1, .L70
 1025              	.LVL101:
 1026              		.loc 1 315 12 view .LVU261
 1027 000e FFF7FEFF 		bl	f_stat
 1028              	.LVL102:
 1029              		.loc 1 315 10 discriminator 1 view .LVU262
 1030 0012 434B     		ldr	r3, .L70+4
 1031 0014 1870     		strb	r0, [r3]
 316:Src/File_Handling.c **** 	if (fresult != FR_OK)
 1032              		.loc 1 316 2 is_stmt 1 view .LVU263
 1033              		.loc 1 316 5 is_stmt 0 view .LVU264
 1034 0016 E8B9     		cbnz	r0, .L67
 317:Src/File_Handling.c **** 	{
 318:Src/File_Handling.c **** 		char *buf = malloc(100*sizeof(char));
 319:Src/File_Handling.c **** 		sprintf (buf, "ERRROR!!! *%s* does not exists\n\n", name);
 320:Src/File_Handling.c **** 		//Send_Uart (buf);
 321:Src/File_Handling.c **** 		free(buf);
 322:Src/File_Handling.c **** 	    return fresult;
 323:Src/File_Handling.c **** 	}
 324:Src/File_Handling.c **** 
 325:Src/File_Handling.c **** 	else
 326:Src/File_Handling.c **** 	{
 327:Src/File_Handling.c **** 		/* Open file to read */
 328:Src/File_Handling.c **** 		fresult = f_open(&fil, name, FA_READ);
 1035              		.loc 1 328 3 is_stmt 1 view .LVU265
 1036              		.loc 1 328 13 is_stmt 0 view .LVU266
 1037 0018 0122     		movs	r2, #1
 1038 001a 2146     		mov	r1, r4
 1039 001c 4148     		ldr	r0, .L70+8
 1040 001e FFF7FEFF 		bl	f_open
 1041              	.LVL103:
 1042 0022 0646     		mov	r6, r0
 1043              		.loc 1 328 11 discriminator 1 view .LVU267
 1044 0024 3E4B     		ldr	r3, .L70+4
 1045 0026 1870     		strb	r0, [r3]
 329:Src/File_Handling.c **** 
 330:Src/File_Handling.c **** 		if (fresult != FR_OK)
 1046              		.loc 1 330 3 is_stmt 1 view .LVU268
 1047              		.loc 1 330 6 is_stmt 0 view .LVU269
 1048 0028 18BB     		cbnz	r0, .L68
 331:Src/File_Handling.c **** 		{
 332:Src/File_Handling.c **** 			char *buf = malloc(100*sizeof(char));
 333:Src/File_Handling.c **** 			sprintf (buf, "ERROR!!! No. %d in opening file *%s*\n\n", fresult, name);
 334:Src/File_Handling.c **** 		    //Send_Uart(buf);
ARM GAS  /tmp/ccnfjbri.s 			page 28


 335:Src/File_Handling.c **** 		    free(buf);
 336:Src/File_Handling.c **** 		    return fresult;
 337:Src/File_Handling.c **** 		}
 338:Src/File_Handling.c **** 
 339:Src/File_Handling.c **** 		/* Read data from the file
 340:Src/File_Handling.c **** 		* see the function details for the arguments */
 341:Src/File_Handling.c **** 
 342:Src/File_Handling.c **** 		//char *buffer = malloc(sizeof(f_size(&fil)));
 343:Src/File_Handling.c **** 		fresult =  f_lseek (&fil, goto_label);								/* Move file pointer of the file object */
 1049              		.loc 1 343 3 is_stmt 1 view .LVU270
 1050              		.loc 1 343 14 is_stmt 0 view .LVU271
 1051 002a 2946     		mov	r1, r5
 1052 002c 3D48     		ldr	r0, .L70+8
 1053 002e FFF7FEFF 		bl	f_lseek
 1054              	.LVL104:
 1055              		.loc 1 343 11 discriminator 1 view .LVU272
 1056 0032 3B4B     		ldr	r3, .L70+4
 1057 0034 1870     		strb	r0, [r3]
 344:Src/File_Handling.c **** 		if (fresult != FR_OK)
 1058              		.loc 1 344 3 is_stmt 1 view .LVU273
 1059              		.loc 1 344 6 is_stmt 0 view .LVU274
 1060 0036 58B3     		cbz	r0, .L61
 1061              	.LBB15:
 345:Src/File_Handling.c **** 		{
 346:Src/File_Handling.c **** 			char *buf = malloc(100*sizeof(char));
 1062              		.loc 1 346 4 is_stmt 1 view .LVU275
 1063              		.loc 1 346 16 is_stmt 0 view .LVU276
 1064 0038 6420     		movs	r0, #100
 1065 003a FFF7FEFF 		bl	malloc
 1066              	.LVL105:
 1067 003e 0546     		mov	r5, r0
 1068              	.LVL106:
 347:Src/File_Handling.c **** 			//free(buffer);
 348:Src/File_Handling.c **** 		 	sprintf (buf, "ERROR!!! Can't seek the file:   *%s*\n\n", name);
 1069              		.loc 1 348 5 is_stmt 1 view .LVU277
 1070 0040 2246     		mov	r2, r4
 1071 0042 3949     		ldr	r1, .L70+12
 1072 0044 FFF7FEFF 		bl	sprintf
 1073              	.LVL107:
 349:Src/File_Handling.c **** 		  //Send_Uart(buffer);
 350:Src/File_Handling.c **** 		  free(buf);
 1074              		.loc 1 350 5 view .LVU278
 1075 0048 2846     		mov	r0, r5
 1076 004a FFF7FEFF 		bl	free
 1077              	.LVL108:
 351:Src/File_Handling.c **** 			return fresult;
 1078              		.loc 1 351 4 view .LVU279
 1079              		.loc 1 351 11 is_stmt 0 view .LVU280
 1080 004e 344B     		ldr	r3, .L70+4
 1081 0050 1878     		ldrb	r0, [r3]	@ zero_extendqisi2
 1082 0052 0CE0     		b	.L59
 1083              	.LVL109:
 1084              	.L67:
 1085              		.loc 1 351 11 view .LVU281
 1086              	.LBE15:
 1087              	.LBB16:
 318:Src/File_Handling.c **** 		sprintf (buf, "ERRROR!!! *%s* does not exists\n\n", name);
ARM GAS  /tmp/ccnfjbri.s 			page 29


 1088              		.loc 1 318 3 is_stmt 1 view .LVU282
 318:Src/File_Handling.c **** 		sprintf (buf, "ERRROR!!! *%s* does not exists\n\n", name);
 1089              		.loc 1 318 15 is_stmt 0 view .LVU283
 1090 0054 6420     		movs	r0, #100
 1091 0056 FFF7FEFF 		bl	malloc
 1092              	.LVL110:
 1093 005a 0546     		mov	r5, r0
 1094              	.LVL111:
 319:Src/File_Handling.c **** 		//Send_Uart (buf);
 1095              		.loc 1 319 3 is_stmt 1 view .LVU284
 1096 005c 2246     		mov	r2, r4
 1097 005e 3349     		ldr	r1, .L70+16
 1098 0060 FFF7FEFF 		bl	sprintf
 1099              	.LVL112:
 321:Src/File_Handling.c **** 	    return fresult;
 1100              		.loc 1 321 3 view .LVU285
 1101 0064 2846     		mov	r0, r5
 1102 0066 FFF7FEFF 		bl	free
 1103              	.LVL113:
 322:Src/File_Handling.c **** 	}
 1104              		.loc 1 322 6 view .LVU286
 322:Src/File_Handling.c **** 	}
 1105              		.loc 1 322 13 is_stmt 0 view .LVU287
 1106 006a 2D4B     		ldr	r3, .L70+4
 1107 006c 1878     		ldrb	r0, [r3]	@ zero_extendqisi2
 1108              	.LVL114:
 1109              	.L59:
 322:Src/File_Handling.c **** 	}
 1110              		.loc 1 322 13 view .LVU288
 1111              	.LBE16:
 352:Src/File_Handling.c **** 		}
 353:Src/File_Handling.c **** 		fresult = f_read (&fil, data, bytesize, &br);
 354:Src/File_Handling.c **** 		if (fresult != FR_OK)
 355:Src/File_Handling.c **** 		{
 356:Src/File_Handling.c **** 			char *buf = malloc(100*sizeof(char));
 357:Src/File_Handling.c **** 			//free(buffer);
 358:Src/File_Handling.c **** 		 	sprintf (buf, "ERROR!!! No. %d in reading file *%s*\n\n", fresult, name);
 359:Src/File_Handling.c **** 		  //Send_Uart(buffer);
 360:Src/File_Handling.c **** 		  free(buf);
 361:Src/File_Handling.c **** 			
 362:Src/File_Handling.c **** 		}
 363:Src/File_Handling.c **** 
 364:Src/File_Handling.c **** 		else
 365:Src/File_Handling.c **** 		{
 366:Src/File_Handling.c **** 			//Send_Uart(buffer);
 367:Src/File_Handling.c **** 			//free(buffer);
 368:Src/File_Handling.c **** 			if (goto_label==0)//Set size of file in first 4 bytes
 369:Src/File_Handling.c **** 			{
 370:Src/File_Handling.c **** 				sizeoffile = f_size(&fil);
 371:Src/File_Handling.c **** 				data[0] = (uint8_t) (sizeoffile&0xff);
 372:Src/File_Handling.c **** 				data[1] = (uint8_t) ((sizeoffile>>8)&0xff);
 373:Src/File_Handling.c **** 				data[2] = (uint8_t) ((sizeoffile>>16)&0xff);
 374:Src/File_Handling.c **** 				data[3] = (uint8_t) ((sizeoffile>>24)&0xff);
 375:Src/File_Handling.c **** 			}
 376:Src/File_Handling.c **** 			
 377:Src/File_Handling.c **** 			/* Close file */
 378:Src/File_Handling.c **** 			fresult = f_close(&fil);
ARM GAS  /tmp/ccnfjbri.s 			page 30


 379:Src/File_Handling.c **** 			if (fresult != FR_OK)
 380:Src/File_Handling.c **** 			{
 381:Src/File_Handling.c **** 				char *buf = malloc(100*sizeof(char));
 382:Src/File_Handling.c **** 				sprintf (buf, "ERROR!!! No. %d in closing file *%s*\n\n", fresult, name);
 383:Src/File_Handling.c **** 				//Send_Uart(buf);
 384:Src/File_Handling.c **** 				free(buf);
 385:Src/File_Handling.c **** 			}
 386:Src/File_Handling.c **** 			else
 387:Src/File_Handling.c **** 			{
 388:Src/File_Handling.c **** 				char *buf = malloc(100*sizeof(char));
 389:Src/File_Handling.c **** 				sprintf (buf, "File *%s* CLOSED successfully\n", name);
 390:Src/File_Handling.c **** 				//Send_Uart(buf);
 391:Src/File_Handling.c **** 				free(buf);
 392:Src/File_Handling.c **** 			}
 393:Src/File_Handling.c **** 		}
 394:Src/File_Handling.c **** 	    return fresult;
 395:Src/File_Handling.c **** 	}
 396:Src/File_Handling.c **** }
 1112              		.loc 1 396 1 view .LVU289
 1113 006e BDE8F081 		pop	{r4, r5, r6, r7, r8, pc}
 1114              	.LVL115:
 1115              	.L68:
 1116              	.LBB17:
 332:Src/File_Handling.c **** 			sprintf (buf, "ERROR!!! No. %d in opening file *%s*\n\n", fresult, name);
 1117              		.loc 1 332 4 is_stmt 1 view .LVU290
 332:Src/File_Handling.c **** 			sprintf (buf, "ERROR!!! No. %d in opening file *%s*\n\n", fresult, name);
 1118              		.loc 1 332 16 is_stmt 0 view .LVU291
 1119 0072 6420     		movs	r0, #100
 1120 0074 FFF7FEFF 		bl	malloc
 1121              	.LVL116:
 1122 0078 0546     		mov	r5, r0
 1123              	.LVL117:
 333:Src/File_Handling.c **** 		    //Send_Uart(buf);
 1124              		.loc 1 333 4 is_stmt 1 view .LVU292
 1125 007a 2346     		mov	r3, r4
 1126 007c 3246     		mov	r2, r6
 1127 007e 2C49     		ldr	r1, .L70+20
 1128 0080 FFF7FEFF 		bl	sprintf
 1129              	.LVL118:
 335:Src/File_Handling.c **** 		    return fresult;
 1130              		.loc 1 335 7 view .LVU293
 1131 0084 2846     		mov	r0, r5
 1132 0086 FFF7FEFF 		bl	free
 1133              	.LVL119:
 336:Src/File_Handling.c **** 		}
 1134              		.loc 1 336 7 view .LVU294
 336:Src/File_Handling.c **** 		}
 1135              		.loc 1 336 14 is_stmt 0 view .LVU295
 1136 008a 254B     		ldr	r3, .L70+4
 1137 008c 1878     		ldrb	r0, [r3]	@ zero_extendqisi2
 1138 008e EEE7     		b	.L59
 1139              	.LVL120:
 1140              	.L61:
 336:Src/File_Handling.c **** 		}
 1141              		.loc 1 336 14 view .LVU296
 1142              	.LBE17:
 353:Src/File_Handling.c **** 		if (fresult != FR_OK)
ARM GAS  /tmp/ccnfjbri.s 			page 31


 1143              		.loc 1 353 3 is_stmt 1 view .LVU297
 353:Src/File_Handling.c **** 		if (fresult != FR_OK)
 1144              		.loc 1 353 13 is_stmt 0 view .LVU298
 1145 0090 284B     		ldr	r3, .L70+24
 1146 0092 4246     		mov	r2, r8
 1147 0094 3946     		mov	r1, r7
 1148 0096 2348     		ldr	r0, .L70+8
 1149 0098 FFF7FEFF 		bl	f_read
 1150              	.LVL121:
 1151 009c 0646     		mov	r6, r0
 353:Src/File_Handling.c **** 		if (fresult != FR_OK)
 1152              		.loc 1 353 11 discriminator 1 view .LVU299
 1153 009e 204B     		ldr	r3, .L70+4
 1154 00a0 1870     		strb	r0, [r3]
 354:Src/File_Handling.c **** 		{
 1155              		.loc 1 354 3 is_stmt 1 view .LVU300
 354:Src/File_Handling.c **** 		{
 1156              		.loc 1 354 6 is_stmt 0 view .LVU301
 1157 00a2 08BB     		cbnz	r0, .L69
 368:Src/File_Handling.c **** 			{
 1158              		.loc 1 368 4 is_stmt 1 view .LVU302
 368:Src/File_Handling.c **** 			{
 1159              		.loc 1 368 7 is_stmt 0 view .LVU303
 1160 00a4 55B9     		cbnz	r5, .L64
 370:Src/File_Handling.c **** 				data[0] = (uint8_t) (sizeoffile&0xff);
 1161              		.loc 1 370 5 is_stmt 1 view .LVU304
 370:Src/File_Handling.c **** 				data[0] = (uint8_t) (sizeoffile&0xff);
 1162              		.loc 1 370 18 is_stmt 0 view .LVU305
 1163 00a6 1F4B     		ldr	r3, .L70+8
 1164 00a8 DA68     		ldr	r2, [r3, #12]
 370:Src/File_Handling.c **** 				data[0] = (uint8_t) (sizeoffile&0xff);
 1165              		.loc 1 370 16 view .LVU306
 1166 00aa 234B     		ldr	r3, .L70+28
 1167 00ac 1A60     		str	r2, [r3]
 371:Src/File_Handling.c **** 				data[1] = (uint8_t) ((sizeoffile>>8)&0xff);
 1168              		.loc 1 371 5 is_stmt 1 view .LVU307
 371:Src/File_Handling.c **** 				data[1] = (uint8_t) ((sizeoffile>>8)&0xff);
 1169              		.loc 1 371 13 is_stmt 0 view .LVU308
 1170 00ae 3A70     		strb	r2, [r7]
 372:Src/File_Handling.c **** 				data[2] = (uint8_t) ((sizeoffile>>16)&0xff);
 1171              		.loc 1 372 5 is_stmt 1 view .LVU309
 372:Src/File_Handling.c **** 				data[2] = (uint8_t) ((sizeoffile>>16)&0xff);
 1172              		.loc 1 372 15 is_stmt 0 view .LVU310
 1173 00b0 5A78     		ldrb	r2, [r3, #1]	@ zero_extendqisi2
 372:Src/File_Handling.c **** 				data[2] = (uint8_t) ((sizeoffile>>16)&0xff);
 1174              		.loc 1 372 13 view .LVU311
 1175 00b2 7A70     		strb	r2, [r7, #1]
 373:Src/File_Handling.c **** 				data[3] = (uint8_t) ((sizeoffile>>24)&0xff);
 1176              		.loc 1 373 5 is_stmt 1 view .LVU312
 373:Src/File_Handling.c **** 				data[3] = (uint8_t) ((sizeoffile>>24)&0xff);
 1177              		.loc 1 373 15 is_stmt 0 view .LVU313
 1178 00b4 9A78     		ldrb	r2, [r3, #2]	@ zero_extendqisi2
 373:Src/File_Handling.c **** 				data[3] = (uint8_t) ((sizeoffile>>24)&0xff);
 1179              		.loc 1 373 13 view .LVU314
 1180 00b6 BA70     		strb	r2, [r7, #2]
 374:Src/File_Handling.c **** 			}
 1181              		.loc 1 374 5 is_stmt 1 view .LVU315
ARM GAS  /tmp/ccnfjbri.s 			page 32


 374:Src/File_Handling.c **** 			}
 1182              		.loc 1 374 15 is_stmt 0 view .LVU316
 1183 00b8 DB78     		ldrb	r3, [r3, #3]	@ zero_extendqisi2
 374:Src/File_Handling.c **** 			}
 1184              		.loc 1 374 13 view .LVU317
 1185 00ba FB70     		strb	r3, [r7, #3]
 1186              	.L64:
 378:Src/File_Handling.c **** 			if (fresult != FR_OK)
 1187              		.loc 1 378 4 is_stmt 1 view .LVU318
 378:Src/File_Handling.c **** 			if (fresult != FR_OK)
 1188              		.loc 1 378 14 is_stmt 0 view .LVU319
 1189 00bc 1948     		ldr	r0, .L70+8
 1190 00be FFF7FEFF 		bl	f_close
 1191              	.LVL122:
 1192 00c2 0546     		mov	r5, r0
 1193              	.LVL123:
 378:Src/File_Handling.c **** 			if (fresult != FR_OK)
 1194              		.loc 1 378 12 discriminator 1 view .LVU320
 1195 00c4 164B     		ldr	r3, .L70+4
 1196 00c6 1870     		strb	r0, [r3]
 379:Src/File_Handling.c **** 			{
 1197              		.loc 1 379 4 is_stmt 1 view .LVU321
 379:Src/File_Handling.c **** 			{
 1198              		.loc 1 379 7 is_stmt 0 view .LVU322
 1199 00c8 D8B1     		cbz	r0, .L65
 1200              	.LBB18:
 381:Src/File_Handling.c **** 				sprintf (buf, "ERROR!!! No. %d in closing file *%s*\n\n", fresult, name);
 1201              		.loc 1 381 5 is_stmt 1 view .LVU323
 381:Src/File_Handling.c **** 				sprintf (buf, "ERROR!!! No. %d in closing file *%s*\n\n", fresult, name);
 1202              		.loc 1 381 17 is_stmt 0 view .LVU324
 1203 00ca 6420     		movs	r0, #100
 1204 00cc FFF7FEFF 		bl	malloc
 1205              	.LVL124:
 1206 00d0 0646     		mov	r6, r0
 1207              	.LVL125:
 382:Src/File_Handling.c **** 				//Send_Uart(buf);
 1208              		.loc 1 382 5 is_stmt 1 view .LVU325
 1209 00d2 2346     		mov	r3, r4
 1210 00d4 2A46     		mov	r2, r5
 1211 00d6 1949     		ldr	r1, .L70+32
 1212 00d8 FFF7FEFF 		bl	sprintf
 1213              	.LVL126:
 384:Src/File_Handling.c **** 			}
 1214              		.loc 1 384 5 view .LVU326
 1215 00dc 3046     		mov	r0, r6
 1216 00de FFF7FEFF 		bl	free
 1217              	.LVL127:
 1218              	.L63:
 384:Src/File_Handling.c **** 			}
 1219              		.loc 1 384 5 is_stmt 0 view .LVU327
 1220              	.LBE18:
 394:Src/File_Handling.c **** 	}
 1221              		.loc 1 394 6 is_stmt 1 view .LVU328
 394:Src/File_Handling.c **** 	}
 1222              		.loc 1 394 13 is_stmt 0 view .LVU329
 1223 00e2 0F4B     		ldr	r3, .L70+4
 1224 00e4 1878     		ldrb	r0, [r3]	@ zero_extendqisi2
ARM GAS  /tmp/ccnfjbri.s 			page 33


 1225 00e6 C2E7     		b	.L59
 1226              	.LVL128:
 1227              	.L69:
 1228              	.LBB19:
 356:Src/File_Handling.c **** 			//free(buffer);
 1229              		.loc 1 356 4 is_stmt 1 view .LVU330
 356:Src/File_Handling.c **** 			//free(buffer);
 1230              		.loc 1 356 16 is_stmt 0 view .LVU331
 1231 00e8 6420     		movs	r0, #100
 1232 00ea FFF7FEFF 		bl	malloc
 1233              	.LVL129:
 1234 00ee 0546     		mov	r5, r0
 1235              	.LVL130:
 358:Src/File_Handling.c **** 		  //Send_Uart(buffer);
 1236              		.loc 1 358 5 is_stmt 1 view .LVU332
 1237 00f0 2346     		mov	r3, r4
 1238 00f2 3246     		mov	r2, r6
 1239 00f4 1249     		ldr	r1, .L70+36
 1240 00f6 FFF7FEFF 		bl	sprintf
 1241              	.LVL131:
 360:Src/File_Handling.c **** 			
 1242              		.loc 1 360 5 view .LVU333
 1243 00fa 2846     		mov	r0, r5
 1244 00fc FFF7FEFF 		bl	free
 1245              	.LVL132:
 1246              	.LBE19:
 1247 0100 EFE7     		b	.L63
 1248              	.LVL133:
 1249              	.L65:
 1250              	.LBB20:
 388:Src/File_Handling.c **** 				sprintf (buf, "File *%s* CLOSED successfully\n", name);
 1251              		.loc 1 388 5 view .LVU334
 388:Src/File_Handling.c **** 				sprintf (buf, "File *%s* CLOSED successfully\n", name);
 1252              		.loc 1 388 17 is_stmt 0 view .LVU335
 1253 0102 6420     		movs	r0, #100
 1254 0104 FFF7FEFF 		bl	malloc
 1255              	.LVL134:
 1256 0108 0546     		mov	r5, r0
 1257              	.LVL135:
 389:Src/File_Handling.c **** 				//Send_Uart(buf);
 1258              		.loc 1 389 5 is_stmt 1 view .LVU336
 1259 010a 2246     		mov	r2, r4
 1260 010c 0D49     		ldr	r1, .L70+40
 1261 010e FFF7FEFF 		bl	sprintf
 1262              	.LVL136:
 391:Src/File_Handling.c **** 			}
 1263              		.loc 1 391 5 view .LVU337
 1264 0112 2846     		mov	r0, r5
 1265 0114 FFF7FEFF 		bl	free
 1266              	.LVL137:
 1267 0118 E3E7     		b	.L63
 1268              	.L71:
 1269 011a 00BF     		.align	2
 1270              	.L70:
 1271 011c 00000000 		.word	fno
 1272 0120 00000000 		.word	fresult
 1273 0124 00000000 		.word	fil
ARM GAS  /tmp/ccnfjbri.s 			page 34


 1274 0128 00000000 		.word	.LC10
 1275 012c 00000000 		.word	.LC5
 1276 0130 24000000 		.word	.LC6
 1277 0134 00000000 		.word	br
 1278 0138 00000000 		.word	sizeoffile
 1279 013c 74000000 		.word	.LC8
 1280 0140 4C000000 		.word	.LC7
 1281 0144 9C000000 		.word	.LC9
 1282              	.LBE20:
 1283              		.cfi_endproc
 1284              	.LFE1194:
 1286              		.section	.text.Create_File,"ax",%progbits
 1287              		.align	1
 1288              		.global	Create_File
 1289              		.syntax unified
 1290              		.thumb
 1291              		.thumb_func
 1293              	Create_File:
 1294              	.LVL138:
 1295              	.LFB1195:
 397:Src/File_Handling.c **** 
 398:Src/File_Handling.c **** FRESULT Create_File (char *name)
 399:Src/File_Handling.c **** {
 1296              		.loc 1 399 1 view -0
 1297              		.cfi_startproc
 1298              		@ args = 0, pretend = 0, frame = 0
 1299              		@ frame_needed = 0, uses_anonymous_args = 0
 1300              		.loc 1 399 1 is_stmt 0 view .LVU339
 1301 0000 10B5     		push	{r4, lr}
 1302              	.LCFI12:
 1303              		.cfi_def_cfa_offset 8
 1304              		.cfi_offset 4, -8
 1305              		.cfi_offset 14, -4
 1306 0002 0446     		mov	r4, r0
 400:Src/File_Handling.c **** 	fresult = f_stat (name, &fno);
 1307              		.loc 1 400 2 is_stmt 1 view .LVU340
 1308              		.loc 1 400 12 is_stmt 0 view .LVU341
 1309 0004 0C49     		ldr	r1, .L77
 1310 0006 FFF7FEFF 		bl	f_stat
 1311              	.LVL139:
 1312              		.loc 1 400 10 discriminator 1 view .LVU342
 1313 000a 0C4B     		ldr	r3, .L77+4
 1314 000c 1870     		strb	r0, [r3]
 401:Src/File_Handling.c **** 	if (fresult == FR_OK)
 1315              		.loc 1 401 2 is_stmt 1 view .LVU343
 1316              		.loc 1 401 5 is_stmt 0 view .LVU344
 1317 000e 08B9     		cbnz	r0, .L73
 1318              	.LBB21:
 402:Src/File_Handling.c **** 	{
 403:Src/File_Handling.c **** 		char *buf = malloc(100*sizeof(char));
 1319              		.loc 1 403 3 is_stmt 1 view .LVU345
 404:Src/File_Handling.c **** 		//sprintf (buf, "ERROR!!! *%s* already exists!!!!\n use Update_File \n\n",name);
 405:Src/File_Handling.c **** 		//Send_Uart(buf);
 406:Src/File_Handling.c **** 		free(buf);
 1320              		.loc 1 406 3 view .LVU346
 407:Src/File_Handling.c **** 	    return fresult;
 1321              		.loc 1 407 6 view .LVU347
ARM GAS  /tmp/ccnfjbri.s 			page 35


 1322              		.loc 1 407 13 is_stmt 0 view .LVU348
 1323 0010 C0B2     		uxtb	r0, r0
 1324              	.L74:
 1325              	.LBE21:
 408:Src/File_Handling.c **** 	}
 409:Src/File_Handling.c **** 	else
 410:Src/File_Handling.c **** 	{
 411:Src/File_Handling.c **** 		fresult = f_open(&fil, name, FA_CREATE_ALWAYS|FA_READ|FA_WRITE);
 412:Src/File_Handling.c **** 		if (fresult != FR_OK)
 413:Src/File_Handling.c **** 		{
 414:Src/File_Handling.c **** 			char *buf = malloc(100*sizeof(char));
 415:Src/File_Handling.c **** 			//sprintf (buf, "ERROR!!! No. %d in creating file *%s*\n\n", fresult, name);
 416:Src/File_Handling.c **** 			//Send_Uart(buf);
 417:Src/File_Handling.c **** 			free(buf);
 418:Src/File_Handling.c **** 		    return fresult;
 419:Src/File_Handling.c **** 		}
 420:Src/File_Handling.c **** 		else
 421:Src/File_Handling.c **** 		{
 422:Src/File_Handling.c **** 			char *buf = malloc(100*sizeof(char));
 423:Src/File_Handling.c **** 			//sprintf (buf, "*%s* created successfully\n Now use Write_File to write data\n",name);
 424:Src/File_Handling.c **** 			//Send_Uart(buf);
 425:Src/File_Handling.c **** 			free(buf);
 426:Src/File_Handling.c **** 		}
 427:Src/File_Handling.c **** 
 428:Src/File_Handling.c **** 		fresult = f_close(&fil);
 429:Src/File_Handling.c **** 		if (fresult != FR_OK)
 430:Src/File_Handling.c **** 		{
 431:Src/File_Handling.c **** 			char *buf = malloc(100*sizeof(char));
 432:Src/File_Handling.c **** 			//sprintf (buf, "ERROR No. %d in closing file *%s*\n\n", fresult, name);
 433:Src/File_Handling.c **** 			//Send_Uart(buf);
 434:Src/File_Handling.c **** 			free(buf);
 435:Src/File_Handling.c **** 		}
 436:Src/File_Handling.c **** 		else
 437:Src/File_Handling.c **** 		{
 438:Src/File_Handling.c **** 			char *buf = malloc(100*sizeof(char));
 439:Src/File_Handling.c **** 			//sprintf (buf, "File *%s* CLOSED successfully\n", name);
 440:Src/File_Handling.c **** 			//Send_Uart(buf);
 441:Src/File_Handling.c **** 			free(buf);
 442:Src/File_Handling.c **** 		}
 443:Src/File_Handling.c **** 	}
 444:Src/File_Handling.c ****     return fresult;
 445:Src/File_Handling.c **** }
 1326              		.loc 1 445 1 view .LVU349
 1327 0012 10BD     		pop	{r4, pc}
 1328              	.LVL140:
 1329              	.L73:
 411:Src/File_Handling.c **** 		if (fresult != FR_OK)
 1330              		.loc 1 411 3 is_stmt 1 view .LVU350
 411:Src/File_Handling.c **** 		if (fresult != FR_OK)
 1331              		.loc 1 411 13 is_stmt 0 view .LVU351
 1332 0014 0B22     		movs	r2, #11
 1333 0016 2146     		mov	r1, r4
 1334 0018 0948     		ldr	r0, .L77+8
 1335 001a FFF7FEFF 		bl	f_open
 1336              	.LVL141:
 411:Src/File_Handling.c **** 		if (fresult != FR_OK)
 1337              		.loc 1 411 11 discriminator 1 view .LVU352
ARM GAS  /tmp/ccnfjbri.s 			page 36


 1338 001e 074B     		ldr	r3, .L77+4
 1339 0020 1870     		strb	r0, [r3]
 412:Src/File_Handling.c **** 		{
 1340              		.loc 1 412 3 is_stmt 1 view .LVU353
 412:Src/File_Handling.c **** 		{
 1341              		.loc 1 412 6 is_stmt 0 view .LVU354
 1342 0022 08B1     		cbz	r0, .L75
 1343              	.LBB22:
 414:Src/File_Handling.c **** 			//sprintf (buf, "ERROR!!! No. %d in creating file *%s*\n\n", fresult, name);
 1344              		.loc 1 414 4 is_stmt 1 view .LVU355
 417:Src/File_Handling.c **** 		    return fresult;
 1345              		.loc 1 417 4 view .LVU356
 418:Src/File_Handling.c **** 		}
 1346              		.loc 1 418 7 view .LVU357
 418:Src/File_Handling.c **** 		}
 1347              		.loc 1 418 14 is_stmt 0 view .LVU358
 1348 0024 C0B2     		uxtb	r0, r0
 1349 0026 F4E7     		b	.L74
 1350              	.L75:
 1351              	.LBE22:
 422:Src/File_Handling.c **** 			//sprintf (buf, "*%s* created successfully\n Now use Write_File to write data\n",name);
 1352              		.loc 1 422 4 is_stmt 1 view .LVU359
 425:Src/File_Handling.c **** 		}
 1353              		.loc 1 425 4 view .LVU360
 428:Src/File_Handling.c **** 		if (fresult != FR_OK)
 1354              		.loc 1 428 3 view .LVU361
 428:Src/File_Handling.c **** 		if (fresult != FR_OK)
 1355              		.loc 1 428 13 is_stmt 0 view .LVU362
 1356 0028 0548     		ldr	r0, .L77+8
 1357 002a FFF7FEFF 		bl	f_close
 1358              	.LVL142:
 428:Src/File_Handling.c **** 		if (fresult != FR_OK)
 1359              		.loc 1 428 11 discriminator 1 view .LVU363
 1360 002e 034B     		ldr	r3, .L77+4
 1361 0030 1870     		strb	r0, [r3]
 429:Src/File_Handling.c **** 		{
 1362              		.loc 1 429 3 is_stmt 1 view .LVU364
 438:Src/File_Handling.c **** 			//sprintf (buf, "File *%s* CLOSED successfully\n", name);
 1363              		.loc 1 438 4 view .LVU365
 441:Src/File_Handling.c **** 		}
 1364              		.loc 1 441 4 view .LVU366
 444:Src/File_Handling.c **** }
 1365              		.loc 1 444 5 view .LVU367
 444:Src/File_Handling.c **** }
 1366              		.loc 1 444 12 is_stmt 0 view .LVU368
 1367 0032 C0B2     		uxtb	r0, r0
 1368 0034 EDE7     		b	.L74
 1369              	.L78:
 1370 0036 00BF     		.align	2
 1371              	.L77:
 1372 0038 00000000 		.word	fno
 1373 003c 00000000 		.word	fresult
 1374 0040 00000000 		.word	fil
 1375              		.cfi_endproc
 1376              	.LFE1195:
 1378              		.section	.text.Update_File,"ax",%progbits
 1379              		.align	1
ARM GAS  /tmp/ccnfjbri.s 			page 37


 1380              		.global	Update_File
 1381              		.syntax unified
 1382              		.thumb
 1383              		.thumb_func
 1385              	Update_File:
 1386              	.LVL143:
 1387              	.LFB1196:
 446:Src/File_Handling.c **** 
 447:Src/File_Handling.c **** FRESULT Update_File (char *name, char *data)
 448:Src/File_Handling.c **** {
 1388              		.loc 1 448 1 is_stmt 1 view -0
 1389              		.cfi_startproc
 1390              		@ args = 0, pretend = 0, frame = 0
 1391              		@ frame_needed = 0, uses_anonymous_args = 0
 1392              		.loc 1 448 1 is_stmt 0 view .LVU370
 1393 0000 70B5     		push	{r4, r5, r6, lr}
 1394              	.LCFI13:
 1395              		.cfi_def_cfa_offset 16
 1396              		.cfi_offset 4, -16
 1397              		.cfi_offset 5, -12
 1398              		.cfi_offset 6, -8
 1399              		.cfi_offset 14, -4
 1400 0002 0446     		mov	r4, r0
 1401 0004 0D46     		mov	r5, r1
 449:Src/File_Handling.c **** 	/**** check whether the file exists or not ****/
 450:Src/File_Handling.c **** 	fresult = f_stat (name, &fno);
 1402              		.loc 1 450 2 is_stmt 1 view .LVU371
 1403              		.loc 1 450 12 is_stmt 0 view .LVU372
 1404 0006 1249     		ldr	r1, .L84
 1405              	.LVL144:
 1406              		.loc 1 450 12 view .LVU373
 1407 0008 FFF7FEFF 		bl	f_stat
 1408              	.LVL145:
 1409              		.loc 1 450 10 discriminator 1 view .LVU374
 1410 000c 114B     		ldr	r3, .L84+4
 1411 000e 1870     		strb	r0, [r3]
 451:Src/File_Handling.c **** 	if (fresult != FR_OK)
 1412              		.loc 1 451 2 is_stmt 1 view .LVU375
 1413              		.loc 1 451 5 is_stmt 0 view .LVU376
 1414 0010 08B1     		cbz	r0, .L80
 1415              	.LBB23:
 452:Src/File_Handling.c **** 	{
 453:Src/File_Handling.c **** 		char *buf = malloc(100*sizeof(char));
 1416              		.loc 1 453 3 is_stmt 1 view .LVU377
 454:Src/File_Handling.c **** 		//sprintf (buf, "ERROR!!! *%s* does not exists\n\n", name);
 455:Src/File_Handling.c **** 		//Send_Uart (buf);
 456:Src/File_Handling.c **** 		free(buf);
 1417              		.loc 1 456 3 view .LVU378
 457:Src/File_Handling.c **** 	    return fresult;
 1418              		.loc 1 457 6 view .LVU379
 1419              		.loc 1 457 13 is_stmt 0 view .LVU380
 1420 0012 C0B2     		uxtb	r0, r0
 1421              	.LVL146:
 1422              	.L81:
 1423              		.loc 1 457 13 view .LVU381
 1424              	.LBE23:
 458:Src/File_Handling.c **** 	}
ARM GAS  /tmp/ccnfjbri.s 			page 38


 459:Src/File_Handling.c **** 
 460:Src/File_Handling.c **** 	else
 461:Src/File_Handling.c **** 	{
 462:Src/File_Handling.c **** 		 /* Create a file with read write access and open it */
 463:Src/File_Handling.c **** 	    fresult = f_open(&fil, name, FA_OPEN_APPEND | FA_WRITE);
 464:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 465:Src/File_Handling.c **** 	    {
 466:Src/File_Handling.c **** 	    	char *buf = malloc(100*sizeof(char));
 467:Src/File_Handling.c **** 	    	//sprintf (buf, "ERROR!!! No. %d in opening file *%s*\n\n", fresult, name);
 468:Src/File_Handling.c **** 	    	//Send_Uart(buf);
 469:Src/File_Handling.c **** 	        free(buf);
 470:Src/File_Handling.c **** 	        return fresult;
 471:Src/File_Handling.c **** 	    }
 472:Src/File_Handling.c **** 
 473:Src/File_Handling.c **** 	    /* Writing text */
 474:Src/File_Handling.c **** 	    fresult = f_write(&fil, data, strlen (data), &bw);
 475:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 476:Src/File_Handling.c **** 	    {
 477:Src/File_Handling.c **** 	    	char *buf = malloc(100*sizeof(char));
 478:Src/File_Handling.c **** 	    	//sprintf (buf, "ERROR!!! No. %d in writing file *%s*\n\n", fresult, name);
 479:Src/File_Handling.c **** 	    	//Send_Uart(buf);
 480:Src/File_Handling.c **** 	    	free(buf);
 481:Src/File_Handling.c **** 	    }
 482:Src/File_Handling.c **** 
 483:Src/File_Handling.c **** 	    else
 484:Src/File_Handling.c **** 	    {
 485:Src/File_Handling.c **** 	    	char *buf = malloc(100*sizeof(char));
 486:Src/File_Handling.c **** 	    	//sprintf (buf, "*%s* UPDATED successfully\n", name);
 487:Src/File_Handling.c **** 	    	//Send_Uart(buf);
 488:Src/File_Handling.c **** 	    	free(buf);
 489:Src/File_Handling.c **** 	    }
 490:Src/File_Handling.c **** 
 491:Src/File_Handling.c **** 	    /* Close file */
 492:Src/File_Handling.c **** 	    fresult = f_close(&fil);
 493:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 494:Src/File_Handling.c **** 	    {
 495:Src/File_Handling.c **** 	    	char *buf = malloc(100*sizeof(char));
 496:Src/File_Handling.c **** 	    	//sprintf (buf, "ERROR!!! No. %d in closing file *%s*\n\n", fresult, name);
 497:Src/File_Handling.c **** 	    	//Send_Uart(buf);
 498:Src/File_Handling.c **** 	    	free(buf);
 499:Src/File_Handling.c **** 	    }
 500:Src/File_Handling.c **** 	    else
 501:Src/File_Handling.c **** 	    {
 502:Src/File_Handling.c **** 	    	char *buf = malloc(100*sizeof(char));
 503:Src/File_Handling.c **** 	    	//sprintf (buf, "File *%s* CLOSED successfully\n", name);
 504:Src/File_Handling.c **** 	    	//Send_Uart(buf);
 505:Src/File_Handling.c **** 	    	free(buf);
 506:Src/File_Handling.c **** 	     }
 507:Src/File_Handling.c **** 	}
 508:Src/File_Handling.c ****     return fresult;
 509:Src/File_Handling.c **** }
 1425              		.loc 1 509 1 view .LVU382
 1426 0014 70BD     		pop	{r4, r5, r6, pc}
 1427              	.LVL147:
 1428              	.L80:
 463:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1429              		.loc 1 463 6 is_stmt 1 view .LVU383
ARM GAS  /tmp/ccnfjbri.s 			page 39


 463:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1430              		.loc 1 463 16 is_stmt 0 view .LVU384
 1431 0016 3222     		movs	r2, #50
 1432 0018 2146     		mov	r1, r4
 1433 001a 0F48     		ldr	r0, .L84+8
 1434 001c FFF7FEFF 		bl	f_open
 1435              	.LVL148:
 463:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1436              		.loc 1 463 14 discriminator 1 view .LVU385
 1437 0020 0C4B     		ldr	r3, .L84+4
 1438 0022 1870     		strb	r0, [r3]
 464:Src/File_Handling.c **** 	    {
 1439              		.loc 1 464 6 is_stmt 1 view .LVU386
 464:Src/File_Handling.c **** 	    {
 1440              		.loc 1 464 9 is_stmt 0 view .LVU387
 1441 0024 08B1     		cbz	r0, .L82
 1442              	.LBB24:
 466:Src/File_Handling.c **** 	    	//sprintf (buf, "ERROR!!! No. %d in opening file *%s*\n\n", fresult, name);
 1443              		.loc 1 466 7 is_stmt 1 view .LVU388
 469:Src/File_Handling.c **** 	        return fresult;
 1444              		.loc 1 469 10 view .LVU389
 470:Src/File_Handling.c **** 	    }
 1445              		.loc 1 470 10 view .LVU390
 470:Src/File_Handling.c **** 	    }
 1446              		.loc 1 470 17 is_stmt 0 view .LVU391
 1447 0026 C0B2     		uxtb	r0, r0
 1448 0028 F4E7     		b	.L81
 1449              	.L82:
 1450              	.LBE24:
 474:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1451              		.loc 1 474 6 is_stmt 1 view .LVU392
 474:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1452              		.loc 1 474 16 is_stmt 0 view .LVU393
 1453 002a 2846     		mov	r0, r5
 1454 002c FFF7FEFF 		bl	strlen
 1455              	.LVL149:
 1456 0030 0246     		mov	r2, r0
 474:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1457              		.loc 1 474 16 discriminator 1 view .LVU394
 1458 0032 094E     		ldr	r6, .L84+8
 1459 0034 094B     		ldr	r3, .L84+12
 1460 0036 2946     		mov	r1, r5
 1461 0038 3046     		mov	r0, r6
 1462 003a FFF7FEFF 		bl	f_write
 1463              	.LVL150:
 474:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1464              		.loc 1 474 14 discriminator 2 view .LVU395
 1465 003e 054C     		ldr	r4, .L84+4
 1466              	.LVL151:
 474:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1467              		.loc 1 474 14 discriminator 2 view .LVU396
 1468 0040 2070     		strb	r0, [r4]
 475:Src/File_Handling.c **** 	    {
 1469              		.loc 1 475 6 is_stmt 1 view .LVU397
 485:Src/File_Handling.c **** 	    	//sprintf (buf, "*%s* UPDATED successfully\n", name);
 1470              		.loc 1 485 7 view .LVU398
 488:Src/File_Handling.c **** 	    }
ARM GAS  /tmp/ccnfjbri.s 			page 40


 1471              		.loc 1 488 7 view .LVU399
 492:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1472              		.loc 1 492 6 view .LVU400
 492:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1473              		.loc 1 492 16 is_stmt 0 view .LVU401
 1474 0042 3046     		mov	r0, r6
 1475 0044 FFF7FEFF 		bl	f_close
 1476              	.LVL152:
 492:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1477              		.loc 1 492 14 discriminator 1 view .LVU402
 1478 0048 2070     		strb	r0, [r4]
 493:Src/File_Handling.c **** 	    {
 1479              		.loc 1 493 6 is_stmt 1 view .LVU403
 502:Src/File_Handling.c **** 	    	//sprintf (buf, "File *%s* CLOSED successfully\n", name);
 1480              		.loc 1 502 7 view .LVU404
 505:Src/File_Handling.c **** 	     }
 1481              		.loc 1 505 7 view .LVU405
 508:Src/File_Handling.c **** }
 1482              		.loc 1 508 5 view .LVU406
 508:Src/File_Handling.c **** }
 1483              		.loc 1 508 12 is_stmt 0 view .LVU407
 1484 004a C0B2     		uxtb	r0, r0
 1485 004c E2E7     		b	.L81
 1486              	.L85:
 1487 004e 00BF     		.align	2
 1488              	.L84:
 1489 0050 00000000 		.word	fno
 1490 0054 00000000 		.word	fresult
 1491 0058 00000000 		.word	fil
 1492 005c 00000000 		.word	bw
 1493              		.cfi_endproc
 1494              	.LFE1196:
 1496              		.section	.rodata.Remove_File.str1.4,"aMS",%progbits,1
 1497              		.align	2
 1498              	.LC11:
 1499 0000 4552524F 		.ascii	"ERROR!!! *%s* does not exists\012\012\000"
 1499      52212121 
 1499      202A2573 
 1499      2A20646F 
 1499      6573206E 
 1500              		.align	2
 1501              	.LC12:
 1502 0020 2A25732A 		.ascii	"*%s* has been removed successfully\012\000"
 1502      20686173 
 1502      20626565 
 1502      6E207265 
 1502      6D6F7665 
 1503              		.align	2
 1504              	.LC13:
 1505 0044 4552524F 		.ascii	"ERROR No. %d in removing *%s*\012\012\000"
 1505      52204E6F 
 1505      2E202564 
 1505      20696E20 
 1505      72656D6F 
 1506              		.section	.text.Remove_File,"ax",%progbits
 1507              		.align	1
 1508              		.global	Remove_File
ARM GAS  /tmp/ccnfjbri.s 			page 41


 1509              		.syntax unified
 1510              		.thumb
 1511              		.thumb_func
 1513              	Remove_File:
 1514              	.LVL153:
 1515              	.LFB1197:
 510:Src/File_Handling.c **** 
 511:Src/File_Handling.c **** FRESULT Remove_File (char *name)
 512:Src/File_Handling.c **** {
 1516              		.loc 1 512 1 is_stmt 1 view -0
 1517              		.cfi_startproc
 1518              		@ args = 0, pretend = 0, frame = 0
 1519              		@ frame_needed = 0, uses_anonymous_args = 0
 1520              		.loc 1 512 1 is_stmt 0 view .LVU409
 1521 0000 70B5     		push	{r4, r5, r6, lr}
 1522              	.LCFI14:
 1523              		.cfi_def_cfa_offset 16
 1524              		.cfi_offset 4, -16
 1525              		.cfi_offset 5, -12
 1526              		.cfi_offset 6, -8
 1527              		.cfi_offset 14, -4
 1528 0002 0446     		mov	r4, r0
 513:Src/File_Handling.c **** 	/**** check whether the file exists or not ****/
 514:Src/File_Handling.c **** 	fresult = f_stat (name, &fno);
 1529              		.loc 1 514 2 is_stmt 1 view .LVU410
 1530              		.loc 1 514 12 is_stmt 0 view .LVU411
 1531 0004 1A49     		ldr	r1, .L93
 1532 0006 FFF7FEFF 		bl	f_stat
 1533              	.LVL154:
 1534              		.loc 1 514 10 discriminator 1 view .LVU412
 1535 000a 1A4B     		ldr	r3, .L93+4
 1536 000c 1870     		strb	r0, [r3]
 515:Src/File_Handling.c **** 	if (fresult != FR_OK)
 1537              		.loc 1 515 2 is_stmt 1 view .LVU413
 1538              		.loc 1 515 5 is_stmt 0 view .LVU414
 1539 000e A0B9     		cbnz	r0, .L92
 516:Src/File_Handling.c **** 	{
 517:Src/File_Handling.c **** 		char *buf = malloc(100*sizeof(char));
 518:Src/File_Handling.c **** 		sprintf (buf, "ERROR!!! *%s* does not exists\n\n", name);
 519:Src/File_Handling.c **** 		Send_Uart (buf);
 520:Src/File_Handling.c **** 		free(buf);
 521:Src/File_Handling.c **** 		return fresult;
 522:Src/File_Handling.c **** 	}
 523:Src/File_Handling.c **** 
 524:Src/File_Handling.c **** 	else
 525:Src/File_Handling.c **** 	{
 526:Src/File_Handling.c **** 		fresult = f_unlink (name);
 1540              		.loc 1 526 3 is_stmt 1 view .LVU415
 1541              		.loc 1 526 13 is_stmt 0 view .LVU416
 1542 0010 2046     		mov	r0, r4
 1543 0012 FFF7FEFF 		bl	f_unlink
 1544              	.LVL155:
 1545 0016 0546     		mov	r5, r0
 1546              		.loc 1 526 11 discriminator 1 view .LVU417
 1547 0018 164B     		ldr	r3, .L93+4
 1548 001a 1870     		strb	r0, [r3]
 527:Src/File_Handling.c **** 		if (fresult == FR_OK)
ARM GAS  /tmp/ccnfjbri.s 			page 42


 1549              		.loc 1 527 3 is_stmt 1 view .LVU418
 1550              		.loc 1 527 6 is_stmt 0 view .LVU419
 1551 001c D8B9     		cbnz	r0, .L89
 1552              	.LBB25:
 528:Src/File_Handling.c **** 		{
 529:Src/File_Handling.c **** 			char *buf = malloc(100*sizeof(char));
 1553              		.loc 1 529 4 is_stmt 1 view .LVU420
 1554              		.loc 1 529 16 is_stmt 0 view .LVU421
 1555 001e 6420     		movs	r0, #100
 1556 0020 FFF7FEFF 		bl	malloc
 1557              	.LVL156:
 1558 0024 0546     		mov	r5, r0
 1559              	.LVL157:
 530:Src/File_Handling.c **** 			sprintf (buf, "*%s* has been removed successfully\n", name);
 1560              		.loc 1 530 4 is_stmt 1 view .LVU422
 1561 0026 2246     		mov	r2, r4
 1562 0028 1349     		ldr	r1, .L93+8
 1563 002a FFF7FEFF 		bl	sprintf
 1564              	.LVL158:
 531:Src/File_Handling.c **** 			Send_Uart (buf);
 1565              		.loc 1 531 4 view .LVU423
 532:Src/File_Handling.c **** 			free(buf);
 1566              		.loc 1 532 4 view .LVU424
 1567 002e 2846     		mov	r0, r5
 1568 0030 FFF7FEFF 		bl	free
 1569              	.LVL159:
 1570              	.L90:
 1571              		.loc 1 532 4 is_stmt 0 view .LVU425
 1572              	.LBE25:
 533:Src/File_Handling.c **** 		}
 534:Src/File_Handling.c **** 
 535:Src/File_Handling.c **** 		else
 536:Src/File_Handling.c **** 		{
 537:Src/File_Handling.c **** 			char *buf = malloc(100*sizeof(char));
 538:Src/File_Handling.c **** 			sprintf (buf, "ERROR No. %d in removing *%s*\n\n",fresult, name);
 539:Src/File_Handling.c **** 			Send_Uart (buf);
 540:Src/File_Handling.c **** 			free(buf);
 541:Src/File_Handling.c **** 		}
 542:Src/File_Handling.c **** 	}
 543:Src/File_Handling.c **** 	return fresult;
 1573              		.loc 1 543 2 is_stmt 1 view .LVU426
 1574              		.loc 1 543 9 is_stmt 0 view .LVU427
 1575 0034 0F4B     		ldr	r3, .L93+4
 1576 0036 1878     		ldrb	r0, [r3]	@ zero_extendqisi2
 1577              	.L88:
 544:Src/File_Handling.c **** }
 1578              		.loc 1 544 1 view .LVU428
 1579 0038 70BD     		pop	{r4, r5, r6, pc}
 1580              	.LVL160:
 1581              	.L92:
 1582              	.LBB26:
 517:Src/File_Handling.c **** 		sprintf (buf, "ERROR!!! *%s* does not exists\n\n", name);
 1583              		.loc 1 517 3 is_stmt 1 view .LVU429
 517:Src/File_Handling.c **** 		sprintf (buf, "ERROR!!! *%s* does not exists\n\n", name);
 1584              		.loc 1 517 15 is_stmt 0 view .LVU430
 1585 003a 6420     		movs	r0, #100
 1586 003c FFF7FEFF 		bl	malloc
ARM GAS  /tmp/ccnfjbri.s 			page 43


 1587              	.LVL161:
 1588 0040 0546     		mov	r5, r0
 1589              	.LVL162:
 518:Src/File_Handling.c **** 		Send_Uart (buf);
 1590              		.loc 1 518 3 is_stmt 1 view .LVU431
 1591 0042 2246     		mov	r2, r4
 1592 0044 0D49     		ldr	r1, .L93+12
 1593 0046 FFF7FEFF 		bl	sprintf
 1594              	.LVL163:
 519:Src/File_Handling.c **** 		free(buf);
 1595              		.loc 1 519 3 view .LVU432
 520:Src/File_Handling.c **** 		return fresult;
 1596              		.loc 1 520 3 view .LVU433
 1597 004a 2846     		mov	r0, r5
 1598 004c FFF7FEFF 		bl	free
 1599              	.LVL164:
 521:Src/File_Handling.c **** 	}
 1600              		.loc 1 521 3 view .LVU434
 521:Src/File_Handling.c **** 	}
 1601              		.loc 1 521 10 is_stmt 0 view .LVU435
 1602 0050 084B     		ldr	r3, .L93+4
 1603 0052 1878     		ldrb	r0, [r3]	@ zero_extendqisi2
 1604 0054 F0E7     		b	.L88
 1605              	.LVL165:
 1606              	.L89:
 521:Src/File_Handling.c **** 	}
 1607              		.loc 1 521 10 view .LVU436
 1608              	.LBE26:
 1609              	.LBB27:
 537:Src/File_Handling.c **** 			sprintf (buf, "ERROR No. %d in removing *%s*\n\n",fresult, name);
 1610              		.loc 1 537 4 is_stmt 1 view .LVU437
 537:Src/File_Handling.c **** 			sprintf (buf, "ERROR No. %d in removing *%s*\n\n",fresult, name);
 1611              		.loc 1 537 16 is_stmt 0 view .LVU438
 1612 0056 6420     		movs	r0, #100
 1613 0058 FFF7FEFF 		bl	malloc
 1614              	.LVL166:
 1615 005c 0646     		mov	r6, r0
 1616              	.LVL167:
 538:Src/File_Handling.c **** 			Send_Uart (buf);
 1617              		.loc 1 538 4 is_stmt 1 view .LVU439
 1618 005e 2346     		mov	r3, r4
 1619 0060 2A46     		mov	r2, r5
 1620 0062 0749     		ldr	r1, .L93+16
 1621 0064 FFF7FEFF 		bl	sprintf
 1622              	.LVL168:
 539:Src/File_Handling.c **** 			free(buf);
 1623              		.loc 1 539 4 view .LVU440
 540:Src/File_Handling.c **** 		}
 1624              		.loc 1 540 4 view .LVU441
 1625 0068 3046     		mov	r0, r6
 1626 006a FFF7FEFF 		bl	free
 1627              	.LVL169:
 1628 006e E1E7     		b	.L90
 1629              	.L94:
 1630              		.align	2
 1631              	.L93:
 1632 0070 00000000 		.word	fno
ARM GAS  /tmp/ccnfjbri.s 			page 44


 1633 0074 00000000 		.word	fresult
 1634 0078 20000000 		.word	.LC12
 1635 007c 00000000 		.word	.LC11
 1636 0080 44000000 		.word	.LC13
 1637              	.LBE27:
 1638              		.cfi_endproc
 1639              	.LFE1197:
 1641              		.section	.rodata.Create_Dir.str1.4,"aMS",%progbits,1
 1642              		.align	2
 1643              	.LC14:
 1644 0000 2A25732A 		.ascii	"*%s* has been created successfully\012\000"
 1644      20686173 
 1644      20626565 
 1644      6E206372 
 1644      65617465 
 1645              		.align	2
 1646              	.LC15:
 1647 0024 4552524F 		.ascii	"ERROR No. %d in creating directory *%s*\012\012\000"
 1647      52204E6F 
 1647      2E202564 
 1647      20696E20 
 1647      63726561 
 1648              		.section	.text.Create_Dir,"ax",%progbits
 1649              		.align	1
 1650              		.global	Create_Dir
 1651              		.syntax unified
 1652              		.thumb
 1653              		.thumb_func
 1655              	Create_Dir:
 1656              	.LVL170:
 1657              	.LFB1198:
 545:Src/File_Handling.c **** 
 546:Src/File_Handling.c **** FRESULT Create_Dir (char *name)
 547:Src/File_Handling.c **** {
 1658              		.loc 1 547 1 view -0
 1659              		.cfi_startproc
 1660              		@ args = 0, pretend = 0, frame = 0
 1661              		@ frame_needed = 0, uses_anonymous_args = 0
 1662              		.loc 1 547 1 is_stmt 0 view .LVU443
 1663 0000 70B5     		push	{r4, r5, r6, lr}
 1664              	.LCFI15:
 1665              		.cfi_def_cfa_offset 16
 1666              		.cfi_offset 4, -16
 1667              		.cfi_offset 5, -12
 1668              		.cfi_offset 6, -8
 1669              		.cfi_offset 14, -4
 1670 0002 0546     		mov	r5, r0
 548:Src/File_Handling.c ****     fresult = f_mkdir(name);
 1671              		.loc 1 548 5 is_stmt 1 view .LVU444
 1672              		.loc 1 548 15 is_stmt 0 view .LVU445
 1673 0004 FFF7FEFF 		bl	f_mkdir
 1674              	.LVL171:
 1675              		.loc 1 548 13 discriminator 1 view .LVU446
 1676 0008 0F4B     		ldr	r3, .L99
 1677 000a 1870     		strb	r0, [r3]
 549:Src/File_Handling.c ****     if (fresult == FR_OK)
 1678              		.loc 1 549 5 is_stmt 1 view .LVU447
ARM GAS  /tmp/ccnfjbri.s 			page 45


 1679              		.loc 1 549 8 is_stmt 0 view .LVU448
 1680 000c 68B9     		cbnz	r0, .L96
 1681              	.LBB28:
 550:Src/File_Handling.c ****     {
 551:Src/File_Handling.c ****     	char *buf = malloc(100*sizeof(char));
 1682              		.loc 1 551 6 is_stmt 1 view .LVU449
 1683              		.loc 1 551 18 is_stmt 0 view .LVU450
 1684 000e 6420     		movs	r0, #100
 1685 0010 FFF7FEFF 		bl	malloc
 1686              	.LVL172:
 1687 0014 0446     		mov	r4, r0
 1688              	.LVL173:
 552:Src/File_Handling.c ****     	sprintf (buf, "*%s* has been created successfully\n", name);
 1689              		.loc 1 552 6 is_stmt 1 view .LVU451
 1690 0016 2A46     		mov	r2, r5
 1691 0018 0C49     		ldr	r1, .L99+4
 1692 001a FFF7FEFF 		bl	sprintf
 1693              	.LVL174:
 553:Src/File_Handling.c ****     	Send_Uart (buf);
 1694              		.loc 1 553 6 view .LVU452
 554:Src/File_Handling.c ****     	free(buf);
 1695              		.loc 1 554 6 view .LVU453
 1696 001e 2046     		mov	r0, r4
 1697 0020 FFF7FEFF 		bl	free
 1698              	.LVL175:
 1699              	.L97:
 1700              		.loc 1 554 6 is_stmt 0 view .LVU454
 1701              	.LBE28:
 555:Src/File_Handling.c ****     }
 556:Src/File_Handling.c ****     else
 557:Src/File_Handling.c ****     {
 558:Src/File_Handling.c ****     	char *buf = malloc(100*sizeof(char));
 559:Src/File_Handling.c ****     	sprintf (buf, "ERROR No. %d in creating directory *%s*\n\n", fresult,name);
 560:Src/File_Handling.c ****     	Send_Uart(buf);
 561:Src/File_Handling.c ****     	free(buf);
 562:Src/File_Handling.c ****     }
 563:Src/File_Handling.c ****     return fresult;
 1702              		.loc 1 563 5 is_stmt 1 view .LVU455
 564:Src/File_Handling.c **** }
 1703              		.loc 1 564 1 is_stmt 0 view .LVU456
 1704 0024 084B     		ldr	r3, .L99
 1705 0026 1878     		ldrb	r0, [r3]	@ zero_extendqisi2
 1706 0028 70BD     		pop	{r4, r5, r6, pc}
 1707              	.LVL176:
 1708              	.L96:
 1709              		.loc 1 564 1 view .LVU457
 1710 002a 0446     		mov	r4, r0
 1711              	.LBB29:
 558:Src/File_Handling.c ****     	sprintf (buf, "ERROR No. %d in creating directory *%s*\n\n", fresult,name);
 1712              		.loc 1 558 6 is_stmt 1 view .LVU458
 558:Src/File_Handling.c ****     	sprintf (buf, "ERROR No. %d in creating directory *%s*\n\n", fresult,name);
 1713              		.loc 1 558 18 is_stmt 0 view .LVU459
 1714 002c 6420     		movs	r0, #100
 1715 002e FFF7FEFF 		bl	malloc
 1716              	.LVL177:
 1717 0032 0646     		mov	r6, r0
 1718              	.LVL178:
ARM GAS  /tmp/ccnfjbri.s 			page 46


 559:Src/File_Handling.c ****     	Send_Uart(buf);
 1719              		.loc 1 559 6 is_stmt 1 view .LVU460
 1720 0034 2B46     		mov	r3, r5
 1721 0036 2246     		mov	r2, r4
 1722 0038 0549     		ldr	r1, .L99+8
 1723 003a FFF7FEFF 		bl	sprintf
 1724              	.LVL179:
 560:Src/File_Handling.c ****     	free(buf);
 1725              		.loc 1 560 6 view .LVU461
 561:Src/File_Handling.c ****     }
 1726              		.loc 1 561 6 view .LVU462
 1727 003e 3046     		mov	r0, r6
 1728 0040 FFF7FEFF 		bl	free
 1729              	.LVL180:
 1730 0044 EEE7     		b	.L97
 1731              	.L100:
 1732 0046 00BF     		.align	2
 1733              	.L99:
 1734 0048 00000000 		.word	fresult
 1735 004c 00000000 		.word	.LC14
 1736 0050 24000000 		.word	.LC15
 1737              	.LBE29:
 1738              		.cfi_endproc
 1739              	.LFE1198:
 1741              		.section	.rodata.Check_SD_Space.str1.4,"aMS",%progbits,1
 1742              		.align	2
 1743              	.LC16:
 1744 0000 00       		.ascii	"\000"
 1745 0001 000000   		.align	2
 1746              	.LC17:
 1747 0004 53442043 		.ascii	"SD CARD Total Size: \011%lu\012\000"
 1747      41524420 
 1747      546F7461 
 1747      6C205369 
 1747      7A653A20 
 1748 001e 0000     		.align	2
 1749              	.LC18:
 1750 0020 53442043 		.ascii	"SD CARD Free Space: \011%lu\012\000"
 1750      41524420 
 1750      46726565 
 1750      20537061 
 1750      63653A20 
 1751              		.section	.text.Check_SD_Space,"ax",%progbits
 1752              		.align	1
 1753              		.global	Check_SD_Space
 1754              		.syntax unified
 1755              		.thumb
 1756              		.thumb_func
 1758              	Check_SD_Space:
 1759              	.LFB1199:
 565:Src/File_Handling.c **** 
 566:Src/File_Handling.c **** void Check_SD_Space (void)
 567:Src/File_Handling.c **** {
 1760              		.loc 1 567 1 view -0
 1761              		.cfi_startproc
 1762              		@ args = 0, pretend = 0, frame = 0
 1763              		@ frame_needed = 0, uses_anonymous_args = 0
ARM GAS  /tmp/ccnfjbri.s 			page 47


 1764 0000 F8B5     		push	{r3, r4, r5, r6, r7, lr}
 1765              	.LCFI16:
 1766              		.cfi_def_cfa_offset 24
 1767              		.cfi_offset 3, -24
 1768              		.cfi_offset 4, -20
 1769              		.cfi_offset 5, -16
 1770              		.cfi_offset 6, -12
 1771              		.cfi_offset 7, -8
 1772              		.cfi_offset 14, -4
 1773 0002 2DED028B 		vpush.64	{d8}
 1774              	.LCFI17:
 1775              		.cfi_def_cfa_offset 32
 1776              		.cfi_offset 80, -32
 1777              		.cfi_offset 81, -28
 568:Src/File_Handling.c ****     /* Check free space */
 569:Src/File_Handling.c ****     f_getfree("", &fre_clust, &pfs);
 1778              		.loc 1 569 5 view .LVU464
 1779 0006 234D     		ldr	r5, .L103
 1780 0008 234F     		ldr	r7, .L103+4
 1781 000a 2A46     		mov	r2, r5
 1782 000c 3946     		mov	r1, r7
 1783 000e 2348     		ldr	r0, .L103+8
 1784 0010 FFF7FEFF 		bl	f_getfree
 1785              	.LVL181:
 570:Src/File_Handling.c **** 
 571:Src/File_Handling.c ****     total = (uint32_t)((pfs->n_fatent - 2) * pfs->csize * 0.5);
 1786              		.loc 1 571 5 view .LVU465
 1787              		.loc 1 571 28 is_stmt 0 view .LVU466
 1788 0014 2A68     		ldr	r2, [r5]
 1789 0016 9369     		ldr	r3, [r2, #24]
 1790              		.loc 1 571 39 view .LVU467
 1791 0018 023B     		subs	r3, r3, #2
 1792              		.loc 1 571 49 view .LVU468
 1793 001a 5289     		ldrh	r2, [r2, #10]
 1794              		.loc 1 571 44 view .LVU469
 1795 001c 02FB03F3 		mul	r3, r2, r3
 1796              		.loc 1 571 57 view .LVU470
 1797 0020 07EE903A 		vmov	s15, r3	@ int
 1798 0024 B8EE677B 		vcvt.f64.u32	d7, s15
 1799 0028 B6EE008B 		vmov.f64	d8, #5.0e-1
 1800 002c 27EE087B 		vmul.f64	d7, d7, d8
 1801              		.loc 1 571 13 view .LVU471
 1802 0030 FCEEC77B 		vcvt.u32.f64	s15, d7
 1803 0034 17EE904A 		vmov	r4, s15	@ int
 1804              		.loc 1 571 11 view .LVU472
 1805 0038 194B     		ldr	r3, .L103+12
 1806 003a C3ED007A 		vstr.32	s15, [r3]	@ int
 572:Src/File_Handling.c ****     char *buf = malloc(30*sizeof(char));
 1807              		.loc 1 572 5 is_stmt 1 view .LVU473
 1808              		.loc 1 572 17 is_stmt 0 view .LVU474
 1809 003e 1E20     		movs	r0, #30
 1810 0040 FFF7FEFF 		bl	malloc
 1811              	.LVL182:
 1812 0044 0646     		mov	r6, r0
 1813              	.LVL183:
 573:Src/File_Handling.c ****     sprintf (buf, "SD CARD Total Size: \t%lu\n",total);
 1814              		.loc 1 573 5 is_stmt 1 view .LVU475
ARM GAS  /tmp/ccnfjbri.s 			page 48


 1815 0046 2246     		mov	r2, r4
 1816 0048 1649     		ldr	r1, .L103+16
 1817 004a FFF7FEFF 		bl	sprintf
 1818              	.LVL184:
 574:Src/File_Handling.c ****     Send_Uart(buf);
 1819              		.loc 1 574 5 view .LVU476
 575:Src/File_Handling.c ****     free(buf);
 1820              		.loc 1 575 5 view .LVU477
 1821 004e 3046     		mov	r0, r6
 1822 0050 FFF7FEFF 		bl	free
 1823              	.LVL185:
 576:Src/File_Handling.c ****     free_space = (uint32_t)(fre_clust * pfs->csize * 0.5);
 1824              		.loc 1 576 5 view .LVU478
 1825              		.loc 1 576 44 is_stmt 0 view .LVU479
 1826 0054 2B68     		ldr	r3, [r5]
 1827 0056 5B89     		ldrh	r3, [r3, #10]
 1828              		.loc 1 576 39 view .LVU480
 1829 0058 3A68     		ldr	r2, [r7]
 1830 005a 02FB03F3 		mul	r3, r2, r3
 1831 005e 07EE103A 		vmov	s14, r3	@ int
 1832              		.loc 1 576 52 view .LVU481
 1833 0062 B8EE477B 		vcvt.f64.u32	d7, s14
 1834 0066 27EE087B 		vmul.f64	d7, d7, d8
 1835              		.loc 1 576 18 view .LVU482
 1836 006a FCEEC77B 		vcvt.u32.f64	s15, d7
 1837 006e 17EE904A 		vmov	r4, s15	@ int
 1838              		.loc 1 576 16 view .LVU483
 1839 0072 0D4B     		ldr	r3, .L103+20
 1840 0074 C3ED007A 		vstr.32	s15, [r3]	@ int
 577:Src/File_Handling.c ****     buf = malloc(30*sizeof(char));
 1841              		.loc 1 577 5 is_stmt 1 view .LVU484
 1842              		.loc 1 577 11 is_stmt 0 view .LVU485
 1843 0078 1E20     		movs	r0, #30
 1844 007a FFF7FEFF 		bl	malloc
 1845              	.LVL186:
 1846 007e 0546     		mov	r5, r0
 1847              	.LVL187:
 578:Src/File_Handling.c ****     sprintf (buf, "SD CARD Free Space: \t%lu\n",free_space);
 1848              		.loc 1 578 5 is_stmt 1 view .LVU486
 1849 0080 2246     		mov	r2, r4
 1850 0082 0A49     		ldr	r1, .L103+24
 1851 0084 FFF7FEFF 		bl	sprintf
 1852              	.LVL188:
 579:Src/File_Handling.c ****     Send_Uart(buf);
 1853              		.loc 1 579 5 view .LVU487
 580:Src/File_Handling.c ****     free(buf);
 1854              		.loc 1 580 5 view .LVU488
 1855 0088 2846     		mov	r0, r5
 1856 008a FFF7FEFF 		bl	free
 1857              	.LVL189:
 581:Src/File_Handling.c **** }
 1858              		.loc 1 581 1 is_stmt 0 view .LVU489
 1859 008e BDEC028B 		vldm	sp!, {d8}
 1860              	.LCFI18:
 1861              		.cfi_restore 80
 1862              		.cfi_restore 81
 1863              		.cfi_def_cfa_offset 24
ARM GAS  /tmp/ccnfjbri.s 			page 49


 1864 0092 F8BD     		pop	{r3, r4, r5, r6, r7, pc}
 1865              	.LVL190:
 1866              	.L104:
 1867              		.loc 1 581 1 view .LVU490
 1868              		.align	2
 1869              	.L103:
 1870 0094 00000000 		.word	pfs
 1871 0098 00000000 		.word	fre_clust
 1872 009c 00000000 		.word	.LC16
 1873 00a0 00000000 		.word	total
 1874 00a4 04000000 		.word	.LC17
 1875 00a8 00000000 		.word	free_space
 1876 00ac 20000000 		.word	.LC18
 1877              		.cfi_endproc
 1878              	.LFE1199:
 1880              		.section	.text.Update_File_float,"ax",%progbits
 1881              		.align	1
 1882              		.global	Update_File_float
 1883              		.syntax unified
 1884              		.thumb
 1885              		.thumb_func
 1887              	Update_File_float:
 1888              	.LVL191:
 1889              	.LFB1200:
 582:Src/File_Handling.c **** 
 583:Src/File_Handling.c **** FRESULT Update_File_float (char *name, float *data, unsigned int bytesize)
 584:Src/File_Handling.c **** {
 1890              		.loc 1 584 1 is_stmt 1 view -0
 1891              		.cfi_startproc
 1892              		@ args = 0, pretend = 0, frame = 0
 1893              		@ frame_needed = 0, uses_anonymous_args = 0
 1894              		.loc 1 584 1 is_stmt 0 view .LVU492
 1895 0000 F8B5     		push	{r3, r4, r5, r6, r7, lr}
 1896              	.LCFI19:
 1897              		.cfi_def_cfa_offset 24
 1898              		.cfi_offset 3, -24
 1899              		.cfi_offset 4, -20
 1900              		.cfi_offset 5, -16
 1901              		.cfi_offset 6, -12
 1902              		.cfi_offset 7, -8
 1903              		.cfi_offset 14, -4
 1904 0002 0446     		mov	r4, r0
 1905 0004 0D46     		mov	r5, r1
 1906 0006 1646     		mov	r6, r2
 585:Src/File_Handling.c **** 	/**** check whether the file exists or not ****/
 586:Src/File_Handling.c **** 	fresult = f_stat (name, &fno);
 1907              		.loc 1 586 2 is_stmt 1 view .LVU493
 1908              		.loc 1 586 12 is_stmt 0 view .LVU494
 1909 0008 1049     		ldr	r1, .L110
 1910              	.LVL192:
 1911              		.loc 1 586 12 view .LVU495
 1912 000a FFF7FEFF 		bl	f_stat
 1913              	.LVL193:
 1914              		.loc 1 586 10 discriminator 1 view .LVU496
 1915 000e 104B     		ldr	r3, .L110+4
 1916 0010 1870     		strb	r0, [r3]
 587:Src/File_Handling.c **** 	if (fresult != FR_OK)
ARM GAS  /tmp/ccnfjbri.s 			page 50


 1917              		.loc 1 587 2 is_stmt 1 view .LVU497
 1918              		.loc 1 587 5 is_stmt 0 view .LVU498
 1919 0012 08B1     		cbz	r0, .L106
 1920              	.LBB30:
 588:Src/File_Handling.c **** 	{
 589:Src/File_Handling.c **** 		char *buf = malloc(100*sizeof(char));
 1921              		.loc 1 589 3 is_stmt 1 view .LVU499
 590:Src/File_Handling.c **** 		//sprintf (buf, "ERROR!!! *%s* does not exists\n\n", name);
 591:Src/File_Handling.c **** 		//Send_Uart (buf);
 592:Src/File_Handling.c **** 		free(buf);
 1922              		.loc 1 592 3 view .LVU500
 593:Src/File_Handling.c **** 	    return fresult;
 1923              		.loc 1 593 6 view .LVU501
 1924              		.loc 1 593 13 is_stmt 0 view .LVU502
 1925 0014 C0B2     		uxtb	r0, r0
 1926              	.LVL194:
 1927              	.L107:
 1928              		.loc 1 593 13 view .LVU503
 1929              	.LBE30:
 594:Src/File_Handling.c **** 	}
 595:Src/File_Handling.c **** 
 596:Src/File_Handling.c **** 	else
 597:Src/File_Handling.c **** 	{
 598:Src/File_Handling.c **** 		 /* Create a file with read write access and open it */
 599:Src/File_Handling.c **** 	    fresult = f_open(&fil, name, FA_OPEN_APPEND | FA_WRITE);
 600:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 601:Src/File_Handling.c **** 	    {
 602:Src/File_Handling.c **** 	    	char *buf = malloc(100*sizeof(char));
 603:Src/File_Handling.c **** 	    	//sprintf (buf, "ERROR!!! No. %d in opening file *%s*\n\n", fresult, name);
 604:Src/File_Handling.c **** 	    	//Send_Uart(buf);
 605:Src/File_Handling.c **** 	        free(buf);
 606:Src/File_Handling.c **** 	        return fresult;
 607:Src/File_Handling.c **** 	    }
 608:Src/File_Handling.c **** 
 609:Src/File_Handling.c **** 	    /* Writing text */
 610:Src/File_Handling.c **** 	    fresult = f_write(&fil, data, bytesize, &bw);
 611:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 612:Src/File_Handling.c **** 	    {
 613:Src/File_Handling.c **** 	    	char *buf = malloc(100*sizeof(char));
 614:Src/File_Handling.c **** 	    	//sprintf (buf, "ERROR!!! No. %d in writing file *%s*\n\n", fresult, name);
 615:Src/File_Handling.c **** 	    	//Send_Uart(buf);
 616:Src/File_Handling.c **** 	    	free(buf);
 617:Src/File_Handling.c **** 	    }
 618:Src/File_Handling.c **** 
 619:Src/File_Handling.c **** 	    else
 620:Src/File_Handling.c **** 	    {
 621:Src/File_Handling.c **** 	    	char *buf = malloc(100*sizeof(char));
 622:Src/File_Handling.c **** 	    	//sprintf (buf, "*%s* UPDATED successfully\n", name);
 623:Src/File_Handling.c **** 	    	//Send_Uart(buf);
 624:Src/File_Handling.c **** 	    	free(buf);
 625:Src/File_Handling.c **** 	    }
 626:Src/File_Handling.c **** 
 627:Src/File_Handling.c **** 	    /* Close file */
 628:Src/File_Handling.c **** 	    fresult = f_close(&fil);
 629:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 630:Src/File_Handling.c **** 	    {
 631:Src/File_Handling.c **** 	    	char *buf = malloc(100*sizeof(char));
ARM GAS  /tmp/ccnfjbri.s 			page 51


 632:Src/File_Handling.c **** 	    	//sprintf (buf, "ERROR!!! No. %d in closing file *%s*\n\n", fresult, name);
 633:Src/File_Handling.c **** 	    	//Send_Uart(buf);
 634:Src/File_Handling.c **** 	    	free(buf);
 635:Src/File_Handling.c **** 	    }
 636:Src/File_Handling.c **** 	    else
 637:Src/File_Handling.c **** 	    {
 638:Src/File_Handling.c **** 	    	char *buf = malloc(100*sizeof(char));
 639:Src/File_Handling.c **** 	    	//sprintf (buf, "File *%s* CLOSED successfully\n", name);
 640:Src/File_Handling.c **** 	    	//Send_Uart(buf);
 641:Src/File_Handling.c **** 	    	free(buf);
 642:Src/File_Handling.c **** 	     }
 643:Src/File_Handling.c **** 	}
 644:Src/File_Handling.c ****     return fresult;
 645:Src/File_Handling.c **** }
 1930              		.loc 1 645 1 view .LVU504
 1931 0016 F8BD     		pop	{r3, r4, r5, r6, r7, pc}
 1932              	.LVL195:
 1933              	.L106:
 599:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1934              		.loc 1 599 6 is_stmt 1 view .LVU505
 599:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1935              		.loc 1 599 16 is_stmt 0 view .LVU506
 1936 0018 3222     		movs	r2, #50
 1937 001a 2146     		mov	r1, r4
 1938 001c 0D48     		ldr	r0, .L110+8
 1939 001e FFF7FEFF 		bl	f_open
 1940              	.LVL196:
 599:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1941              		.loc 1 599 14 discriminator 1 view .LVU507
 1942 0022 0B4B     		ldr	r3, .L110+4
 1943 0024 1870     		strb	r0, [r3]
 600:Src/File_Handling.c **** 	    {
 1944              		.loc 1 600 6 is_stmt 1 view .LVU508
 600:Src/File_Handling.c **** 	    {
 1945              		.loc 1 600 9 is_stmt 0 view .LVU509
 1946 0026 08B1     		cbz	r0, .L108
 1947              	.LBB31:
 602:Src/File_Handling.c **** 	    	//sprintf (buf, "ERROR!!! No. %d in opening file *%s*\n\n", fresult, name);
 1948              		.loc 1 602 7 is_stmt 1 view .LVU510
 605:Src/File_Handling.c **** 	        return fresult;
 1949              		.loc 1 605 10 view .LVU511
 606:Src/File_Handling.c **** 	    }
 1950              		.loc 1 606 10 view .LVU512
 606:Src/File_Handling.c **** 	    }
 1951              		.loc 1 606 17 is_stmt 0 view .LVU513
 1952 0028 C0B2     		uxtb	r0, r0
 1953 002a F4E7     		b	.L107
 1954              	.L108:
 1955              	.LBE31:
 610:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1956              		.loc 1 610 6 is_stmt 1 view .LVU514
 610:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1957              		.loc 1 610 16 is_stmt 0 view .LVU515
 1958 002c 094F     		ldr	r7, .L110+8
 1959 002e 0A4B     		ldr	r3, .L110+12
 1960 0030 3246     		mov	r2, r6
 1961 0032 2946     		mov	r1, r5
ARM GAS  /tmp/ccnfjbri.s 			page 52


 1962 0034 3846     		mov	r0, r7
 1963 0036 FFF7FEFF 		bl	f_write
 1964              	.LVL197:
 610:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1965              		.loc 1 610 14 discriminator 1 view .LVU516
 1966 003a 054C     		ldr	r4, .L110+4
 1967              	.LVL198:
 610:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1968              		.loc 1 610 14 discriminator 1 view .LVU517
 1969 003c 2070     		strb	r0, [r4]
 611:Src/File_Handling.c **** 	    {
 1970              		.loc 1 611 6 is_stmt 1 view .LVU518
 621:Src/File_Handling.c **** 	    	//sprintf (buf, "*%s* UPDATED successfully\n", name);
 1971              		.loc 1 621 7 view .LVU519
 624:Src/File_Handling.c **** 	    }
 1972              		.loc 1 624 7 view .LVU520
 628:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1973              		.loc 1 628 6 view .LVU521
 628:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1974              		.loc 1 628 16 is_stmt 0 view .LVU522
 1975 003e 3846     		mov	r0, r7
 1976 0040 FFF7FEFF 		bl	f_close
 1977              	.LVL199:
 628:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 1978              		.loc 1 628 14 discriminator 1 view .LVU523
 1979 0044 2070     		strb	r0, [r4]
 629:Src/File_Handling.c **** 	    {
 1980              		.loc 1 629 6 is_stmt 1 view .LVU524
 638:Src/File_Handling.c **** 	    	//sprintf (buf, "File *%s* CLOSED successfully\n", name);
 1981              		.loc 1 638 7 view .LVU525
 641:Src/File_Handling.c **** 	     }
 1982              		.loc 1 641 7 view .LVU526
 644:Src/File_Handling.c **** }
 1983              		.loc 1 644 5 view .LVU527
 644:Src/File_Handling.c **** }
 1984              		.loc 1 644 12 is_stmt 0 view .LVU528
 1985 0046 C0B2     		uxtb	r0, r0
 1986 0048 E5E7     		b	.L107
 1987              	.L111:
 1988 004a 00BF     		.align	2
 1989              	.L110:
 1990 004c 00000000 		.word	fno
 1991 0050 00000000 		.word	fresult
 1992 0054 00000000 		.word	fil
 1993 0058 00000000 		.word	bw
 1994              		.cfi_endproc
 1995              	.LFE1200:
 1997              		.section	.text.Update_File_byte,"ax",%progbits
 1998              		.align	1
 1999              		.global	Update_File_byte
 2000              		.syntax unified
 2001              		.thumb
 2002              		.thumb_func
 2004              	Update_File_byte:
 2005              	.LVL200:
 2006              	.LFB1201:
 646:Src/File_Handling.c **** 
ARM GAS  /tmp/ccnfjbri.s 			page 53


 647:Src/File_Handling.c **** FRESULT Update_File_byte (char *name, uint8_t *data, unsigned int bytesize)
 648:Src/File_Handling.c **** {
 2007              		.loc 1 648 1 is_stmt 1 view -0
 2008              		.cfi_startproc
 2009              		@ args = 0, pretend = 0, frame = 0
 2010              		@ frame_needed = 0, uses_anonymous_args = 0
 2011              		.loc 1 648 1 is_stmt 0 view .LVU530
 2012 0000 F8B5     		push	{r3, r4, r5, r6, r7, lr}
 2013              	.LCFI20:
 2014              		.cfi_def_cfa_offset 24
 2015              		.cfi_offset 3, -24
 2016              		.cfi_offset 4, -20
 2017              		.cfi_offset 5, -16
 2018              		.cfi_offset 6, -12
 2019              		.cfi_offset 7, -8
 2020              		.cfi_offset 14, -4
 2021 0002 0446     		mov	r4, r0
 2022 0004 0D46     		mov	r5, r1
 2023 0006 1646     		mov	r6, r2
 649:Src/File_Handling.c **** 	/**** check whether the file exists or not ****/
 650:Src/File_Handling.c **** 	fresult = f_stat (name, &fno);
 2024              		.loc 1 650 2 is_stmt 1 view .LVU531
 2025              		.loc 1 650 12 is_stmt 0 view .LVU532
 2026 0008 1049     		ldr	r1, .L117
 2027              	.LVL201:
 2028              		.loc 1 650 12 view .LVU533
 2029 000a FFF7FEFF 		bl	f_stat
 2030              	.LVL202:
 2031              		.loc 1 650 10 discriminator 1 view .LVU534
 2032 000e 104B     		ldr	r3, .L117+4
 2033 0010 1870     		strb	r0, [r3]
 651:Src/File_Handling.c **** 	if (fresult != FR_OK)
 2034              		.loc 1 651 2 is_stmt 1 view .LVU535
 2035              		.loc 1 651 5 is_stmt 0 view .LVU536
 2036 0012 08B1     		cbz	r0, .L113
 2037              	.LBB32:
 652:Src/File_Handling.c **** 	{
 653:Src/File_Handling.c **** 		char *buf = malloc(100*sizeof(char));
 2038              		.loc 1 653 3 is_stmt 1 view .LVU537
 654:Src/File_Handling.c **** 		//sprintf (buf, "ERROR!!! *%s* does not exists\n\n", name);
 655:Src/File_Handling.c **** 		//Send_Uart (buf);
 656:Src/File_Handling.c **** 		free(buf);
 2039              		.loc 1 656 3 view .LVU538
 657:Src/File_Handling.c **** 	    return fresult;
 2040              		.loc 1 657 6 view .LVU539
 2041              		.loc 1 657 13 is_stmt 0 view .LVU540
 2042 0014 C0B2     		uxtb	r0, r0
 2043              	.LVL203:
 2044              	.L114:
 2045              		.loc 1 657 13 view .LVU541
 2046              	.LBE32:
 658:Src/File_Handling.c **** 	}
 659:Src/File_Handling.c **** 
 660:Src/File_Handling.c **** 	else
 661:Src/File_Handling.c **** 	{
 662:Src/File_Handling.c **** 		 /* Create a file with read write access and open it */
 663:Src/File_Handling.c **** 	    fresult = f_open(&fil, name, FA_OPEN_APPEND | FA_WRITE);
ARM GAS  /tmp/ccnfjbri.s 			page 54


 664:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 665:Src/File_Handling.c **** 	    {
 666:Src/File_Handling.c **** 	    	char *buf = malloc(100*sizeof(char));
 667:Src/File_Handling.c **** 	    	//sprintf (buf, "ERROR!!! No. %d in opening file *%s*\n\n", fresult, name);
 668:Src/File_Handling.c **** 	    	//Send_Uart(buf);
 669:Src/File_Handling.c **** 	        free(buf);
 670:Src/File_Handling.c **** 	        return fresult;
 671:Src/File_Handling.c **** 	    }
 672:Src/File_Handling.c **** 
 673:Src/File_Handling.c **** 	    /* Writing text */
 674:Src/File_Handling.c **** 	    fresult = f_write(&fil, data, bytesize, &bw);
 675:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 676:Src/File_Handling.c **** 	    {
 677:Src/File_Handling.c **** 	    	char *buf = malloc(100*sizeof(char));
 678:Src/File_Handling.c **** 	    	//sprintf (buf, "ERROR!!! No. %d in writing file *%s*\n\n", fresult, name);
 679:Src/File_Handling.c **** 	    	//Send_Uart(buf);
 680:Src/File_Handling.c **** 	    	free(buf);
 681:Src/File_Handling.c **** 	    }
 682:Src/File_Handling.c **** 
 683:Src/File_Handling.c **** 	    else
 684:Src/File_Handling.c **** 	    {
 685:Src/File_Handling.c **** 	    	char *buf = malloc(100*sizeof(char));
 686:Src/File_Handling.c **** 	    	//sprintf (buf, "*%s* UPDATED successfully\n", name);
 687:Src/File_Handling.c **** 	    	//Send_Uart(buf);
 688:Src/File_Handling.c **** 	    	free(buf);
 689:Src/File_Handling.c **** 	    }
 690:Src/File_Handling.c **** 
 691:Src/File_Handling.c **** 	    /* Close file */
 692:Src/File_Handling.c **** 	    fresult = f_close(&fil);
 693:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 694:Src/File_Handling.c **** 	    {
 695:Src/File_Handling.c **** 	    	char *buf = malloc(100*sizeof(char));
 696:Src/File_Handling.c **** 	    	//sprintf (buf, "ERROR!!! No. %d in closing file *%s*\n\n", fresult, name);
 697:Src/File_Handling.c **** 	    	//Send_Uart(buf);
 698:Src/File_Handling.c **** 	    	free(buf);
 699:Src/File_Handling.c **** 	    }
 700:Src/File_Handling.c **** 	    else
 701:Src/File_Handling.c **** 	    {
 702:Src/File_Handling.c **** 	    	char *buf = malloc(100*sizeof(char));
 703:Src/File_Handling.c **** 	    	//sprintf (buf, "File *%s* CLOSED successfully\n", name);
 704:Src/File_Handling.c **** 	    	//Send_Uart(buf);
 705:Src/File_Handling.c **** 	    	free(buf);
 706:Src/File_Handling.c **** 	     }
 707:Src/File_Handling.c **** 	}
 708:Src/File_Handling.c ****     return fresult;
 709:Src/File_Handling.c **** }
 2047              		.loc 1 709 1 view .LVU542
 2048 0016 F8BD     		pop	{r3, r4, r5, r6, r7, pc}
 2049              	.LVL204:
 2050              	.L113:
 663:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 2051              		.loc 1 663 6 is_stmt 1 view .LVU543
 663:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 2052              		.loc 1 663 16 is_stmt 0 view .LVU544
 2053 0018 3222     		movs	r2, #50
 2054 001a 2146     		mov	r1, r4
 2055 001c 0D48     		ldr	r0, .L117+8
ARM GAS  /tmp/ccnfjbri.s 			page 55


 2056 001e FFF7FEFF 		bl	f_open
 2057              	.LVL205:
 663:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 2058              		.loc 1 663 14 discriminator 1 view .LVU545
 2059 0022 0B4B     		ldr	r3, .L117+4
 2060 0024 1870     		strb	r0, [r3]
 664:Src/File_Handling.c **** 	    {
 2061              		.loc 1 664 6 is_stmt 1 view .LVU546
 664:Src/File_Handling.c **** 	    {
 2062              		.loc 1 664 9 is_stmt 0 view .LVU547
 2063 0026 08B1     		cbz	r0, .L115
 2064              	.LBB33:
 666:Src/File_Handling.c **** 	    	//sprintf (buf, "ERROR!!! No. %d in opening file *%s*\n\n", fresult, name);
 2065              		.loc 1 666 7 is_stmt 1 view .LVU548
 669:Src/File_Handling.c **** 	        return fresult;
 2066              		.loc 1 669 10 view .LVU549
 670:Src/File_Handling.c **** 	    }
 2067              		.loc 1 670 10 view .LVU550
 670:Src/File_Handling.c **** 	    }
 2068              		.loc 1 670 17 is_stmt 0 view .LVU551
 2069 0028 C0B2     		uxtb	r0, r0
 2070 002a F4E7     		b	.L114
 2071              	.L115:
 2072              	.LBE33:
 674:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 2073              		.loc 1 674 6 is_stmt 1 view .LVU552
 674:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 2074              		.loc 1 674 16 is_stmt 0 view .LVU553
 2075 002c 094F     		ldr	r7, .L117+8
 2076 002e 0A4B     		ldr	r3, .L117+12
 2077 0030 3246     		mov	r2, r6
 2078 0032 2946     		mov	r1, r5
 2079 0034 3846     		mov	r0, r7
 2080 0036 FFF7FEFF 		bl	f_write
 2081              	.LVL206:
 674:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 2082              		.loc 1 674 14 discriminator 1 view .LVU554
 2083 003a 054C     		ldr	r4, .L117+4
 2084              	.LVL207:
 674:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 2085              		.loc 1 674 14 discriminator 1 view .LVU555
 2086 003c 2070     		strb	r0, [r4]
 675:Src/File_Handling.c **** 	    {
 2087              		.loc 1 675 6 is_stmt 1 view .LVU556
 685:Src/File_Handling.c **** 	    	//sprintf (buf, "*%s* UPDATED successfully\n", name);
 2088              		.loc 1 685 7 view .LVU557
 688:Src/File_Handling.c **** 	    }
 2089              		.loc 1 688 7 view .LVU558
 692:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 2090              		.loc 1 692 6 view .LVU559
 692:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 2091              		.loc 1 692 16 is_stmt 0 view .LVU560
 2092 003e 3846     		mov	r0, r7
 2093 0040 FFF7FEFF 		bl	f_close
 2094              	.LVL208:
 692:Src/File_Handling.c **** 	    if (fresult != FR_OK)
 2095              		.loc 1 692 14 discriminator 1 view .LVU561
ARM GAS  /tmp/ccnfjbri.s 			page 56


 2096 0044 2070     		strb	r0, [r4]
 693:Src/File_Handling.c **** 	    {
 2097              		.loc 1 693 6 is_stmt 1 view .LVU562
 702:Src/File_Handling.c **** 	    	//sprintf (buf, "File *%s* CLOSED successfully\n", name);
 2098              		.loc 1 702 7 view .LVU563
 705:Src/File_Handling.c **** 	     }
 2099              		.loc 1 705 7 view .LVU564
 708:Src/File_Handling.c **** }
 2100              		.loc 1 708 5 view .LVU565
 708:Src/File_Handling.c **** }
 2101              		.loc 1 708 12 is_stmt 0 view .LVU566
 2102 0046 C0B2     		uxtb	r0, r0
 2103 0048 E5E7     		b	.L114
 2104              	.L118:
 2105 004a 00BF     		.align	2
 2106              	.L117:
 2107 004c 00000000 		.word	fno
 2108 0050 00000000 		.word	fresult
 2109 0054 00000000 		.word	fil
 2110 0058 00000000 		.word	bw
 2111              		.cfi_endproc
 2112              	.LFE1201:
 2114              		.global	free_space
 2115              		.section	.bss.free_space,"aw",%nobits
 2116              		.align	2
 2119              	free_space:
 2120 0000 00000000 		.space	4
 2121              		.global	total
 2122              		.section	.bss.total,"aw",%nobits
 2123              		.align	2
 2126              	total:
 2127 0000 00000000 		.space	4
 2128              		.global	fre_clust
 2129              		.section	.bss.fre_clust,"aw",%nobits
 2130              		.align	2
 2133              	fre_clust:
 2134 0000 00000000 		.space	4
 2135              		.global	pfs
 2136              		.section	.bss.pfs,"aw",%nobits
 2137              		.align	2
 2140              	pfs:
 2141 0000 00000000 		.space	4
 2142              		.global	bw
 2143              		.section	.bss.bw,"aw",%nobits
 2144              		.align	2
 2147              	bw:
 2148 0000 00000000 		.space	4
 2149              		.global	br
 2150              		.section	.bss.br,"aw",%nobits
 2151              		.align	2
 2154              	br:
 2155 0000 00000000 		.space	4
 2156              		.global	fno
 2157              		.section	.bss.fno,"aw",%nobits
 2158              		.align	2
 2161              	fno:
 2162 0000 00000000 		.space	24
ARM GAS  /tmp/ccnfjbri.s 			page 57


 2162      00000000 
 2162      00000000 
 2162      00000000 
 2162      00000000 
 2163              		.global	fil
 2164              		.section	.bss.fil,"aw",%nobits
 2165              		.align	2
 2168              	fil:
 2169 0000 00000000 		.space	4144
 2169      00000000 
 2169      00000000 
 2169      00000000 
 2169      00000000 
 2170              		.global	fs
 2171              		.section	.bss.fs,"aw",%nobits
 2172              		.align	2
 2175              	fs:
 2176 0000 00000000 		.space	4148
 2176      00000000 
 2176      00000000 
 2176      00000000 
 2176      00000000 
 2177              		.text
 2178              	.Letext0:
 2179              		.file 2 "Middlewares/Third_Party/FatFs/src/integer.h"
 2180              		.file 3 "/usr/lib/gcc/arm-none-eabi/13.2.1/include/stdint.h"
 2181              		.file 4 "/usr/lib/gcc/arm-none-eabi/13.2.1/include/stddef.h"
 2182              		.file 5 "Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_ll_dma.h"
 2183              		.file 6 "Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_ll_tim.h"
 2184              		.file 7 "Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_ll_rcc.h"
 2185              		.file 8 "Middlewares/Third_Party/FatFs/src/ff.h"
 2186              		.file 9 "/usr/include/newlib/string.h"
 2187              		.file 10 "/usr/include/newlib/stdio.h"
 2188              		.file 11 "/usr/include/newlib/stdlib.h"
 2189              		.file 12 "<built-in>"
ARM GAS  /tmp/ccnfjbri.s 			page 58


DEFINED SYMBOLS
                            *ABS*:00000000 File_Handling.c
     /tmp/ccnfjbri.s:20     .text.Send_Uart:00000000 $t
     /tmp/ccnfjbri.s:26     .text.Send_Uart:00000000 Send_Uart
     /tmp/ccnfjbri.s:40     .text.Mount_SD:00000000 $t
     /tmp/ccnfjbri.s:46     .text.Mount_SD:00000000 Mount_SD
     /tmp/ccnfjbri.s:86     .text.Mount_SD:0000001c $d
     /tmp/ccnfjbri.s:2175   .bss.fs:00000000 fs
     /tmp/ccnfjbri.s:92     .text.Unmount_SD:00000000 $t
     /tmp/ccnfjbri.s:98     .text.Unmount_SD:00000000 Unmount_SD
     /tmp/ccnfjbri.s:138    .text.Unmount_SD:0000001c $d
     /tmp/ccnfjbri.s:143    .rodata.Scan_SD.str1.4:00000000 $d
     /tmp/ccnfjbri.s:156    .text.Scan_SD:00000000 $t
     /tmp/ccnfjbri.s:162    .text.Scan_SD:00000000 Scan_SD
     /tmp/ccnfjbri.s:344    .text.Scan_SD:000000b8 $d
     /tmp/ccnfjbri.s:2161   .bss.fno:00000000 fno
     /tmp/ccnfjbri.s:355    .rodata.Format_SD.str1.4:00000000 $d
     /tmp/ccnfjbri.s:359    .text.Format_SD:00000000 $t
     /tmp/ccnfjbri.s:365    .text.Format_SD:00000000 Format_SD
     /tmp/ccnfjbri.s:485    .text.Format_SD:00000078 $d
     /tmp/ccnfjbri.s:494    .text.Write_File:00000000 $t
     /tmp/ccnfjbri.s:500    .text.Write_File:00000000 Write_File
     /tmp/ccnfjbri.s:604    .text.Write_File:00000050 $d
     /tmp/ccnfjbri.s:2168   .bss.fil:00000000 fil
     /tmp/ccnfjbri.s:2147   .bss.bw:00000000 bw
     /tmp/ccnfjbri.s:612    .text.Write_File_byte:00000000 $t
     /tmp/ccnfjbri.s:618    .text.Write_File_byte:00000000 Write_File_byte
     /tmp/ccnfjbri.s:721    .text.Write_File_byte:0000004c $d
     /tmp/ccnfjbri.s:729    .rodata.Read_File.str1.4:00000000 $d
     /tmp/ccnfjbri.s:745    .text.Read_File:00000000 $t
     /tmp/ccnfjbri.s:751    .text.Read_File:00000000 Read_File
     /tmp/ccnfjbri.s:976    .text.Read_File:000000e4 $d
     /tmp/ccnfjbri.s:2154   .bss.br:00000000 br
     /tmp/ccnfjbri.s:991    .rodata.Seek_Read_File.str1.4:00000000 $d
     /tmp/ccnfjbri.s:995    .text.Seek_Read_File:00000000 $t
     /tmp/ccnfjbri.s:1001   .text.Seek_Read_File:00000000 Seek_Read_File
     /tmp/ccnfjbri.s:1271   .text.Seek_Read_File:0000011c $d
     /tmp/ccnfjbri.s:1287   .text.Create_File:00000000 $t
     /tmp/ccnfjbri.s:1293   .text.Create_File:00000000 Create_File
     /tmp/ccnfjbri.s:1372   .text.Create_File:00000038 $d
     /tmp/ccnfjbri.s:1379   .text.Update_File:00000000 $t
     /tmp/ccnfjbri.s:1385   .text.Update_File:00000000 Update_File
     /tmp/ccnfjbri.s:1489   .text.Update_File:00000050 $d
     /tmp/ccnfjbri.s:1497   .rodata.Remove_File.str1.4:00000000 $d
     /tmp/ccnfjbri.s:1507   .text.Remove_File:00000000 $t
     /tmp/ccnfjbri.s:1513   .text.Remove_File:00000000 Remove_File
     /tmp/ccnfjbri.s:1632   .text.Remove_File:00000070 $d
     /tmp/ccnfjbri.s:1642   .rodata.Create_Dir.str1.4:00000000 $d
     /tmp/ccnfjbri.s:1649   .text.Create_Dir:00000000 $t
     /tmp/ccnfjbri.s:1655   .text.Create_Dir:00000000 Create_Dir
     /tmp/ccnfjbri.s:1734   .text.Create_Dir:00000048 $d
     /tmp/ccnfjbri.s:1742   .rodata.Check_SD_Space.str1.4:00000000 $d
     /tmp/ccnfjbri.s:1752   .text.Check_SD_Space:00000000 $t
     /tmp/ccnfjbri.s:1758   .text.Check_SD_Space:00000000 Check_SD_Space
     /tmp/ccnfjbri.s:1870   .text.Check_SD_Space:00000094 $d
     /tmp/ccnfjbri.s:2140   .bss.pfs:00000000 pfs
     /tmp/ccnfjbri.s:2133   .bss.fre_clust:00000000 fre_clust
ARM GAS  /tmp/ccnfjbri.s 			page 59


     /tmp/ccnfjbri.s:2126   .bss.total:00000000 total
     /tmp/ccnfjbri.s:2119   .bss.free_space:00000000 free_space
     /tmp/ccnfjbri.s:1881   .text.Update_File_float:00000000 $t
     /tmp/ccnfjbri.s:1887   .text.Update_File_float:00000000 Update_File_float
     /tmp/ccnfjbri.s:1990   .text.Update_File_float:0000004c $d
     /tmp/ccnfjbri.s:1998   .text.Update_File_byte:00000000 $t
     /tmp/ccnfjbri.s:2004   .text.Update_File_byte:00000000 Update_File_byte
     /tmp/ccnfjbri.s:2107   .text.Update_File_byte:0000004c $d
     /tmp/ccnfjbri.s:2116   .bss.free_space:00000000 $d
     /tmp/ccnfjbri.s:2123   .bss.total:00000000 $d
     /tmp/ccnfjbri.s:2130   .bss.fre_clust:00000000 $d
     /tmp/ccnfjbri.s:2137   .bss.pfs:00000000 $d
     /tmp/ccnfjbri.s:2144   .bss.bw:00000000 $d
     /tmp/ccnfjbri.s:2151   .bss.br:00000000 $d
     /tmp/ccnfjbri.s:2158   .bss.fno:00000000 $d
     /tmp/ccnfjbri.s:2165   .bss.fil:00000000 $d
     /tmp/ccnfjbri.s:2172   .bss.fs:00000000 $d

UNDEFINED SYMBOLS
f_mount
fresult
malloc
strcpy
f_opendir
sprintf
free
f_readdir
strcmp
strlen
f_closedir
f_unlink
f_stat
f_open
f_write
f_close
f_read
f_lseek
sizeoffile
f_mkdir
f_getfree
