Okey, it works.
check these links if you have problems.
https://community.onion.io/topic/2101/from-cross-compiling-for-the-omega-i-cannot-successfully-build-the-gpioread-example/10
Okey, it works.
check these links if you have problems.
https://community.onion.io/topic/2101/from-cross-compiling-for-the-omega-i-cannot-successfully-build-the-gpioread-example/10
@crispyoz Firstly, thanks for your support. I'm looking for the relevant library on my computer, but it doesn't exist.
i did and after
scripts/feeds install libugpio
volkan@ubuntu:~/source$ ./scripts/feeds install libugpio
Collecting package info: done
WARNING: Makefile 'package/feeds/onion/transmission-console-app/Makefile' has a dependency on 'Onion-Console', which does not exist
WARNING: Makefile 'package/feeds/onion/transmission-console-app/Makefile' has a dependency on 'transmission-daemon', which does not exist
WARNING: Makefile 'package/feeds/onion/zeromq/Makefile' has a build dependency on 'libuuid', which does not exist
volkan@ubuntu:~/source$ cd -
/home/volkan
volkan@ubuntu:~$ cd oniongit/
volkan@ubuntu:~/oniongit$ cd c-cross-compile-example/
volkan@ubuntu:~/oniongit/c-cross-compile-example$ sh xCompile.sh -buildroot ~/source/ -lib ugpio
Compiling C program
/home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/bin//mipsel-openwrt-linux-gcc -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I /home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/usr/include -I /home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/include -I /home/volkan/source//staging_dir/target-mipsel_24kc_musl/usr/include -I /home/volkan/source//staging_dir/target-mipsel_24kc_musl/include gpioRead.c -o gpioRead -L/home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/usr/lib -L/home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/lib -L/home/volkan/source//staging_dir/target-mipsel_24kc_musl/usr/lib -L/home/volkan/source//staging_dir/target-mipsel_24kc_musl/lib -lugpio
gpioRead.c:7:10: fatal error: ugpio/ugpio.h: No such file or directory
#include <ugpio/ugpio.h>
^~~~~~~~~~~~~~~
compilation terminated.
makefile:9: recipe for target 'gpioRead' failed
make: *** [gpioRead] Error 1
i think, .sh file is wrong
volkan@ubuntu:~/source$ ./scripts/feeds install libugpio
Collecting package info: done
WARNING: Makefile 'package/feeds/onion/transmission-console-app/Makefile' has a dependency on 'Onion-Console', which does not exist
WARNING: Makefile 'package/feeds/onion/transmission-console-app/Makefile' has a dependency on 'transmission-daemon', which does not exist
WARNING: Makefile 'package/feeds/onion/zeromq/Makefile' has a build dependency on 'libuuid', which does not exist
volkan@ubuntu:~/source$ cd -
/home/volkan
volkan@ubuntu:~$ cd oniongit/
volkan@ubuntu:~/oniongit$ cd c-cross-compile-example/
volkan@ubuntu:~/oniongit/c-cross-compile-example$ sh xCompile.sh -buildroot ~/source/ -lib ugpio
Compiling C program
/home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/bin//mipsel-openwrt-linux-gcc -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I /home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/usr/include -I /home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/include -I /home/volkan/source//staging_dir/target-mipsel_24kc_musl/usr/include -I /home/volkan/source//staging_dir/target-mipsel_24kc_musl/include gpioRead.c -o gpioRead -L/home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/usr/lib -L/home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/lib -L/home/volkan/source//staging_dir/target-mipsel_24kc_musl/usr/lib -L/home/volkan/source//staging_dir/target-mipsel_24kc_musl/lib -lugpio
gpioRead.c:7:10: fatal error: ugpio/ugpio.h: No such file or directory
#include <ugpio/ugpio.h>
^~~~~~~~~~~~~~~
compilation terminated.
makefile:9: recipe for target 'gpioRead' failed
make: *** [gpioRead] Error 1
I really don't understand why the company doesn't update its documentation.
Thanks for ur quick reply,
i tried it before. Here is the output
./scripts/feeds install libugpio
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libgnutls', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libopenldap', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libidn2', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libssh2', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
Ignoring feed 'packages' - index missing
Ignoring feed 'luci' - index missing
Ignoring feed 'routing' - index missing
Ignoring feed 'telephony' - index missing
Ignoring feed 'onion' - index missing
Here is my part of this
TOOLCHAIN_NAME="toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16"
TOOLCHAIN_NAME_FOR_GCC="toolchain-mipsel_24kc_gcc-7.3.0_musl"
TARGET_NAME="target-mipsel_24kc_musl"
i added myself TOOLCHAIN_NAME_FOR_GCC because of could not find the corresponding directory.
But now it gives me error
gpioRead.c:7:10: fatal error: ugpio/ugpio.h: No such file or directory
#include <ugpio/ugpio.h>
^~~~~~~~~~~~~~~
compilation terminated.
makefile:9: recipe for target 'gpioRead' failed
Followed instructions Cross-Compiling for the Omega. Unfortunately the "c-cross-compile-example" will not build as the mipsel-openwrt-linux-gcc : Command not Found
Here is the error :
Compiling C program
/home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/bin/mipsel-openwrt-linux-gcc -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I /home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/usr/include -I /home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/include -I /home/volkan/source//staging_dir/target-mipsel_24kc_musl-1.1.16/usr/include -I /home/volkan/source//staging_dir/target-mipsel_24kc_musl-1.1.16/include gpioRead.c -o gpioRead -L/home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/usr/lib -L/home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/lib -L/home/volkan/source//staging_dir/target-mipsel_24kc_musl-1.1.16/usr/lib -L/home/volkan/source//staging_dir/target-mipsel_24kc_musl-1.1.16/lib -lugpio
make: /home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/bin/mipsel-openwrt-linux-gcc: Command not found
makefile:9: recipe for target 'gpioRead' failed
make: *** [gpioRead] Error 127
Am i miss something ?
Best Regards.
@Alex-Costea Thanks for reply , but i dont understand properly.
you mean that 384 (32 bit offset) -> hex(4384) = 0x600 , but how?
What about Gpio::baseAddress + registerOffset?
Hi Scott , you can drive two Dc motors or one step motor. per channel up to two amper. l298p is the main ic. You can find it on my blog.
https://engineeringvolkan.wordpress.com/2018/08/19/onion-omega2-motor-surucu-karti-pcbway/
Hey omega lovers , we made a motor shield for omega2. We will be putting it on Tindie for sale. Who wants it?. Any advice ?
@Patryk-Wychowaniec Hi Patryk , when i look into the datasheet , i see this adress for GPIO_CTRL_0 32
10000600
How can you write your code ? any datasheet?