CMSIS2000  0.0.7
 Указатель Структуры данных Файлы Функции Переменные Определения типов Перечисления Элементы перечислений Макросы Группы Страницы
uboot_file.h
См. документацию.
1 /*
2  * CMSIS2000
3  * CMSIS-like sources for LPC2xxx series MCUs
4  *
5  * (C) Copyright 2011-2012, Dmitriy Cherepanov, All Rights Reserved
6  *
7  * Version: 0.0.7
8  * Date of the Last Update: 2013-03-04
9  *
10  * Permission is hereby granted, free of charge, to any person obtaining a copy
11  * of this software and associated documentation files (the "Software"), to
12  * deal in the Software without restriction, including without limitation the
13  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
14  * sell copies of the Software, and to permit persons to whom the Software is
15  * furnished to do so, subject to the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be included in
18  * all copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
26  * IN THE SOFTWARE.
27  *
28  * Do not be lasy! For the latest version see http://irtos.sourceforge.net .
29  *
30  *
31 #*/
32 /*----------------------------------------------------------------------------*/
33 /**
34 \file find and load file in memory
35 \author Cherepanov Dmitiy
36 */
37 /*----------------------------------------------------------------------------*/
38 #ifndef UTILS_UBOOT_FILE
39 #define UTILS_UBOOT_FILE
40 
41 ///type of address bus in MCU
42 #define flash_addr_t unsigned int
43 /*----------------------------------------------------------------------------*/
44 /**
45  * Search uboot image in MCU bus address space and check CRC
46  * \return (-1) if not found
47  */
48 flash_addr_t find_uboot_file (flash_addr_t search_start_address,
49  flash_addr_t search_end_address );
50 
51 
52 //#define SKIP_CRC_CHECKING (!0)
53 /*
54  * load uboot image to RAM on MCU bus (memcpy) and check crc
55  * \par no_need_crc if no_need_crc == 0 then image will be crc checked
56  * \return address of run point or -1 if something goes wrong
57  */
58 //flash_addr_t uboot_file_load_and_check_crc (flash_addr_t src_address, uint32_t no_need_crc );
59 
60 
61 /**
62  * load uboot image to RAM on MCU bus (memcpy)
63  * \return address of run point or -1 if something goes wrong
64  */
65 
67 
68 
69 /**
70  * get load uboot image address at RAM
71  * \return destination address of load image in RAM
72  */
74 
75 
76 #define HAS_FULL_IMAGE 0
77 #define HAS_HDR_ONLY (!(HAS_FULL_IMAGE))
78 
79 unsigned int uboot_check_image_at_addr (const void * const addr,char only_header);
80 
81 #endif