Retrieve FreeMASTER project and referenced resources over HTTP or HTTPS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Retrieve FreeMASTER project and referenced resources over HTTP or HTTPS

2,149 Views
scotty
Contributor III

Dear FreeMASTER experts, dear @MichalH,

Currently we are using the macro FMSTR_TSA_PROJECT in our firmware to specify a name and the FreeMASTER project file on a network folder. Also, the related ELF file and a HTML start page are referenced by relative paths on this network folder. This works fine with FreeMASTER V3.2.1.6: When I connect to the board, the project information is retrieved and I can open the project. The related ELF file is considered and the HTML start page is displayed within FreeMASTER window.

Now, we need to move from those network folders to a file server.

The User's Guide (FreeMASTER Communication Driver, Rev.4.2) shows in chapter 3.4.3 the example:

FMSTR_TSA_PROJECT("Full Project (online)", “http://mycompany.com/prj/demo.pmp”)

I could verify that the project file is loaded over HTTP. But I had problems to use the secure version (HTTPS).

Also, the ELF file with the address information was not loaded from the file server. I tried the relative path and an URL starting with http. (I also escaped spaces by %20.) I had no success.

The HTML start page was loaded from the file server, but after an dialog, it was displayed in an external browser instance and not within the FreeMASTER window.

So, I have the following questions:

1) Is HTTPS supported by FreeMASTER to fetch project resources (pmp/pmpx, map/elf, HTML page)?

2) Is HTTPS (or HTTPS) supported to retrieve the ELF file? (How? Relative to project file? Complete URL?)

3) How can I make FreeMASTER to display the HTML start page, which was retrieved from the file server, within its window?

Best regards,
michaeL

Tags (1)
0 Kudos
Reply
9 Replies

1,534 Views
scotty
Contributor III

Dear FreeMASTER developers,

I verified that with V3.2.2.2 I can retrieve the project file by the help of the board information when a HTTPS ressource is specified. Thank you very much. (This was item 1 in my original post).

But FreeMASTER fails if the related map file (ELF file) should be fetched by HTTPS. I tried a relative path and an absolute path (URL).
Also the ressources for the homepage could not be loaded from the server. (These are the items 2 and 3 in my original post.)

@TomasK: We would be pleased if this feature is solved in the next FreeMASTER version, as you already held out in prospect.
When do you think that this version will be available?

Kind regards,
michaeL

0 Kudos
Reply

1,493 Views
MichalH
NXP Apps Support
NXP Apps Support

Hello @scotty ,

it is not only the FreeMASTER who is making the file access requests when rendering an HTML content. Once the main page is loaded, there are other requests for pictures and other files that are coming directly from the web browser. I don't think we want to redirect all such requests to the remote storage.

There is a better solution to this issue. You are able to pack the ELF file and all resource files into the project file when saving it. The FreeMASTER will then unpack the content to a temporary local location when opening the project (even if opening the project itself from a remote HTTP server). 

The key is to put all resource files into one sub-directory (e.g. "sources") and specify the name of the sub-directory in the project "Pack Dir" option. The "sources" then becomes your default working directory, so all other paths specified in the project shall assume this is the default path. This behavior enables it to work seamlessly when end user opens the project and gets it expanded into a temporary folder instead.

MichalH_0-1702285144226.png

If you use this feature, try also the "Project / Resources" menu option to display a resource analyzer to see if all paths are set correctly as relative to "sources" directory.

Regards,
Michal

Tags (1)

1,488 Views
scotty
Contributor III

Hello @MichalH,

Thank you very much for your suggestions. I did not realize that it is possible to include the ELF file into the FreeMASTER project file.

But I am not sure if this is the easier solution in our case. We use the XML format of the FreeMASTER project file (pmpx) for better management with Git. Our FreeMASTER project and the relating web page are rather stable right now (only a few changes over time), but the ELF file changes often.

We are using a Linux-based build-server for our embedded application. We have different build configurations (= different ELF files) for different device variants. The XML is changed accordingly for those variants and different project files are stored on our file server.
So, the integration of the ELF file into the FreeMASTER project needs to be automated by a suitable interface. I do not know if this is possible.

Including the web page ressources would be possible.

So, in our case, it would be helpful if at least the map-file (ELF in our case) could be fetched per HTTP/HTTPS. (If retrieving the files is abstracted in the FreeMASTER application, only one place needs to distinguish between file system and web storage.)

However, I will try manually how the ELF file integration works.

0 Kudos
Reply

1,483 Views
MichalH
NXP Apps Support
NXP Apps Support

Hello @scotty .

understood. We will enable fetching the ELF from the remote location in the next version (Q1/2024).

Thanks,
Michal

 

 

1,476 Views
scotty
Contributor III

Great to hear, @MichalH, that this feature will be addressed in the next release. We are looking forward to this version.

Have a good Advent season.
michaeL

0 Kudos
Reply

2,084 Views
scotty
Contributor III

Hello @TomasK,

Thank you for your reply.

1) That is great. Most of the servers have changed from HTTP to HTTPS over the last few years for security reasons.

2) We would appreciate this feature. It would be helpful if relative paths were supported (for drives and URLs).

3) I double checked this with https://google.com. In this case the page is displayed within the FreeMASTER window. Maybe there is some property why there are two different ways how the page is displayed? (Inframe vs. external application)

This works as intended:

scotty_0-1687533385697.png

If the HTML page is retrieved from a file server, the following dialog is shown:

scotty_1-1687534395217.png

When I confirm the dialog, the page is opened in an external browser instance.

If the page is stored on a (network) drive, the page is opened in the FreeMASTER window as shown above.

0 Kudos
Reply

2,050 Views
TomasK
NXP Employee
NXP Employee

Hello @scotty,

could you please specify an example how the URL looks like when the page is opened in an external browser?

You mentioned file server, so is it file://... ?

 

Thank you!

BR,

Tomas

0 Kudos
Reply

2,039 Views
scotty
Contributor III

Good morning @TomasK,

the HTML page is fetched with http, as shown below.

scotty_0-1687767710375.png

The file contains plain HTML code, only one image is inserted.

Maybe the behavior depends on the MIME type which the server delivers?

I made another test:

I copied the path into the URL line of my Edge browser. The file is not displayed, but downloaded!

We use Nexus Repository OSS | Sonatype which is a file server but not a web server.

Best regards,
michaeL

 

0 Kudos
Reply

2,118 Views
TomasK
NXP Employee
NXP Employee

Hello,

to your questions:

1) HTTPS for project files is supported in new version of FreeMASTER (should be released in few days).

2) Currently there is no support for remote ELF file but we will add this feature to FreeMASTER as well (thanks for the hint).

3) This works well. Are you able to reproduce it with some public page e.g. "https://google.com" ? If yes, lets us know how as we are not able to reproduce this issue and the page is always displayed within FreeMASTER.

 

Thank you!

BR,

Tomas

0 Kudos
Reply