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.

AM2434: MCU+ SDK 11.00.00.15 (AM2434) – build fixes & networking/FreeRTOS improvements (patch suggestions)

Part Number: AM2434
Other Parts Discussed in Thread: SYSCONFIG

I’m working with AM2434 and MCU+ SDK 11.00.00.15, and during integration I found a few issues and made several small modifications that might be useful to incorporate in a future SDK revision.

If there is a recommended way to achieve the same results without modifying the SDK, please let me know. In general, I’m finding it inconvenient that even small user-side configuration changes (e.g., FreeRTOSConfig.h) require rebuilding SDK libraries, which makes it harder to maintain multiple projects with different configurations.

Below is a list of the changes I applied, grouped by component.

1) TinyUSB (NoRTOS) – missing NO_SYS define

File: source/usb/tinyusb/makefile.ncm_nortos.am243x.r5f.ti-arm-clang

In DEFINES_common, add:

-DNO_SYS=1

File: source/usb/tinyusb/makefile.rndis_nortos.am243x.r5f.ti-arm-clang

In DEFINES_common, add:

-DNO_SYS=1

2) FreeRTOS kernel makefile – missing file and heap selection

File: source/kernel/freertos/makefile.am243x.r5f.ti-arm-clang

In FILES_common, add:

stream_buffer.c

Optionally (but preferable for my use case), replace: heap_3.c → heap_4.c

3) ENET lwIP interface – pbuf type + IPv6 support

File: source/networking/enet/core/lwipif/src/lwip2enet.c

Around line ~1246, change: PBUF_POOL → PBUF_REF

File: source/networking/enet/core/lwipif/src/lwip2lwipif.c

a) Add IPv6 header include

#include "lwip/ethip6.h"

b) In LWIPIF_LWIP_init, when populating netif flags/interface, add IPv6 support

netif->flags |= NETIF_FLAG_ETHARP | NETIF_FLAG_BROADCAST;
#if LWIP_IGMP
netif->flags |= NETIF_FLAG_IGMP;
#endif
#ifdef LWIP_IPV6
netif->flags     |= NETIF_FLAG_MLD6;
netif->hwaddr_len = ETH_HWADDR_LEN;
netif->output_ip6 = ethip6_output;
#endif

4) lwIP TLS (mbedTLS) – pbuf type + entropy/RNG hook

File: source/networking/lwip/lwip-stack/src/apps/altcp_tls/altcp_tls_mbedtls.c

Around line ~385, change: PBUF_POOL → PBUF_RAM

Replace ALTCP_MBEDTLS_RNG_FN block with the following to use a real entropy generator:

#ifndef ALTCP_MBEDTLS_RNG_FN
extern int EnetApp_getEntropy(void *ctx, unsigned char *buffer, size_t len);
#define ALTCP_MBEDTLS_RNG_FN EnetApp_getEntropy
#endif

5) lwIP stack makefile – missing mDNS and TLS files

File: source/networking/lwip/makefile.stack_freertos.am243x.r5f.ti-arm-clang

Under FILES_common, add the required mDNS sources:

mdns_out.c
mdns_domain.c

Also add the missing TLS source:

altcp_tls_mbedtls.c

6) Percepio Tracealyzer / FreeRTOS tracing – include paths needed for build

To integrate Percepio Tracealyzer support (FreeRTOS tracing), I had to add the following include paths; otherwise the SDK does not build.

Files:

  • source/networking/enet/makefile.lwipif-ic-freertos.am243x.r5f.ti-arm-clang
  • source/networking/enet/makefile.lwipif-cpsw-freertos.am243x.r5f.ti-arm-clang
  • source/networking/enet/makefile.lwipif-icssg-freertos.am243x.r5f.ti-arm-clang
  • source/networking/lwip/makefile.contrib-freertos.am243x.r5f.ti-arm-clang
  • source/networking/lwip/makefile.stack_freertos.am243x.r5f.ti-arm-clang

Add to INCLUDES_common:

-I${MCU_PLUS_SDK_PATH}/source/kernel/freertos/config/am243x/r5f \
-I${MCU_PLUS_SDK_PATH}/source/kernel/freertos/FreeRTOS-Kernel/include \
-I${MCU_PLUS_SDK_PATH}/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F \

Development environment

  • MCU+ SDK: 11.00.00.15
  • Compiler: TI ARM CLANG 4.0.4 LTS
  • SysConfig: 1.26.0
  • CCS: 20.40
  • Device: AM2434 (Cortex-R5F_0-0)
  • Hi Roberto,

    Please allow some time to check the above and revert back.

    Regards,

    Tushar

  • Hi Roberto,

    Thanks for your patience.

    If there is a recommended way to achieve the same results without modifying the SDK, please let me know. In general, I’m finding it inconvenient that even small user-side configuration changes (e.g., FreeRTOSConfig.h) require rebuilding SDK libraries, which makes it harder to maintain multiple projects with different configurations.

    Whenever you make change in the SDK source, the only way to apply those changes is via rebuilding the library files. Without rebuilding libraries the changes will not be reflected in the final binary.

    I have filed an internal Jira for the above issues and will update as soon as I hear back from the team.

    Development environment

    It is suggested to use the exact version of tools recommended in the MCU+SDK official documentation. Please refer SDK_DOWNLOAD_PAGE for details.

    Please refer 

    Regards,

    Tushar