Forum Discussion
Altera_Forum
Honored Contributor
21 years agoYour hardware and uClinux
Hi again, Adding an Avalon custom hardware and its software driver (either HAL or not) is easy and straightforward. Having said that I mean the standard Nios II IDE project_syslib/system_descri...
Altera_Forum
Honored Contributor
21 years agoAll hardware in any Nios II based system can be accessed via simple memory reads/writes.
So, for example, if your hardware has registers at 0x00920830, then you can read from the first 4 bytes of your register by using something as simple as: int *addr = 0x80920830; int reg = *addr; Notice that I turned on the high bit for the address of the registers. This bypasses the data cache so that I'm guaranteed to receive current data. Writing is done in the same fashion. Since access is so simple, there are no macro's to read and write from hardware for Linux as far as I know.