Re-compiling firmware for 7i92/7i93 in Ubuntu.

More
07 Sep 2021 23:43 #219896 by deusex25
Good day gentlemen.

I'm trying to re-compile the firmware for 7i92/7i93, to be able to use non-standard interface boards.
The problem is that I cannot even re-compile original files from 7i92.zip. I get almost 30 errors.
Need to mention, that when I try to load the project, I get a message, saying that project was made by older version and need to migrate. Then I get a message, asking to load some missing files. Have to mostly skip them, as they are not exist in folder.

Here are some of the error messages.
Parser messages:
ProjectMgmt:806 - "/home/username/Downloads/7i93/configs/hostmot2/source/hostmot2/TopEthernet16HostMot2.vhd" Line 79. Syntax error near "@".
ProjectMgmt:806 - "/home/username/Downloads/7i93/configs/hostmot2/source/hostmot2/TopEthernet16HostMot2.vhd" Line 98. Syntax error near "@".

Sythesis messages:
HDLCompiler:1206 - "/home/username/Downloads/7i93/configs/hostmot2/source/hostmot2/TopEthernet16HostMot2.vhd" Line 79: Syntax error near '@'
....
HDLCompiler:104 - "/home/username/Downloads/7i93/configs/hostmot2/source/hostmot2/TopEthernet16HostMot2.vhd" Line 90: Cannot find <i93_x9card> in library <work>. Please ensure that the library was compiled, and that a library and a use clause are present in the VHDL file.
.....
HDLCompiler:69 - "/home/username/Downloads/7i93/configs/hostmot2/source/hostmot2/TopEthernet16HostMot2.vhd" Line 365: <pindesc> is not declared.
HDLCompiler:69 - "/home/username/Downloads/7i93/configs/hostmot2/source/hostmot2/TopEthernet16HostMot2.vhd" Line 366: <moduleid> is not declared.
....
HDLCompiler:374 - "/home/username/Downloads/7i93/configs/hostmot2/source/hostmot2/TopEthernet16HostMot2.vhd" Line 409: Entity <topethernethostmot2> is not yet compiled.
.....
HDLCompiler:69 - "/home/username/Downloads/7i93/configs/hostmot2/source/hostmot2/TopEthernet16HostMot2.vhd" Line 415: <std_logic> is not declared.

I use version 14.7, installed on my Xubuntu 20.04.

Has anybody faced this issue before?       
Attachments:

Please Log in or Create an account to join the conversation.

More
08 Sep 2021 03:36 #219906 by PCW
These errors mean you need to edit the top level file and comment out the card and pinout placeholders ( @card@ and @pin@ ) and uncomment the desired card and pinout file


ProjectMgmt:806 - "/home/username/Downloads/7i93/configs/hostmot2/source/hostmot2/TopEthernet16HostMot2.vhd" Line 79. Syntax error near "@".
ProjectMgmt:806 - "/home/username/Downloads/7i93/configs/hostmot2/source/hostmot2/TopEthernet16HostMot2.vhd" Line 98. Syntax error near "@".

Sythesis messages:
HDLCompiler:1206 - "/home/username/Downloads/7i93/configs/hostmot2/source/hostmot2/TopEthernet16HostMot2.vhd" Line 79: Syntax error near '@'
The following user(s) said Thank You: deusex25

Please Log in or Create an account to join the conversation.

More
08 Sep 2021 14:36 #219954 by deusex25
Thanks a lot!

It did work and I managed to load the new firmware to Mesa board successfully!

Now I'm looking for the way of bringing this firmware into the PNCConf menu. As far as I can see, I miss an .xml file in the folder "/lib/firmware/hm2/7i92", alongside with .bit file. You've mentioned in one of the posts, that currently these xml files are generated from a utility that reads the card info.
Please, could you explain, which software does it and how/where it can be obtained?

Thanks in advance.

Please Log in or Create an account to join the conversation.

More
08 Sep 2021 15:56 #219966 by PCW
They can be made with Mesaflash
though I'm not sure pncconf can really
use these files due to naming differences

Please Log in or Create an account to join the conversation.

More
08 Sep 2021 18:35 #219982 by deusex25
If you're talking about --xml key, then - no, it doesn't work. At least with LCNC 2.8.
Any other idea?

Besides this I found, that "Discovery" option doesn't work with custom firmware. Will have to check...

Please Log in or Create an account to join the conversation.

More
08 Sep 2021 18:38 #219983 by PCW
You would probably have to hand edit a hal file created for a similar setup
(or find and fix the issues in the mesaflash created .xml file)

Please Log in or Create an account to join the conversation.

More
08 Sep 2021 18:43 - 08 Sep 2021 18:52 #219986 by deusex25
 

File Attachment:

File Name: TopEtherne....vhd.zip
File Size:9 KB
 

File Attachment:

File Name: PIN_M017i9....vhd.zip
File Size:2 KB
Peter,

Please, could you check the attached file? I have loaded one of .bit files from 7i92.zip, and discovery option worked!
What I did wrong in this file?...
Attachments:
Last edit: 08 Sep 2021 18:52 by deusex25.

Please Log in or Create an account to join the conversation.

More
08 Sep 2021 19:28 #219993 by deusex25
Managed to get working Discovery option with the firmware. Have deleted unused Module ID strings, and replaced them with NullTag ones!
Unfortunately that didn't help with XML file generation.

Please Log in or Create an account to join the conversation.

More
08 Sep 2021 19:53 #219995 by PCW
Yes, the module ID section must be consistent with what's in the pinout.

Also for Ethernet devices you should add a DPLL module to improve step
generation fidelity when there are large amounts of jitter

Please Log in or Create an account to join the conversation.

More
08 Sep 2021 20:30 #220000 by deusex25
Thanks for advise!

Are you talking about following string?

(HM2DPLLTag, x"00", ClockLowTag, x"01", HM2DPLLBaseRateAddr&PadT, HM2DPLLNumRegs, x"00", HM2DPLLMPBitMask),

I have one more question: Is it possible to state GPIO pins (explicitly specify secondary function), so they'll appear in LinuxCNC as "GPIO Output" only? is there any place (file), where I can find all possible options, as example?

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.245 seconds
Powered by Kunena Forum