Kinetis Bootloader Host
2.0.0
Host Tools for Kinetis devices
Introduction
Related Pages
Modules
src/blfwk/stdafx.h
1
/*
2
* Copyright (c) 2013-14, 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 stdafx_h_
31
#define stdafx_h_
32
33
// stdafx.h : include file for standard system include files,
34
// or project specific include files that are used frequently, but
35
// are changed infrequently
36
//
37
38
// Default to external release.
39
#ifndef SGTL_INTERNAL
40
#define SGTL_INTERNAL 0
41
#endif
42
43
#include <iostream>
44
#include <stdexcept>
45
#include <stdint.h>
46
47
#if defined(WIN32)
48
//#include <tchar.h>
49
50
// define this macro for use in VC++
51
#if !defined(__LITTLE_ENDIAN__)
52
#define __LITTLE_ENDIAN__ 1
53
#endif // !defined(__LITTLE_ENDIAN__)
54
#endif // defined(WIN32)
55
56
#if defined(LINUX)
57
// For Linux systems only, types.h only defines the signed
58
// integer types. This is not professional code.
59
// Update: They are defined in the header files in the more recent version of redhat enterprise gcc.
60
//#include "/usr/include/sys/types.h"
61
//#include <stdint.h>
62
// typedef unsigned long uint32_t;
63
// typedef unsigned short uint16_t;
64
// typedef unsigned char uint8_t;
65
66
//#define TCHAR char
67
//#define _tmain main
68
69
// give a default endian in case one is not defined on Linux (it should be, though)
70
#if !defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
71
#define __LITTLE_ENDIAN__ 1
72
#endif // !defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
73
74
#endif // defined(Linux)
75
76
// gcc on Mac OS X
77
#if defined(__GNUC__) && (defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__MACOS_CLASSIC__))
78
#include <TargetConditionals.h>
79
80
#if defined(TARGET_RT_LITTLE_ENDIAN) && TARGET_RT_LITTLE_ENDIAN
81
#if !defined(__LITTLE_ENDIAN__)
82
#define __LITTLE_ENDIAN__
83
#endif
84
#elif defined(TARGET_RT_BIG_ENDIAN) && TARGET_RT_BIG_ENDIAN
85
#if !defined(__BIG_ENDIAN__)
86
#define __BIG_ENDIAN__
87
#endif
88
#endif
89
#endif
90
91
#if !defined(TRUE)
92
#define TRUE 1
93
#endif // !defined(TRUE)
94
95
#if !defined(FALSE)
96
#define FALSE 0
97
#endif // !defined(FALSE)
98
99
#endif // stdafx_h_
src
blfwk
stdafx.h
Generated on Mon Mar 7 2016 16:49:50 for Kinetis Bootloader Host by
1.8.11