LPCOpen Platform
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 #elif defined(__ARMCC_VERSION)
81  #define LOCATE_AT(x) __attribute__((at(x)))
82 #elif (defined(__CODE_RED))
83  #define LOCATE_ATX(x) __attribute__((section(".shmem_"#x ",\"aw\",%nobits@")))
84  #define LOCATE_AT(x) LOCATE_ATX(x)
85 #else
86  #error "Unsupported Compiler/Tool-Chain!"
87 #endif
88 
89 #ifdef __cplusplus
90 extern "C" {
91 #endif
92 
104 extern void IPCEX_Init(void);
105 
116 extern void USBHOST_Init(void);
117 
128 extern void USBDEV_Init(void);
129 
144 extern void LWIP_Init(void);
145 
158 extern void EMWIN_Init(void);
159 
172 extern void BLINKY_Init(void);
173 
184 extern void ipcex_tasks(void);
185 
197 extern void blinky_tasks(void);
198 
209 extern void usb_host_tasks(void);
210 
221 extern void usb_device_tasks(void);
222 
235 extern void lwip_tasks(void);
236 
247 extern void emwin_tasks(void);
248 
259 void MSleep(int32_t msecs);
260 
270 int M0Image_Boot(uint32_t m0_image_addr);
271 
272 #ifdef __cplusplus
273 }
274 #endif
275 
280 #endif