importing a file into firmware binary

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

importing a file into firmware binary

Jump to solution
1,949 Views
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

Labels (1)
0 Kudos
1 Solution
614 Views
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

View solution in original post

0 Kudos
5 Replies
614 Views
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 Kudos
614 Views
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 Kudos
614 Views
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 Kudos
615 Views
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 Kudos
614 Views
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 Kudos