Andrei,<br><br>thanks for the advise. <br><br>It was very useful to narrow the possible cause of the problem, yet I'm not succeding at getting the 4.6.6 erc32 BSP to work.<br><br>1) Linkcmds seems fine. It is almost the same as the one I am using with 4.8 -differences are the '*' after the labels (ie: "_text*" instead of "_text"), the dynamic sections that were not present in 4.6.6, some additional sections for GNU compatibility, etc. PROM_SIZE and RAM_SIZE have the same values (2M and 4M) respectively in both versions.<br>
<br>2) The code that loads .data and fills .bss with zeroes in start.S is the same in 4.6.6 and 4.8, so I believe the problem is not there either.<br><br>I'll keep trying.... : )<br><br>Nicolás<br><br><br><br><br><br>
<br><br><div class="gmail_quote">2009/9/30 Andrei Chichak <span dir="ltr"><<a href="mailto:groups@chichak.ca">groups@chichak.ca</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Nicolas,<br>
<br>
I found the problem in my BSP after a LOT of looking.<br>
<br>
It turns out that my linkcmds file was not working properly and start.S, in copying ROM to RAM, did not use the proper addresses, corrupting the .data section.<br>
<br>
This was causing calloc to fail setting up the work area.<br>
<br>
<br>
I would suggest creating a variable in your program like:<br>
<br>
int fu = 42;<br>
<br>
and run through the initialization code and make sure that fu is being initialized properly.<br>
<br>
With your code, it looks like you are trying to initialize 4GB of RAM. Either you have a lot of memory or the value of work_area_size got smashed.<br>
<br>
<br>
<br>
Hope this helps,<div class="im"><br>
Andrei<br>
<br>
<br>
<br>
On 2009-September-24, at 9:51 AM, Nicolas Horro wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
Hello,<br>
<br>
when downgrading from rtems 4.8.0 to rtems 4.6.6 I found that the "hello world" example in real hardware with ERC32 bsp fails at startup when executing the function RTEMS_Malloc_Initialize( heap_start, heap_size, use_sbrk ).<br>

<br>
The line that fails is the memset() call.<br>
<br>
if (!starting_address) {<br>
 if ( rtems_cpu_configuration_get_do_zero_of_workspace() )<br>
   memset( starting_address, 0, length ); /* <= error */<br>
<br>
I believe this error is caused because <starting_address> and <length> have invalid values:<br>
<br>
(gdb) x starting_address<br>
0x2015e48:      0x00000000<br>
<br>
(gdb) x length<br>
0x3d6c20:       0xffffffff<br>
<br>
but not sure about this.<br>
<br>
I tried to identify the changes between ERC32 BSP in RTEMS 4.8.0 (in which hello world example works ok) and RTEMS 4.6.6, but I'm not succeeding to understand the full startup project.<br>
<br>
I'm aware 4.6.6 is no longer being supported, but any tip on what to look for would be really appreciated.<br>
<br>
Thanks in advance,<br>
<br>
Nicolás Horro<br></div></div><div class="im">
_______________________________________________<br>
rtems-users mailing list<br>
<a href="mailto:rtems-users@rtems.org" target="_blank">rtems-users@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br>
</div></blockquote><div><div></div><div class="h5">
<br>
---------------------<br>
Andrei Chichak<br>
<br>
Systems Developer<br>
CBF Systems Inc.<br>
4-038 NINT Innovation Centre<br>
11421 Saskatchewan Drive<br>
Edmonton, Alberta<br>
Canada<br>
T6G 2M9<br>
<br>
Phone: 780-628-2072<br>
Skype: andrei.chichak<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>------------------------------------------------<br>Nicolás Eduardo Horro<br><br>