Студопедия

КАТЕГОРИИ:

АстрономияБиологияГеографияДругие языкиДругоеИнформатикаИсторияКультураЛитератураЛогикаМатематикаМедицинаМеханикаОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРиторикаСоциологияСпортСтроительствоТехнологияФизикаФилософияФинансыХимияЧерчениеЭкологияЭкономикаЭлектроника


Using Flash Devices




Using Flash Device explains the steps to create applications for embedded Flash devices.

Include into the project and configure the following source files:

  1. The library that matches the device core:
    FS_CM3.lib for Cortex-M devices.
    FS_ARM_L.lib for ARM7 or ARM9 devices.
  2. The description files:
    FS_FlashDev.h containing the sector layout.
    FS_FlashPrg.c containing the Flash programming algorithm.
  3. The configuration files:
    File_Config.c for configuring the device.
    Retarget.c for configuring the output.
  4. The main file for initializing and connecting the Flash device.

5. #include <RTL.h>

6. #include "Em_File.h"

7.

8. int main (void) {

9. ...

10. init_comm (); // initialize communication port

11. init_file (); // initialize and format device

12.

13. while (1) {

14. ... // add the code

15. }

16. }

Applications can be created using existing µVision projects as templates.

  1. Copy all files from any folder \ARM\Boards\vendor\board\RL\FlashFS\EM_File to a new folder and open the project *.uvproj with µVision. RTX projects are using the RTX-RTOS. However, the configuration does not differ.
  2. Open the file File_Config.c and configure the Flash device using the Configuration Wizard.
  3. Enable Flash Drive and set the device characteristics.

  1. Adapt the code in the files FS_FlashDev.h and FS_FlashPrg.c that contain the sector layout and Flash programming algorithms.
  2. Modify the code to the application needs.

Note

  • Configuration options are described in Flash Drive.

 


Поделиться:

Дата добавления: 2015-09-15; просмотров: 62; Мы поможем в написании вашей работы!; Нарушение авторских прав





lektsii.com - Лекции.Ком - 2014-2024 год. (0.008 сек.) Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав
Главная страница Случайная страница Контакты