Git Product home page Git Product logo

Comments (16)

kblomqvist avatar kblomqvist commented on June 30, 2024

Sorry for the late response.

The plugin response that "could not find avr-gcc" and you are sure that /usr/local/CrossPack-AVR/bin include avr-gcc binary?

Also try to add /usr/local/CrossPack-AVR/bin into settings:

{
    "c_std": "c99",
    "cpp_std": "c++98",
    "optimize": "s",
    "path": "/usr/local/CrossPack-AVR/bin"
}

from sublimeavr.

ottoragam avatar ottoragam commented on June 30, 2024

Hi, I'm using Windows 7 and Sublime Text 2. My toolchain was installed via WinAVR, which automatically updates the system variables with the pertinent content. I checked the variable Path and it does indeed contain "C:\WinAVR-20100110\bin", the directory for the avr-gcc binary. Still, when I try to create a project, i receive the message "could not find avr-gcc". Any ideas on what could be wrong?

from sublimeavr.

kblomqvist avatar kblomqvist commented on June 30, 2024

You have set C:\WinAVR-20100110\bin in environment path (Windows global setting) or in plugin settings? If it's in environment path, then please recheck that you can call avr-gcc in command prompt.

I'm not able to reproduces the issue and it confuses me that this doesn't seem to work in all systems.

from sublimeavr.

ottoragam avatar ottoragam commented on June 30, 2024

Yep, I've set the C:\WinAVR-20100110\bin in enviroment path, and I can call avr-gcc from the command prompt. Heres the pictures:

winavr
path
sublime
cmd

from sublimeavr.

kblomqvist avatar kblomqvist commented on June 30, 2024

Could you edit unix.py file https://github.com/kblomqvist/SublimeAVR/blob/master/unix.py#L28 and print target to ST2 console so that we can debug this further.

from sublimeavr.

ottoragam avatar ottoragam commented on June 30, 2024

Sure, just give a few hours (I'm away from Pc right now). Thanks for the help!

from sublimeavr.

ottoragam avatar ottoragam commented on June 30, 2024

Hi again. I'm not sure if I understood the code. I supposed that the function attempted to get every directory listed in the PATH variable, and append to each one of them the file I'm searching for to see if it exist in said directoires. So I used avr-gcc as the function input, but nothing happened; the for loop in the function does nothing because the argument path is an empty string, is this right?

from sublimeavr.

kblomqvist avatar kblomqvist commented on June 30, 2024

Argument path is an extension to environ['PATH']. So if the argument path is empty then your avr-gcc should be found from C:\WinAVR-20100110\bin because its defined in environ['PATH']. Print targets to console and let me know what it found.

for p in path.split(path + pathsep + environ['PATH']):
    target = join(p, bin)
    print target                                                        # add this line

For your reference path is extended by the plugin's path setting, https://github.com/kblomqvist/SublimeAVR/blob/master/SublimeAVR.sublime-settings#L5. You could try to add C:\WinAVR-20100110\bin there too. For example, using plugin's path setting allows easy way to use other version of the compiler installed somewhere else instead of what is defined globally in OS environment path.

from sublimeavr.

ottoragam avatar ottoragam commented on June 30, 2024

Something is wrong with the string splitting. It only returns [''] even when environ['PATH'] is non empty. I did the following:

which

from sublimeavr.

ottoragam avatar ottoragam commented on June 30, 2024

I added C:/WinAVR-20100110/bin into the plugin default settings and the "Could not find avr-gcc" message dissapeared (note that i used "/" instead of the default backslash). The thing is the create project command does nothing afterwards.

from sublimeavr.

kblomqvist avatar kblomqvist commented on June 30, 2024

For some reason, most likely because your avr-gcc version is working differently, the plugin cannot get the list of MCU types.

You could check whether the list is empty or not:
https://github.com/kblomqvist/SublimeAVR/blob/master/SublimeAVR.py#L57

Also what do you get when you run avr-as -mlist-devices in command prompt?

from sublimeavr.

kblomqvist avatar kblomqvist commented on June 30, 2024

This should fix path splitting: c94adb2

from sublimeavr.

ottoragam avatar ottoragam commented on June 30, 2024

The fix worked. I do get "C:\WinAVR-20100110\bin" as output for avr-gcc's path. As for displaying the devices list on in command prompt...

mcu-list

Not sure what the last line means

from sublimeavr.

kblomqvist avatar kblomqvist commented on June 30, 2024

How about now with this change: 4243e5d

from sublimeavr.

ottoragam avatar ottoragam commented on June 30, 2024

It is working now! Thanks for doing the changes to support my toolchain. At least now one has the option of using the WinAVR package (no idea why it is so outdated).

from sublimeavr.

kblomqvist avatar kblomqvist commented on June 30, 2024

Release v1.1.0 includes this fix: https://github.com/kblomqvist/SublimeAVR/releases/tag/1.1.0

from sublimeavr.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.