RE: minsoc: gdb set does not work
by flozn on Oct 19, 2013 |
flozn
Posts: 16 Joined: Jun 10, 2013 Last seen: Sep 22, 2020 |
||
Hi Raul!
The stack size seems not to be the problem. I visited the #openrisc irc channel and got some answers: the stack handling of c shall be the same like c++ at a given gnu compiler version. The friendly guys told me to check the software in the or1ksim simulator to verify the software. At the moment I don't get a successful simulation (some systematic problem - simple examples fail also...). Now I found some workaround: instead of passing local variables by pointer from c++ to c I moved the function into the c object file. Now c++ only passes variables by value to c and everything is fine... At another codeline the c++ code throws a SIGBUS error: double pointers doesn't work properly (but the code is already proven on AVR!). Finally some stack handling is faulty :/ . At the moment I could work around all problems, but the reason for SIGBUS errors is not known :( ... Cheers Flo |
RE: minsoc: gdb set does not work
by olof on Oct 20, 2013 |
olof
Posts: 218 Joined: Feb 10, 2010 Last seen: Dec 17, 2018 |
||
Hi Flo,
If you think you hit a bug in the toolchain and/or hardware it would be great if you could file a bug report at bugzilla.opencores.org, just so it doesn't get lost and forgotten in the forum Regards, Olof Kindgren |
RE: minsoc: gdb set does not work
by rfajardo on Oct 20, 2013 |
rfajardo
Posts: 306 Joined: Jun 12, 2008 Last seen: Jan 6, 2020 |
||
Hi Flo,
could you try to follow the pointer addresses during function calls over the simulator? Maybe you can find out where the pointer gets corrupted. I believe you have better chances of doing so with the simulator (Watchpoint support?) than on the hardware only being able to output the registers' values. Minsoc should have been prepared for working with the newer toolchain that requires more memory in the case of exceptions. I have proceeded as reported here: http://opencores.org/forum,OpenRISC,0,3975,0#1288611962 However, you could try to use the crt0.S and friends from newlib and see if that solves the problem. HTH, Raul |
RE: minsoc: gdb set does not work
by rfajardo on Oct 20, 2013 |
rfajardo
Posts: 306 Joined: Jun 12, 2008 Last seen: Jan 6, 2020 |
||
You could also try the watchpoint system (on Minsoc-1.0) provided by Nathan for the adv_debug_sys. Adv_debug_sys has a Java program for Watchpoints.
|
RE: minsoc: gdb set does not work
by flozn on Oct 20, 2013 |
flozn
Posts: 16 Joined: Jun 10, 2013 Last seen: Sep 22, 2020 |
||
Hey you two!
Thanks for all the input! Next week I will try to find the reason :) . Minsoc dev synthesized with 64k sram. Because of this I was able to use the newlib instead of the minsoc driver modules. Then another error occured which I may also try to identify. Thanks again :) ! Cheers Flo |