Kinetis Bootloader
2.0.0
Common bootloader for Kinetis devices
Introduction
Related Pages
Modules
bootloader_config.h
1
/*
2
* Copyright (c) 2014-2015, Freescale Semiconductor, Inc.
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without modification,
6
* are permitted provided that the following conditions are met:
7
*
8
* o Redistributions of source code must retain the above copyright notice, this list
9
* of conditions and the following disclaimer.
10
*
11
* o Redistributions in binary form must reproduce the above copyright notice, this
12
* list of conditions and the following disclaimer in the documentation and/or
13
* other materials provided with the distribution.
14
*
15
* o Neither the name of Freescale Semiconductor, Inc. nor the names of its
16
* contributors may be used to endorse or promote products derived from this
17
* software without specific prior written permission.
18
*
19
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
*/
30
#ifndef __BOOTLOADER_CONFIG_H__
31
#define __BOOTLOADER_CONFIG_H__
32
34
// Definitions
36
37
//
38
// Bootloader configuration options
39
//
40
42
43
44
#if !defined(BL_CONFIG_UART)
45
#define BL_CONFIG_UART (1)
46
#endif
47
#if !defined(BL_CONFIG_SCUART)
48
#define BL_CONFIG_SCUART (1)
49
#endif
50
#if !defined(BL_CONFIG_LPUART)
51
#define BL_CONFIG_LPUART (1)
52
#endif
53
54
#if !defined(BL_CONFIG_CAN)
55
#define BL_CONFIG_CAN (1)
56
#endif
57
58
#if !defined(BL_CONFIG_I2C)
59
#define BL_CONFIG_I2C (1)
60
#endif
61
62
#if !defined(BL_CONFIG_SPI)
63
#define BL_CONFIG_SPI (1)
64
#endif
65
#if !defined(BL_CONFIG_DSPI)
66
#define BL_CONFIG_DSPI (1)
67
#endif
68
69
#if !defined(BL_CONFIG_USB)
70
#define BL_CONFIG_USB (1)
71
#endif
72
#if !defined(BL_CONFIG_USB_HID)
73
#define BL_CONFIG_USB_HID (0)
74
#endif
75
#if !defined(BL_CONFIG_USB_MSC)
76
#define BL_CONFIG_USB_MSC (1)
77
#endif
78
79
#if !defined(BL_CONFIG_USB_HID)
80
#define BL_CONFIG_USB_HID (1)
81
#endif
82
#if !defined(BL_CONFIG_HS_USB_HID)
83
#define BL_CONFIG_HS_USB_HID (0) // For TOWER and FRDM boards
84
#endif
85
86
#if !defined(BL_CONFIG_HS_USB_MSC)
87
#define BL_CONFIG_HS_USB_MSC (1) // For TOWER and FRDM boards
88
#endif
89
90
91
#if !defined(BL_TARGET_FLASH) && !defined(BL_TARGET_RAM)
92
#define BL_TARGET_FLASH (1)
93
#endif
94
95
#if !defined(BL_TARGET_RAM)
96
#define BL_FEATURE_CRC_CHECK (1)
97
#endif
98
99
#define BL_FEATURE_QSPI_MODULE (0)
100
101
#define BL_FEATURE_ENCRYPTION (1)
102
103
#define BL_FEATURE_UART_AUTOBAUD_IRQ (1)
104
105
// Bootloader peripheral detection default timeout in milliseconds
106
// After coming out of reset the bootloader will spin in a peripheral detection
107
// loop for this amount of time. A zero value means no time out.
108
#if DEBUG
109
#define BL_DEFAULT_PERIPHERAL_DETECT_TIMEOUT 0
110
#else
111
#define BL_DEFAULT_PERIPHERAL_DETECT_TIMEOUT 5000
112
#endif // DEBUG
113
114
#define BL_FEATURE_POWERDOWN (0)
115
116
// Bootloader powerdown timeout in milliseconds
117
// The bootloader enters a low power mode after waiting for this amount of time. A zero value means // no time out. Only
118
// applicable if BL_FEATURE_POWERDOWN is enabled.
119
#if DEBUG
120
#define BL_DEFAULT_POWERDOWN_TIMEOUT 10000
121
#else
122
#define BL_DEFAULT_POWERDOWN_TIMEOUT 600000
123
#endif // DEBUG
124
125
// The bootloader will check this address for the application vector table upon startup.
126
#if !defined(BL_APP_VECTOR_TABLE_ADDRESS)
127
#define BL_APP_VECTOR_TABLE_ADDRESS 0xa000
128
#endif
129
130
/* Serial Port Info */
131
132
/**************************************************************************
133
* Note:
134
*
135
* Because of the changes to the UART modules, we can no longer define
136
* the TERM_PORT as a base pointer. The uart functions have been modified
137
* accommodate this change. Now, TERM_PORT_NUM must be defined as the
138
* number of the UART port desired to use
139
*
140
* TERM_PORT_NUM = 0 -- This allows you to use UART0; default pins are
141
* PTA14 and PTA15
142
*
143
* TERM_PORT_NUM = 1 -- This allows you to use UART1; default pins are
144
* PTC3 and PTC4
145
*
146
* TERM_PORT_NUM = 2 -- This allows you to use UART2; default pins are
147
* PTD2 and PTD3
148
*
149
*************************************************************************/
150
#define TERM_PORT_NUM 0
151
152
#define TERMINAL_BAUD 19200
153
#undef HW_FLOW_CONTROL
154
155
#endif // __BOOTLOADER_CONFIG_H__
156
// EOF
validation
embedded_host
src
bootloader_config.h
Generated on Mon Mar 7 2016 16:48:23 for Kinetis Bootloader by
1.8.11