Go Down

Topic: Notepad++ User Defined Language for Arduino (Read 41444 times) previous topic - next topic

ijm51000

Hi Riva,

I have been all round the net expecting it to be complicated, but you where right it's as simple as placing the following in the run command

C:\arduino-1.0.4\arduino.exe $(FULL_CURRENT_PATH)

This added to your extensions list and the SourceCookifier plugin and it is probably as much of a development environment as I need.

I also added the extra commands and they now work.

Thanks for all the help

Ian

Riva

Glad you got it working as you wanted. I noticed CodeBlocks have an Arduino Uploader that can compile & upload arduino sketches. You could maybe get this to work with NPP or switch to using Codeblocks if it meets your needs.
Don't PM me for help as I will ignore it.

ijm51000

Hi Riva,

I have tried CodeBlocks, Eclipse and Atmel studio and a few others, they are good and all have benefits, but by the time you setup a new project it feels like you could have written a new version of windows:)  I am sure if you are working full time on Atmel products these IDE's would have a big advantage and I will probably revisit CodeBlocks as it was the best fit for me.

However at the moment for me using NPP in conjunction with Arduino IDE set to external editor has a lot of benefits in a simple to use setup. 

Keyword highlighting
code folding
own functions, defines, vars listed in a right hand panel which you can jump to with a double click
Run and load Arduino IDE with current file from NPP, which means with a couple of clicks you can setup board type, com port, compile & run
And quite a few more not listed.

Also Arduino 1.5 as you pointed out in a previous post, is on its way with extra features and using the method above; upgrading should not be too big a problem(he says stupidly :-) just change the directory. 

The Arduino IDE is called by a lot of people for lacking this and that feature but does IMHO a very good job of what it is designed to do, hide a lot of tedious detail that would stop a lot of none technical people getting involved in the project, while at the same time letting the user get more and more involved in the more technical details if they so wish.

All the best

Ian

 

Riva

Yes I also tried codeblocks but for most projects I do on Arduino the NPP/IDE combination suits best. I just hope they don't go the route of processing IDE and remove the 'use external editor' option.
Don't PM me for help as I will ignore it.

ijm51000

Hi Riva,

Got a bit worried after your last reply and downloaded 1.5.2 just to check you can still use an external editor with that version and the answer is yes, the external editor option is the same as 1.04.

Yesterday I also tried komodo edit as it is cross platform and, quickly managed to get a rough User Defined Language plugin built(cut and paste from NPP), then looked at syntax highlighting at which point it was reconfirmed for me anyway that NPP & Arduino IDE are a good middle ground.

All the best

Ian

C2

Thanks for the work here, I'm going to try this too...

ijm51000

Hi C2,

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

Have a look at http://www.visualmicro.com/ 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

Ian

Riva

#22
Jun 06, 2013, 10:44 am Last Edit: Jun 06, 2013, 06:41 pm by Riva Reason: 1
I have finally updated to using IDE 1.0.5 and the keywords have been updated to match.

Don't PM me for help as I will ignore it.

larryd

No technical PMs.
The last thing you did is where you should start looking.

Riva


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.
Don't PM me for help as I will ignore it.

cprobertson1

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

Thanks for the great work!

Riva


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

Added but not yet tested.
Don't PM me for help as I will ignore it.

xl97

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?)


Thanks!

DKWatson

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).

dkw
Live as if you were to die tomorrow. Learn as if you were to live forever. - Mahatma Gandhi

Go Up