- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I have a very very wear behavior in my orogram. I have this code://message is a char array
const unsigned int* command =((unsigned int*)(message+2));
When I observe the debugger 'Variables' tab I can see: command 0x02ffcf0a *command 1 '1' is the expected value, it's a command that I'm sending to the Nios from my PC. The wear is the next code: printf("*command = %d", *command);
if( (*command) == 1U){
TCPSSReport("Never enters here!!!!!!!!\n");
}
The test it's always false. The output is this: *command = 66684 //The actual value seems to be random So, the program behavior is very very wrong!. I have no optimization enable. My memory map is the following: .bss : onchip_mem .entry : reset .exceptions : onchip_mem .heap : sram1 .rodata : sram2 .rwdata : onchip_mem .stack : sram2 .data :sram2 the instruction (in the disassambly tab)used to load the variable is 'ldw'. any ideas what is causing this?
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page