Why not adapt a simple RTOS (e.g. FreeRTOS) to run on multicore
in a SMP configuration?
It is very simple to do and provides a nice environment for
complex application code.
gdb/eclipse will even show the individual processes for you.
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/CALR3b2BXZmxmsyKUDY14gh-NHH4Jpo9fFD2m%3D_22Yf6UwCAGBQ%40mail.gmail.com.
Why not adapt a simple RTOS (e.g. FreeRTOS) to run on multicore in a SMP configuration?
It is very simple to do and provides a nice environment for complex application code.
gdb/eclipse will even show the individual processes for you.
On 11-Apr-18 12:14, Noureddine AIT SAID wrote:
Hello,
I'm working on a simple baremetal program destined to run on a multicore RISC-V platform (directly on hardware without pk), after a long search of a supported multicore OS (on real HW).
I got inspired from the riscv-tests + riscv-pk repos to build a simple m-mode software. It works well in Spike, The program tries basically to initiate multiple threads, affects each thread to a separate core, and then joins everything and prints the results, using the printf function defined in syscalls.c.
My questions are:
- I could build it and get out all the logs and instructions along with executed instructions and cycles. But the problem is that the execution stops at the moment I launch the first printf. Using some dummy instructions I could detect where the problem happened, but don't understand why?
- What is the most convinient way to debug the app using the C++ Emulator? Can anyone explain in a few words the method or just point me to a documentation?
- Is it possible to dump the content of the memory after execution of the program on the C++ Emulator using something else rather than printf?
I'm sorry for the basic questions I got very lost trying to understand the spirit of risc-v, thank you very much.
Cordialement,
Noureddine
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/CALR3b2BXZmxmsyKUDY14gh-NHH4Jpo9fFD2m%3D_22Yf6UwCAGBQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/25f1df70-d56e-0720-1b97-ce2e7be843db%40gmail.com.
Possibly dumb question but ... what exactly is this "C++ emulator" that you're referring to (a link to the relevant project would help clarify) and does it have any documentation about running bare metal stdio programs on it?
Are you referring to the RISC-V qemu or something else?
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/37d227dc-5f6d-4e2c-a046-733039d747cc%40groups.riscv.org.
Any use?
https://groups.google.com/a/groups.riscv.org/forum/m/#!topic/hw-dev/Pv8jUk0DzKI
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/4863e9fa-c71f-415d-ac84-5353034a9993%40groups.riscv.org.
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/17e6335f-4d92-482c-8126-44f619520126%40groups.riscv.org.
Thank you for the additional information.Why I didn't understand is why they put that message in the C Emulator about Jtag Remote Btbang if it doesn't support that? I tried to put that +jtag_rbb_enable=1 as an argument but no results. Is this used for another purpose maybe?As you said there is only the printf mehod which is very painful. I even added some assembly dummy instructions incide the c files to mark suspicious parts where I think it stops, this helps me navigate the log files from the verilator emulation, but these aren't definitely better than a real debugger.Kind regards,Noureddine
On Thu, Apr 12, 2018 at 2:35 PM, Tommy Murphy <tommy_...@hotmail.com> wrote:
Glad it helped.Bare metal programs on a RISC-V target are normally debugged using gdb/openocd/JTAG/DTM..But I'm not sure that there's any solution for this with verilator?Unless the testbench section here gives any clues since it already seems to use some DTM functionality?Linux apps running on Linux on a target would normally be debugged using gdb-server or gdbstub but as far as I know that does not yet exist/work for RISC-V.I'm not sure that there is a debug solution here other than "printf debugging"?But others may know more than I do about this.
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/17e6335f-4d92-482c-8126-44f619520126%40groups.riscv.org.
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/CALR3b2CsURc1wa%2BqC9nSjegHiTnqEB5eYr%2BK-Qcw7nDcW33YbA%40mail.gmail.com.
Rocket chip regressions run GDB/OpenOCD against the emulator. You can look at the .travis.yml file and regression/Makefile to see how.
On Thu, Apr 12, 2018 at 07:53 Noureddine AIT SAID <noureddin...@gmail.com> wrote:
Thank you for the additional information.Why I didn't understand is why they put that message in the C Emulator about Jtag Remote Btbang if it doesn't support that? I tried to put that +jtag_rbb_enable=1 as an argument but no results. Is this used for another purpose maybe?As you said there is only the printf mehod which is very painful. I even added some assembly dummy instructions incide the c files to mark suspicious parts where I think it stops, this helps me navigate the log files from the verilator emulation, but these aren't definitely better than a real debugger.Kind regards,Noureddine
On Thu, Apr 12, 2018 at 2:35 PM, Tommy Murphy <tommy_...@hotmail.com> wrote:
Glad it helped.Bare metal programs on a RISC-V target are normally debugged using gdb/openocd/JTAG/DTM..But I'm not sure that there's any solution for this with verilator?Unless the testbench section here gives any clues since it already seems to use some DTM functionality?Linux apps running on Linux on a target would normally be debugged using gdb-server or gdbstub but as far as I know that does not yet exist/work for RISC-V.I'm not sure that there is a debug solution here other than "printf debugging"?But others may know more than I do about this.
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/17e6335f-4d92-482c-8126-44f619520126%40groups.riscv.org.
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/CALR3b2CsURc1wa%2BqC9nSjegHiTnqEB5eYr%2BK-Qcw7nDcW33YbA%40mail.gmail.com.
--Megan A. WachsEngineer | SiFive, Inc
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/CAKnTnFQUr_U1YPPuwSRpy2Cxw5fwvZj5uw6Yc%2Bj7ZydeweGRpA%40mail.gmail.com.
My post crossed with Megan's which is better advice than mine! :-)
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/f9b9fb04-ea1a-4448-86f4-854345e2b27a%40groups.riscv.org.