I'm working on a BeagleBone Black (BBB from now on) with its stock Angstrom Linux.
I'm able to do GPIO/Analog programming using JavaScript, but I want to do it in C/C++.
I know the sysfs thing and /dev/mem, I want to know how to configure the GPIO and analog pins.
I can write C/C++ code for GPIO/analog reading writing, but have no clue what to do for initialization.
One way is the Device Tree Overlay, but I don't want to go for two different things for one purpose, since I can understand that it can be done in C/C++ but how??
It'll be helpful if I could alongside get some example related to both sysfs and /dev/mem for configuring+r/w of gpio &/or analog pins of the BBB (on Angstrom Linux, if this matters)
OK, so Linux is the only way? I've tried cross-compiling for other processors (bare-metal) using code::blocks, em::blocks & eclipse/ by using the respective cross-gcc toolchain for windows. Ex: arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) with Eclipse CDT was great and easy. Isn't there any toolchain that would let me cross-compile for BBB/Angstrom-Linux on my windows laptop. I tried the linaro toolchain but even that didn't work
Thanks for those links, the Device tree seems good way, I want to try /dev/mem also, it looks more straightforward and is similar to bare-metal C/C++ programming once mmap is done.