Risc-v memory issue

Denis Obrezkov denisobrezkov at gmail.com
Mon Jun 12 16:09:12 UTC 2017


Hello all,

I was able to debug my program on top of HiFive1 board.
I found out that I can't use next and until commands from gdb,
they just hang gdb.
And now I have a problem, this is my backtrace:

#0  0x2041d728 in _User_extensions_Iterate (arg=0x80002eb8,
visitor=0x2041d64e <_User_extensions_Fatal_visitor>,
direction=CHAIN_ITERATOR_FORWARD)
    at
/home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/userextiterate.c:155
#1  0x20410ed4 in _User_extensions_Fatal (source=INTERNAL_ERROR_CORE,
error=2) at
../../cpukit/../../../hifive1/lib/include/rtems/score/userextimpl.h:307
#2  0x20410ef8 in _Terminate (the_source=INTERNAL_ERROR_CORE, the_error=2)
at
/home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/interr.c:35
#3  0x20410f40 in _Internal_error
(core_error=INTERNAL_ERROR_TOO_LITTLE_WORKSPACE) at
/home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/interr.c:44
#4  0x2041e484 in _Workspace_Handler_initialization (areas=0x80002f78,
area_count=1, extend=0x0) at
/home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/wkspace.c:123
#5  0x2040031c in bsp_work_area_initialize_default (area_begin=0x80001d58,
area_size=8872) at
../../../../../.././hifive1/lib/include/bsp/bootcard.h:147
#6  0x20400372 in bsp_work_area_initialize () at
/home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/lib/libbsp/riscv32/hifive1/../../shared/bspgetworkarea.c:61
#7  0x2040f3ce in rtems_initialize_executive () at
/home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/sapi/src/exinit.c:95
#8  0x204002cc in boot_card (cmdline=0x0) at
/home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/lib/libbsp/riscv32/hifive1/../../shared/bootcard.c:76
#9  0x20400064 in _end_clear_bss () at
/home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/lib/libbsp/riscv32/hifive1/start/start.S:116

So, I think I should increase a workspace.
Now, I have some questions:
I took Hesham's linker file for riscv-generic, and there were no stack
space,
I allocated 0x1000 for stack. Should I make it zero again, or should I
decrease its size?
what size for stack should be enough?
And why there were no space for stack? is it possible to work without stack
allocated in
linkcmd file?
Can RTEMS work with a smaller workspace?

-- 
Regards, Denis Obrezkov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20170612/ffb08b3f/attachment.html>


More information about the devel mailing list