Notepad++ User Defined Language for Arduino

Thanks for the work here, I’m going to try this too…

Hi C2,

Things move on so fast, this is a nice middle ground, but you will out grow it.

Have a look at using atmel studio, it also has a good special offer on the debugger at the moment, it's not perfect but, well worth a look.

All the best


I have finally updated to using IDE 1.0.5 and the keywords have been updated to match.

This is just excellent.

LarryD: This is just excellent.

It suits most of my needs, especially now I have bothered to add Arduino IDE call to the 'Run' menu. Main bugbear is the insistence of putting the sketch into it's own like named folder so to save I need to create the folder then the sketch within it. I would also like to try Arduino-Builder but it's interface does not work on my main PC for some reason.

Might be an idea to add the "byte" instruction to the "INSTRUCTION WORD" list ;)

Thanks for the great work!

Might be an idea to add the “byte” instruction to the “INSTRUCTION WORD” list :wink:

Added but not yet tested.

anyone keeping up with this development?

For the latest IDE versions (anywhere?) :)

I use NP++ for my web development.. and would like to use it for Arduino IDE/coding as well.

I'll go back and re-read all the directions.. (if there is a current version available?)


For any who may be interested, I just posted this on the Programming Questions board and it was hinted that maybe here would be useful as well. In essence it's a reminder to post code properly but I make reference to the use of NPP which I then detail.

It's pretty quiet just now so I thought about dealing with this, perhaps once and for all. There are guides at the beginning of the forum, specifically:

Using millis() for timing. A beginners guide Useful links - check here for reference posts / tutorials How to use this forum - please read. Read this before posting a programming question ...

Read these, please, especially the last two.

I draw your attention to the ongoing plea to post your code in tags. There's a reason for this. Like many, I use a variety of tools in coding. One of these is Notepad++. It's a useful editor with very good colour highlighting that reveals many syntax errors immediately.

When code is formatted and posted properly (within tags) it is a very simple matter to select/copy/paste into a new tab in NPP (Notepad++). Selecting the language as C or C++ will highlight all the code in a keyword colour scheme of your choice. This makes life easier for somebody likely to offer you a suggestion as to what your software issue might be, rather than download, drag a mouse to select, reformatting, and on and on.

Furthermore, the user community for NPP is quite extensive as well and several plug-ins have been developed that make life easier still. If you choose to use NPP, make sure you get the plug-ins NPPExec and TextFX. The former allows for attaching command line batch-type structures to shortcut key sequences, thereby allowing you to invoke the avr-gcc compiler (or any other compiler for that matter) and the latter contains many text formatting functions, specifically Reindent C++ code.

Back to NPPExec, without having an Arduino even attached to your system you can compile your code quickly and see where errors and warnings pop up. As you have more direct control over the compiler switches, you can experiment more easily as well. Additionally, include objcopy in your batch file and you can produce a hex file that can be uploaded directly with avrdude or 3rd party apps such as Xloader. Switch compilers too! The latest release of Arduino IDE 1.8.5 ships with gcc 4.9.2 where the latest gcc release is 7.2.0. Using the latest compiler, I see code as much as 10% lighter.

All that aside, the point is that with an environment set up to quickly and easily load and check code, if that code adheres to the guidelines, is it any wonder really, why some get frustrated with what seems to be an ongoing ambivalence towards those requests? Remember, we're not reading your post for our benefit.

========================================= Post script.

For those interested in the NPP platform as an editor. Install at least the NPPExec plug-in. From the Plugins>NPPExec>Execute... (or press F6) you'll get a window for your script. What I use is:

NPP_SAVE cd $(CURRENT_DIRECTORY) d:\Arduino\AVR Programming\avr-gcc-7.2.0-x86-mingw\bin\avr-gcc.exe -Wall -mmcu=atmega328p -DF_CPU=16000000UL -std=c99 -Os -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects $(FILE_NAME) -o $(NAME_PART).o d:\Arduino\AVR Programming\avr-gcc-7.2.0-x86-mingw\bin\avr-objcopy -O ihex $(NAME_PART).o $(NAME_PART).hex d:\Arduino\AVR Programming\avr-gcc-7.2.0-x86-mingw\bin\avr-size $(NAME_PART).hex

which will save the file, compile it, produce the hex file and then run avr-size so you can see how big it is.

Obviously the directory will need to be changed to point to your own compiler location and make sure that -mmcu is defining the proper processor. The other thing you must be aware of is that gcc ships with both the C and C++ compilers (gcc and g++). The file from within NPP must have a .c or .cpp extension (no .ino).