With Virtual Hosting feature, we can open/read/write files of host computer.
* ICEman checks the system call and passes to GDB if it’s supported, then invokes the I/O service on the host side and sending the result back to ICEman.
Turn On/Off Virtual Hosting:* Via ICEman option when initiating.
--- Turn ON – “-j” or “--enable-virtual-hosting”
--- Turn OFF – “-J” or “--disable-virtual-hosting”
* Via GDB command during runtime.
--- Turn ON – “monitor virtual hosting on”
--- Turn OFF – “monitor virtual hosting off”
--- Query status – “monitor virtual hosting query”
Please refer this AndeSight demo project:Attachment:
demo-printf-fopen.zip [189.42 KiB]
Downloaded 1143 times
This demo project will open "D:\aaa.txt" file, and write/read it.
"printf" will output string to file instead of UART.
Note: It have to active virtual hosting in ICEman or GDB.
Please new an empty file "D:\aaa.txt" first.
It seens 'w+' can not create new file.
The default CPU is N968A and platform is AG101P.
Change "Target Chip" for other Andes CPU.
Run project: Right-click on project, and select
"Debug As --> (DSF) C/C++ Application"