AVR project templates with code completion and navigation
- Total 4K
- Win 2K
- Mac 690
- Linux 1K
|Nov 30||Nov 29||Nov 28||Nov 27||Nov 26||Nov 25||Nov 24||Nov 23||Nov 22||Nov 21||Nov 20||Nov 19||Nov 18||Nov 17||Nov 16||Nov 15||Nov 14||Nov 13||Nov 12||Nov 11||Nov 10||Nov 9||Nov 8||Nov 7||Nov 6||Nov 5||Nov 4||Nov 3||Nov 2||Nov 1||Oct 31||Oct 30||Oct 29||Oct 28||Oct 27||Oct 26||Oct 25||Oct 24||Oct 23||Oct 22||Oct 21||Oct 20||Oct 19||Oct 18||Oct 17|
AVR Sublime Text plug-in
- Make sure that you have installed AVR Toolchain and set it in PATH. You can also use the CrossPack or any other AVR Toolchain distribution available.
- In Windows you probably have to install Make as well. Make for Windows is a good option.
Installation via Package Control (recommended)
First make sure that you have a Package Control plug-in installed (version 2.0.0 or later). After then …
CTRL+SHIFT+P, type install and press enter.
- Select AVR from the list and press enter.
- Download and unzip, or git clone, the plug-in into
Packages/AVRfolder. To access the folder called
Packages, open Sublime Text and select Preferences, Browse packages…
- Note that the plug-in can't be installed “in the Sublime Text 3 way” in to the
CTRL+SHIFT+P to bring the command palette into view. Next type AVR and select a command which to run:
- Prompts the MCU type and directory where to create a new project. After that a template is asked.
- When done you can open the project. To do that select Project, Open projects…, browse to the project folder and open
- In case the given project directory already contains
SublimeAVR.sublime-project, the update is applied. Other files aren't touched.
In Linux SublimeClang needs few extra steps to work. After creating your first project open command-line and cd into
SublimeClang package folder. You need to place
locate libclang.so ln -s [location] internals/libclang.so
libclang.so wasn't found install it via your Linux distrubution's package manager. For example, in Debian use aptitude:
sudo aptitude install libclang-dev
libcache.so needs to be built:
mkdir -p src/build cd src/build cmake .. make
CTRL+Bbuilds the project
ALT+D ALT+Dgoes to the definition of whatever is under the current cursor position
ALT+D ALT+Igoes to the implementation of whatever is under the current cursor position
ALT+D ALT+Bcome back to where ever you were before hitting goto the definition or implementation
To edit plug-in settings select Preferences, Package Settings, AVR. If you don't want to alter the default settings, copy and paste those into the user side for editing.
- c_std and cpp_std: C and C++ standard used when creating the project. These settings have affect to preprocessor define macros saved into
- optimize: Compiler optimization level. Has also affect to preprosessor define macros.
- path: The project PATH environment variable will be prepended by this.
- workdir: Default folder (aka workspace) for new projects.
Templates are zip-files searched from the
templates/ plug-in folder. You can put your own template files there as well and use them via the plug-in. Take a cue from the basic tamplate, which should be included in this plug-in. If you have a good general purpose template, for example for Arduino, I'm happy to merge it into the plug-in.
- SublimeText throws an error
Decode error - output not utf-8when trying to buid.
Open your project's
SublimeAVR.sublime-project file and add the following new setting into the build_systems dictionary – right after the selector setting, for example:
“ "encoding”: “cp1252”
## License This SublimeAVR Sublime Text plug-in is licensed under the MIT license:
Copyright © 2014 Kim Blomqvist, kblomqvist.github.io
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The plug-in is derived from [Aery32 Sublime Text plug-in](https://github.com/aery32/sublime-aery32), which is licensed under the new BSD license:
Copyright © 2012-2013, Muiku Oy
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of Muiku Oy nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
## Third party Packages used SublimeAVR plug-in is dependent of [SublimeClang](https://github.com/quarnster/SublimeClang) plug-in. This dependent plug-in will be installed automatically by the SublimeAVR plug-in if needed. If you decided to pre-install SublimeClang, SublimeAVR will notice this and will not overwrite or modify your installation. SublimeClang is licensed under the zlib:
Copyright © 2011-2012 Fredrik Ehnbom
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
This notice may not be removed or altered from any source distribution.