Progress report! I have gotten the compiler working (have to use g++ for some odd reason) and it creates a working executable. I have a demo program for the AVR32, and all I had to do was change the GPIO pin in the code and it actually worked. But, it is slow, about 120 us for each flip of the port bit. Still, that is pretty encouraging progress! It uses the device file /sys/class/gpio/gpio168/value to set the port bit. This isn't real surprising, guessing at what the inside of this driver looks like. Also, the test code uses : rewind (fp); strcopy(,"1"); fwrite(,,fp); fclose(fp); for each change to the port bit.
Does anyone know any pointers to docs, examples, etc. on writing device drivers to emulate a generic PC parallel port on these embedded environments? I gather there is a mechanism to map a group of GPIO ports to memory addresses, and then the driver might be quite simple. So, a write to the par port data register would just become a byte write to that memory address. I tried to write a Unix device driver (actually a printer, in fact) about 25 years ago, and although it worked, I used the wrong mechanisms and it was INSANELY slow, maybe a thousand characters a second. I know that a device driver won't be needed for the real time side of EMC to talk to the port, but I need to make some user-mode test programs first. On the other hand, instead of a driver (which would be "neater"), if somebody knows how to set up the memory mapping of the ports, I could try that. The docs on Angstrom are pretty thin, I know how to do a lot of stuff on the X86 architecture like open the mapping to PC I/O ports with ioperm() and iopl(), I expect there's some similar facility in Angstrom for the ARM architecture...... Thanks, Jon ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers