CubeMX IDE error issues with correct code - eclipse

I recently installed cubeMX to use freeRTOS on STM32 controller.
HAL_GPIO_TogglePin(GPIOB, GPIO_Pin_12);
If I type out the above I get an error.
If I have Eclipse auto complete the code I get the same error.
If I type out the code in visual studio and copy it into Eclipse everything works ok.
Error:
../Core/Src/main.c:296:30: error: 'GPIO_Pin_12' undeclared (first use in this function); did you mean 'GPIO_PIN_12'?
296 | HAL_GPIO_TogglePin(GPIOB, GPIO_Pin_12); //Generated by cubeMX

Related

Chain link AggregatorV2V3Interface Interface error?

I'm following a Solidity tutorial that implements Chain Link's AggregatorV2V3Interface. An error is popping on VSCode 2 while compiling the code with the brownie compile command
Here is the error :
I'm very new to Solidity and still trying to figure out how that works.
Changing the VSCode compiler to v0.6.6+
and setting FundMe.sol solidity version to pragma solidity ^0.6.6;
is what worked for me

Live Sass Compiler - #use causes compilation error

I'm using Live Sass Compiler v3.0.0 in my VS Code and it throws a compilation error whenever I use the #use rule to import variables from another file. However, when I use the Sass command line interface (sass --watch) to compile my files, it throws no errors.
Therefore, I want to ask is this caused by a syntax error in my code or a bug of Live Sass Compiler.
Steps to Reproduce
File Structure & Code
This is the file structure of the folder called sass-test that I opened in VS Code:
sass-test
| style.scss
| _variables.scss
style.scss
#use "variables";
html {
color: variables.$primaryColor;
}
_variables.scss
$primaryColor: #ff0000;
Live Sass Compiler Output
Open style.scss in a new tab in VS Code. Then, click the "Watch Sass" button located in the bottom right of the window. Live Sass Compiler would output the following error:
Compiling Sass/Scss Files:
d:\Web Development\sass-test\style.scss
--------------------
Compilation Error
Error: Invalid CSS after " color: variables": expected expression (e.g. 1px, bold), was ".$primaryColor;"
on line 4 of sass/d:\Web Development\sass-test\style.scss
>> color: variables.$primaryColor;
------------------^
--------------------
Watching...
-------------------
Sass CLI Output
Open Terminal and run sass --watch style.scss:style.css. The compiler successfully compiles without any errors:
Compiled style.scss to style.css.
Sass is watching for changes. Press Ctrl-C to stop.
Since my code can compile successfully with Sass CLI, does it mean that my code is syntactically correct and it's caused by a bug from the Live Sass Compiler extension?
I had same/similar problem two days ago.
#use is a new directive introduced in the new official Version 'Dart Sass' and replaces '#import' which is depricated now.
The popular Extension 'Live Sass Compiler' in VS Code is not longer supported by the maintainer for some time. So unfortunately the Sass Version is not updated in that extension...
In VS Code for 'Dart Sass' I found the the Extension 'DartJS Sass Compiler':
https://marketplace.visualstudio.com/items?itemName=codelios.dartsass
Actual I just did a quick testing so I cannot report much about it. But on the first glance it is running well. But as it is another extension you may have to change some settings.
UPDATE
Additional to the above reported exentsion DartJS Sass Compiler with actual SASS version I found an actualised and actual maintained fork of Live Sass Compiler. It has been deep hidden in the searching reuslts. As it is a very popular extension in VS Code here the link to the fork:
https://marketplace.visualstudio.com/items?itemName=glenn2223.live-sass
Remark:
I played arround with both extension. Both are doing the job well and have advantages.
'DartJS Sass Compiler' has the additional possibility for more detailed output like information about sass version and watchers. And additional to included SASS version it allows to use your own SASS version if installed to your system or locally to your project. So there is no/less dependency on updates by the maintainer.
'Live Sass Compiler' runs out of the box with included sass version. As it is a very popular extension in VS Code there is a special advantage: it seems it keeps your settings in the old projects running.
I think both are good solutions.

G_DECLARE_FINAL_TYPE() throws compiler error

I have written a programm in C and GTK3. I am using Arch Linux and everything works fine. However, I have to use my program also on a rather old Ubuntu machine.
gtk+-3.0 3.10.8
GCC 4.8.4
With this setup the program does not compile
In the Header file of a custom GTK-Widget I have:
#ifndef __LAYER_ELEMENT_H__
#define __LAYER_ELEMENT_H__
#include <gtk/gtk.h>
G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE(LayerElement, layer_element, LAYER, ELEMENT, GtkListBoxRow)
/* Rest of file comes here */
When compiling it throws the error message:
expected ')' before GtkListBoxRow in the line with the G_DECLARE_FINAL_TYPE macro.
How can I fix this issue?
G_DECLARE_FINAL_TYPE was added to GLib in version 2.44 (see the documentation). If you want to compile on an old version of Ubuntu, you will either have to get hold of a backport of GLib 2.44 (or later) for that version of Ubuntu, and compile against that; or you will have to modify your code to not use any GLib APIs added after version 2.40.

Why am I not receiving compile errors?

How do I compile Elm code within Visual Studio Code?
I am currently using Ctrl + F5 to compile my code.
However, I am not sure why I am NOT receiving any compilation errors based on the code I have below:
I expect an error reflecting "blah" not being defined.
NOTE:
I am attempting to learn Elm and VS Code.
Hence, all of this is new to me.

Error Mapping Shared Libraries with Eclipse CDT and GDB

I'm trying to debug a program using a Ubuntu 12.04 host and an ARM client with Eclipse Kepler, CDT, and GDB. The host is running GDB 7.4 and the client 7.0.1.
In my .gdbinit file I set sysroot /usr/local/arm-none-gnueabi/arm-none-linux-gnueabi/
However, when I try to debug I get the following error:
Warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
The target endianness is set automatically (currently little endian)
Error while mapping shared library sections:
/usr//lib/libstdc++.so.6: No such file or directory.
Error while mapping shared library sections:
/lib/libm.so.6: No such file or directory.
Warning: .dynamic section for "/usr/local/arm-none-linux-gnueabi/arm-none-linux-gnueabi/lib/libgcc_s.so.1" is not at the expected address (wrong library or version mismatch?)
Error while mapping shared library sections:
/lib/libc.so.6: No such file or directyory.
Error while mapping shared library sections:
/lib/ld-linux.so.3: No such file or directory.
I've searched this problem to death and can't seem to resolve it. Any answers would be most appreciated!