developing drivers for custom boards

More
18 Jul 2011 13:57 #11600 by btvpimill
Replied by btvpimill on topic Re:developing drivers for custom boards
Yup, another thing came to mind. In the comp file I have:

function read
function write

In that order. Does that mean the read will be first then the write or is that controlled by the HAL file?

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

More
18 Jul 2011 14:44 #11601 by andypugh
Replied by andypugh on topic Re:developing drivers for custom boards
btvpimill wrote:

but how do I tell it to always generate the start but never worry about the reset? Or if I need to keep the reset thread in there, how to not actually send the reset to the port?.


Setting the space_length to zero in the HAL file does this.

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

More
18 Jul 2011 14:45 #11602 by andypugh
Replied by andypugh on topic Re:developing drivers for custom boards
btvpimill wrote:

Yup, another thing came to mind. In the comp file I have:

function read
function write

In that order. Does that mean the read will be first then the write or is that controlled by the HAL file?


The execution order is set by the HAL file, it is the order that the functions are added to the thread in.

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

More
18 Jul 2011 17:20 #11611 by btvpimill
Replied by btvpimill on topic Re:developing drivers for custom boards
Thanks Andy, on futher thought I think it makes sense to do an address read for the first data byte to be sent to PC, just like the address write for the first byte sent to the card.

This way I can not worry about having the threads in the wrong order.

Now PCW may have already suggested I do it this way, But I took his advice to mean a single address write then clock all the data both ways. So PCW, if you did mean that, it only took me a week to come around and see it - LOL

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

More
03 Aug 2011 20:10 #12161 by btvpimill
Replied by btvpimill on topic Re:developing drivers for custom boards
Finally found time to get back to this, I followed the instructions given by andy to install my comp file:

sudo comp --install/somewhere/eppdriver.comp

here are the errors:

ruby@ruby-desktop:~$ sudo comp --install /home/ruby/emc2/configs/eppdriver.comp
[sudo] password for ruby:
Traceback (most recent call last):
File "/usr/bin/comp", line 1321, in <module>
main()
File "/usr/bin/comp", line 1290, in main
process(f, mode, outfile)
File "/usr/bin/comp", line 1164, in process
a, b = parse(filename)
File "/usr/bin/comp", line 404, in parse
a, b = f.split("\n;;\n", 1)
ValueError: need more than 1 value to unpack
ruby@ruby-desktop:~$

now not really knowing if thesew are errors, warnings, or flat out failures, I tried to load it in my hal file:


loadrt eppdriver ioaddr=0x378

won't load, message after all the intresting stuff is:

can't find module 'eppdriver' in usr/realtime......


I looked and in fact it is not there. So I can only assume there was a real problem with the comp --install? The comp file is the one I posted here with only the base_address +3 changes

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

More
04 Aug 2011 01:30 #12164 by btvpimill
Replied by btvpimill on topic Re:developing drivers for custom boards
BTW, happy to post more error messages if needed when I get back to work tomorrow. I was rushing when I posted and my Emc machine does not have Internet access so everything is copy paste transfer post.

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

More
04 Aug 2011 11:02 #12175 by btvpimill
Replied by btvpimill on topic Re:developing drivers for custom boards
Just found and read this thread:
www.linuxcnc.org/component/option,com_ku...tart,0/lang,english/

I am not clear to how the OP resolved the same exact error I have, But I am going to make sure the file is "clean" Update in just a bit.

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

More
04 Aug 2011 12:26 #12179 by btvpimill
Replied by btvpimill on topic Re:developing drivers for custom boards
Next update: Checked all spelling and such. Even re-typed the driver just to be sure there are no crazy codes, did this in Gedit. Still same error.

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

More
04 Aug 2011 13:20 #12180 by BigJohnT
Replied by BigJohnT on topic Re:developing drivers for custom boards
Start a new file with just the bare skeleton in it, then compile that. Add section by section if possible to find the source of the error.

John

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

More
04 Aug 2011 13:31 #12181 by BigJohnT
Replied by BigJohnT on topic Re:developing drivers for custom boards
Here is a simple one.
component constant;
pin out float out;
param r float value = 1.0;
function _;
license "GPL";
;;
FUNCTION(_) {

  out = value;

}

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

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