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

Andrei Chichak groups at chichak.ca
Sat Sep 26 05:42:16 UTC 2009


After much mucking about, I believe I know what is going on.

When the processor starts, a bunch of registers are set so that memory  
works, the stack is set up and memory is initialized. Then we call  
bsp_start() to let the operating system know where the heap is located  
and how big it is so that RTEMS can allocate the necessary structures.

I think that there must have been some sort of a transition somewhere  
along the way because I don't remember doing this in the BSP that I  
put together earlier and now I see veiled references in the  
documentation to the Configuration structure (which shouldn't be  
munged directly but doesn't give an example of how to do it in the  
official method).

So, which BSP is the latest, gospel, prototypical, godlike, "Man, I  
wish they were all written like this", BSP that we should be using as  
a template? Or equivalently, what are the interface guidelines for  
letting RTEMS know where the RAM is?


thanks,

Andrei



On 2009-September-24, at 11:21 AM, Andrei Chichak wrote:

> Holy cow, just this morning I'm bringing up a new BSP in RTEMS 4.9  
> for a Coldfire 5282 and I am currently trying to cure this exact  
> same problem.
>
> Mine looks like the problem happens in a routine called  
> _Workspace_Handler_initialization. No further information yet, I'm  
> trying to single step it.
>
> 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
>
>
> _______________________________________________
> 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




More information about the users mailing list