How can I use --with-rtems-bspopts properly?

Pavel Pisa ppisa4lists at pikron.com
Sun Apr 28 22:30:36 UTC 2024


Dear Y. HB,

On Friday 16 of September 2022 11:45:05 Y. HB wrote:
> I am working on tms570 bsp
>
> I want to change some bspopts , but I cannot get the default value
> overridden via --with-rtems-bspopts, what correct way should I do?
>
> I used following command to configure RTEMS bsp
>
> ../../rtems-master/configure  OTHER-OPTIONS
> --with-rtems-bspopts="TMS570_USE_HWINIT_STARTUP=1 ARM_TMS570LC4357=1
> BSP_MINIMUM_TASK_STACK_SIZE=2048"
>
> But the generated bspopts.h is not changed with above values.

If you work with current mainline RTEMS sources then the process
to build RTEMS has changed. This is my build scrip for
test of tms570ls3137_hdk_sdram, it builds but there is some
issue to run BSP on TMS570LS3137 which can be caused by my
load method or changes for Cortex-R5 found on TMS570LC4357.
I have not found time to investigate that yet and that
platform is not our actual priority.

My RTEMS build script looks following way now

----------------------------------------------
#!/bin/sh

MY_DIR="$(cd "$(dirname "$0")" ; pwd -L )"

RTEMS_DIR=../../../git/rtems

$RTEMS_DIR/waf bspdefaults --rtems-bsps=arm/tms570ls3137_hdk_sdram -t "$RTEMS_DIR" -o "$MY_DIR" --prefix "/opt/rtems/6" >config.ini || exit 1

#mv config.ini config.ini.default
#sed <config.ini.default >config.ini \
  -e 's/^RTEMS_POSIX_API .*$/RTEMS_POSIX_API = True/' \

$RTEMS_DIR/waf configure -t "$RTEMS_DIR" -o "$MY_DIR" --rtems-config "$MY_DIR/config.ini" --prefix "/opt/rtems/6" || exit 1
$RTEMS_DIR/waf || exit 1
$RTEMS_DIR/waf install || exit 1
----------------------------------------------

Generally, after $RTEMS_DIR/waf bspdefaults you can edit
config.ini.

You can change

TMS570_USE_HWINIT_STARTUP = False

to

TMS570_USE_HWINIT_STARTUP = True

in the config.ini. It can be automated by

  -e 's/^TMS570_USE_HWINIT_STARTUP .*$/TMS570_USE_HWINIT_STARTUP = True/' \


There are lot of other options which can be adjusted.

Best wishes,

                Pavel
--
                Pavel Pisa

    phone:      +420 603531357
    e-mail:     pisa at cmp.felk.cvut.cz
    Department of Control Engineering FEE CVUT
    Karlovo namesti 13, 121 35, Prague 2
    university: http://control.fel.cvut.cz/
    personal:   http://cmp.felk.cvut.cz/~pisa
    company:    https://pikron.com/ PiKRON s.r.o.
    Kankovskeho 1235, 182 00 Praha 8, Czech Republic
    projects:   https://www.openhub.net/accounts/ppisa
    social:     https://social.kernel.org/ppisa
    CAN related:http://canbus.pages.fel.cvut.cz/
    RISC-V education: https://comparch.edu.cvut.cz/
    Open Technologies Research Education and Exchange Services
    https://gitlab.fel.cvut.cz/otrees/org/-/wikis/home


More information about the users mailing list