OK...so far I'm still having troubles.
When trying to use the "outl" and "inl" macros, there is a problem. These only expect an address of size short. How would I tell it to use the full 32 bit address. In any case, I tried this and it didn't seem to have any effect on the registers or on the pins.
I also tried using mmap. I finally was able to get this to compile and run, but it didn't have any effect either. When trying to use either "MAP_SHARED" or "MAP_PRIVATE" and perform a write, it would complain and say that it isn't supported. The only way I could get it not to complain was to set this parameter to "0". This didn't produce the desired effect, because the registers wouldn't update. Basically, no matter what I tried with mmap, the memory address that was supposed to be mapped from the pio peripheral was changed in an erratic way, or it wasn't changed at all.
Now I am back to trying the plain and simple method where you set up a pointer of type np_pio and set it to the address defined in the nios2_system.h file.
This is where I originally started and wasn't able to get the registers to update or see any changes on the pio pins.
However, this time I'm going to try to manually remove Dcache from the NIOS2 and see if this produces the desired affect.
cc
I don't understand why something as simple as the pio's would exhibit such a problem. I am using multiple i2c controllers and uarts with 100% success. The only difference is that I'm trying to access the pio registers directly from a user-space application, vs. going through a Linux driver.
Shouldn't I be able to do this with little effort?
The main reason for accessing them from user space was so that I could quickly package some utilities together for our Test Engineer to use.
Any other suggestions?
Do you or anyone else have a sample user application that accesses a pio peripheral under Linux?
Thanks...