RISC-V interrupts

Gedare Bloom gedare at rtems.org
Wed Jun 7 16:40:47 UTC 2017

On Wed, Jun 7, 2017 at 12:26 PM, Denis Obrezkov <denisobrezkov at gmail.com> wrote:
> 2017-06-07 14:44 GMT+03:00 Sebastian Huber
> <sebastian.huber at embedded-brains.de>:
>> On 06/06/17 18:58, Hesham Almatary wrote:
>>> Originally RTEMS had a one big linkcmd for each platform, which
>>> defines linker symbols (used in C code) and required sections. This
>>> has been improved with current BSPs (like ARM-based ones), by
>>> splitting up shared linkcmd parts (linkcmd base) and BSP specific ones
>>> that include the shared one. riscv_generic, given that it's old,
>>> follows the old way of having a single big linkcmd. You can change
>>> this for your new BSP.
>> New ports/BSPs should definitely use a shared linkcmds.base (see ARM). Use
>> "riscv-rtems4.12-ld --verbose" to get the default linker script.
> Ok.
> Now I have a problem:
> https://github.com/embeddedden/rtems-riscv/blob/hifive1/c/src/lib/libbsp/riscv32/hifive1/start/start.S#L117
> When I step to that line, gdb hangs with a message:
> (gdb) step
> Note: automatically using hardware breakpoints for read-only addresses.
> Does somebody know what can be done here?
Check what is the value in s0 before the jr, and compare that with the
symbol map / function addresses, which you can get with nm or objdump.
(I usually use xxx-rtems4.xx-objdump -dA hello.exe > hello.txt and
examine the text file.)

> Also, I don't like my initial linker file:
> https://github.com/embeddedden/rtems-riscv/blob/hifive1/c/src/lib/libbsp/riscv32/hifive1/startup/linkcmds
> Critique is very appreciated.
I can't look at this yet except to reiterate that it is worth it to
mimic the arm/sparc BSPs and use a linkcmds.base file and then
specialize it for each individual BSP.

> --
> Regards, Denis Obrezkov
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel

More information about the devel mailing list