-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplatform_config.h
150 lines (110 loc) · 3.54 KB
/
platform_config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
// Automatically generated header file for NUCLEOF411RE
// Generated by scripts/build_platform_config.py
#ifndef _PLATFORM_CONFIG_H
#define _PLATFORM_CONFIG_H
/*
// SYSTICK is the counter that counts up and that we use as the real-time clock
// The smaller this is, the longer we spend in interrupts, but also the more we can sleep!
#define SYSTICK_RANGE 0x1000000 // the Maximum (it is a 24 bit counter) - on Olimexino this is about 0.6 sec
#define SYSTICKS_BEFORE_USB_DISCONNECT 2
*/
#ifdef TARGET_NRF51822
#define RAM_TOTAL (0x2000)
#define FLASH_TOTAL (0x2A000)
#define HASNOOPENDRAIN
#elif TARGET_LPC11U24
#define RAM_TOTAL (0x1F40)
#define FLASH_TOTAL (32*1024)
#elif TARGET_ARCH_MAX
#define RAM_TOTAL (128*1024)
#define FLASH_TOTAL (1024*1024)
#elif TARGET_ARCH_MAX
#define RAM_TOTAL (128*1024)
#define FLASH_TOTAL (1024*1024)
#elif TARGET_LPC1768
#define RAM_TOTAL (32*1024)
#define FLASH_TOTAL (512*1024)
#elif TARGET_NUCLEO_F103RB
#define RAM_TOTAL (20*1024)
#define FLASH_TOTAL (128*1024)
#elif TARGET_NUCLEO_F401RE
#define RAM_TOTAL (96*1024)
#define FLASH_TOTAL (512*1024)
#elif TARGET_NUCLEO_F411RE
#define RAM_TOTAL (128*1024)
#define FLASH_TOTAL (512*1024)
#elif TARGET_NUCLEO_F334R8
#define RAM_TOTAL (12*1024)
#define FLASH_TOTAL (64*1024)
#elif TARGET_NUCLEO_F302R8
#define RAM_TOTAL (16*1024)
#define FLASH_TOTAL (64*1024)
#elif TARGET_NUCLEO_F303RE
#define RAM_TOTAL (64*1024)
#define FLASH_TOTAL (512*1024)
#elif TARGET_NUCLEO_L152RE
#define RAM_TOTAL (0x14000-0x13C)
#define FLASH_TOTAL (512*1024)
#elif TARGET_NUCLEO_L053R8
#define RAM_TOTAL (8*1024)
#define FLASH_TOTAL (64*1024)
#elif TARGET_NUCLEO_F030R8
#define RAM_TOTAL (8*1024)
#define FLASH_TOTAL (64*1024)
#elif TARGET_NUCLEO_F070RB
#define RAM_TOTAL (16*1024)
#define FLASH_TOTAL (128*1024)
#elif TARGET_NUCLEO_F072RB
#define RAM_TOTAL (16*1024)
#define FLASH_TOTAL (128*1024)
#elif TARGET_NUCLEO_F091RC
#define RAM_TOTAL (32*1024)
#define FLASH_TOTAL (256*1024)
#elif TARGET_KL46Z
#define RAM_TOTAL (32*1024)
#define FLASH_TOTAL (256*1024)
#define HASNOOPENDRAIN
#elif TARGET_KL25Z
#define RAM_TOTAL (16*1024)
#define FLASH_TOTAL (128*1024)
#define HASNOOPENDRAIN
#define HASNOPULLDOWN
#elif TARGET_K20D50M
#define RAM_TOTAL (16*1024)
#define FLASH_TOTAL (128*1024)
#define HASNOOPENDRAIN
#elif TARGET_K22F
#define RAM_TOTAL (0x000020000 - 0x00000400)
#define FLASH_TOTAL (0x000080000 - 0x00000410)
#define HASNOOPENDRAIN
#elif TARGET_K64F
#define RAM_TOTAL (0x00040000 - 0x00000198)
#define FLASH_TOTAL (0x00100000 - 0x00000410)
#define HASNOOPENDRAIN
#elif TARGET_KL05Z
#define RAM_TOTAL (4*1024)
#define FLASH_TOTAL (32*1024)
#define HASNOOPENDRAIN
#define HASNOPULLDOWN
#elif TARGET_lpc11u68
#define RAM_TOTAL (0x8000-0x100) // fix me
#define FLASH_TOTAL (0x40000)
#elif TARGET_LPC1549
#define RAM_TOTAL (16*1024) //fix me
#define FLASH_TOTAL (256*1024)
#elif TARGET_LPC824
#define RAM_TOTAL (0x2000-0xC0)
#define FLASH_TOTAL (0x8000)
#elif TARGET_LPC11U24
#define RAM_TOTAL (0x1F40)
#define FLASH_TOTAL (48*1024)
#endif
#define JSVAR_CACHE_SIZE ((RAM_TOTAL - 12 * 1024)/16 - 1) // Number of JavaScript variables in RAM
// When to send the message that the IO buffer is getting full
#define IOBUFFER_XOFF ((TXBUFFERMASK)*6/8)
// When to send the message that we can start receiving again
#define IOBUFFER_XON ((TXBUFFERMASK)*3/8)
#define IOBUFFERMASK ((RAM_TOTAL < 20 * 1024 ? 64:128) - 1) // amount of items in event buffer
#define TXBUFFERMASK ((RAM_TOTAL < 20 * 1024 ? 32:128) - 1)
#define UTILTIMERTASK_TASKS (RAM_TOTAL < 20 * 1024 ? 4:16)
#endif // _PLATFORM_CONFIG_H