PROCESSOR-SDK-AM64X: OTP Keywriter over Ethernet/BOOTP

Part Number: PROCESSOR-SDK-AM64X
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi,

I have a custom board and is trying to get the OTP Keywriter v10.00.08 (mcu_plus_sdk_am64x_10_00_00_20) to work through Ethernet/BOOTP.

The tiboot3.bin binary seems to be correctly uploaded to the device but there is no output on the serial console (Application does not appear to start at all).

According to the user guide, the keywriter application has been validated to work using UART,OSPI,USB-DFU,JTAG.

Ethernet/BOOTP is not included in the validated list but using OTP Keywriter v09_00_00 (mcu_plus_sdk_am64x_09_00_00_31) I can successfully run the keywriter application over Ethernet/BOOTP.

We would prefer to use version 10 as it allows for larger certificates.

Is there any reason why, running over Ethernet/BOOTP, should not work in version v10.00.08 but work in v09_00_00?

Best Regards,

Mathias

 

  • Hello,

    Is there any reason why, running over Ethernet/BOOTP, should not work in version v10.00.08 but work in v09_00_00?

    The v10 has the eMMC enabled in the Sysconfig. So, if you don't have the eMMC on your custom board, the failure is expected since the execution would be stuck in the eMMC initialization. If this is the case, please remove the eMMC with the following patch

    diff --git a/source/security/sbl_keywriter/am64x-evm/r5fss0-0_nortos/example.syscfg b/source/security/sbl_keywriter/am64x-evm/r5fss0-0_nortos/example.syscfg
    index 68aec3367..b66360e40 100644
    --- a/source/security/sbl_keywriter/am64x-evm/r5fss0-0_nortos/example.syscfg
    +++ b/source/security/sbl_keywriter/am64x-evm/r5fss0-0_nortos/example.syscfg
    @@ -8,8 +8,6 @@
     /**
      * Import the modules used in this configuration.
      */
    -const bootloader      = scripting.addModule("/drivers/bootloader/bootloader", {}, false);
    -const bootloader1     = bootloader.addInstance();
     const ddr             = scripting.addModule("/drivers/ddr/ddr", {}, false);
     const ddr1            = ddr.addInstance();
     const gtc             = scripting.addModule("/drivers/gtc/gtc");
    @@ -41,22 +39,11 @@ const section5        = section.addInstance();
     /**
      * Write custom configuration values to the imported modules.
      */
    -bootloader1.appImageOffset      = "0x800000";
    -bootloader1.appImageBaseAddress = "0";
    -bootloader1.bootMedia           = "EMMC";
    -bootloader1.$name               = "CONFIG_BOOTLOADER_EMMC0";
    -bootloader1.EMMCAppImageOffset  = "0x800000";
    -
     ddr1.$name = "CONFIG_DDR0";
     
     i2c1.$name           = "CONFIG_I2C0";
     i2c1.I2C_child.$name = "drivers_i2c_v0_i2c_v0_template0";
     
    -const mmcsd             = scripting.addModule("/drivers/mmcsd/mmcsd", {}, false);
    -const mmcsd1            = mmcsd.addInstance({}, false);
    -mmcsd1.$name            = "CONFIG_MMCSD0";
    -bootloader1.MMCSDDriver = mmcsd1;
    -
     uart2.$name      = "CONFIG_UART1";
     uart2.intrEnable = "DISABLE";
     
    @@ -216,7 +203,6 @@ section5.output_section[0].alignment = 0;
     i2c1.I2C.$suggestSolution                   = "I2C1";
     i2c1.I2C.SCL.$suggestSolution               = "I2C1_SCL";
     i2c1.I2C.SDA.$suggestSolution               = "I2C1_SDA";
    -mmcsd1.MMC0.$suggestSolution                = "MMC0";
     uart2.UART.$suggestSolution                 = "USART1";
     uart2.UART.RXD.$suggestSolution             = "UART1_RXD";
     uart2.UART.TXD.$suggestSolution             = "UART1_TXD";
    diff --git a/source/security/sbl_keywriter/am64x-evm/r5fss0-0_nortos/main.c b/source/security/sbl_keywriter/am64x-evm/r5fss0-0_nortos/main.c
    index f8591ee78..93e1a37f6 100644
    --- a/source/security/sbl_keywriter/am64x-evm/r5fss0-0_nortos/main.c
    +++ b/source/security/sbl_keywriter/am64x-evm/r5fss0-0_nortos/main.c
    @@ -34,6 +34,7 @@
     #include <stdlib.h>
     #include <ti_drivers_config.h>
     #include <ti_drivers_open_close.h>
    +#include <drivers/bootloader.h>
     
     /* We add a delay to avoid partial UART logs */
     #define WAIT_FOR_R5_UART_LOGS (1U)
    

  • Hi Prashant

    The eMMC and i2c has been removed from our config. We use GPIO to set VPP. At the moment the code for setting the GPIO and writing the keys have been commented out:

    //keywriter_processKeyConfig();

    I am only trying to get the serial uartLog to work.

    My changes:

    /**
     * Import the modules used in this configuration.
     */
    -const bootloader      = scripting.addModule("/drivers/bootloader/bootloader", {}, false);
    -const bootloader1     = bootloader.addInstance();
    const ddr             = scripting.addModule("/drivers/ddr/ddr", {}, false);
    const ddr1            = ddr.addInstance();
    const gtc             = scripting.addModule("/drivers/gtc/gtc");
    -const i2c             = scripting.addModule("/drivers/i2c/i2c", {}, false);
    -const i2c1            = i2c.addInstance();
    const uart            = scripting.addModule("/drivers/uart/uart", {}, false);
    const uart2           = uart.addInstance();
    const debug_log       = scripting.addModule("/kernel/dpl/debug_log");
    @@ -41,22 +37,9 @@ const section5        = section.addInstance();
    /**
     * Write custom configuration values to the imported modules.
     */
    -bootloader1.appImageOffset      = "0x800000";
    -bootloader1.appImageBaseAddress = "0";
    -bootloader1.bootMedia           = "EMMC";
    -bootloader1.$name               = "CONFIG_BOOTLOADER_EMMC0";
    -bootloader1.EMMCAppImageOffset  = "0x800000";
     
    ddr1.$name = "CONFIG_DDR0";
     
    -i2c1.$name           = "CONFIG_I2C0";
    -i2c1.I2C_child.$name = "drivers_i2c_v0_i2c_v0_template0";
    -
    -const mmcsd             = scripting.addModule("/drivers/mmcsd/mmcsd", {}, false);
    -const mmcsd1            = mmcsd.addInstance({}, false);
    -mmcsd1.$name            = "CONFIG_MMCSD0";
    -bootloader1.MMCSDDriver = mmcsd1;
    -
    uart2.$name      = "CONFIG_UART1";
    uart2.intrEnable = "DISABLE";
     
    @@ -213,10 +196,6 @@ section5.output_section[0].alignment = 0;
     * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
     * re-solve from scratch.
     */
    -i2c1.I2C.$suggestSolution                   = "I2C1";
    -i2c1.I2C.SCL.$suggestSolution               = "I2C1_SCL";
    -i2c1.I2C.SDA.$suggestSolution               = "I2C1_SDA";
    -mmcsd1.MMC0.$suggestSolution                = "MMC0";
    uart2.UART.$suggestSolution                 = "USART1";
    uart2.UART.RXD.$suggestSolution             = "UART1_RXD";
    uart2.UART.TXD.$suggestSolution             = "UART1_TXD";

    I also tried using our old syscfg from V9 keywriter. I then had to add:

    const CacheP_Config gCacheConfig = {};
    to get it to compile.

    Also, with this version the serial uartLog is completely silent.

    Compared to the V9 version, there are a lot of memory initialization included in example.syscfg.

    Are all of these needed?

  • Are all of these needed?

    This syscfg does not really match with default v10 syscfg. I would expect you to use the default keywriter v10 and apply the previous patch I shared. Have you done changes from your side as well?

  • Hi Prashant

    You are correct, I had accidently overwritten a file in V10. It is working now.

    Thank you for your help.