I have a STM32 Nucleo F4 and I am trying to create a new C project in STMCubeIDE.
I have STMCubeIDE version 1.5.0 Build: 8698_20201117_1050 (UTC)
In the Embedded Software Packages Manager I have installed "STM32Cube MCU Package for STM32F4 Series" version 1.25.2
However, when I go to create a new STM32 project (using the board selector to select my board - NUCLEO-F410RB) I get the following error message:
Code generation could not be done most probably because the necessary firmware package is missing. Not able to complete STM32Cube project creation. See Firmware Updater for settings related to firmware package installation Tips: Please use the Device Configuration Tool, and then use 'Project > Generate Code' to complete the project generation.
If I call 'Project > Generate Code' it seems to complete, but most of the project files are missing, which means 'generate code' has failed silently at some stage.
Does anyone have any ideas?
After more searching I finally found this:
https://community.st.com/s/question/0D50X0000BeZi12/code-generation-could-not-be-done-firmware-package-v1241-can-not-be-unzipped
The solution from there worked for me:
From this page https://www.st.com/en/embedded-software/stm32cubef4.html download two zips (STM32CubeF4 and Patch-CubeF4)
Unpack first en.STM32Cube_FW_F4_V1.24.0.zip to Repository folder
Then unpack en.patch_cubefw_f4.zip to the same folder with file replacement
Done!
I downloaded V1.25.0 and the patch.
The repository folder was under C:/Users//STM32CUBE/Repository
If you have the IDE working, choose menu item Help->"Manage Embedded Software Packages"
It will guide you to install the FW package you noted above. Afterwards, you can import the examples from that zip file into your IDE as a project.
Related
I'm practising clean code and I installed sonarlint as a static testing tool to help me write clean code. after installing the editor rises this notification
SonarLint is unable to analyze C and C++ file(s) because there is no configured compilation
database.
after some searching, I found that I should add a file with a name
compile_commands.json.
this file should be exported automatically by cmake after adding this option
CMAKE_EXPORT_COMPILE_COMMANDS
where can I add this option in VScode.
this link is where the vscode redirected me to creat the required .json file
I am assuming that you are using CMake for your build. If that is the case then add the following line to the CMakeLists.txt
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
Then build the project and the database will be created for you.
I am an Android beginner and I downloaded the DisplayBitmaps project from the following link:
http://developer.android.com/training/displaying-bitmaps/index.html
It seems that there are no java files under the "src" folder but i find some codes under the folder "java" and a new item called "gradle".
I googled "gradle" and downloaded the eclipse plugin as suggested by the following link:
http://forums.gradle.org/gradle/topics/gradle-2-3-released
In Windows cmd, i have checked that gradle has been installed in my computer but i just don't know the next steps required in order to execute the project. I searched a long time and a bit confused by the solutions posted online.
It seems that gradle is q common but there are not many well documented tutorials on importing gradle into eclipse. It will be great if anyone would share some useful materials, many thanks in advance.
Install Gradle Eclipse plugin from this update site: http://dist.springsource.com/release/TOOLS/update/3.6.4.RELEASE/e4.4
(The update site is for Eclipse 4.4.x, put 4.5 at the end of URL if it's Eclipse 4.5 you are using)
Once installed import project as Gradle project. Don't forget to click on "Build Model" in the import wizard once you point to the right folder where the project to import is.
Once Gradle project is properly imported it'll have java nature applied to it and it'll have the appropriate folders...
Hi I'm fairly new with Eclipse. I'm trying to work on my cocos2d-x project on Eclipse, but for some reason I couldn't convert the android project to a c/c++ project and so I couldn't open the c++ files inside the Classes folders as you can see on the image here.
cocos2d-x: cocos2d-x v3.0 alpha0
eclipse: (ADT)Android Developer Tools - Build: v22.2.1-833290
os: windows 7
What I did:
ran create-multi-platform-projects.py in cmd
opened eclipse(ADT) then File->New->Other->Android Project from Existing Code->browsed to {cocos2d-x v3}/projects/mygame/proj.android
built the project.
tried to convert the project. Right-clicked project->New->Other->Under C/C++ tree, select Convert to a C/C++ project (Adds C/C++ nature)
but then the candidates for conversion is empty, meaning I couldn't convert my project to c++. I have installed the C++ plugins as seen here. Obviously I'm missing something here but I can't figure out what. I've been following tutorials on setting up cocos2d-x android development on eclipse windows os but I'm stuck with the converting to c++ step. Please could someone point out what I'm missing. Thanks in advance.
It will already be having c++ nature, so it wont show you that option (You can verify this by checking if you have C/C++ build in your project properties)...
You can open the cpp files by adding a reference to the source folder, to do so follow the below steps:
Right Click your project and select properties
Goto Resource->Linked Resources
In Path Variables Tab, Click New...
Give some name and choose the folder where you have your source code
It will now show a link to the source code folder in the project
Here are one by one steps, You may setup easily!
I'm trying to get the GNATbench plugin to work with Eclipse. I put the plugin and feature files in the correct places. I restart Eclipse and I am now given the option to create a new Ada project but when I try to do it I get this error:
The selected wizard could not be started. Plug-in com.adacore.gnatbench.cdt was unable to load class
com.adacore.gnatbench.ui.internal.wizards.NewAdaProject. An error
occurred while automatically activating bundle
com.adacore.gnatbench.ui (235).
Any idea what is causing this?
This is the issue you'll see if you attempt to use GNATbench with the 64-bit version of Eclipse. As the system requirements note in the readme, it's only compatible with the 32-bit version. I just did a quick test, which confirmed the issue.
I checked the README file of this plugin, it says this is required:
"C/C++ Development Tools (CDT) plug-in for Eclipse 3.5.x or 3.6.x"
Have you installed that?
The other important thing is that the downloaded archive file is actually a P2 repository installable file. In this case I would unzip a new eclipse (or remove manually the related plugins you copied over, this is the hard way), start it, click on help/install new software, click add, select archive, point to your downloaded GNATbench zip file, select the 2 features appearing on the avail "software" list and continue the wizard normally (next, finish...). If there is a version problem the wizard should "validate" it.
There was a plugin for Ada called Hibachi, IIRC... I'm not sure where it stands on development or completeness though.
I am working on a cross-platform C++ project with 8 other people which uses the following libraries:
OpenCV Library
Boost C++ Library
The project is inteded to be cross-platform so all users have agreed not to use platform-specific code, and, to keep things as simple as possible, all users will be using Eclipse as their IDE. However, some will be using Eclipse for Windows while other will be using Eclipse for Linux.
Since the project will be hosted on SVN, we would like to avoid conflicts with different configuration files (like make files, eclipse project files etc..) which are shared. We would also like to share as much of the configuration files as possible through SVN, to keep the configuration as simple as possible.
Let's assume that all users have properly configured system variables and installed the required build tools (such as make, cmake etc.), and have configured their Eclipse settings configured properly (but not the project-specific settings).
How to configure the project once and what of the configuration files to share on the repository, so that both Windows and Linux users can compile it without modifying configuration files retrieved from the SVN repository?
(I am not looking for the complete solution which would specifically work for those 2 libraries I mentioned, so I would appreciate a general how-to step-by-step explanations which would enable me to easily add another library.)
General discussion:
You will need to install Cygwin or something similar to it to make GNU Autotools toolchain available to Eclipse on Windows:
How to deal with Eclipse CDT+Cygwin?
Once your toolchain, Eclipse, with CDT and SVN connectors are ready on your development machines, go through the following steps.
Open Eclipse and switch to CDT: Click Window->Open Perspective->Other... and select C/C++
Select: Eclipse->File->New->C++ Project
Project name: viewer
Select: Project type->GNU Autotools->Hello World C++ Autotools Project
Click: Next
Click: Finish
Right-click in Project Explorer: viewer->Reconfigure project
Click: Console->Display Selected Console submenu-># CDT Global Build Console. If "autoreconf -i" output is nominal, proceed to step 9. If Console reports: sh: autoreconf: command not found, then add the path to the autoreconf command to the Project Build Environment:
Right-click in Project Explorer: viewer->Properties->C/C++ Build->Environment->Add...
Name: PATH
Value: path_to_autoreconf:${env_var:PATH}
Click: OK
Click: Apply
Go back to step 8.
Double-click: Project Explorer->viewer->src->viewer.cpp
Add some code:
include <opencv/cv.h>
include <opencv/highgui.h>
include <cassert>
int main(int argc, char *argv[]) {
assert(argc > 1);
CvMat* img = cvLoadImageM(argv1);
cvNamedWindow("Picture", CV_WINDOW_AUTOSIZE);
cvShowImage("Picture", img);
cvWaitKey(0);
return 0;
}
Double-click: Project Explorer->viewer->configure.ac and enter the following code below AC_PROG_CXX.
AC_CHECK_LIB([opencv_core],[cvSetZero],[],[])
AC_CHECK_LIB([opencv_highgui],[cvShowImage],[],[])
AC_CHECK_LIB([boost_regex-mt],[regexecA],[BOOST_LIB_SUFFIX="-mt"],[BOOST_LIB_SUFFIX=""])
AC_SUBST(BOOST_LIB_SUFFIX)
Double-click: Project Explorer->viewer->src->Makefile.am and enter the following code.
>
bin_PROGRAMS=viewer
viewer_SOURCES=openCvFocusIssue.cpp
viewer_LDFLAGS = -lboost_regex#BOOST_LIB_SUFFIX# -lopencv_core -lopencv_highgui
Repeat step 8, autoreconf (Reconfigure project)
Click: Project Explorer->viewer
Build project by clicking the hammer in the toolbar. If you do not see the hammer, Window->Open Perspective->Other... and select C/C++. If C/C++ does not show up, install the CDT.
Click: Project Explorer->viewer and then Run->Run, then in the Run As window->Local C/C++ Application, then in the Launch Debug Configuration Selection window->gdb/mi and press enter. You should see Hello World.
Quit Eclipse and navigate to the viewer project directory.
On the command line, issue make dist
Ensure you got a viewer-1.0.tar.gz or similarly named file, and then remove it: rm viewer-1.0.tar.gz
On the command line, issue make clean
In the same place, issue make distclean.
Navigate to the workspace directory that contains the viewer project.
Move the entire viewer directory to the directory that contains the svn checkout you want to place the viewer project in.
Change directories to where you just moved the viewer.
svn add viewer && svn ci -m "Added eclipse-autotool project"
Open eclipse and make sure that you have an SVN connector installed.
Remove the "viewer" project from the Project Explorer view.
Open eclipse and add this SVN repository checkout to the Team perspective.
Import the viewer project from your SVN repository checkout.
Switch back to the C/C++ perspective and have fun.
Two suggestions:
Use cmake: I love this tool. There is a bit of a learning curve but
if you get it right all the project will include is the cmake files
and when a person first checks it out they run cmake to generate
their makefiles (or VC++ project files, etc) with all the different rules for linux or windows one
might need.
or
Check in a basic config for the project, then add those configs to the git/svn ignore so no one ever checks them in again, then when you checkout for the first time you have to get your config running but after that it won't be overwritten.