Errors in PSIM

Binkowski, Cassio cassioiks at gmail.com
Thu May 2 02:28:22 UTC 2013


How can one increase the memory in linkcmds? Just change change de writing
from 16mb to 32mb?

And, what would be your recommendation for this situation? Should I use
malloc? If so, just do it on the beginning of Init task?

Another issue that probably got left behind. Is the following a memory leak
issue?

*Suspending faulting task (0x0A010003)*
*Exception handler called for exception 7 (0x7)*
*Too many stack frames (stack possibly corrupted), giving up...*
*Suspending faulting task (0x0A010004)*


On Wed, May 1, 2013 at 11:12 PM, Joel Sherrill <Joel.Sherrill at oarcorp.com>wrote:

>  You can increase the memory easily in the linkcmds but RTEMS will use it all based on the default linkcmds.
>
> In general, unless you have a special back of memory or tinker with the linker script, malloc or declaring a large memory block in your program are the solutions.
>
> Where the memory is usually not the critical concern. Having a dedicated pool of fixed buffers is.
>
> "Binkowski, Cassio" <cassioiks at gmail.com> wrote:
>
>
>  Thanks Joel. So, no chance of customizing Psim for 32mb of RAM?
>
>  "On real how you can do that or arrange the linker script to have a
> special reserved area." I'm not sure I understood this. On the
> 'production' code I should find some other way for guaranteeing that space
> is free, is that it?
>
>
> On Wed, May 1, 2013 at 11:01 PM, Joel Sherrill <Joel.Sherrill at oarcorp.com>wrote:
>
>>  Sorry.. Forgot to follow up on board differences. Psim is not the same as any real hardware. Each bsp matches a specific hardware set. Psim is configured to have 16mb of ram and I think your partition base addresses are beyond that.
>>
>> Gedare is right.. On a simulator, malloc the memory for partitions for simplicity. On real how you can do that or arrange the linker script to have a special reserved area.
>>
>> --joel
>>
>> Gedare Bloom <gedare at rtems.org> wrote:
>>
>>
>>   You tell the partitions where to start, so just give the second
>> partition the right address. You have to be sure the memory you use is
>> available both in the hw as real memory and also not used for other
>> purposes. Probably you can malloc all the memory you need at startup time
>> and pass pointers into the allocated buffer to partition create.
>> -Gedare
>> On May 1, 2013 7:07 PM, "Binkowski, Cassio" <cassioiks at gmail.com> wrote:
>>
>>> Hmmm. The 'Testing Task' does not have a while(1) loop and I'm not
>>> deleting it. Could that be it? *<- Yup, that's it. Just tested. Can you
>>> please explain how did you arrive at this conclusion?*
>>>
>>>  I'm referring to the MPC5200B board. You can see the manual in the
>>> following link:
>>> http://www.freescale.com/files/32bit/doc/ref_manual/MPC5200BUM.pdf
>>>
>>>  Now, mentioning the partitions and memory addresses. I'm not quite
>>> sure if I'm incrementing addresses correctly. I do want to create a
>>> partition right next where the other one finishes.
>>> So, if starting address is 0x10000, the next partition will start at
>>> 0x10000 + previousPartitionSize.
>>> Does this make sense?
>>>
>>>  Thanks.
>>>
>>>
>>>
>>> On Wed, May 1, 2013 at 7:49 PM, Joel Sherrill <Joel.Sherrill at oarcorp.com
>>> > wrote:
>>>
>>>>  It could be another task exiting. You mentioned loading code.
>>>>
>>>> Psim is a specific simulated hardware environment and does not as configured match any board. If you got addresses from a piece of real hardware, the addresses will not match. What target board's manual are you reading?
>>>>
>>>> "Binkowski, Cassio" <cassioiks at gmail.com> wrote:
>>>>
>>>>
>>>>   Ok.
>>>>
>>>>  1) The Init task is already deleting itself after loading the other
>>>> tasks. Do I have to do something else?
>>>>
>>>>  2) The memory for partitions came from the board data sheet. I based
>>>> myself on the addresses mentioned there and followed upon. I was creating
>>>> the first one starting at 0x10000 and incrementing from that according to
>>>> each partition's size.
>>>>
>>>>  Can you help me set these 2 things up? I'm not really sure how to
>>>> deal with that memory issue and the internal error as well.
>>>>
>>>>
>>>> On Wed, May 1, 2013 at 6:18 PM, Joel Sherrill <
>>>> Joel.Sherrill at oarcorp.com> wrote:
>>>>
>>>>>  That address is invalid for psim. Where does the partition memory come from? Here I'd the memory keep for psim
>>>>> http://git.rtems.org/rtems/tree/c/src/lib/libbsp/powerpc/psim/startup/linkcmds
>>>>>
>>>>> "Binkowski, Cassio" <cassioiks at gmail.com> wrote:
>>>>>
>>>>>
>>>>>  I'm also getting the following error when I uncomment the function
>>>>> that creates 10 partitions to be used by my application:
>>>>>
>>>>>  *core_find_mapping() - access to unmaped address, attach a default
>>>>> map to handle this - addr=0x1000d2c nr_bytes=0x4 processor=0xa8e5000
>>>>> cia=0x1028c*
>>>>>  *
>>>>> *
>>>>> Can you please help?
>>>>>
>>>>>
>>>>> On Wed, May 1, 2013 at 5:44 PM, Binkowski, Cassio <cassioiks at gmail.com
>>>>> > wrote:
>>>>>
>>>>>> The file 'events.c' is inside /gdb-7.5.1/sim/ppc.
>>>>>>
>>>>>>  I am using psim-gdb testing my own application, it's not an RTEMS
>>>>>> example.
>>>>>>
>>>>>>  I managed to break right on it, and it stops at:
>>>>>> ../../../../../../rtems/c/src/../../cpukit/score/src/interr.c:58
>>>>>>
>>>>>>  Signature is the following:
>>>>>>  the_source=the_source at entry=INTERNAL_ERROR_CORE,
>>>>>> is_internal=is_internal at entry=true,
>>>>>>     the_error=the_error at entry=5)
>>>>>>
>>>>>>  I have no clue of what it can be. Do you have any idea?
>>>>>>
>>>>>>
>>>>>> On Wed, May 1, 2013 at 5:37 PM, Joel Sherrill <
>>>>>> Joel.Sherrill at oarcorp.com> wrote:
>>>>>>
>>>>>>>  Where is the file events.c?
>>>>>>>
>>>>>>> Break at the fault handler printing that.
>>>>>>>
>>>>>>> Does this happen with any rtems provided examples?
>>>>>>>
>>>>>>> Are you using the psim or psim-gdb script to run it?
>>>>>>>
>>>>>>> "Binkowski, Cassio" <cassioiks at gmail.com> wrote:
>>>>>>>
>>>>>>>
>>>>>>>   Hi everyone,
>>>>>>>
>>>>>>>  I was just testing my application using PSIM and it is returning
>>>>>>> the following lines, right after starting a Task:
>>>>>>>
>>>>>>>  *rtems-4.10.99.0(PowerPC/Generic (classic FPU)/psim) PANIC ERROR 5*
>>>>>>> *events.c:404: assertion failed - events->time_from_event > 0*
>>>>>>>
>>>>>>>  Has anybody experienced this before?
>>>>>>>
>>>>>>>  Thanks.
>>>>>>> Cassio
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> rtems-users mailing list
>>> rtems-users at rtems.org
>>> http://www.rtems.org/mailman/listinfo/rtems-users
>>>
>>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20130501/8517c844/attachment-0001.html>


More information about the users mailing list