STM32 libraries for eclipse - eclipse

Can you use the CMSIS, HAL, TM libraries for STM32F407 discovery board with eclipse, without STM32Cube? According to this link http://www.carminenoviello.com/en/2015/06/04/stm32-applications-eclipse-gcc-stcube/ you can do it with eclipse & STM32Cube. But I wonder if you can do just same thing without the STM32Cube. Since I'm using OS X, it is impossible to install the STM32Cube, but in order to use the GPIO library I need to use CMSIS, HAL, TM libraries.

You might be able to used the older "Standard Peripheral Driver" model - which was a just a distributed set of driver files specific to the chip. These libraries are no longer supported and are replaced by STM32Cube which generates equivalent code - but with better support for hardware abstraction however they are still very useable.
Search "STM32F4xx_StdPeriph_Driver" to locate the libraries (which include the standard peripheral drivers and CMSIS).

You can download the libraries as a separate zip file
http://www.st.com/web/en/catalog/tools/PF259243
just unpack it and import whatever you need from it into your project. You can take an example project which is closest to your needs, and start developing your application from that. That's what I did in Linux.
There is the STM32CubeMX, which is the installable program you're referring to, and there are STM32CubeF4, STM32CubeL0, etc, which are the firmware package for the different controller families.

CubeMX now officially supports Mac and Linux. However here is an old post how to run it manually http://www.carminenoviello.com/2015/09/09/running-stm32cubemx-macos-finally/.
Regarding the HAL and SPL I'll add that there are really nice libraries in libopencm3 which are developed by community and are not so "buggy" as HAL or SPL.

I found an interesting instruction. You can install the STM32CubeMX on OS X. http://www.stm32duino.com/viewtopic.php?t=267

There is an Eclipse based IDE by OpenSTM32 community called SW4STM32. Available at OpenSTM32 community's site. System Workbench for STM32 installer has been released on the following platforms:
Microsoft Windows Vista and newer (32 bits or 64 bits)
Linux (32 bits or 64 bits)
Mac OSX 10.10 Yosemite and newer + Xcode 7
Java SE JRE 7 or newer
When creating a project you can choose which library you want want to use, SPL, HAL or baremetal.

STM32CubeMX is a initialization code generator. It definitely eases development, but you can write you code completely from the beginning.
STM32CubeMX uses HAL as its Library. You can download the HAL and Include the files that you need and write down the code from scratch. You just need to be aware of the APIs, which are documented in UM1725 Application Note.
But, now STM32CubeMX is also available for Linux and Mac.

Related

Using qemu-system-gnuarmeclipse command-line for nrf52840

I want to run unit-tests for a firmware code written for nrf52840 using QEMU. I came across the GNU MCU Eclipse project which has forked the main QEMU project to provide better support for Cortex-M SoCs by allowing the creation of cortex-m devices through data definitions provided in CMSIS SVD files (as noted here). Even though the project primarily supports the STM32 based boards and MCUs, their eclipse plugin does support adding new device packs for development and debugging. But I am not able to figure out how to use their command-line tool qemu-system-gnuarmeclipse to run an ELF file created for nrf52840. I have the following questions:
How does eclipse plugin allow debugging for nrf52840 using custom SVD file even though their command-line tool doesn't have any option to provide a custom SVD file?
How can I add support for nrf52840? Can I reuse board and MCU definitions for STM32 and just provide a JSON variant for SVD file here?
See the discussion here for response to this question

Eclipse, GCC, installing them twice?

I am thinking of installing Eclipse for developing STM32 programs (I have a question about this that I will post later). In the instructions it says I have to install:
the IDE for C/C++
GNU ARM Eclipse Plug-ins
GNU GCC ARM tool-chain
among other tools..
However, I am also thinking of installing e2studio for developing Renesas programs. You can see about this Here. There you can see that this is "based on Eclipse CDT" (what is the difference between this CDT and the IDE?) and that it also uses Plug-ins like GNU Tool & Support Here.
My question is, is this possible? Do I have to install them separately? (I guess so). Will the GNU tools will also be installed twice??
(I am using a windows10 machine)
Thanks in advance
CDT is dedicated to C/C++ programming. Actually I personally prefere to have separate eclipse installations for different families of uC. Why? Because it is much easier to manage updates and to keep my work in the correct order.
For STM32 I advice (I think, you are a novice user of Eclipse & ARM toolchains) to install OpenSTM32 (yo have a straightforward installer). It imports projects from CUBEFX & MX which gives you an easy way to import examples & initialisation code from Cube. I personally do not use HAL libraries but as I know I am a minority.
However, I am also thinking of installing e2studio for developing
Renesas programs. You can see about this Here. There you can see that
this is "based on Eclipse CDT" (what is the difference between this
CDT and the IDE?)
Eclipse CDT is an open-source general-purpose C and C++ IDE.
e2studio is one of several software packages that extend CDT with (most likely proprietary) plugins geared towards a more specific market (in this case, Renesas programs).
My question is, is this possible?
Yes.
Do I have to install them separately? (I guess so).
Yes.
Will the GNU tools will also be installed twice?? (I am using a windows10 machine)
You can certainly share a single installation of a toolchain between two installations of CDT, if both of them need the same toolchain (in terms of version and architecture). I don't know enough about STM32 and Renesas to tell you if they use the same toolchain.

Configuring QT Creator on Windows 7 (Raspberry pi is target)

So I will start off by saying that I do NOT want know how to setup or run QT on the pi. I am specifically trying to setup Qt Creator 4.0.3 (Based on Qt 5.7.0 (MSVC 2013, 32 bit)) to write and compile C++ and the run it on the Raspberry pi 2. I have found that running qt on the pi is far to slow.
I have searched for two days to find the right toolchain download for qt/raspberry and its corresponding qt configuration. Nothing seems to work. I have found what seems like a thousand dead ends searching the web. I can write and compile apps for windows console fine. But finding information to cross compile for raspberry seems to be an elusive Unicorn!
Does anyone have this working??? If so which of the many toolchains did you use? And please help me replicate your QT configuration. The closest I have come is using the GCC ARM Embedded toolchain but I cant seem to get the QT options set correctly and I believe that only gets me part of the way there. My ultimate goal is to control GPIO and use the RadioHead library.
Thanks in advance!
I also wanted to do that, and I actually achieved it, It's called "cross-compilation", you build on the Main PC and then compile it to the target.
Initially I wanted to use my main PC with windows 10, but I ended creating a linux partition on my pc to do it since I didn't found any way to do it with windows.
Qt has a very comprehensive tutorial with Qt5 and RaspberryPi2 (both with linux), the only problem is you need linux on your pc to do it. If you want to do this I would suggest following this steps:
Create a linux partition with the same os as in the pi (for example raspbian and debian) and name the username (in linux) "pi" and the password "raspberry". This will help you with external libraries.
Install Qt for Linux on your new partition
Follow Qt's tutorial on https://wiki.qt.io/RaspberryPi2EGLFS
The tutorial is really straightforward, I really recommend it.
Good Luck.

Are there any USB stick runnable, no-install, cross platform software frameworks (with GUI)?

Does anyone know of a good software development framework or similar that has the following properties?
Cross platform: it should be runnable on XP, Vista, OSX and common versions of Linux (such as Ubuntu and Kubuntu).
No installation: Be able to run the software from a USB stick without having to copy anything to the host machine.
Have good GUI support (this is why this question doesn't give a suitable answer, as far as I can tell).
Permissive licensing such as LGPL or BSD or such.
Among the softer requirements are having a set of abstractions for the most common backend functionality, such as sockets, file IO, and so on (There is usually some platform specific adaptations necessary), and supporting a good language such as Python or C++, though it is usually fun to learn a new one (i.e. not perl).
I think possible candidates are Qt 4.5 or above (but IFAIK Qt software will not run on Vista without any installation(?)), some wxWidgets or maybe wxPython solution, perhaps gtkmm. The examples I have found have failed on one or another of the requirements. This does not mean that no such examples exist, it just means that I have not found any. So I was wondering if anyone out there know of any existing solutions to this?
Some clarifications;
By "framework" I mean something like Qt or gtkmm or python with a widget package.
This is about being able to run the finished product on multiple platforms, from a stick, without installation, it is not about having a portable development environment.
It is not a boot stick.
It is ok to have to build the software specifically for the different targets, if necessary.
The use case I am seeing is that you have some software that you rely on (such as project planning, administration of information, analysis tools or similar) that:
does not rely on having an internet connection being available.
is run on different host machines where it is not really ok to install anything.
is moved by a user via a physical medium (such as a USB stick).
is run on different operating systems, such as Windows, Vista, Ubuntu, OSX.
works on the same data on these different hosts (the data can be stored on the host or on the stick).
is not really restricted in how big the bundled framework is (unless it is several gigabytes, which is not really realistic).
It is also ok to have parallel installations on the stick as long as the software behaves the same and can work on the same data when run on the different targets.
A different view on the use case would be that I have five newly installed machines with Vista, XP, OSX, Ubuntu and Kubuntu respectively in front of me. I would like to, without having to install anything new on the machines, be able to run the same software from a single USB stick (meeting the above GUI requirements and so on) on each of these five machines (though, if necessary from different bundles on the stick).
Is this possible?
Edit:
I have experimented a little with a Qt app that uses some widgets and a sqlite database. It was easy to get it to work on an ubuntu dist and on osx. For windows xp and vista I had to copy QtCored4.dll, QtGuid4.dll, QtSqld4.dll and mingwm10.dll to distribution directory (this was debug code) and I copied the qsqlited4.dll to a folder named "sqldrivers" in the distribution directory.
You mention wxWidgets but dismiss it as failing at least one of the requirements.
I don't know what your requirements are and in what way wxWidgets wouldn't work for you, but IMO it does fulfill them:
Cross platform: it should be runnable on XP, Vista, OSX and common versions of Linux.
It does run on those platforms, but "common versions of Linux" isn't good enough, as you can never be sure that the necessary GUI libraries for wxGTK (which should not be linked to statically) will be installed. This is however a problem for other solutions as well, unless you plan to put everything onto the stick.
No installation: Be able to run the software from a USB stick without having to copy anything to the host machine.
See the previous point, you would need to specify which libraries are needed on Linux. Also you could specify at build time not to use some of the system-provided libraries (for example for graphics, compression, regexes) but to use the wxWidgets-internal libraries instead.
Have good GUI support
Check.
Permissive licensing such as LGPL or BSD or such.
Check. You can statically link wxWidgets into your application too.
supporting a good language such as Python or C++
Supports both, and there are bindings to other languages as well.
having a set of abstractions for the most common backend functionality, such as sockets, file IO, and so on
It does have some abstractions like that, but you can link to other cross-platform libraries as well.
We use wxWidgets for FlameRobin, a graphical administration program for the Firebird SQL server. It has active ports to Windows, Linux and Mac OS X, and has been compiled for at least some BSD variant and Solaris as well. It definitely runs from a stick on Windows, I haven't tried with Linux or Mac OS X, but I don't see why it shouldn't there too.
Java.
It has GUI support.
It provides your network/file/etc. abstractions.
It is cross-platform. Most platforms you can think of have a JRE available.
No need to install a JRE. Most users probably already have one, and if not, you can run the appropriate JRE right off the stick.
You can provide several startup scripts for various platforms to run the app under the appropriate JRE.
Something else to consider is HTML+Javascript. :D
You can look at Mono it cross platform, has GUI (GTK+, or Winforms 2.0) and I can execute code without installing.
This might not be crossplatform, but is maybe even better, it dont even use the platform : linux on a stick :-)
The subtitle is
Take your Java workspaces wherever you go on a USB key
Here with java and eclipse, but nothing stops you there of course.
http://knol.google.com/k/inderjeet-singh/installing-a-ubuntu-hardy-heron-java/1j9pj7d01g86i/2#
Well, it depends on what you mean by 'package'. Kylix came close to being such a thing. It was QT based, and it allowed you to write once and compile for Windows + Linux. However, it was not an open source solution.
I asked a similar question in this link
http://www.24hsoftware.com/DevelopersForum/CrossPlatform-C-Library.html
and the best asnswer seems to be QT.
I have started using QT, but it is not as easy as I expected mainly due to deployment problems due to the DLL hell, Winsxs hell and manifest hell.
Tclkit is a single-file, self-contained Tcl/Tk system. The mac version I have is about 3.8 megs. You can get a version for just about any modern OS. I carry around a thumb drive that has mac, windows and linux binaries so I can run my scripts on any platform. No install is required, just copy one file wherever you want.
The most recent versions of tcklit use native, themed widgets (though, on *nix there really isn't a single "native" set of widgets...)

open solaris code vs solaris code

How compatible is code written under Solaris with Open Solaris ? I would be interested specifically in some kernel modules .
I think it is hard to quantify software compatibility, but I'd say code written for Solaris is quite forward compatible with OpenSolaris kernel. OpenSolaris source code evolves into what will be Solaris 11, and Sun's commitment to backwards compatibility is quite a fact.
Kernel modules written for Solaris should function in OpenSolaris following a simple recompile providing you are using the exposed kernel APIs that are compatible between the releases that you are using in Solaris and OpenSolaris.
There is a huge amount of work in Sun to ensure that programs written using publicly exposed interfaces are compatible. There is a listed 'Exposure/Stability' entry at the bottom of manual pages for most APIs that state in defined terms how someone can use it.
Kernel modules in particular will be very compatible between Solaris and OpenSolaris. OpenSolaris (via Project Indiana) is evolving the user-space components more heavily, including the installer and packages.
This is with regard to core OS daemons only and not kernel modules, but I've had success compiling OpenSolaris components from source and using the resulting binaries on commercial Solaris just fine. It's obviously easier with a Makefile but I did one manually.
I tried this with a small handful of binaries that I needed to add debugging output to and compiled them directly on the commercial Solaris system using gcc without issue. As mentioned earlier YMMV based on what app/module it is.