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.

BEAGLEBK: IPv6 configuration problem

Part Number: BEAGLEBK


I have a problem configuring IPv6 using NDK for TI-RTOS. Could you point out my mistake or provide a sample code of IPv6 config and socket creation?

I use *.cfg configuration with IPv6 support enabled. This is my code :

#ifdef IPV6_TEST
static void IPv6DADStatus(IP6N Address, unsigned short dev_index, unsigned char Status)
{
    char strIPAddress[40];

    /* Convert the IP Address to String Format. */
    IPv6IPAddressToString(Address, strIPAddress);

    /* Print the status of the address. */
    NIMU_log("IPv6 address: %s on device %d is %s\n", strIPAddress, dev_index,
        (Status == 1) ? "UNIQUE" : "DUPLICATE");

    return;
}
#endif

/* ========================================================================== */
/*                            MAIN                                            */
/* ========================================================================== */
int main()
{
    /* Call board init functions */
    Board_initCfg boardCfg;
    Task_Params taskParams;
    EMAC_HwAttrs_V4 cfg;

    boardCfg = BOARD_INIT_PINMUX_CONFIG |
        BOARD_INIT_MODULE_CLOCK | BOARD_INIT_UART_STDIO;
    Board_init(boardCfg);

    /* Chip configuration MII/RMII selection */
    SOCCtrlCpswPortMacModeSelect(1, ETHERNET_MAC_TYPE_MII);
    SOCCtrlCpswPortMacModeSelect(2, ETHERNET_MAC_TYPE_MII);

    EMAC_socGetInitCfg(0, &cfg);
    cfg.port[0].phy_addr = EMAC_CPSW_PORT0_PHY_ADDR_EVM;
    cfg.port[1].phy_addr = EMAC_CPSW_PORT0_PHY_ADDR_EVM;
    cfg.macModeFlags = EMAC_CPSW_CONFIG_MODEFLG_FULLDUPLEX;
    EMAC_socSetInitCfg(0, &cfg);

#ifdef IPV6_TEST
    llEnter ();
    int status = IPv6InterfaceInit(1, IPv6DADStatus);
    llExit ();

    if (status < 0) {
        NIMU_log("Unable to initialize the IPv6 stack\n");
    }else{
        NIMU_log("initialized IPv6 stack\n");
    }

#endif

    Task_Params_init(&taskParams);
    taskParams.priority = 3;
    taskParams.stackSize = 0x2400;
    taskParams.instance->name = "SOC-recive";
    Task_create(socket_recive_test, &taskParams, NULL);

    Task_Params_init(&taskParams);
    taskParams.priority = 1;
    taskParams.stackSize = 0x2400;
    taskParams.instance->name = "SOC-send";
    Task_create(socket_send_test, &taskParams, NULL);

    NIMUDeviceTable[nimu_device_index++].init =  &CpswEmacInit ;
    NIMUDeviceTable[nimu_device_index].init =  NULL ;

    BIOS_start();

    return -1;
}

When i run it i get : CortxA8: Unhandled ADP_Stopped exception 0x800FCC38

Its based on a  MINU_BasicExample from the PDK

  • Hi,

    Please provide the PRSDK release version, SYBIOS and NDK versions for the IPV6 test.

    Regards, Eric

  • Hi,

    am335x pdk v1.0.15

    sys_bios 6.75.2.0

    rtos sdk 6.0.0.7

    ndk 3.60.0.13

    Regards

  • Hi,

    The current NDK/NIMU examples in Processor SDK RTOS for AM335x does not support IPv6, even though the NDK 3.60.0.13 does support both IPv4 and IPv6.

    We do not have any example code to show how the IPv6 works at this point. I will check with the NDK developers whether they have some examples available internally.

    Meanwhile, you can try a few things:

    1. Rebuild the NDK with _INCLUDE_IPv6_CODE enabled per instruction from NDK User's Guide section 1.2

    2. Refer to "G IP Version 6 (IPv6) Stack API" of NDK API Guide to make sure your application code does the right things to support the IPv6

    3. Make sure your CFG file has the following lines:

       var Global = xdc.useModule('ti.ndk.config.Global');

       Global.IPv6 = true;

    Best regards,

    Ming

  • Hi,

    I will be also grateful if you could tell me if there is a way to adapt IiceAMIC110/icev2AM335x examples for BBB as I'm planning to use PRU-ICSS for my adapter and a sample code will be great at the beginning.

    Best regards

    przemek

  • Hi Przermek,

    I have checked with the NDK developers. There is no IPv6 example code at this point and currently there is no future plan to add one for the Processor SDK RTOS. In other words, we are not support the IPv6 in Processor SDK RTOS right now. If you wish to implement it by yourself, you can follow the pointers we provided in previous post.

    As of the PRU-ICSS example for BBB, please start a new thread with proper title in this forum, so that we can direct your post to the proper experts.

    Thanks!

    Ming

  • Hi,

    How IPv6 is not supported if it is available as an option even in graphical CFG editor

    I have checked my CFG file and it contains mentioned lines and also way i call those functions is derived from NDK api guide.

    I also found this :

    Which looks fairly similar to my version except for different NDK function names.

    And for the last : what is the purpose of providing IPv6 in code if you do not support it and not planning to support it in the future.

    Regards,

    Przemek

  • Hi Przemek,

    I understand your frustration. Unfortunately, we do not have the IPv6 NDK/NIMU example in Processor SDK RTOS currently, therefore it is difficult for us to support you further on this topic.

    As you may know, the NDK and the PDK drivers and examples in the Processor SDK RTOS are developed and maintained  by two different teams, so not all the features supported by the NDK will be supported in the Processor SDK RTOS. Your request is a legitimate request. We will submit a request to the PDK development team for adding the IPv6 examples. Meanwhile you have to explore it by yourself.

    From what you reported before (CortxA8: Unhandled ADP_Stopped exception 0x800FCC38), the exception may be caused by insufficient stack space for the NDK thread. Please try the following in your CFG file:

    var Global = xdc.useModule('ti.ndk.config.Global');

    Global.ndkThreadStackSize = 16384*2;

    You can also try to increase the Task.defaultStackSize from 4KB to 32KB.

    Let us know how it goes!

    Ming

  • Hi,

    About this Exception ->  have tried the solutions you suggested with no success. But i found out that if I want to first send on a socket then receive  I get this error [on different address depending how large memory  assign], but if I firs receive and send confirmation [I made 2 test tasks but even changing the order of calls in working one gives an error]. I will investigate it further later but if you have any more suggestions I  will be pleased.

    regards,

    przemek

  • Hi Przemek,

    Unfortunately I do not have any more suggestions at this point. As I mentioned before, I have submitted a request to the PDK development team to add an IPv6 example for NDK/NIMU. Before it is done, we will not be able to support it further. I will close this thread.

    Best regards,

    Ming