Current state of RISC-V BSP

Denis Obrezkov denisobrezkov at gmail.com
Tue Aug 8 09:51:31 UTC 2017


2017-08-07 0:49 GMT+02:00 Denis Obrezkov <denisobrezkov at gmail.com>:

> 2017-08-07 0:44 GMT+02:00 Hesham Almatary <heshamelmatary at gmail.com>:
>
>> Hi Denis,
>>
>> Thanks for sharing the state of HiFive1 BSP. At this stage of GSoC, we
>> would want you to clean-up the code, write documentations/comments and
>> submit your code for review (probably to my GitHub repo).
>> Details/instructions how to use your code (compile, build, run, etc)
>> are also important.
>>
>> Cheers,
>> Hesham
>>
>> On Mon, Aug 7, 2017 at 7:25 AM, Denis Obrezkov <denisobrezkov at gmail.com>
>> wrote:
>> > Hello all,
>> >
>> > currently I have some issues with optimization flags.
>> > First of all, the low ticker example doesn't work with any optimization
>> > flags.
>> > Secondly, the hello example is too big and doesn't fit into memory
>> without
>> > optimization.
>> > And, in conclusion, scanf requires a clock driver, but as I said it
>> still
>> > doesn't
>> > work with optimization flags, so I can't test it.
>> >
>> > Also, I want to say that on this stage the BSP is very fragile and
>> requires
>> > proper configuration options to be set.
>> >
>> > --
>> > Regards, Denis Obrezkov
>> >
>> > _______________________________________________
>> > devel mailing list
>> > devel at rtems.org
>> > http://lists.rtems.org/mailman/listinfo/devel
>>
>>
>>
>> --
>> Hesham
>>
> Yes, I will try to do it till this Wednesday.
>
>
> --
> Regards, Denis Obrezkov
>
Sorry, I was too curious and found out why the low ticker example didn't
work with -Os optimization flag.
I found out that global interrupts aren't enabled back after task creation
or starting routing. Thus, I have modified the code
in this way:

for (i=1 ; i<=3 ; i++ ) {
      status = rtems_task_create(
        rtems_build_name( 'T', 'A', 0x30+1, ' ' ), 1, 0,
RTEMS_DEFAULT_MODES,
        RTEMS_DEFAULT_ATTRIBUTES, &id
      );
      status = rtems_task_start( id, Test_task, i );
    }
asm volatile ("csrsi mstatus, 0x8");  //I've added this line

And it works.
Now I can proceed with documentation and clean up the code.
-- 
Regards, Denis Obrezkov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20170808/d9ee5800/attachment-0002.html>


More information about the devel mailing list