Arm Mbed OS support forum

Suggestions to reduce project size

I’ve been using the Mbed online compiler in an educational setting for a number of years. This year I am planning to start using Mbed Studio.

I’ve noticed that when I create (or import) a new program, it downloads several hundred MB of source code which can take a while.

I’m envisaging the scenario when there are ~80 students in a lab. When they all create a project, it will probably put a huge strain on the network.

Additionally, each student only gets 1 GB of network storage, which is probably only enough to store 2 or 3 Mbed projects (or less considering they will already have files stored).

Are there any workarounds/alternative workflows that anyone can suggest? e.g. a compiled Mbed source that can be linked with the student source code?

Any suggestions appreciated!

You can download mbed-os only once and have each project point to the location.

You’ll find more info here: https://os.mbed.com/docs/mbed-os/v5.14/tools/working-with-mbed-cli.html

In the " Managing multiple Mbed projects" section.

We don’t currently support that feature in Mbed Studio, but do plan to.

1 Like

Thanks for the replies.

I think for the moment I will provide the students with a single project that has all the libraries etc. and then get them to create a different main.cpp for each laboratory activity. They can then archive the different main.cpp files (or commit to version control) when they move onto a new activity.

Not ideal, but should be sufficient until Mbed Studio is fully featured.

Same issue for us. 80 students in a lab, not only uses a lot of disk space but also hits the network quite hard.
For us, I’d be happy to have all project use the same version of the mbed-os library.

Have you developed any workarounds?

I’m going to do some more testing this week, but as I said above, at the moment I envisage a single project with single main.cpp. At the end of each activity, they can rename the main.cpp e.g. main.cpp.lab1.task3 and then create a new main.cpp

I’m hoping the re-named extension will prevent the makefile from trying to compile it, but will only know for sure after testing.

Hello all,

I maybe have a spare solution for you , until MbedStudio team not finish it in the future.
Currently I have 4 projects with one separete Mbed OS linked by simple command MKlink.

mklink /d “C:\Users\USERNAME\Mbed Programs\mbed-os-empty\mbed-os” "C:\Users\USERNAME\MbedLib\mbed-os"

If you are interested, check the sources.

It looks functional but I do not know what will happened when new version of MbedOS will come.

BR, Jan

2 Likes

Thanks, looks like it could be useful, will check it out!

sadly not

Hi @eencae, @noutram, @JohnnyK

We are still looking at the best solution to either reduce the size of each program or to share libraries across programs. We have a few ideas but haven’t made a final decision about it yet. In the meantime we added a new option to Mbed Studio 0.8.0 installer on Windows. It allows installing Studio for all users on your system. That should help you reduce disk space usage a little bit. To test it please remove Mbed Studio 0.7.0 and download a new version from https://os.mbed.com/studio.

Thanks,
Arek - Mbed Studio team

1 Like

Ahoj,

Thx for info Arek.
How I wrote above, I use links and it works well for my personal use.

BR, Jan

Hi

Ok, thanks for the update. A static library file without all the mbed-os sources would be a workable solution for us.

It is very unlikely that we would want students to look at the mbed-os source + the build time would be shorter.

In an ideal world, we would be able to then update the lib file on request.

Regards

Nick

image001.jpg

mklink /d works well for me also, at least working locally. Not sure is links are supported by git version control.

@arekzaluski

I’ve just downloaded 1.0.0 but the projects still seem to each be >1.0 GB.

Has there been any more thought about sharing libraries? Without this I just cannot see how we can use Mbed Studio in our University lab.

Thanks,

Craig

Hi Craig,

Yes, we are aware of how important this issue is. We are currently implementing a solution in Mbed Studio that will allow to share libraries across programs. We were not able to finish it on time for 1.0.0 release. We are however working on releasing it soon.

Thanks,
Arek - Mbed Studio team

Thanks for the reply! Glad to hear you are working on a solution!

Out of interest, will the shared library be in say, C:\Program Files\xxxx or in the users area? For us (and I’m sure others with similar network setups) each user has limited network space so the users area is no good for storing large files. Even if C:\Users\xxxx is used, this gets periodically wiped and is re-built on each machine the student logs into (there are 80 PCs in the lab and students don’t necessarily use the same one each time). So if the 1 GB Mbed library is stored there, it would still need downloading every time they log into a new machine.

So ideally the Mbed library files would be a part of the Mbed Studio installation directory.

Best wishes,

Craig