PICSimLab - Programmable IC Simulator Laboratory
0.9.3
PICSimLab - API
Loading...
Searching...
No Matches
picsimlab6_mplabx.h
1
/* ########################################################################
2
3
PICSimLab - Programmable IC Simulator Laboratory
4
5
########################################################################
6
7
Copyright (c) : 2010-2026 Luis Claudio GambĂ´a Lopes <lcgamboa@yahoo.com>
8
9
This program is free software; you can redistribute it and/or modify
10
it under the terms of the GNU General Public License as published by
11
the Free Software Foundation; either version 2, or (at your option)
12
any later version.
13
14
This program is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License
20
along with this program; if not, write to the Free Software
21
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
23
For e-mail suggestions : lcgamboa@yahoo.com
24
######################################################################## */
25
26
#ifndef CPWINDOW6MPLABX
27
#define CPWINDOW6MPLABX
28
29
static
const
char
project_xml[] =
30
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
31
"<project xmlns=\"http://www.netbeans.org/ns/project/1\">\n"
32
" <type>com.microchip.mplab.nbide.embedded.makeproject</type>\n"
33
" <configuration>\n"
34
" <data xmlns=\"http://www.netbeans.org/ns/make-project/1\">\n"
35
" <name>%s</name>\n"
36
" <creation-uuid>ea0a34a0-5fc7-4a39-9009-%012lx</creation-uuid>\n"
37
" <make-project-type>0</make-project-type>\n"
38
" <sourceEncoding>UTF-8</sourceEncoding>\n"
39
" <make-dep-projects/>\n"
40
" <sourceRootList/>\n"
41
" <confList>\n"
42
" <confElem>\n"
43
" <name>default</name>\n"
44
" <type>2</type>\n"
45
" </confElem>\n"
46
" </confList>\n"
47
" <formatting>\n"
48
" <project-formatting-style>false</project-formatting-style>\n"
49
" </formatting>\n"
50
" </data>\n"
51
" </configuration>\n"
52
"</project>\n"
;
53
54
static
const
char
configurations_xml[] =
55
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
56
"<configurationDescriptor version=\"65\">\n"
57
" <logicalFolder name=\"root\" displayName=\"root\" projectFiles=\"true\">\n"
58
" <logicalFolder name=\"HeaderFiles\"\n"
59
" displayName=\"Header Files\"\n"
60
" projectFiles=\"true\">\n%s"
61
" </logicalFolder>\n"
62
" <logicalFolder name=\"ExternalFiles\"\n"
63
" displayName=\"Important Files\"\n"
64
" projectFiles=\"true\">\n"
65
" <itemPath>Makefile</itemPath>\n"
66
" </logicalFolder>\n"
67
" <logicalFolder name=\"LinkerScript\"\n"
68
" displayName=\"Linker Files\"\n"
69
" projectFiles=\"true\">\n"
70
" </logicalFolder>\n"
71
" <logicalFolder name=\"SourceFiles\"\n"
72
" displayName=\"Source Files\"\n"
73
" projectFiles=\"true\">\n%s"
74
" </logicalFolder>\n"
75
" <itemPath>main.c</itemPath>\n"
76
" <itemPath>README</itemPath>\n"
77
" </logicalFolder>\n"
78
" <sourceRootList>\n%s"
79
" </sourceRootList>"
80
" <projectmakefile>Makefile</projectmakefile>\n"
81
" <confs>\n"
82
" <conf name=\"default\" type=\"2\">\n"
83
" <toolsSet>\n"
84
" <developmentServer>localhost</developmentServer>\n"
85
" <targetDevice>%s</targetDevice>\n"
86
" <targetHeader></targetHeader>\n"
87
" <targetPluginBoard></targetPluginBoard>\n"
88
" <platformTool>picsimlab</platformTool>\n"
89
" <languageToolchain>XC8</languageToolchain>\n"
90
" <platform>2</platform>\n"
91
" </toolsSet>\n"
92
" <HI-TECH-COMP>\n"
93
" <property key=\"extra-include-directories\" value=\"%s\"/>\n"
94
" </HI-TECH-COMP>\n"
95
" <XC8-config-global>\n"
96
" <property key=\"stack-type\" value=\"%s\"/>"
97
" </XC8-config-global>\n"
98
" </conf>\n"
99
" </confs>\n"
100
"</configurationDescriptor>\n"
;
101
102
static
const
char
blink_mplabx[] =
103
"/*\n"
104
" Simple example to blinking an LED using MPLAB X IDE.\n"
105
" To upload to PICSimLab:\n"
106
" 1- Check if PICSimLab is running;\n"
107
" 2- Toggle the PICSimLab Debug button;\n"
108
" 3- Use the menu [Debug > Debug Project] in MPLABX IDE.\n"
109
"\n"
110
"Note: If you encounter problems with the transfer or debugging process,\n"
111
"use the [Debug > Disconnect from debug tool] menu, then turn off and on \n"
112
"the Debug button in PICSimLab, and try step 3 again.\n"
113
"*/\n"
114
"\n"
115
"\n"
116
"%s \n"
117
"\n"
118
"#define _XTAL_FREQ %s \n"
119
"\n"
120
"#include <xc.h>\n"
121
"\n"
122
"void main(void) {\n"
123
" %s = 0;\n"
124
"\n"
125
" while (1) {\n"
126
" %s = 1;\n"
127
" __delay_ms(500);\n"
128
" %s = 0;\n"
129
" __delay_ms(500);\n"
130
" }\n"
131
"}\n"
;
132
133
static
const
char
blink_mplabx_avr[] =
134
"/*\n"
135
" Simple example to blinking an LED using MPLAB X IDE.\n"
136
" To upload to PICSimLab:\n"
137
" 1- Check if PICSimLab is running;\n"
138
" 2- Toggle the PICSimLab Debug button;\n"
139
" 3- Use the menu [Debug > Debug Project] in MPLABX IDE.\n"
140
"\n"
141
"Note: If you encounter problems with the transfer or debugging process,\n"
142
"use the [Debug > Disconnect from debug tool] menu, then turn off and on \n"
143
"the Debug button in PICSimLab, and try step 3 again.\n"
144
" */\n"
145
"\n"
146
"#define F_CPU 8000000UL\n"
147
"\n"
148
"#include <xc.h>\n"
149
"#include <util/delay.h>\n"
150
"\n"
151
"int main(void) {\n"
152
"\n"
153
" DDRB |= (1 << PB0);\n"
154
"\n"
155
" while (1) {\n"
156
" PORTB |= (1 << PB0);\n"
157
" _delay_ms(500);\n"
158
" PORTB &= ~(1 << PB0);\n"
159
" _delay_ms(500);\n"
160
" }\n"
161
"}\n"
162
"\n"
;
163
164
static
const
char
blink_mplabx_freertos[] =
165
"/*\n"
166
" Simple example to blinking an LED using MPLAB X IDE.\n"
167
" To upload to PICSimLab:\n"
168
" 1- Check if PICSimLab is running;\n"
169
" 2- Toggle the PICSimLab Debug button;\n"
170
" 3- Use the menu [Debug > Debug Project] in MPLABX IDE.\n"
171
"\n"
172
"Note: If you encounter problems with the transfer or debugging process,\n"
173
"use the [Debug > Disconnect from debug tool] menu, then turn off and on \n"
174
"the Debug button in PICSimLab, and try step 3 again.\n"
175
"*/\n"
176
"\n"
177
"%s \n"
178
"\n"
179
"#define _XTAL_FREQ %s\n"
180
"\n"
181
"#include<xc.h>\n"
182
"#include \"FreeRTOS.h\"\n"
183
"#include \"task.h\"\n"
184
"\n"
185
"static void vTask1(void *pvParameters) {\n"
186
" %s = 0;\n"
187
" while (1) {\n"
188
" %s = 0;\n"
189
" vTaskDelay(500 / portTICK_PERIOD_MS);\n"
190
" %s = 1;\n"
191
" vTaskDelay(500 / portTICK_PERIOD_MS);\n"
192
" }\n"
193
"}\n"
194
"\n"
195
"void on_interrupt(void) {\n"
196
"}\n"
197
"\n"
198
"void main() {\n"
199
" xTaskCreate(vTask1, \"T1\", configMINIMAL_STACK_SIZE, NULL, 1, NULL);\n"
200
" vTaskStartScheduler();\n"
201
"}\n"
202
"\n"
;
203
204
static
const
char
blink_mplabx_picgenios[] =
205
"/*\n"
206
" Simple example to blinking an LED using MPLAB X IDE.\n"
207
" To upload to PICSimLab:\n"
208
" 1- Check if PICSimLab is running;\n"
209
" 2- Toggle the PICSimLab Debug button;\n"
210
" 3- Use the menu [Debug > Debug Project] in MPLABX IDE.\n"
211
"\n"
212
"Note: If you encounter problems with the transfer or debugging process,\n"
213
"use the [Debug > Disconnect from debug tool] menu, then turn off and on \n"
214
"the Debug button in PICSimLab, and try step 3 again.\n"
215
"*/\n"
216
"\n"
217
"#include \"config.h\"\n"
218
"\n"
219
"void setup() {\n"
220
" pinMode(_RD0, OUTPUT);\n"
221
"}\n"
222
"\n"
223
"void loop() {\n"
224
" digitalWrite(_RD0, HIGH);\n"
225
" delay(500);\n"
226
" digitalWrite(_RD0, LOW);\n"
227
" delay(500);\n"
228
"}\n"
229
"\n"
;
230
231
#endif
/*#CPWINDOW6MPLABX*/
src
picsimlab6_mplabx.h
Generated by
1.15.0