Jump to content

A guide to build MIOS32 applications with Eclipse on Windows10


Recommended Posts

Hello all,

I noticed that the MIDIBox DokuWiki is a little bit outdated (still based on XP screenshots) and not necessarily easy to understand for true beginners.

I have written the small guide here to describe step by step as best as possible the installation and configuration of Eclipse for MIOS32 projects.

All comments are welcome of course (and if somebody wants to try to make sure that nothing is missing or is wrong, he/she is welcome :cheers:)

Benoit


(EDIT : due to an update, the first version of the file has been deleted from this message to avoid any mismatch. Please see below for the updated version)

Edited by BEBDigitalAudio
Link to comment
Share on other sites

Nice job!

I managed to do it the old fashioned way the other evening, just setting environment variables by hand and invoking "make" from the project directory. But this looks easy enough for anyone to try :). With Eclipse are you able to set different "presets" for distinct build environments? I know you can run into trouble with multiple toolchains etc.

Link to comment
Share on other sites

8 hours ago, latigid on said:

Nice job!

I managed to do it the old fashioned way the other evening, just setting environment variables by hand and invoking "make" from the project directory. But this looks easy enough for anyone to try :). With Eclipse are you able to set different "presets" for distinct build environments? I know you can run into trouble with multiple toolchains etc.

Hi Latigid,

thank you for your comment.

About the "presets": they are already included. On this PC, I have different toolchain installed (one for Intel Galileo, one for MIOS32, one for XMOS, etc...), they all run under Eclipse and they do not conflict each other. The reason is simple : every instance of Eclipse saves its own settings in a separate directory. Eclipse does not know the concept of Windows registry (not portable), so there is no common place where configurations would conflict between each others.

However, you have to take within Eclipse about paths, because this may lead Eclipse to scan the wrong directory when it executes the makefile. That's why I never declare paths to toolchains directly in system's path environment variables, but directly within Eclipse

Benoit

Edited by BEBDigitalAudio
Link to comment
Share on other sites

8 hours ago, Psykhaze said:

Wow great Work @BEBDigitalAudio ! I will give it a deep review / test /
I will try to make a similar Tutorial with Code:blocks .
If you have no wiki account i will be pleased to create the following content, just pm me =)
Bests,
Jerome

Hi Jerome (tiens un autre Français :happy:)

I sent you a PM about the Wiki

Benoit

Link to comment
Share on other sites

On 23/08/2016 at 10:04 PM, latigid on said:

Nice job!

I managed to do it the old fashioned way the other evening, just setting environment variables by hand and invoking "make" from the project directory. But this looks easy enough for anyone to try :). With Eclipse are you able to set different "presets" for distinct build environments? I know you can run into trouble with multiple toolchains etc.

Hey Latigid

By the way, I just forgot to tell you : you can create as many "presets" as you want, with different toolchain configuration, just by creating as many workspaces as you want. For example, on this computer, I have one MIOS32 configuration for the "pure" MIDIBox projects (the projects presented on the website), and I have another one, located in a different directory, with its own SVN image for my HorusDSP projects (since there is a MIDIBox version of it). Each workspace has its own build environment configuration, defined in the Preferences.

When you switch from one workspace to another, Eclipse takes care to point to correct source code folder and toolchain folders.

If you need more help with this setup, just tell me, I can explain more in details

Link to comment
Share on other sites

  • 3 years later...

Hello everyone,

I am new to midibox and a beginner at embedded programming. I have followed the instructions but am unable to build the project. It says the make files are not to be found but when I check project in the project explorer the files are very much present. Any help would be appreciated. Thanks in advance.

 

 

5.PNG

3.PNG

Link to comment
Share on other sites

  • 4 months later...

This might be a dumb question, because it seems so obvious to everyone, but where do you get the "trunk" folder? I can't find it on GitHub. In the repository that I've been directed to by this https://github.com/midibox/mios32

The only place I found a folder called trunk was in the folder for the FM Synthesizer module..

I guess there is a major misunderstanding going on here..

EDIT: So i just looked up that a trunk folder is something like a master branch in Git. I guess that as an environment variable for the MIOS32_PATH i just need to select the location that exactly depicts the folder-layer shown when clicking on the link above..

Edited by m.str
Newfound knowledge
Link to comment
Share on other sites

1 hour ago, m.str said:

EDIT: So i just looked up that a trunk folder is something like a master branch in Git. I guess that as an environment variable for the MIOS32_PATH i just need to select the location that exactly depicts the folder-layer shown when clicking on the link above..

Welcome to the MIDIbox forums! :-)

Yes, that is correct. At some point in time, TK. moved away from using subversion as a code revisioning system and moved on to git, which is a bit more modern. During this process, "trunk" was removed, so if you find any old documentation or file paths referencing to it, you can just remove this part of the directory tree.

Have fun and many greets,
Peter

Link to comment
Share on other sites

1 minute ago, Hawkeye said:

Welcome to the MIDIbox forums! :-)

Yes, that is correct. At some point in time, TK. moved away from using subversion as a code revisioning system and moved on to git, which is a bit more modern. During this process, "trunk" was removed, so if you find any old documentation or file paths referencing to it, you can just remove this part of the directory tree.

Have fun and many greets,
Peter

Thank you for the warm welcome! Beziehungsweise "danke", denn ich komme auch aus Deutschland was hier wie ich sehe nicht angezeigt wird :) Anyways, it's still better to continue in English, because unfortunately I have another/similar problem...

The PATH Variable seems to be incorrect, but i cannot really imagine why.. Hence I added the pictures, what am I missing?

err1.PNG

err2.PNG

Link to comment
Share on other sites

38 minutes ago, m.str said:

Thank you for the warm welcome! Beziehungsweise "danke", denn ich komme auch aus Deutschland was hier wie ich sehe nicht angezeigt wird :) Anyways, it's still better to continue in English, because unfortunately I have another/similar problem...

The PATH Variable seems to be incorrect, but i cannot really imagine why.. Hence I added the pictures, what am I missing?

err1.PNG

err2.PNG

Okay so I found that the MIOS32_PATH was wrong, I actually thought that just because the "/c/" part is lower case everything had to be lower case...

Anyway there is another error, now with the toolchain

EDIT: While tyring to move aroung the gcc folder and then unzip it again from the file that was introduced in the tutorial I noticed that the .zip file is damaged (Warning during the unzip processing). The Process of unzipping still finishes and the file that is mentioned in the Eclipse eroor IS there, but maybe that's still the source of error. Does anyone know another place where I can get a non-corrupted zip-file?

 

err3.PNG

Edited by m.str
Link to comment
Share on other sites

In explorer, search if stdint.h is an existing file in the folder c:/studium/bachelor/gcc-toolchain/mios32_toolchain/lib/gcc/arm-none-eabi/4.7.4/include/ and check this folder too.

Quote

EDIT: While tyring to move aroung the gcc folder and then unzip it again from the file that was introduced in the tutorial I noticed that the .zip file is damaged (Warning during the unzip processing). The Process of unzipping still finishes and the file that is mentioned in the Eclipse eroor IS there, but maybe that's still the source of error. Does anyone know another place where I can get a non-corrupted zip-file?

Download it again  http://www.midibox.org/mios32_toolchain/gcc-arm-none-eabi-4_7-2013q3-20130916-win32.zip
and use 7-zip, it was working for me.

 

Edited by Antichambre
Link to comment
Share on other sites

2 minutes ago, Antichambre said:

In explorer, search if stdint.h is an existing file in the folder c:/studium/bachelor/gcc-toolchain/mios32_toolchain/lib/gcc/arm-none-eabi/4.7.4/include/ and check this folder too.

It is found by the explorer's search function. and I find it by moving to it manually.

Everytime I moved the folder around I also re-set the environment variables, both in Windows and in Eclipse. I now removed the one in the Windows settings, to no success...

After relocating the toolchain folder to just C:/toolchain this is the value of my PATH Variable in Eclipse              C:\msys\1.0\bin;C:\toolchain\bin

(Append variables to native environment selected)

Link to comment
Share on other sites

45 minutes ago, Antichambre said:

In explorer, search if stdint.h is an existing file in the folder c:/studium/bachelor/gcc-toolchain/mios32_toolchain/lib/gcc/arm-none-eabi/4.7.4/include/ and check this folder too.

Download it again  http://www.midibox.org/mios32_toolchain/gcc-arm-none-eabi-4_7-2013q3-20130916-win32.zip
and use 7-zip, it was working for me.

 

Downloaded it again, unpacked it with 7-zip. No error message about a damaged zip file turned up. That was a valuable tip of yours, thanks a lot! Moved it to the right destination. Now this error

 

err4.PNG

Edited by m.str
Link to comment
Share on other sites

17 hours ago, Antichambre said:

Clean the project and rebuild...

Didn't know that was a thing actually.. I always just deleted and reimported the projects.

Tried that now, still the same result though..

SOLVED: This morning I threw everything that I had set up according to the instruction manual so far away and re-worked the whole thing anew. Noteably I only set the Env variables in Eclipse and unzipped every upcoming .zip-file with 7-zip. Don't really whatever went wrong there, but that's what fixed it.

Thank you Antichambre for your kind help!

Edited by m.str
Solved
  • Like 1
Link to comment
Share on other sites

  • 2 years later...

Hello guys!

I'm trying to build MIOS32 and I have a few questions. I read most documentations and I have been studying the sources for almost a week now. It's really a great contribution from Thorsten.

Before I dive into details of my question, I found this post very helpful and might have the answer I'm looking for. However, I was wondering if same steps work/apply to STM32CubeIDE? As you know, it's an Eclipse based IDE.

I have another question, but I believe it's better to ask in a new thread!

Marcos

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...