Upgrade legato on mangOH red

I have just started to use VS code. I can compile my code. Now, I want to upload latest legato 19.02 to my mangOH red. Does someone know how to upgrade legato?

Do you want upgrade the base image or the overlay? See the diagram near the end here https://docs.legato.io/latest/conceptsUpdates.html#conceptsUpdates_Base

Hi @dbeckwith,
Thanks for reply. i have installed VS code and I am learning how to use it. I don’t want to upgrade my mangOH red, but I want to know how to do it.

Choose Flash image to device
image

Then choose one option?
image

I do not trust VS code and I do not want to have another unresponsive mangOH in the office :slight_smile: I want to know if it works.

Another question:
I can go to properties in Developer Studio and change platform, legato and recompile my project.

image

How can I achieve it under VS code? When I change processor from wp77 to wp85 for example. Legato icon disappears and i cannot recompile a project.
image

Do you know how to do it?

@TheGod To be perfectly honest I haven’t tried doing this via Leaf through VS Code. You can upgrade your Legato using the Overlay method using the command app install <name>.<target>.update, for example app install mangoh.wp85.update. The Overlay method places the file in R/W space as shown in the diagram I referenced. This doesn’t replace the base image it just overlays it.

The other option is to replace the base image or replace the base image combined. Either way you do that with fwupdate command.

This document is helpful https://source.sierrawireless.com/resources/airprime/application_notes_and_code_samples/airprime_-wp_series-_airvantage_fota_sota_guidelines/

The VSCode implementation is a “preview” of what we are still working on developing, more features and changes are coming and this is still in active development. Developer Studio is still the more “full featured” IDE. We will be publishing the next version of VSCode soon and it will include new features and by the end of the summer, we are planning to have the development finished to release the VSCode Plugin as version 1.0.

I’m not sure if you are talking about upgrading your development environment from one version of Legato to another or if you are talking about updating your device with your new app.

Currently, you can’t upgrade your version of Legato from one to another without creating a new profile in VSCode. It is easy to do in the command line though by going into your workspace and searching for the version you want to upgrade to.
IE leaf search -t and then upgrading to that version: leaf update -p

Reloading the window in VSCode will pick up this change [Ctrl+Shift+p] then choose reload window (you might have to start typing in the option).

You can then use the [Ctrl+Shift+B] to build and install the new version on your target.

If you want to just push the update to your target then use [Ctrl+Shift+B] and choose build and install.

Currently, there is no way to create a new image to update the “base” layer on the target. This is a feature we are working on implementing and will be in a future release.

Through the command line, you can use the legato tools systocwe to change the update file into a .cwe file and then use swicwe to package that and the firmware/linux distribution that you need into a .spk file to update the read-only or base layer of your device.