vfs semihosting misunderstanding

beryllium
Posts: 11
Joined: Fri Mar 12, 2021 2:14 pm

vfs semihosting misunderstanding

Postby beryllium » Sun May 28, 2023 5:24 pm

Hello,

Inspired by the rest_full_server example, I created an application, which stores web pages in the /datas/web-pages directory. During the debug phase, I use the "vfs semihosting" mode. As long as I'm not trying to read a file and just building a response in an ad-hoc handler, everything is fine, but if I try to read a page, like: index.html, the statement: "int fd = open(filepath, O_RDONLY, 0)" always fails. :-(

at this moment we have:
filepath = "/www/index.html",
CONFIG_EXAMPLE_WEB_MOUNT_POINT = "/www",
CONFIG_EXAMPLE_WEB_DEPLOY_SEMIHOST=y,
CONFIG_EXAMPLE_HOST_PATH_TO_MOUNT=""D:\\___ESP32_IDF\\restful_server\\datas\\web-pages",
Or
"/datas/web-pages" and empty WEB_MOUNT_POINT
CMakeLists.txt defines this:
set(WEB_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../datas/web-pages")

The "index.html" file is stored in the /datas/web-pages directory

I am having some difficulty understanding WEB_MOUNT_POINT and HOST_PATH_TO_MOUNT and where webpages should be stored. I don't use VUE, which I don't know.
Can you give me a clue to solve this problem, thank you for your help.

Who is online

Users browsing this forum: No registered users and 5 guests