A guide to build MIOS32 applications with Eclipse on Windows10

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 )

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)

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.

Wow great Work  ! 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

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

8 hours ago, Psykhaze said:

Wow great Work  ! 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 )

I sent you a PM about the Wiki

Benoit

And here is already a first update… (Sorry, I realized that an important step was missing in the first version of the document)

 

MIOS32 Eclipse installation on Windows 10.pdf

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

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.

 

 

Hi,

Check or add the correct path in environment:

Page 14 in the [pdf](< base_url >/applications/core/interface/file/attachment.php?id=12996)

Best
Bruno

Hello,

Thank you for the quick reply. I had renamed the folder as there was a space. Still the problem persists in a different way. I am using Windows 10 and Eclipse Luna as stated in the given steps. I feel I am missing a basic step.

 

 

Still page 14 -> "Note the special syntax to enter the MIOS32_PATH. The value “/c/mios32/trunk” means “c:\mios32\trunk” for Eclipse. "

Hello Bruno,

Thank you for the quick reply and support. I have followed your instructions and it works perfectly well. I My bad for mot following the instructions perfectly.

 

 

You’re welcome! Have fun :wink:

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..

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! :slight_smile:

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

1 minute ago, Hawkeye said:

Welcome to the MIDIbox forums! :slight_smile:

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 :slight_smile: 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?

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 :slight_smile: 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?

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?

 

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.

 

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)

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