MDK-ARM Keil, MDK-ARM Datasheet - Page 52
![KIT REALVIEW MCU DEVELOPMENT](/photos/9/32/93274/mdk-arm_sml.jpg)
MDK-ARM
Manufacturer Part Number
MDK-ARM
Description
KIT REALVIEW MCU DEVELOPMENT
Manufacturer
Keil
Type
Compiler and IDEr
Specifications of MDK-ARM
For Use With/related Products
ARM MCUs
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
- Current page: 52 of 156
- Download datasheet (3Mb)
52
File I/O Routines
Once the file system has been configured, we can manipulate files.
To create a file, open a file on the volume and define a handler to it. This
handler, with which we can read and write to the file, is a pointer to the open file.
#include <stdio.h>
FILE *Fptr;
Include the
file and check that it has opened. fopen() requires a string for the file name and
an access attribute, which can be “w” write, “a” append, or “r” read.
Fptr = fopen ("Test.txt","w");
If the file cannot be created or opened, a NULL pointer is returned.
if (Fptr == NULL)
}
Once you have finished using the file, you must close it by calling fclose(). Up to
this point, all data written to the file is buffered in the heap space. When you
close the file, the data is written to the physical storage media. Consider this
carefully if you have multiple file streams or are storing large streams of data.
fclose (Fptr);
Once we have created a file, a number of functions help us work with it.
Function
fopen
fclose
fflush
Function
feof
ferror
fseek
ftell
rewind
…;
stdio.h
Description
Creates a new file or opens an existing file.
Writes buffered data to a file and then closes the file.
Writes buffered data to a file.
Description
Reports whether the end of the file stream has been reached.
Reports whether there is an error in the file steam.
Moves the file stream in pointer to a new location.
Gets the current location of the file pointer.
Moves the file stream in file pointer to the beginning of the file.
library to define our file handler as type FILE. Next, create a
{
// error handler
Chapter 3. RL-Flash Introduction
Related parts for MDK-ARM
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![MDK-ARM-B](/photos/28/43/284363/mdk-arm-basic_tmb.jpg)
Part Number:
Description:
KIT REALVIEW MCU DEVELOPMENT
Manufacturer:
Keil
Datasheet:
![MDK-ARM-B-SM](/photos/15/87/158780/keil_software_tmb.jpg)
Part Number:
Description:
Development Software SUPPORT EXTENSION FOR MDK-ARM-B
Manufacturer:
Keil Software
![MDK-ARM-SM](/photos/15/87/158780/keil_software_tmb.jpg)
Part Number:
Description:
Development Software SUPPORT EXTENSION FOR MDK-ARM
Manufacturer:
Keil Software
![MDK-ARM-BASIC](/photos/28/43/284363/mdk-arm-basic_tmb.jpg)
Part Number:
Description:
KIT REALVIEW MCU DEVELOPMENT
Manufacturer:
Keil
Datasheet:
![MDK-ARM-UF](/photos/15/87/158780/keil_software_tmb.jpg)
Part Number:
Description:
Development Software MCU DEV KIT FOR ARM UPG TO FLOATING LIC
Manufacturer:
Keil Tools
![MDK-ARM-F](/photos/15/87/158780/keil_software_tmb.jpg)
Part Number:
Description:
Development Software MCU DEV KIT FOR ARM W/ FLOATING LICENSE
Manufacturer:
Keil Software
![MDK-ARM3.1](/photos/26/86/268691/landingpagekeilrealviewarmkit_tmb.jpg)
Part Number:
Description:
Development Software MCU DEV KIT FOR ARM uVISION & C++ & RTX
Manufacturer:
Keil Tools
![MDK-ARM-SMB](/images/no-image3.png)
Part Number:
Description:
Development Software SUPP LICENSE RENEWAL 90+ DAYS NO TECH SUP
Manufacturer:
Keil Software
![KEIL-PK51-INTL](/images/manufacturer_photos/0/6/609/silicon_laboratories_inc_tmb.jpg)
Part Number:
Description:
KEIL C-COMPILER INTERNATIONAL
Manufacturer:
Silicon Laboratories Inc
![OM10045](/photos/9/21/92162/om10045_tmb.jpg)
Part Number:
Description:
BOARD EVAL FOR LPC213X ARM MCU
Manufacturer:
NXP Semiconductors
Datasheet:
![TWR-K60N512-KEIL](/images/manufacturer_photos/0/2/262/freescale_semiconductor_tmb.jpg)
Part Number:
Description:
K60N512 Keil Tower Kit
Manufacturer:
Freescale Semiconductor
Datasheet: