Skip to content

compile failed when use tiarmclang 5.1.1 #312

Closed

Description

@mikisama

CMSIS_6

#include "cmsis_clang.h"

#define __PROGRAM_START _start

CMSIS_5

https://github.com/ARM-software/CMSIS_5/blob/55b19837f5703e418ca37894d5745b1dc05e4c91/CMSIS/Core/Include/cmsis_tiarmclang.h#L123

#define __PROGRAM_START           _c_int00

compile failed when use CMSIS_6 but works fine with CMSIS_5

CMSIS_6 tell tiarmclang to use cmsis_clang.h, where __PROGRAM_START is defined as _start. However, tiarmclang actually uses _c_int00

Activity

  1. added theissue type on Aug 31, 2026
  2. mikisama commented on Sep 1, 2026

    @mikisama
    Author

    I resolved this by modifying startup_DEVICE.c ahead of the #include "DEVICE.h" statement.

    // startup_DEVICE.c
    #if defined ( __clang__ ) && defined ( __ti__ )
      #define __PROGRAM_START _c_int00
      #define __INITIAL_SP __stack
    #endif
    
    #include "DEVICE.h"
  3. JonatanAntoni commented on Sep 1, 2026

    @JonatanAntoni
    Member

    @mikisama, for now I added the TI Clang specifics into the generic clang header file. Please double check if the minimal fix in #315 is sufficient for you on the short run. Longer term, we might need to think about addressing such c library details as an independent degree of freedom. I.e., we've already seen similar challenges when building with newlib, picolib, or others.

  4. mikisama commented on Sep 2, 2026

    @mikisama
    Author

    Hi, @JonatanAntoni

    It’s fixed

    I think CI can help solve this type of compile failed errors

  5. added a commit that references this issue on Sep 2, 2026
    7dc9932
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions