Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 5 FirstFirst 1 2 3 4 ... LastLast
Results 26 to 50 of 101

Thread: Use Sublime Text as an Arduino IDE replacement.

  1. #26
    Senior Member
    Join Date
    May 2015
    Posts
    338
    Actually I don't see anything related to Sublime or Stino on your gethub. I do see the TFT library your working on, a breakout board project, and a few more projects.

  2. #27

  3. #28
    Senior Member
    Join Date
    May 2015
    Posts
    338
    Well closer I am sure but It still fails compiling.

    [
    Code:
    Stino - Start building "Blink"...]
    [  1%] Creating C:\Users\david\AppData\Local\Temp\Stino_build\Blink\Blink.ino.cpp.o...
    The system cannot find the path specified.
    
    
    [Stino - Exit with error code 1.]
    Could spaces in the patch name to Arduino cause problems? It doesn't seem to save when I set it using menu Arduino/Preferences/Select Arduino Application Folder. First it tries to go to a non existent folder and complains(beeps) when I hit cancel but eventually I can select the path.Click image for larger version. 

Name:	I_Drive.png 
Views:	27 
Size:	7.1 KB 
ID:	9005Click image for larger version. 

Name:	ArduinoPath.png 
Views:	29 
Size:	16.0 KB 
ID:	9006

    When I do this pops up where the build info would show when I do set it:
    Arduino 1.6.13 is found at C:\Program Files (x86)\Arduino. I'm getting closer.

  4. #29
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    3,984
    Yes, their code brings up several of those type dialogs on my machine as I have a multi card reader without anything in it. I just hit continue.

    When you looked at my Stino github project, did you change the branch to the Teensy branch? https://github.com/KurtE/Stino/tree/...teensy-support

  5. #30
    Senior Member
    Join Date
    May 2015
    Posts
    338
    I think so.
    Code:
    {
    	"bootstrapped": true,
    	"in_process_packages":
    	[
    	],
    	"installed_packages":
    	[
    		"Package Control",
    		"Stino"
    	],
    	"repositories":
    	[
    		"https://github.com/KurtE/Stino/tree/new-stino-teensy-support",
    		"https://github.com/KurtE/Stino/tree/new-stino-teensy-support"
    	]
    }

  6. #31
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    3,984
    I don't know how that part works with repositories... But:
    You might want to check to see if the files on your machine match what I have up there.
    On my machine I do most of the editing for this stuff in: C:\Users\Kurt\AppData\Roaming\Sublime Text 3\Packages\Stino-new-stino\stino\pyarduino
    Obviously the location will be different on your machine and I believe two files I changed are: arduino_compiler.py and arduino_library.py

    Warning: I am in no way a Python programmer, so I only hack a long...

    Edit: Also when you make changes here I believe I had best luck to restart sublime text to have the changes take effect

  7. #32
    Senior Member
    Join Date
    May 2015
    Posts
    338
    Thanks for all the help. I'll follow up later after I get a chance to try manually moving files. Today has been kind of crazy with missing deliveries that show signed for and a lost but later found by a good neighbor credit card.

  8. #33
    Senior Member
    Join Date
    May 2015
    Posts
    338
    Well it almost worked once. Looked like it was compiling ok but then it couldn't find a core.o file and died at 90%+ done .
    Now the every item you can pick in the Arduino menu is grey'ed out again. So close but back to ground zero. Looks like Atmel Studio and Visual Micro will have to be good enough for me.

  9. #34
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,579
    Don't give up DaQue - I have two machines I intend to make it work on and you were supposed to make Kurt's scheme work so I didn't have to do it blindly

    I'll give it a try soon . . . hopefully . . .

  10. #35
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    3,984
    Quote Originally Posted by DaQue View Post
    Well it almost worked once. Looked like it was compiling ok but then it couldn't find a core.o file and died at 90%+ done .
    Now the every item you can pick in the Arduino menu is grey'ed out again. So close but back to ground zero. Looks like Atmel Studio and Visual Micro will have to be good enough for me.
    Did you make the edit I mentioned in platform.txt... Wish we could get this changed in the new releases...

    Yep I don't remember why it would gray out stuff at times. I know I started over a few times.

    As I mentioned, I do use this some, but not much. Most of the time I simply edit here and use the Arduino IDE to do the build and do some of the editing of the main sketch.

    What I have not played around much with is to check the option in the Arduino IDE to use external Editor, to see how much that integrates in...

  11. #36
    Senior Member
    Join Date
    May 2015
    Posts
    338
    I edited the platform_teensy3.txt file as noted. For now I will just edit with it.

  12. #37
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    3,984
    Sounds reasonable. I will be playing more with it soon. Also I am not sure, but at one point I thought I read that people had better luck when Arduino was installed into a path that had no blanks in the name.
    Mine is stored at the Root of the drive, like: c:\arduino.1.6.13

  13. #38
    Senior Member
    Join Date
    May 2015
    Posts
    338
    That's worth a try. Thanks

  14. #39
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    3,984
    Thought I would mention, that I am playing around some with this today, to see if still working.

    I am now using 1.8.1 with the new 1.36b1

    I still needed to make change to the Teensy install platform.txt, for the Archive definition, as the stino builds to different directory...
    Code:
    recipe.ar.pattern="{compiler.path}{build.toolchain}{build.command.ar}" rcs "{build.path}/core/{archive_file}" "{object_file}"
    to a line closer to what Arduino has
    Code:
    archive_file_path={build.path}/{archive_file}
    recipe.ar.pattern="{compiler.path}{build.toolchain}{build.command.ar}"  rcs "{archive_file_path}" "{object_file}"
    Then got farther, but this time ran into issue where STINO was not generating the proper Arduino verison value to pass to the compiler. It was passing 181 whereas Arduino is passing 10801 and header file was checking for version > 10600 and failed...

    One of these days I will learn python a little better, but hacked up their read_version:
    Code:
    def read_version(ide_path, version_file_name):
        lib_path = os.path.join(ide_path, 'lib')
        version_file_path = os.path.join(lib_path, version_file_name)
        version_file = base.abs_file.File(version_file_path)
        version_name = version_file.read().strip()
        if not version_name:
            version_name = 'unknown version'
    
        version_txt = version_name
        if ':' in version_txt:
            version_txt = version_txt.split(':')[1]
        if version_txt.startswith('v'):
            version_txt = version_txt[1:]
        #version_txt = version_txt.replace('.', '')
        #bugbug: need to properly generate version 
        version_txt = version_txt.replace('.', '0')
        version = '0'
        for char in version_txt:
            if not char in '0123456789':
                break
            version += char
        version = str(int(version))
    
        return (version_name, version)
    My hack was to change where they replaced the .'s in the version string: 1.8.1 with nothing,
    I replaced it with 0... My guess is it would be better to extract the three numbers and build proper where the two second parts must be two digits...

    But at least I got it working again for now.

  15. #40
    Junior Member
    Join Date
    May 2014
    Posts
    19
    Have you had a look a Platformio?
    There is an integration for sublime:
    http://docs.platformio.org/en/stable...blimetext.html

    I haven't used Platformio with sublime, but I worked nicely with Atom as well as Visual Studio

  16. #41
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    3,984
    Thanks, I have not tried Platformio... These days I still do the majority of my builds using the Arduino IDE, and only at times do I try to use builds within sublime text.

    The main reason I do so, is hopefully at times others find some of the things I am doing useful and by keeping things working with the standard Arduino setup, I hope keeps things easier to share and/or be able to hopefully help others when there are issues...

    From what I can tell platform IO expects you to setup a configuration file for your project to tell it the board and the like. One of the nice things about the Stino setup, is they create a Arduino Menu on the top of sublime text, which already has commands built into build/compile. It also reads in the Arduino platform.txt, boards.txt... files and generates, things like the boards list, the list of board types, which you then select. It then builds up an Build options menu, which allows me to select all of the options that Paull added.... It allows you to configure to which Arduino IDE to integrate with. And it even picks up that I am configured to use TyQt...

    But I still may take a look at it. for the fun of it!

    Thanks again
    Kurt

  17. #42
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    3,984
    Thought I would mention that the Stino plug is having a major rework done to it.
    https://github.com/Robot-Will/Stino

    The new main branch is Stino2017 - I received github email about my earlier Pull Request to make it work on Teensy. So after seeing update message about passing for Teensy. I gave it a try.

    I decided I did not want to have my older version interfere with the new stuff, so I deleted my old configuration stuff: That is I got rid of:
    C:\Users\kurte\AppData\Roaming\Sublime Text 3

    I then reinstalled the few additions I mainly use. Sublime Merge, and some code that allows by default the sidebar (directory list) to be hidden, but if you hover over the line number area it shows up...

    I then followed the instructions in the readme to install. You need to setup your path to the Arduino IDE that has Teensy installed in it. I ran into a couple of problems like my Sketch folder was too big to load, so he fixed it. There was an issue on searching for libraries, which he fixed...

    So this morning I was able to build for T3.6 and I build and downloaded (using TyCommander) the test program I am doing for testing out adding DMA to the ili9341_t3n library... And I did not have to edit the platform.txt file like I was doing before.

    He did run into an issue last night building the graphictest program... Not sure if my version or not, but from the message he saw:
    Code:
    But the example graphicstest did not pass the build. The error message is:
    graphicstest" -larm_cortexM4lf_math -lm
    d:/arduino-1.8.1/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
    sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk'
    collect2.exe: error: ld returned 1 exit status
    But again if you are using Sublimetext 3, you might give this new version of the plugin a try!

  18. #43
    Senior Member
    Join Date
    May 2015
    Posts
    338
    Its now on my todo list. Thanks for the update. I have mostly stayed withe the Arduino IDE but used Visual Micro on AVRStudio for intelsense and looking up definitions/ defines in libraries. I like doing both. Sometimes one finds an error the other one misses.

  19. #44
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,579
    Nice update Kurt, I am using Sublime as text editor and getting used to it - but not done the Stino - very good reason to trust it now - Thanks! Sublime has great 'global grep' - just like my 20 year old tool and is a good replacement. Search is very fast across whole Teensy Hardware tree - especially on SSD.

    BTW: Since I had a fresh machine without Visual Studio historical versions - I put on last weeks new VS_2017 (8+ GB online install download onto 40+GB disk space) - then VisualMicro - it Works for TeensyDuino installed Teensy and also an STM32 device with a JSON boards Mgr link! The interface of course is over functional - i.e. the Arduino IDE is more direct and usable. And Sublime has a more natural looking editor and environment - so I'm more likely to use and pay for SubLime than for VisualMicro. VisualMicro has 'debugging' - but that seems to involve dropping perpetual USB spew they strip out in their SerMon - though I didn't try breakpoints enough to see them work. The STM32 device has active debug pins and I have an ST-Link - which VisualMicro seemed to allow selecting - though I think they may just use it as an alternate spew/work (FTDI type) port - though it does suggest hardware breakpoints based on VM forum notes - though that would take custom setup for this 'new device'.

  20. #45
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    3,984
    As I mentioned, he is still working out the kinks of this new version. There is an issue in the link phase I mentioned above...

    I noticed that he is archiving everything into the archive and not quite the same order which may be the issue... Hopefully he will figure it out soon. In the mean time it is still nice to be able to build in one place while editing...

    One thing I am trying to figure out now on my new machine is: I have installed Arduino onto my Hard drive d: and not the solid state drive...

    Which works fine, BUT Arduino still wants all of the optional install hardware, like DUE, like Adafruit, like Intel Edison installs (board manager)
    it appears to be hard coded to: C:\Users\kurte\AppData\Local\Arduino15
    So far I have not found any setting to allow me to move the package/staging... to some other location?

  21. #46
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,579
    Indeed that reliance on %appdata% seems to be hardcoded, and shared among any Arduino15 install wrt boards_manager. Quick glance doesn't show a setting for that and it has been that way since the board Mgr was implemented. My new SSD is luckily 500GB - I made a 30GB partition on it where I put my Arduino so I could keep a flash drive updated. Runs much faster from SSD - bad thing is Malwarebytes I see doubling compile time with it's over head and exclusions haven't kicked in yet that I saw. Even with VS_2017 I'm holding 298GB free on SSD so far - and the SSD was setup to have free swap space IIRC.

    May be a day or more before I wade into Stino . . . Visual Micro was giving somebody (stroom?) an issue - they have unique processing to emulate IDE build order of INO - may be something to that.

  22. #47
    Senior Member
    Join Date
    Nov 2012
    Location
    Salt Lake City, UT, USA
    Posts
    259
    Just found this thread today... I switched to Sublime 3 a few months ago from Notepad++, after giving up on Eclipse (I never could get the couple of Arduino plugins to work), so now I just build in Arduino (use external editor checked) with TyQt integrated so that is pretty painless. But when I get a bit of breathing room will try stino. It can still hand off the loading to Teensys to TyQt? Really happy with TyQt when running various test codes on different Teensys. Teensies?

  23. #48
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,579
    Notepad++ is friendly and easy - working hard not to install it on this fresh computer.

    Sublime is intuitive in some obscure things. I was on github and took a raw sketch from a Manitou page onto clipboard. Managed to create the directory and the file using the left pane and right clicking IIRC to open it in IDE.

    TyQt is of course now TyCommander - it didn't work on VisualMicro - but I see a new posted update that ignores HEX extension case - which seems to be the issue as IDE uses lower case and VMicro UPPER.

  24. #49
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,579
    Done! Works! At least for the T_3.6 sketch I uploaded - using TyComm! Using an stm32 board and it did the compile - seems to have ignored my boards entry and pulled from the %appdata% path and the build went fine - but upload uses DFU program that is specified in the IDE and it doesn't seem to have picked up on that. Will set 'external editor' in IDE and have put an Issue on Stino.

    I manually edited the paths like the ReadMe "Set Folders' for IDE and that was ignored. I had to 'Arduino / Install Platform / Add Arduino IDE' and give the path there. Same for Sketch folder: 'Arduino / Open Sketch / Change Location'. For those two it prompted on the bottom CMD line and too my entry then showing the Teensy and my sketch folder after a refresh.

    <edit>: Used on T-3.6 and T-3.0 with another sketch with changes to a core file and that worked. NOTE:: Unlike the IDE you must save your sketch source files to have them compiled!

    I had two instances open and it wants to compile in the FIRST and there seemed to be confusion. And 4 times {each time} it lost my :: 'Arduino / Install Platform / Add Arduino IDE' - so need to re-add and refresh that on each Sublime restart?

    I have the same sketch going to T_3.6 and STM32. T-3.6 compiles from Sublime uploads with TyComm and IDE compiles and uploads from IDE calling the DFU uploader. Teensy runs the same sketch slightly faster clocked at 72 than STM at its max speed of 80 MHz.
    Last edited by defragster; 03-16-2017 at 10:23 AM.

  25. #50
    There is also a plugin called Deviot https://github.com/gepd/Deviot, it is based on PlatformIo.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •