Hi,
is it possible to access GPIOs (C programming) on iMX7 without libraries?
In the following article, it is assumed that the programmer uses the libsoc:
In the toradex-linux gpio documentation, It can be understood that the programmer has only to include linux/gpio.h and use the gpio functions:
http://git.toradex.com/cgit/linux-toradex.git/tree/Documentation/gpio.txt
A simple code accessing the GPIO1_IO1 pin would look like this:
#include <linux/gpio.h>
int main (void)
{
if (gpio_request(1, NULL)){
gpio_direction_output(1, 1);
gpio_free(1);}
}
When I cross-compile the program (using the arm toolchain) to run it on iMX7, I get the undefined reference errors for these functions.
I just want to access few output pins simply by assigning a value.
Is there any simple way to access the gpio (e.g. memory like access) that would work for Cortex A7 (would be nice if it can be ported for Cortex M4).
Best regards,
Majd