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.

[参考译文] 编译器/EK-TM4C123GXL:sprintf()函数错误(&L);stdio.h>

Guru**** 2478765 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/690066/compiler-ek-tm4c123gxl-error-with-sprintf-function-of-stdio-h

器件型号:EK-TM4C123GXL
主题中讨论的其他器件:TM4C123GH6PM

工具/软件:TI C/C++编译器

我的进程跳转至 tm4c123gh6m_startup_ccs.c 中的 FaultISR()函数 在调试之前、我已创建、并且没有错误。

我的代码  

#include

char *__restrict Temp;

char *__restrict Vari;

char varx = 65;
字符 temp[3];

int main (空)

  //
  //配置系统的时钟。
  //系统时钟= 50MHz。
  //
    SysCtlClockSet (SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHz | SYSCTL_OSC_MAIN);

  // initlcd();

    Varari =变容;(&V)

    temp =&temp[0];

    sprintf (温度、"%02d"、Vari);

    while (1)

  {
    ;
  }
返回0;