What does nios-run do?

Hello,

I can download a program to memory using "nios-run my_prog.srec" and it works fine.

However, when I write the program into the same memory manually (ie. memory fill command), nios will not wrong the program properly.

I verified that both methods write exactly the same program bytes into memory, but nios-run does something with the memory AFTER the program end. This must be the source of my problems. Why are bytes changed after the end of the program?

I verified every byte up until the last byte written as defined by the S-Record.

Any ideas on what steps nios-run goes through?

Help is greatly appreciated.

Reply to
cruzin
Loading thread data ...

What are you talking about?

Reply to
fabbl

Maybe a stupid question: How do you run your manually entered program? Are you using the go (G) command in germs? Can you use go to *re-run* the downloaded srec file?

Petter

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Reply to
Petter Gustad

Hi Petter,

I wrote a program to convert an Srec file to a binary file and then downloaded this over a PCI/Avalon bridge.

I have found my problem, which was that I assumed the Srec file was always writing a contiguous memory region, when in fact sometimes addresses are skipped, presumably for alignment optimization.

Reply to
cruzin

If you have a look at the srec spec, I'm fairly sure the first data after the 's' on every line is the address that line starts at.

Nial

------------------------------------------------ Nial Stewart Developments Ltd FPGA and High Speed Digital Design Cyclone based 'Easy PCI' dev board

formatting link

Reply to
Nial Stewart

Hi Nial,

Yes you are correct.

When I wrote my Srec-converter program, I looked at a nios-built Srec file, and all records were contiguous. Later on, I realized in some programs, nios-build will skip bytes here and there. Live and learn.

Reply to
cruzin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.