LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dualcore_common.h
Go to the documentation of this file.
1 /*
2  * @brief LPC43XX dual core common functions and defines
3  *
4  * @note
5  * Copyright(C) NXP Semiconductors, 2012
6  * All rights reserved.
7  *
8  * @par
9  * Software that is described herein is for illustrative purposes only
10  * which provides customers with programming information regarding the
11  * LPC products. This software is supplied "AS IS" without any warranties of
12  * any kind, and NXP Semiconductors and its licensor disclaim any and
13  * all warranties, express or implied, including all implied warranties of
14  * merchantability, fitness for a particular purpose and non-infringement of
15  * intellectual property rights. NXP Semiconductors assumes no responsibility
16  * or liability for the use of the software, conveys no license or rights under any
17  * patent, copyright, mask work right, or any other intellectual property rights in
18  * or to any products. NXP Semiconductors reserves the right to make changes
19  * in the software without notification. NXP Semiconductors also makes no
20  * representation or warranty that such application will be suitable for the
21  * specified use without further testing or modification.
22  *
23  * @par
24  * Permission to use, copy, modify, and distribute this software and its
25  * documentation is hereby granted, under NXP Semiconductors' and its
26  * licensor's relevant copyrights in the software, without fee, provided that it
27  * is used in conjunction with NXP Semiconductors microcontrollers. This
28  * copyright, permission, and disclaimer notice must appear in all copies of
29  * this code.
30  */
31 
32 #ifndef __DUALCORE_COMMON_H_
33 #define __DUALCORE_COMMON_H_
34 
46 /*
47  * Select the default device to which the image
48  * be loaded, based on the board. It could be overridden
49  * by the user by defining one of the TARGET_XXXXX in the
50  * compiler defines.
51  */
52 #if (!defined(TARGET_SPIFI) && !defined(TARGET_IFLASH) && !defined(TARGET_XFLASH))
53  #ifdef BOARD_HITEX_EVA_18504350
54  #define TARGET_SPIFI
55  #elif defined(BOARD_KEIL_MCB_18574357)
56  #define TARGET_IFLASH
57  #elif defined(BOARD_NGX_XPLORER_18304330)
58  #define TARGET_SPIFI
59  #else
60  #error "Unknown load target!"
61  #endif
62 #endif
63 
64 /* Selecting base address based on Target */
65 #ifdef TARGET_SPIFI
66  #define IMAGE_BASE_ADDR (SPIFI_BASE_ADDR)
67 #elif defined(TARGET_XFLASH)
68  #define IMAGE_BASE_ADDR (XFLASH_BASE_ADDR)
69 #elif defined(TARGET_IFLASH)
70  #define IMAGE_BASE_ADDR (IFLASH_BASE_ADDR)
71 #else
72  #error "Unknown load target!"
73 #endif
74 
75 /* Compiler specific attributes */
76 #if defined(__IAR_SYSTEMS_ICC__)
77  #define LOCATE_ATX(x) _Pragma(#x)
78  #define LOCATE_ATXX(x) LOCATE_ATX(location=x)
79  #define LOCATE_AT(x) LOCATE_ATXX(x)
80  #define WEAK_SYMBOL __weak
81 #elif defined(__ARMCC_VERSION)
82  #define LOCATE_AT(x) __attribute__((at(x)))
83  #define WEAK_SYMBOL __attribute__((weak))
84 #elif (defined(__CODE_RED))
85  #define LOCATE_ATX(x) __attribute__((section(".shmem_"#x ",\"aw\",%nobits@")))
86  #define LOCATE_AT(x) LOCATE_ATX(x)
87  #define WEAK_SYMBOL __attribute__((weak))
88 #else
89  #error "Unsupported Compiler/Tool-Chain!"
90 #endif
91 
92 #ifdef __cplusplus
93 extern "C" {
94 #endif
95 
107 extern void IPCEX_Init(void);
108 
119 extern void USBHOST_Init(void);
120 
131 extern void USBDEV_Init(void);
132 
147 extern void LWIP_Init(void);
148 
161 extern void EMWIN_Init(void);
162 
175 extern void BLINKY_Init(void);
176 
187 extern void ipcex_tasks(void);
188 
200 extern void blinky_tasks(void);
201 
212 extern void usb_host_tasks(void);
213 
224 extern void usb_device_tasks(void);
225 
238 extern void lwip_tasks(void);
239 
250 extern void emwin_tasks(void);
251 
262 void MSleep(int32_t msecs);
263 
273 int M0Image_Boot(uint32_t m0_image_addr);
274 
275 #ifdef __cplusplus
276 }
277 #endif
278 
283 #endif