Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- control option fails in Linux #30

Open
ahmetonat opened this issue May 18, 2023 · 1 comment
Open

- control option fails in Linux #30

ahmetonat opened this issue May 18, 2023 · 1 comment

Comments

@ahmetonat
Copy link

Firt of all, great piece of software for the LPC series. It works beautifully with LPC824 using buttons for Reset and Boot0. Thanks for writing it!

Doing:
$ lpc21isp build/i2c_isr.hex -control /dev/ttyUSB0 115200 12000

This error comes up:
ERROR: open() for /sys/class/gpio/gpio0/value failed, No such file or directory

Indeed, there is no /sys/class/gpio/gpio0, but /sys/class/gpio/gpiochip708 exists and it is created every time I plug in the serial converter. However, there is nothing called "value" in it.

Linux Ubuntu 20.04.6 LTS, FTDI232 extender with FT232RL (fairly sure it is genuine).

This seems like an abandoned project, but perhaps someone is at the other end of the line?

Thanks,
Ahmet

@ahmetonat
Copy link
Author

ahmetonat commented May 18, 2023

OK, it looks like I found the solution.

  • For FT232RL + Centos 8 Stream it was tested by a friend and verified that it works.
  • For Ubuntu 20.04 it is yet untested with the LPC824 but when only the FT232RL is connected, the GPIO error goes away - I don't have the LPC824 board to test for now.

The code is configured to use SYSFS by default to control the GPIO lines. This is what caused the problem. The fix is to comment out the following #define statement:
in the file: "lpc21isp.h" around line 68:

#if defined(linux) && !defined(GPIO_RST) && !defined(GPIO_ISP)
#define SYSFS_GPIO_SUPPORT
#endif

All 3 lines can be commented out or just the center #define line.

It worked fine after that.

Hope this helps someone.

Ahmet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant