Andes Workshop

It is currently Tue Sep 26, 2017 2:56 pm

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Virtual Hosting - host file access demo
PostPosted: Fri Sep 12, 2014 12:08 pm 
Offline

Joined: Wed Apr 13, 2011 7:44 pm
Posts: 23
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 159 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"


Last edited by ianfeng on Mon Sep 15, 2014 12:38 pm, edited 3 times in total.

Top
 Profile Send private message E-mail  
 
 Post subject: Re: Virtual Hosting - host file access demo
PostPosted: Fri Sep 12, 2014 4:28 pm 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
The ICEman setting can be set in AndeSight.
Please refer to the following pictures:

Attachment:
vir1.png
vir1.png [ 10.55 KiB | Viewed 2622 times ]


Attachment:
vir2.png
vir2.png [ 74.37 KiB | Viewed 2622 times ]


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Virtual Hosting - host file access demo
PostPosted: Thu Aug 18, 2016 2:58 pm 
Offline

Joined: Wed Apr 13, 2011 7:44 pm
Posts: 23
This option only for BSP v3.2.1 or AndeSight v2.0.1 MCU.

For AndeSight v2.1.1 or BSP v4.0.x, please use compiler option '-mvh'.
Please refer programming guide for detail description.


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group