RTEMS ARMv8 Port

Gedare Bloom gedare at rtems.org
Thu Mar 17 17:39:14 UTC 2016


Init threads are created during system initialization by
_RTEMS_tasks_Initialize_user_tasks_body(). Before the "Init" tasks are
created, the idle threads are created by _Thread_Create_idle() during
system initialization. Are you sure the restore is breaking on the
Init task and not the idle?



On Thu, Mar 17, 2016 at 3:34 AM, Raghav Nayak <raghav.nayak at nxp.com> wrote:
> Gedare,
>
> It would be great if you could tell where exactly you do "Init" (HelloWorld entrypoint) context store so that  "_CPU_Context_restore" can get proper context of the thread before launching
>
> Thanks
>
> With Regards
>   Raghav
>
> -----Original Message-----
> From: Raghav Nayak
> Sent: Thursday, March 17, 2016 12:39 PM
> To: 'Gedare Bloom'
> Cc: 'joel at rtems.org'; 'Jan Sommer'; 'rtems-users at rtems.org'
> Subject: RE: RTEMS ARMv8 Port
>
> Gedare,
>
> I am trying to run RTEMS ARMv8 Port on GEM5 Model. I am hitting some issues on "_CPU_Context_restore" part. After digging through the flow there is "_Per_CPU_Information" from where whole thread context is to be loaded back to register in context restore code. Could you please help me understand this section
>
> Thanks
>
> With Regards
>   Raghav
>
> -----Original Message-----
> From: Raghav Nayak
> Sent: Wednesday, March 16, 2016 8:09 PM
> To: 'Gedare Bloom'
> Cc: joel at rtems.org; Jan Sommer; rtems-users at rtems.org
> Subject: RE: RTEMS ARMv8 Port
>
> Gedare,
>
> Changing link format I could build properly. Thanks
>
> -----Original Message-----
> From: gedare at gwmail.gwu.edu [mailto:gedare at gwmail.gwu.edu] On Behalf Of Gedare Bloom
> Sent: Wednesday, March 16, 2016 7:30 PM
> To: Raghav Nayak
> Cc: joel at rtems.org; Jan Sommer; rtems-users at rtems.org
> Subject: Re: RTEMS ARMv8 Port
>
> Check where the link fails. Maybe the target binary output format is not supported by the linker for some reason.
>
> On Wed, Mar 16, 2016 at 9:54 AM, Raghav Nayak <raghav.nayak at nxp.com> wrote:
>> Gedare,
>>
>> Currently I have put necessary port for ARMv8 to run "HelloWorld" App.
>> But hitting some issue while linking final hello app
>>
>> With Regards
>>   Raghav
>>
>> -----Original Message-----
>> From: gedare at gwmail.gwu.edu [mailto:gedare at gwmail.gwu.edu] On Behalf
>> Of Gedare Bloom
>> Sent: Wednesday, March 16, 2016 7:22 PM
>> To: Raghav Nayak
>> Cc: joel at rtems.org; Jan Sommer; rtems-users at rtems.org
>> Subject: Re: RTEMS ARMv8 Port
>>
>> Raghav,
>>
>> In addition to the RTEMS toolchain, you must have a port of RTEMS itself to the target architecture. This involves probably a week or two of engineering effort.
>>
>> On Wed, Mar 16, 2016 at 9:48 AM, Raghav Nayak <raghav.nayak at nxp.com> wrote:
>>> Hi Joel,
>>>
>>>
>>>
>>> Currently I am using the RTEMS toolchain for ARMv8 through Source
>>> Builder
>>>
>>>
>>>
>>> With Regards
>>>
>>> Raghav
>>>
>>>
>>>
>>> From: users [mailto:users-bounces at rtems.org] On Behalf Of Raghav
>>> Nayak
>>> Sent: Wednesday, March 16, 2016 6:51 PM
>>> To: joel at rtems.org; Jan Sommer
>>> Cc: rtems-users at rtems.org
>>> Subject: RE: RTEMS ARMv8 Port
>>>
>>>
>>>
>>> Hi Joel,
>>>
>>>
>>>
>>> I could build to some extent and when it comes to application it says
>>>
>>> “error: Cannot change output format whilst linking AArch64 binaries”.
>>>
>>>
>>>
>>> Any hints to resolve this problem ? Thanks
>>>
>>>
>>>
>>> With Regards
>>>
>>>   Raghav
>>>
>>>
>>>
>>> From: Joel Sherrill [mailto:joel at rtems.org]
>>> Sent: Wednesday, March 16, 2016 6:05 PM
>>> To: Jan Sommer
>>> Cc: rtems-users at rtems.org; Raghav Nayak
>>> Subject: Re: RTEMS ARMv8 Port
>>>
>>>
>>>
>>>
>>> On Mar 16, 2016 7:26 AM, <soja-lists at aries.uberspace.de> wrote:
>>>>
>>>> Am 2016-03-16 10:32, schrieb Raghav Nayak:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I am trying to configure RTEMS for ARMv8 target. Tried running the
>>>>> following command:
>>>>>
>>>>> ../configure --target=aarch64-rtems4.12
>>>>> --enable-rtemsbsp=raspberrypi --enable-tests=samples
>>>>> --enable-networking --enable-posix
>>>>> --prefix=/mnt/FSL/pandora/rtems/rtems-armv8-bsp/4.12
>>>>>
>>>>
>>>> I am no expert in this, but I highly doubt that this is supposed to work.
>>>> So far you only have a cross-compiler for RTEMS for the aarch64 target.
>>>> However, as ARMv8 is a new architecture for RTEMS I would expect
>>>> that you need to first add support for this new architecture to the
>>>> RTEMS-kernel and probably the configure scripts as well. I have
>>>> never done this, so I can't help here. The RTEMS porting guide might
>>>> be a first step in understanding what you have to do:
>>>> https://docs.rtems.org/doc-current/share/rtems/pdf/porting.pdf
>>>>
>>>> Another thing is that you want to build the raspberrypi-bsp. I
>>>> assume you want to build RTEMS for the raspberry pi 3. The new
>>>> raspberry uses another cpu as the older versions and of a different
>>>> target architecture. That means from the operating system's point of
>>>> view it differs significantly from the older ones, thus you cannot
>>>> expect that the bsp for the RPi 1 and RPi 2 will work for the RPi 3.
>>>> No one has added support for the RPi 3 yet. It's very new on the
>>>> market and RTEMS has currently no ARMv8 support.
>>>
>>> That's the basics. A new architecture requires adding
>>> score/cpu/aarch64 and a new BSP for that architecture
>>> c/src/lib/libbsp/aarch64/NEWBSP. I added the GNU tools support.
>>>
>>> I did notice that gdb has a simulator for aarch64 which means a BSP
>>> for that is simple to construct. The gdb simulator is similar on all
>>> architectures and we have BSPs for a variety to use as examples. This
>>> would be enough to debug core functionality on the aarch64 and run
>>> the tests without interrupt support.
>>>
>>> Then you have to add interrupt support and move to real HW and add a
>>> second BSP.
>>>
>>>>> But not able to get the output something like this:
>>>>>
>>>>> target architecture: aarch64.
>>>>> available BSPs: raspberrypi.
>>>>> 'make all' will build the following BSPs: raspberrypi.
>>>>> other BSPs can be built with 'make RTEMS_BSP="bsp1 bsp2 ..."'
>>>>>
>>>>> config.status: creating Makefile
>>>>>
>>>>>
>>>>> Do you have any clues?
>>>>>
>>>>>
>>>>> With Regards
>>>>>   Raghav
>>>>>
>>>>> _______________________________________________
>>>>> users mailing list
>>>>> users at rtems.org
>>>>> http://lists.rtems.org/mailman/listinfo/users
>>>>
>>>> _______________________________________________
>>>> users mailing list
>>>> users at rtems.org
>>>> http://lists.rtems.org/mailman/listinfo/users
>>>
>>>
>>> _______________________________________________
>>> users mailing list
>>> users at rtems.org
>>> http://lists.rtems.org/mailman/listinfo/users


More information about the users mailing list