error at startup running Hello World Example in rtems 4.6.6 / erc32 bsp

Nicolas Horro nhorro at gmail.com
Thu Oct 1 12:50:42 UTC 2009


Andrei,

thanks for the advise.

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.

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.

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.

I'll keep trying.... : )

Nicolás







2009/9/30 Andrei Chichak <groups at chichak.ca>

> Nicolas,
>
> I found the problem in my BSP after a LOT of looking.
>
> 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.
>
> This was causing calloc to fail setting up the work area.
>
>
> I would suggest creating a variable in your program like:
>
> int fu = 42;
>
> and run through the initialization code and make sure that fu is being
> initialized properly.
>
> 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.
>
>
>
> Hope this helps,
> Andrei
>
>
>
> On 2009-September-24, at 9:51 AM, Nicolas Horro wrote:
>
>  Hello,
>>
>> 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 ).
>>
>> The line that fails is the memset() call.
>>
>> if (!starting_address) {
>>  if ( rtems_cpu_configuration_get_do_zero_of_workspace() )
>>   memset( starting_address, 0, length ); /* <= error */
>>
>> I believe this error is caused because <starting_address> and <length>
>> have invalid values:
>>
>> (gdb) x starting_address
>> 0x2015e48:      0x00000000
>>
>> (gdb) x length
>> 0x3d6c20:       0xffffffff
>>
>> but not sure about this.
>>
>> 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.
>>
>> I'm aware 4.6.6 is no longer being supported, but any tip on what to look
>> for would be really appreciated.
>>
>> Thanks in advance,
>>
>> Nicolás Horro
>> _______________________________________________
>> rtems-users mailing list
>> rtems-users at rtems.org
>> http://www.rtems.org/mailman/listinfo/rtems-users
>>
>
> ---------------------
> Andrei Chichak
>
> Systems Developer
> CBF Systems Inc.
> 4-038 NINT Innovation Centre
> 11421 Saskatchewan Drive
> Edmonton, Alberta
> Canada
> T6G 2M9
>
> Phone: 780-628-2072
> Skype: andrei.chichak
>
>


-- 
------------------------------------------------
Nicolás Eduardo Horro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20091001/b8b85c19/attachment.html>


More information about the users mailing list