5 years, 6 months ago.

Why getting compile errors after getting back to older code?

Hello everybody, I have a general question about mbed or the online compiler: I am working with the FRDM-K64 platform and have already created some programs that are also currently established in a productive environment and do their job well there. However, I often have problem that I get previously not existing compile errors when trying to recompile them. This means for me that in the first step a debug of the mbed library, which means an extreme (additional) time effort for me. Background seems to be that new versions of the mbed library are included in the compile, although I did not perform an explicit update here. As I am working with productive code here, I would like to know if there is a possibility to change the existing own program code minimally without the whole program not being compilable anymore. 1. Can I continue to develop normally with the program I created (months ago)? 2. Please don't misunderstand me, but is this mbed online compiler environment useful for productive code at all? 3. Is there a possibility here that I haven't noticed or overlooked so far? I am thankful for every hint from the community and look forward to your reactions. Best regards, Iluman

I am not affiliated with mbed, just a user. I think you have answered your own question. All tool chains must change. That is the nature of growth. There is effort. You might have to take a snapshot of the mbed-cli and mbed repository and archive these in your SCCM. Then refactor your build and project to build under CLI. Then you can always go back to build legacy products. One company I worked with disabled all USB mass storage devices, which cause grief and I could not use online compiler.

posted by David Thedens 18 Oct 2018

3 Answers

5 years, 6 months ago.

Hi U Fa,

It's quite likely that you are seeing changes in your build output because the build infrastructure has changed - meaning that a new version of the compiler was introduced with an update to the online tools. It would be unusual for this to break your build, but you might be seeing new warning messages.

If you are delivering production code, by all means we hope you are using the built-in version control system described here (or using something off-line):

If you have accidentally migrated to a newer version of Mbed (or another library), you can select an alternate version using the "Revision" button (see attachment below).

We do agree with David above... if this is an important project then you should take it to the command line interface (CLI) where you have total control over the build process. The potentially big drawback to that is you will then have to migrate your project to gcc or purchase a copy of Keil uVision or DS-5 to use the Arm compiler. The Online Compiler utilizes the Arm compiler, but that is not delivered with the CLI as it is a licensed-managed product.

Regards,

Ralph, Team Mbed

/media/uploads/RalphF/onlinecompiler-switchosrevision.png

New screen captures for Francis:

/media/uploads/RalphF/oc-reporevision.png /media/uploads/RalphF/oc-mbedrevision.png

Hi Ralph, We have the same issue here. Each time we leave our code on the shelf for multiple months, it is impossible to rebuild our project. We use external libraries which were tested and qualified for a specific version of mBed-os and each time we go back in time the mBed-os library get reverted to the latest version which is incompatible. We then loose hoursss and an incredible amount of time trying to make our project to work again, without knowing if what we are rebuilding is the same. It is unacceptable that the mBed-os librairy of a project that has been committed and published gets automatically updated when we checkout a copy of it.... What is the point of version control!!! By the way, tell me how we can revert the library mBed-os library back to revision 5.4.7 when there was 1000 of committed changes and you only show 20 revisions on the online revision screen to select from? I'm really disappointed about this broken behavior.

posted by Francis Jacques 25 Oct 2018

Hi Francis,

So you are saying that all your libraries (including Mbed) are getting auto-updated to the latest revision when you revisit an old project? That should not be happening! When did this start to occur?

The libraries will be saved with the commit hash so if you check your repo online you can see if it is being saved properly. I've updated my post with 2 new screen captures for a small project based on Mbed v5.9.1.

As for going back to see all revisions of a library, this is currently not possible and we are aware of that short coming.

You probably already know this, but to revert back to an older version you can remove the library and then import it directly from the URL. For Mbed v5.4.7 you will want to use this:

To get the commit hash to add to the end of the URL look under the "Releases" tab on the Mbed OS GitHub repository here:

and then click on the version number string beneath the "mbed-os-5.4.7" tag on the left sidebar.

Regards,

Ralph, Team Mbed

posted by Ralph Fulchiero 30 Oct 2018
5 years, 5 months ago.

Personally I found problems as well but for a different reason. The previous code that was error-free was able to include files from *any* location. However, now the compiler needs an exact location. This only occurs if the code in question was in a sub-folder. The "#include" statement used to be something like "#include mydefs.h" but now the same code won't compile. Changing it to "#include ../mydefs.h" has allowed it to compile. This should *NEVER* have passed a screening test in the compiler group. If there was a defacto search scheme, it should have stayed the same and resolved the includes as it *ALWAYS* did for the last 4-5 years instead of failing to find them. Bad practice, mbed, bad.

5 years, 5 months ago.

code chef uses certain set of compiler for assessment.. try to use the same on your machine.. there is difference between how you write code in turbo c++ and gcc compiler prog.c:2:18: fatal error: conio.h: No such file or directory

  1. include < conio.h >

compilation terminated

I encountered the above compilation error... Whats the problem? all over them you can get the help from the www.toshibasupportphonenumber.com/blog/category/toshiba-satellite-drivers-for-windows-7-64-bit/ and it will helpful for you.