Warning, /kdevelop/kdev-embedded/README.md is written in an unsupported language. File is not indexed.

0002 [GSoC 2016] KDevelop Integration with Arduino and embedded development
0003 ---------------------------------------------------------------------------
0005     Electronic engineering, Federal University of Santa Catarina, Brazil,
0006     e-mail: <patrickelectric at gmail dot com>
0009 Motivation
0010 ==========
0012 The actual Arduino IDE, was initially created with
0013 Java and is still a simple IDE that does
0014 not provides autocompletion, sentence errors, assembly visualizer, field
0015 for compiling and linking flags, syntax highlighting and other features
0016 present in both [Kdevelop](https://www.kdevelop.org/) and [Qt
0017 Creator](http://www.qt.io/ide/).
0019 The other alternative IDEs for Arduino are:
0022     It provides good features and development options, but isn't a free
0023     or open source software.
0025 -   PlatformIO IDE:
0026     A good substitute to Arduino IDE. It's a modified
0027     [Atom](https://atom.io/) version, Doesn' have assembly
0028     visualization, serial plotting, data loggging and other
0029     important tools. It's written in CoffeeScript, JavaScript, Less
0030     and HTML.
0032 -   Embrio:
0033     An easy variable visualization ambient with real-time" plot with
0034     code editor. But, isn't free or open source.
0036 Some developers and [educators](http://www.hackvandedam.nl/blog/?p=762)
0037 say that Arduino IDE isn't as good and comfortable as a development
0038 ambient for higher education and development. In order to the to fix
0039 this situations, the development of Arduino plugins for KDevelop, Qt
0040 creator, Visual Studio and Eclipse began, but generally the setup for
0041 such plugins is complicated and it's necessary a good understanding of
0042 these IDEs and OS'a ambient functionality.
0044 Project goals
0045 =============
0047 Here I will showcase some of the features that I propose to implement.
0048 Right now I'm the [second biggest
0049 contributor](https://github.com/mupuf/arduide/graphs/contributors) of a
0050 project called [ArduIDE](http://mupuf.org/project/arduide.html), a C++
0051 IDE to help with software development to Arduino boards.
0053 The initial idea is to work with KDevelop to port some implemented features that
0054 already exist in others embedded systems IDE, like:
0055 memory map view, assembly visualizer and others.
0057 Some of the goals are:
0059 1.  Port Arduino support from 1.6.0 to last Arduino version
0060     into KDevelop.
0062 2.  Port and create others features like:
0063     - Board selector.
0064     - Clock selector.
0065     - Serial monitor.
0066     - Assembly visualization.
0067     - Compilation flags editor.
0068     - Real-time plotting with serial input, with integrator and derivator plot.
0069     - Real-time data logging.
0071 3.  Perform the upload process for Arduino boards with AVR processors.
0073 4.  Perform the upload process for Arduino boards with ARM processors.
0075 5.  (If time isn't a problem) Realize the upload process for Arduino
0076     boards with x86 processors.
0078     With all Arduino features implemented, the development of ARM
0079     processors can start:
0081 6.  Implement same features of Arduino development with ARM processors.
0083 7.  Add support to JTAGs(Joint Test Action Group) with [OpenOCD](http://openocd.org/).
0085 8.  Add GDB debugger with OpenOCD interface.
0087 Timeline
0088 ========
0090 This section shows the estimated timeline of the project.
0092 ### Done:
0093 #### Arduino
0094   - Download and install tools.
0097 May:
0098 ----
0100 Initial week, change ArduIDE features from Qt4 to Qt5 in KDevelop.
0101 Almost everything in ArduIDE is done with Qt4,
0102 [Grantlee](https://github.com/steveire/grantlee) and
0103 [QScintilla](https://riverbankcomputing.com/software/qscintilla/intro)
0105 It's possible to replace grantlee with QML since ArduIDE create only a
0106 dynamic webpage with examples and libraries installed on the system.
0107 Right now a good part of ArduIDE it's in Qt5 in my personal repository
0108 but isn't finished yet.
0110 Some of the features that already exist in ArduIDE that will be ported
0111 to KDvelop:
0113 -   Board selector
0114 -   Clock selector
0115 -   Serial monitor
0116 -   Assembly visualization
0117 -   Compilation flags
0119 June:
0120 -----
0122 After the transition from Qt4 to Qt5, the IDE needs to be updated to the
0123 last version of Arduino software and be compatible with the boards.
0125 Test the software compatibility and programmability of KDevelop with
0126 Arduino's source code and libraries. After that, a plugin will be
0127 created to manage what kind of embedded system the project will use
0128 during the development, this same plugin will manage other plugins that
0129 will provide a variable system development.
0130 In the beginning will be only one children plugin to manage the Arduino
0131 environment and process. To perform such boards and processors
0132 management it's possible to use a generic *makefile* to compile and
0133 upload the project to Arduino boards.
0134 With selectors menu, like Board and processor clock, it's possible to
0135 use the Kdevelop module called *Sublime* with a drop-down menu in
0136 toolbar that will be display the options to the user, and with this
0137 information it's possible to modify a generic Arduino makefile to manage
0138 the project compiling and upload process.
0140 The data-log can be added in a Dock, the same back-end of data-log can
0141 be used to the a plot system that will provide in the same Dock a
0142 user visualization tool to display the output data of the board.
0144 July:
0145 -----
0147 With all Arduino AVR boards working, the process of Arduino ARM boards
0148 begun. Unlike the AVR boards which use
0149 [*avrdude*](http://www.nongnu.org/avrdude/), the ARM boars use
0150 [*bossac*](http://www.shumatech.com/web/products/bossa) to perform the
0151 upload process. The same process of Arduino AVR can be used with the
0152 Arduino ARM boards, using a generic makefile, but with *bossac* and
0153 *arm-none-eabi-binutils* in the place of *avrdude*.
0154 The Arduino X86 boards uses a script to perform the compile and upload
0155 process. If time isn't a problem until now in the project the
0156 implementation of such feature will be performed.
0157 With *arm-none-eabi-binutils* we already have a .bin, .elf or .hex to be
0158 uploaded to an ARM processor. It's necessary something between the
0159 processor and the computer to realize the upload process, this thing
0160 it's called JTAG or programmer interface, can it be a Pirate BUS, JTAG,
0161 DTAG and ICSP interface or a simple FTDI232R/H to realize the midfield
0162 to the in-chip JTAG. It's possible to communicate with all this
0163 interfaces with OpenOCD, a list with all possible interfaces can be
0164 located
0165 [here](http://openocd.org/doc/html/Debug-Adapter-Configuration.html).
0166 Using OpenOCD can be a bit complicated but not impossible !
0168 August:
0169 -------
0171 If the last point finish with success, this part can be done without so
0172 much problems. With a OpenOCD link with the board interface, it's
0173 possible to use the GDB with a remote access to the socket door that
0174 OpenOCD open to realize the communication with GDB and the hardware
0175 components of the processor debug.
0176 With all this steps done, we have created a awesome embedded system
0177 platform with our friend KDevelop :)
0178 The last week will be reserved to solve some bugs and finish some points
0179 in the documentation of the project.
0181 Branchs
0182 ========
0183 1. [Master](https://phabricator.kde.org/diffusion/KDEVEMBEDDED/)
0184 2. [Arduino](https://phabricator.kde.org/diffusion/KDEVEMBEDDED/repository/Arduino/)
0186 Instalation
0187 ========
0189 1.  Download/Clone the repository (`git clone repository.git`)
0190 2.  Create a build folder (`mkdir build && cd build`)
0191 3.  Configure (`cmake .. `), if you are using KDevelop from source (`cmake .. -DCMAKE_INSTALL_PREFIX=PathToKDE5`)
0192 4.  Compile and install (`make install`)
0194 Debuging:
0195 -------
0197 The debug can be done using the output of qCDebug() function.
0198 1.  Turn the debug variable true (`export QT_LOGGING_RULES="Kdev.embedded*.debug=true"`)
0199 2.  Highlight and show debug messages (`kdevelop 2>&1 | grep Kdev.embedded `)
0201 If you want to help us if a bug appears, please use `kdevelop 2>&1 | grep Kdev.embedded > kdev-embedded-log.txt` to save the debug message and send to us.