赛灵思
直播中

周颖雯

7年用户 153经验值
私信 关注
[问答]

如何在VIVADO中使用文件指针创建DUMP文件

我在创建像FILE * fp这样的FILE指针时遇到了问题。
然后我打开一个文件,如fp = fopen(“c:/user/xilinx/project1/hello.txt”,“w”);我在调试时没有得到文件指针中的任何地址,我没有得到
我的project1中的任何转储文件hello.txt都帮帮我!!!!!!!!!
helloworld.c 3 KB

以上来自于谷歌翻译


以下为原文

I had a problem in creating FILE pointer like FILE *fp; and then i opend a file like
fp = fopen("c:/user/xilinx/project1/hello.txt","w");
and i didn't get any address in file pointer while debugging and i didn't get any dump file hello.txt in my project1 help me!!!!!!!!!
            helloworld.c ‏3 KB

回帖(2)

袁伟

2019-3-26 07:07:28
嗨,您可以在TCL脚本中创建如下文件。
set fp [open“somefile”r] set file_data [read $ fp] close $ fp您可以使用$ file_data写入int文件,如下所示。
设置数据[split $ file_data“ n”] foreach行$ data {#在这里做一些行处理}问候,KR
--------------------------------------------------
--------------------------------------------请注意 - 请注明
答案为“接受为解决方案”,如果提供的信息是有帮助的。给予您认为有用的帖子。感谢 -
------------------------- ------------------------
-------------------

以上来自于谷歌翻译


以下为原文

Hi,
you can create a file as below in TCL script.

   set fp [open "somefile" r]
     set file_data [read $fp]
     close $fp
You can write intot hte file using the $file_data as below.

   set data [split $file_data "n"]
     foreach line $data {
          # do some line processing here
     }

Regards,
KR
--------------------------------------------------​--------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful.
--------------------------------------------------​-------------------------------------------
举报

刘飞

2019-3-26 07:18:32
所以,你说在.c文件中使用文件指针创建转储文件是不可能的

以上来自于谷歌翻译


以下为原文

So, you said that it was not possible to creating dump file using file pointer in .c file
举报

更多回帖

发帖
×
20
完善资料,
赚取积分