importing a file into firmware binary

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

importing a file into firmware binary

跳至解决方案
1,970 次查看
Matt_OES
Contributor I

I am trying to use a 52254 to program a cyclone2 fpga using Altera's MicroBlaster firmware example.

 

It involves setting up the I/O according to the hardware to mimick how ByteBlaster would use a parallel port, then streaming a file out.

 

The I/O part is easy enough, but I am having trouble with the file I/O portion.

 

The firmware has no file system, so the standard fopen (etc) doesn't work. I'd like to simply have the contents of the programming file (.rbf) inserted into my firmware file at a known location so I can stream the data out of it without any fopen etc.

 

I can obviously add the .rbf file to my project window, but I have no idea how I would place it in a known location in flash and then provide fopen-like functionality to it.

 

Let me know if my problem is not clear and I will answer any questions.

 

Thanks,

Matt

标签 (1)
标记 (1)
0 项奖励
1 解答
635 次查看
ProcessorExpert
Senior Contributor III
Hello,
 
there is the possibility to enter relative path into ExternalFile bean related to project directory. For more details please find attached example project for CW V7.2.
 
best regards
Vojtech Filip
Processor Expert Support Team

在原帖中查看解决方案

0 项奖励
5 回复数
635 次查看
CrasyCat
Specialist III

Hello

 

Did you check the Targeting_ColdFire.pdf manual.

 

Chapter "ELF Linker and Command Language" section "LCF Syntax" -> "Writing Data Directly to memory" provide some hints on how to add binary files to a .eld file.

 

CrasyCat

0 项奖励
635 次查看
Matt_OES
Contributor I
Thanks CrasyCat. I will look into that. For now, though, I am able to use the Bean "ExternalFile". Probably not the best route because we lock the code generation and it wouldn't pull a new file if the external file were updated and I just compiled.
0 项奖励
635 次查看
Matt_OES
Contributor I

Okay, i created a new post for this next question and unless i'm mistaken, it just disappeared.

 

Now I'm using the ExternalFile bean and it wants an absolute path. I have multiple branches of this project on my computer and on other developer's computers. Can the ExternalFile bean use a relative path instead of absolute? It is very annoying to have to change the path manually after every branch/update

0 项奖励
636 次查看
ProcessorExpert
Senior Contributor III
Hello,
 
there is the possibility to enter relative path into ExternalFile bean related to project directory. For more details please find attached example project for CW V7.2.
 
best regards
Vojtech Filip
Processor Expert Support Team
0 项奖励
635 次查看
Matt_OES
Contributor I

I appreciate the reply. I thought this was a dead thread. That is a very simple solution and I appreciate the help. I will adjust the various branches of the project and life will be easier.

0 项奖励