This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Global variables get corrupted


Hi All,

I am new to this group and new to eCos as well. I am trying to port Bluetooth stack on EP7312 board from Cirrus Logic using eCos-1.3.1 version.

The complete Bluetooth stack is a two threaded implementation, that is, the data will be sent out from the Bluetooth device in the downstream thread and the data received from the peer device will be sent to the application above the Bluetooth stack using the callback mechanism.

I am having the following issues when I try to run my application over the board.

The application has global mutexes on which the application will wait for EVENTs to occur and a global structure instance which will be used in both upstream and downstream functions as an application handle.

The global variables defined in the downstream thread get corrupted as soon as the control comes to the callback function or the upstream thread hence no global variables can be used after that, but the local variable values defined in the downstream thread are fine.

1. Has anybody seen this problem of global variables getting corrupted when the thread context changes?

2. Is there anything to do with the memory alignment of eCos (Single byte, WORD aligned or DWORD aligned)?

3. Do I need to make any specific changes in the memory mapping for eCos?

4. I have configured and built my kernel for EDB7xxx family of boards, I think this should take care of configuring the eCos kernel for this family of boards.

Can anybody please suggest some solution for this issue.

Thanks & Regards,
-Ravi Joshi

-- 
____________________________________________
http://www.operamail.com
Get OperaMail Premium today - USD 29.99/year


Powered by Outblaze

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]