sifive risc-v hifive unleashed bsp (qemu)

Joel Sherrill joel at rtems.org
Sat Feb 13 16:00:26 UTC 2021


On Sat, Feb 13, 2021, 4:16 AM Hesham Almatary <hesham.almatary at cl.cam.ac.uk>
wrote:

> On Sat, 13 Feb 2021 at 10:59, Eshan Dhawan <eshandhawan51 at gmail.com>
> wrote:
> >
> >
> > On 13-Feb-2021, at 1:53 PM, Sanskar Khandelwal <kdsanskar07 at gmail.com>
> wrote:
> >
> > 
> >
> >
> > On Sat, Feb 13, 2021 at 9:30 AM Joel Sherrill <joel at rtems.org> wrote:
> >>
> >>
> >>
> >> On Fri, Feb 12, 2021, 8:47 PM Rohan kumar <krohan8870 at gmail.co> wrote:
> >>>
> >>> I will look into this in more detail and get back to you but in mean
> time I want to contribute to any issues so can you suggest any thats need
> to be solved or how do I look for from my own.
> >>
> >>
> >> Projects or just smaller issues?
> >
> >
> > Actually I am looking for some small issues related to this project so I
> can get some experience.
> > before the project, I think this help me write better proposal and
> understand codebase more easily and faster.
> >
> > Also can you tell me status of the below tickets and are they open for
> participation? Actually I haven't decided project right now i am just
> learning about them so I can make better decision like which project suits
> me better according to may skills and experience level.
> >
> > But I am looking for project related to risc-v, I found this very
> interesting that's why I am asking for any issue related to this.
> >
> >  #3337 : RISC-V Port in Supervisor Mode
> >  #4182 : Port Rust to RTEMS
> >
> > Also can share some reference links so i can start, I have build the
> riscv/rv64imac on my laptop but i dont know how do i simulate it on qemu.
> >
> > Hello sanskar
> > I use this to run test suites
> > Although I am not quite sure if you were wanting this or something else
> >
> > qemu-system-riscv32 -no-reboot -nographic -machine virt -m 256M -kernel
> hello.exe
> >
> For RV64 and recent QEMU versions, the command would be:
>
> qemu-system-riscv64 -no-reboot -nographic -machine virt -m 256M -bios
> hello.exe
>

To work on the BSP, you definitely have to have the RISC-V toolchain and
being ae to run tests from existing RISC-V BSPs and used gdb with that is a
foundation you have to have.

Beyond that, there are a few prep things needed for any BSP.

+ You need to find documentation on the board and its peripherals. This
should be sufficiently detailed so you know the memory map and what each
peripheral's model/name is

+ Find candidate drivers for the peripherals in RTEMS that are already
working on other BSPs.

+ Look at the build structure for a BSP. You will likely reuse a fair
amount of shared code for startup, clock, and console.

+ If you can't find any code to reuse, BSDs and vendor kits are often
useful. Beware of incompatible licensing and ask for help to ensure you are
potentially starting from something we will accept and is right technically.

+ Linker script needs to use shared infrastructure and map this board into
that.

+ You can put together a minimal bsp that has a polled console and uses the
idle thread ticker as a first major milestone. Then incrementally add clock
tick, etc.

If SiFive has a bare metal setup (no OS) for this board, I find it useful
to make sure I can get that type of thing working.

Basically ensure you have something working to compare against and find
code to share as much as possible. Homework can make things a lot easier.

--joel


> > - - Eshan
> >
> >
> > thanks
> > sanskar
> >
> >
> >>
> >> There is a tag in the ticketing system for small projects but this
> query makes me wonder if some should be closed. Deciding a ticket is dead
> is good. :)
> >>
> >>
> >>
> https://devel.rtems.org/query?status=accepted&status=assigned&status=new&status=reopened&keywords=~Small&col=id&col=summary&col=status&col=owner&col=type&col=priority&col=milestone&order=priority
> >>
> >> Looking at Coverity is a quick way to find a small task. Some tickets
> geared to adding a test aren't bad.
> >>
> >> --joel
> >>>
> >>>
> >>> Thanks
> >>> Sanskar
> >>>
> >>>
> >>> On Fri, Feb 12, 2021, 3:01 PM Hesham Almatary <
> hesham.almatary at cl.cam.ac.uk> wrote:
> >>>>
> >>>> On Fri, 12 Feb 2021 at 11:24, Sanskar Khandelwal <
> kdsanskar07 at gmail.com> wrote:
> >>>> >
> >>>> > Hello joel,
> >>>> >
> >>>> > 1. #4162 : sifive risc-v hifive unleashed bsp (qemu)
> >>>> > As you mentioned this a good project i thought to search more about
> this project I learned a lot while doing so but I still don't understand
> what is the goal of this project (the description on the ticket is not very
> detailed ) also I don't have any idea on how to make approach for this
> project right now so if you can clear both my doubt it will be big help.
> >>>> >
> >>>> You'd need to identify the devices for this platform that QEMU
> >>>> supports (e.g., networking, UART, flash, etc?) and propose some
> >>>> timeline to implement (a subset of) them. That would be part of your
> >>>> proposal evaluation.
> >>>>
> >>>> > Also as you mention that this can be a big task for a gsoc time
> frame I am thinking that I can do some of it after gsoc too.
> >>>> >
> >>>> > Also I looked for some more open projects and found these
> interesting so I wanted to know if these are open for participation for
> gsoc and what's their status and what further enhancement you are looking
> at each of them.
> >>>> >
> >>>> > 2. #3337 : RISC-V Port in Supervisor Mode
> >>>> > 3. #4182 : Port Rust to RTEMS
> >>>> >
> >>>> > Another thing is that while I am learning more about these projects
> I want to contribute, so if you can tell me about any issue that I can work
> on, it will be nice. I think this will help get me more familiar with rtems
> too.
> >>>> >
> >>>> > Thanks
> >>>> > Sanskar
> >>>> > _______________________________________________
> >>>> > devel mailing list
> >>>> > devel at rtems.org
> >>>> > http://lists.rtems.org/mailman/listinfo/devel
> >>>> _______________________________________________
> >>>> devel mailing list
> >>>> devel at rtems.org
> >>>> http://lists.rtems.org/mailman/listinfo/devel
> >>>
> >>> _______________________________________________
> >>> devel mailing list
> >>> devel at rtems.org
> >>> http://lists.rtems.org/mailman/listinfo/devel
> >>
> >> _______________________________________________
> >> devel mailing list
> >> devel at rtems.org
> >> http://lists.rtems.org/mailman/listinfo/devel
> >
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210213/b0aa7990/attachment.html>


More information about the devel mailing list