-
Notifications
You must be signed in to change notification settings - Fork 4
/
readme.txt
148 lines (95 loc) · 3.76 KB
/
readme.txt
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
Lamwino: Lazarus Arduino Module Wizard:
Version 0.1
"A wizard to create Arduino loadable module (.hex) using Lazarus/Free Pascal"
https://github.com/jmpessoa/lazarduinomodulewizard
http://forum.lazarus.freepascal.org/index.php?topic=31513.msg201993
Key Features:
1.Builder for FPC avr/arduino cross compiler
2.New Project option: "Arduino [avr] Module"
3.Install ".hex" module in Arduino device
Author:
Jose Marques Pessoa
jmpessoa_hotmail_com
https://github.com/jmpessoa/lazarduinomodulewizard
Acknowledgements [all teachings!]:
-Ygot,
-HatForCat
-Engkin
ref. http://forum.lazarus.freepascal.org/index.php/topic,30960.msg201921.html#msg201921
Version 0.1 revision 03 - 24 Fev - 2016
NEW! Added string support to Serial
NEW! LamwinoDemo4 [String Serial demo] //<---- Please, use some "Serial Monitor" app to send and receive info...
Version 0.1 revision 02 - 22 Feb - 2016
NEW! Added support to Serial [COM]
NEW! LamwinoDemo3 [Serial demo] //<---- Please, use some "Serial Monitor" app to send and receive info...
WARNING! Please, configure NEW "Path do code Templates"
IDE menu "Tools" --> [Lamwino] Arduino Module Wizard --> Settings
IMPROVED! Added support to commons Arduino chip
IMPROVED! Usability
Version 0.1 revision 01 - 14 Feb - 2016
NEW! Added support to Arduino Mega 2560
1. Prerequisites/Infrastructure
Arduino IDE: [drives, binutils, toolchains, avrdude, serial monitor, etc...]
ref. https://www.arduino.cc/en/Main/Software
SlikSvn: command line SVN client
ref. https://sliksvn.com/pub/Slik-Subversion-1.8.11-win32.msi [windows]
Optional: Serial-Monitor-Deluxe [Pure FPC/Lazarus app!!] [windows]
ref. http://www.idogendel.com/en/products/serial-monitor-deluxe
2. Lamwino Install
arduinonewprojectwizard.lpk
lamwino_ide_tools.lpk [..../ide-tools]
3. Lamwino Use
3. 1. Settings:
Lazarus IDE menu "Tools" ---> "[Lamwino] Arduino Module Wizard" --> "Settings ..."
3.2. Building FPC AVR/Arduino cross compiler
Lazarus IDE menu "Tools" ---> "[Lamwino] Arduino Module Wizard" --> "Get FPC Source"
.[if you do not have it!]
Lazarus IDE menu "Tools" ---> "[Lamwino] Arduino Module Wizard" --> "Build FPC Cross Arduino"
.Build
.Install
3.3 New Project
.Lazarus IDE select "Project" -> "New Project"
.Arduino Avr Module [Lamwino]
.Path to projects folder
.Project Name
.Target
.Generad Code [to start]
[x]Blinking //<---- * LamwinoDemo1, thanks to @ykot!
.OK
.Save
.Lazarus IDE menu "Run" ---> "Build"
{-------------------------------------
.check for usb/pc/arduino connection
.check for arduino COM port used ***
-------------------------------------}
.Lazarus IDE menu "Run" ---> "[Lamwino] Install/Run"
.Congratulations!!! \o/ \o/ \o/ \o/
***How to Detect Arduino used COM Port
1.Windows 10
Start Menu
Settings
Devices
Connected Devices
2. All Windows:
Controls Panel
Device Manager
Ports(COM & LPT)
3.4 Using Demos [....\demos]
.Go to project ".lpi" and [if needed] change: atmega328p [and avr5]
according to you arduino device [and compiler!]
<Item0 Name="AVRCHIP" Value="atmega328p"/>
<CustomOptions Value="-Cpavr5 -Wpatmega328p -a"/>
Note: atmega328p and avr5 are "Arduino Uno" compatibles!
4. References:
.FPC/Lazarus Arduino Tutorial
ref. http://forum.lazarus.freepascal.org/index.php/topic,30960.msg201921.html#msg201921
.Arduino UNO Pinout Diagram
ref. http://forum.arduino.cc/index.php?topic=146315.0
.I/O Port Operations in AVR
ref. http://maxembedded.com/2011/06/port-operations-in-avr/
.Cduino: Arduino Programming with C and Make
ref. http://brittonkerin.com/cduino/lessons.html
LamwinoDemo2 <<--- lesson3!
Thanks to All!
by jmpessoa
[jmpessoa[AT]hotmail[DOT]com]