This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/AM5718: Regarding compilation of SBL for AM571x IDK

Part Number: AM5718

Tool/software: TI-RTOS

Hello Experts,

I am trying to compile the SBL for only idkAM571x executing "gmake sbl LIMIT_BOARDS="idkAM571x" 

But it looks like it compiles all the boards in PDK as error shown below. 

C:/ti/pdk_am57xx_1_0_12/packages/ti/board/board_cfg.h:66:54: fatal error: ti/bo
rd/src/evmAM572x/include/board_cfg.h: No such file or directory
 #include <ti/board/src/evmAM572x/include/board_cfg.h>
                                                      ^
compilation terminated.
gmake[2]: *** [C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/binary/evmAM572x/mm
sd/obj/sbl_main.o] Error 1
gmake[2]: Leaving directory `c:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `c:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl'
gmake: *** [sbl] Error 2

How can we limit the sbl compilation to a particular board?

Thanks,

Ajijt

  • Hi Ajit,

    This is how I built SBL successful for AM571x IDK on Linux Ubuntu:

    $:~/ti/pdk_am57xx_1_0_13/packages/ti/boot/sbl$ make all BOARD=idkAM571x SOC=AM571x BOOTMODE=mmcsd

    Refer to the below user guide for more details:

    software-dl.ti.com/.../index_Foundational_Components.html

    Regards,
    Pavel
  • 
    

    Thank you Pavel,

    That issue has been solved!!

    I need to compile the same for my custom board gardAM5708, when i do i get the below error



    c:\ti\pdk_am57xx_1_0_12\packages\ti\boot\sbl>make all BOARD=gardAM5708 SOC=AM571 x BOOTMODE=mmcsd gmake[1]: Entering directory `c:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl' gmake[1]: ./board/gardAM5708/build/makefile: No such file or directory gmake[1]: *** No rule to make target `./board/gardAM5708/build/makefile'. Stop. gmake[1]: Leaving directory `c:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl' make: *** [all] Error 2

  • Ajit,

    You need to create folders, files and makefile for your gardAM5708, similar to idkAM571x board:

    pdk_am57xx_1_0_13/packages/ti/boot/sbl/board/idkAM571x/build/makefile
    pdk_am57xx_1_0_13/packages/ti/boot/sbl/board/gardAM5708/build/makefile

    Regards,
    Pavel
  • Hi Pavel,

    Thanks for the help, it started compiling for gardAM5708

    it is throwing another error as it is not able to get the structure pmic_data_t.

    it looks like some configuration to point to my custom board, please find the below error

    C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/board/src/sbl_avs_config.c:664:28:
    error: request for member 'pmic_get_offset' in something not a structure or unio
    n
         offset_code = pPmicData->pmic_get_offset(val, pPmicData);
                                ^~
    C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/board/src/sbl_avs_config.c:666:14:
    error: request for member 'pmic_write' in something not a structure or union
         pPmicData->pmic_write(pPmicData->slave_addr, vcores->core.addr, offset_code
    );
                  ^~
    C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/board/src/sbl_avs_config.c:666:36:
    error: request for member 'slave_addr' in something not a structure or union
         pPmicData->pmic_write(pPmicData->slave_addr, vcores->core.addr, offset_code
    );
                                        ^~
    C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/board/src/sbl_avs_config.c:670:28:
    error: request for member 'pmic_get_offset' in something not a structure or unio
    n
         offset_code = pPmicData->pmic_get_offset(val, pPmicData);
                                ^~
    C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/board/src/sbl_avs_config.c:672:14:
    error: request for member 'pmic_write' in something not a structure or union
         pPmicData->pmic_write(pPmicData->slave_addr, vcores->mpu.addr, offset_code)
    ;
                  ^~
    C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/board/src/sbl_avs_config.c:672:36:
    error: request for member 'slave_addr' in something not a structure or union
         pPmicData->pmic_write(pPmicData->slave_addr, vcores->mpu.addr, offset_code)
    ;
                                        ^~
    C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/board/src/sbl_avs_config.c:688:32:
    error: request for member 'pmic_get_offset' in something not a structure or unio
    n
             offset_code = pPmicData->pmic_get_offset(val, pPmicData);
                                    ^~
    C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/board/src/sbl_avs_config.c:690:18:
    error: request for member 'pmic_write' in something not a structure or union
             pPmicData->pmic_write(pPmicData->slave_addr, vcores->dsp.addr, offset_c
    ode);
                      ^~
    C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/board/src/sbl_avs_config.c:690:40:
    error: request for member 'slave_addr' in something not a structure or union
             pPmicData->pmic_write(pPmicData->slave_addr, vcores->dsp.addr, offset_c
    ode);
                                            ^~
    C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/board/src/sbl_avs_config.c:698:32:
    error: request for member 'pmic_get_offset' in something not a structure or unio
    n
             offset_code = pPmicData->pmic_get_offset(val, pPmicData);
                                    ^~
    C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/board/src/sbl_avs_config.c:700:18:
    error: request for member 'pmic_write' in something not a structure or union
             pPmicData->pmic_write(pPmicData->slave_addr, vcores->gpu.addr, offset_c
    ode);
                      ^~
    C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/board/src/sbl_avs_config.c:700:40:
    error: request for member 'slave_addr' in something not a structure or union
             pPmicData->pmic_write(pPmicData->slave_addr, vcores->gpu.addr, offset_c
    ode);
                                            ^~
    C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/board/src/sbl_avs_config.c:708:32:
    error: request for member 'pmic_get_offset' in something not a structure or unio
    n
             offset_code = pPmicData->pmic_get_offset(val, pPmicData);
                                    ^~
    C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/board/src/sbl_avs_config.c:710:18:
    error: request for member 'pmic_write' in something not a structure or union
             pPmicData->pmic_write(pPmicData->slave_addr, vcores->iva.addr, offset_c
    ode);
                      ^~
    C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/board/src/sbl_avs_config.c:710:40:
    error: request for member 'slave_addr' in something not a structure or union
             pPmicData->pmic_write(pPmicData->slave_addr, vcores->iva.addr, offset_c
    ode);
                                            ^~
    C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/board/src/sbl_avs_config.c:715:14:
    error: request for member 'pmic_device_close' in something not a structure or un
    ion
         pPmicData->pmic_device_close();
                  ^~
    gmake[1]: *** [C:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl/binary/gardAM5708/mm
    csd/obj/sbl_avs_config.o] Error 1
    gmake[1]: Leaving directory `c:/ti/pdk_am57xx_1_0_12/packages/ti/boot/sbl'
    make: *** [all] Error 2
    
    c:\ti\pdk_am57xx_1_0_12\packages\ti\boot\sbl>

  • Hi Pavel,

    I am able to compile using the command "$:~/ti/pdk_am57xx_1_0_13/packages/ti/boot/sbl$ make all BOARD=idkAM571x SOC=AM571x BOOTMODE=mmcsd"

    Thanks,
    Ajit
  • Hi Pavel,

    I am still facing the compiling SBL for my custom board, it works fine for the IDK!!

    Can you please help me to fix the issue?

    Thanks,
    Ajit
  • Ajit,

    You don`t seem to be defining the PMIC AVS and ABB configuration. structure in the SBL in the file sbl_avs_config.c . If you open the source file, you will see a structure for each AM57xx board supported by the SBL. Depending on what kind of PMIC you are using and the I2C address please add your board structure or #if def to the source file so that data is pulled in.

    Details on AVS and ABB for the device are covered in the app note : (Also applies to AM57xx)
    www.ti.com/.../sprac22.pdf

    The easiest way for you to locate the change would be locate #if defined (idkAM572x) and add OppTable. vcores_data_t for your custom platform as that might not be defined.

    Regards,
    Rahul
  • Thanks Rahul,

    I was able to compile the code with the changes mentioned.
    Yes, i am still working on the AVS and ABB configuration of PMIC.
    I will open up that with a different query if i find some issues

    Thanks,
    Ajit
  • Thanks for the update Ajit.