Problems in boot_card() with configuration

Gedare Bloom gedare at rtems.org
Thu Feb 14 19:38:30 UTC 2013


On Thu, Feb 14, 2013 at 2:16 PM, Joel Sherrill
<joel.sherrill at oarcorp.com> wrote:
> On 2/14/2013 1:09 PM, Matthew J Fletcher wrote:
>>
>> Hi,
>>
>> I am using RTEMS 4.10.2, and a custom BSP based on the ARM rtl22xx.
>>
>> I am running through the asm startup ok and calling into boot_card(),
>> stepping through its all working fine, work_area_start, work_area_size,
>> heap_start and heap_size are setup as i expect from my linkscript.
>>
>> But the test of "work_area_size <= Configuration.work_space_size" fails
>> because Configuration.work_space_size looks like 0xfffffff, the only
>> place that assigns to Configuration.work_space_size is a few lines
>> further down.
>>
>> Does this code presume that the BSP has set the Configuration structure
>> to zero, or the whole memory ? even so the aforementioned test seems odd
>> as its just testing memory has been initialised.
>>
We do assume the .bss section is initialized to 0, although I'm not
sure if that is still a necessary assumption. But I don't think that
is the problem here, because if the value of
Configuration.work_space_size was 0 then this test would still fail.

The work_space_size calculation is done in the
cpukit/sapi/include/confdefs.h file, but that can be a bit messy to
try to figure out.

>> Or am i missing some RTEMS initialisation call that needs to be done
>> before boot_card() ?
>
> No but there may be some basic C language assumptions not
> being met. Configuration is in the .data section and that value
> does not look like it was initialized to.
>
> Is your download correct?
>
You can disassemble your binary image and inspect the value of the
Configuration.work_space_size field in the data section.

>>
>> - Matthew
>> _______________________________________________
>> rtems-users mailing list
>> rtems-users at rtems.org
>> http://www.rtems.org/mailman/listinfo/rtems-users
>
>
>
> --
> Joel Sherrill, Ph.D.             Director of Research & Development
> joel.sherrill at OARcorp.com        On-Line Applications Research
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
> Support Available                (256) 722-9985
>
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users



More information about the users mailing list