The only changes done by me are to the device driver .c file while using the generated code from the Device Integration example of Raspberry Pi.
I followed your suggestion. And pin-pointed the location where the error is occuring.
The fault occurs before the DeviceDriver_Initialize() function is even called. Since devicedriver.c was the file which was modified , I am not able to draw any conclusions from this.
Here, I have attached the device driver.c file.
Just FYI, I am using an ADC chip ADS1256 . An example file(namely ADS1256test.c- which is also attached below) was available online which uses bcm2835.h as the base functionality file. I had tested the file independently , also I tested the Deviceintegeration project independently. This is my attempt to basically include the ADC functions into the Devicedriver.
I still believe the segmentation fault happens somewhere within the DeviceDriver_Intialize() function - your EwPrint() messages are maybe not transferred because of the missing "\n".
Try to find the erroneous location e.g. by putting a lot of simple but unique messages within your code, e.g.:
void DeviceDriver_Initialize( void )
Thanks a lot Manfred
You were right. The error was due the bcm2835.h library. It required root access to run.
Ask Embedded Wizard
Welcome to the question and answer site for Embedded Wizard users and UI developers.
Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!