question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot get ECC to work on windows

See original GitHub issue

System info:

Windows 10 64 bit

  • Sublime Text version: 3.2 build 3200
  • Clang version: <clang version 8.0.0 (tags/RELEASE_800/final) Target: x86_64-pc-windows-msvc Thread model: posix InstalledDir: C:\Program Files\LLVM\bin>

What happens:

I simply cannot get EasyClangComplete to work on my configuration. At the moment I am programming for a Cortex M3 microcontroller from ST.

EasyClangComplete does not autocomplete

I’ve been trying to configure ECC to work in windows 10 and I am programming a Cortex M microcontroller. I tried creating a simple structure and right below it I create a variable with the struct’s type and then try to autocomplete and nothing happens. At most I can get to do a full autocomplete with every single word IN THE FILE I’M CURRENTLY USING, it doesn’t even give me the correct autocomplete options at first, I have to scrool to get to them and it doesn’t even offer to autocomplete from any other files. I have created a configuration in the project settings:

{
    "folders":
    [
        {
            "path": "."
        }
    ],
    "settings":
    {
    	"easy_clang_complete_verbose": true,
        "ecc_use_libclang": true,
        "clang_flags": [
        "-std=c11", "-I/usr/include", "-IC:\\Program Files (x86)\\Atollic\\TrueSTUDIO for STM32 9.2.0\\ARMTools\\lib\\gcc\\arm-atollic-eabi\\6.3.1\\include", "-IInc"
        ], 
        "common_flasg": [
        	"C:\\Program Files (x86)\\Atollic\\TrueSTUDIO for STM32 9.2.0\\ARMTools\\lib\\gcc\\arm-atollic-eabi\\6.3.1\\include", "-IInc"
        ],
        "file": ".clang_complete", 
        "verbose": true
    }
}

The log file is as follows:

[ECC:INFO   ]: Getting version from command: ` -v`
Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 627, in on_activated_async
    callback.on_activated_async(v)
  File "C:\Users\userName\AppData\Roaming\Sublime Text 3\Packages\EasyClangComplete\EasyClangComplete.py", line 274, in on_activated_async
    settings = EasyClangComplete.settings_manager.settings_for_view(view)
  File "C:\Users\userName\AppData\Roaming\Sublime Text 3\Packages\EasyClangComplete\plugin\settings\settings_manager.py", line 55, in settings_for_view
    self.__init_for_view(view)
  File "C:\Users\userName\AppData\Roaming\Sublime Text 3\Packages\EasyClangComplete\plugin\settings\settings_manager.py", line 103, in __init_for_view
    self.__settings_dict[view_id].update_from_view(view)
  File "C:\Users\userName\AppData\Roaming\Sublime Text 3\Packages\EasyClangComplete\plugin\settings\settings_storage.py", line 128, in update_from_view
    self.__update_wildcard_values(view)
  File "C:\Users\userName\AppData\Roaming\Sublime Text 3\Packages\EasyClangComplete\plugin\settings\settings_storage.py", line 327, in __update_wildcard_values
    version_str = Tools.get_clang_version_str(self.clang_binary)
  File "C:\Users\userName\AppData\Roaming\Sublime Text 3\Packages\EasyClangComplete\plugin\tools.py", line 733, in get_clang_version_str
    if "Apple" in output_text:
TypeError: argument of type 'NoneType' is not iterable

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
morcillocommented, Apr 23, 2019

@acourt First try putting the ECC configuration into ECC’s configurations and not the project’s configurations.

For some reason it doesn’t work when I put it in the project configurations it doesn’t work. Don’t forget to turn on verbose to see if you get any output from ECC.

Go to preferences > Package Settings > EasyClangComplete > Settings

on the right side try putting something like this:

{
	"common_flags" :[
	        "-I/usr/include",
            "-I$project_base_path/src",
            "-I$project_base_path/Inc",
            "-I$project_base_path/Drivers/STM32F4xx_HAL_Driver/Inc",
            "-I$project_base_path/Drivers/CMSIS/Device/ST/STM32F4xx/Include",
            "-I$project_base_path/Middlewares/Third_Party/FatFs/src",
            "-DSTM32F411xE",
            "-U_WIN32",
            "-I/usr/lib/clang/$clang_version/include"
	],
	"lang_flags": {
    	"C": ["-std=c99"],
    	"CPP": ["-std=c++99"],
    	"OBJECTIVE_C": ["-std=c11"],
    	"OBJECTIVE_CPP": ["-std=c++11"],
  	},
}

Also … “show_errors”: true, “verbose” : true,

After that open the console and see what ECC tells you.

1reaction
morcillocommented, Mar 23, 2019

OK. I just got it working. The problem is that it just didn’t matter if I added the include paths to the project file (.sublime-project) because it wasn’t reading them. I then tried to open the EasyClangComxplete configuration found in the preferences tab in sublime text and then ovewrote the common_flags configuration for the user. Then it started finding the files correctly and the autocomplete started working.

The issue now is that:

1 - I think that modifying the project file should be enough and I shouldn’t modify the configurations for ECC … I’ve seen maaaaany posts were it works for other people, so there must be something wrong on my end;

2 - Autocomplete for a struct works, but it gives me many options and jumps to an option about 20 lines below the first ones, and the first ones are the actual members of the struct … maybe another wrong configuration in my part;

3 - It gives me a warning that snprintf is implicitly declared, but I already added the correct include file and after some searching it says that it’s only defined for c99, and when I went to the configurations it apparently was configured for c11, so I changed it to c99 but it didn’t work, This one isn’t actually a problem, it’s just bothering me because I don’t want to see the warning sign on the left side.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable Windows 10 Pro ECC Settings WHEA (Windows ...
I installed ECC RAM in my custom built PC and need to know how to navigate to the settings to enable the ECC...
Read more >
ECC RAM not booting | Tom's Hardware Forum
Hi, I bought some ECC RAM to use in my computer and with it installed my computer will not boot. My monitor shows...
Read more >
Check for ECC memory using Windows 10 PowerShell ...
... the new ram (memory) you installed is actually registering as ECC or notPower Shell Commands to check for ECCwmic MEMORYCHIP get Dat......
Read more >
Windows 10 Education ECC memory support
Memory ID-ECC or non-ECC? Another command: wmic memorychip list full. If Windows may have found problems with ECC RAM run administrative command ...
Read more >
What happened to ECC RAM? - Super User
Microsoft tried to make ECC a required feature for Vista certification but Intel refused to do it. Before the Core i7 series the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found