keil stm32 : extern _ARMABI

keil stdio.h

extern _ARMABI int fputc(int /*c*/, FILE * /*stream*/) __attribute__((__nonnull__(2)));
   /*
    * writes the character specified by c (converted to an unsigned char) to
    * the output stream pointed to by stream, at the position indicated by the
    * asociated file position indicator (if defined), and advances the
    * indicator appropriately. If the file position indicator is not defined,
    * the character is appended to the output stream.
    * Returns: the character written. If a write error occurs, the error
    *          indicator is set and fputc returns EOF.
    */

 1. 商业公司,赚钱是目的。有一部分源代码,还是不会以源码的形式给出的。

ARM is a chip architecture.

ABI is application binary interface.   https://community.st.com/t5/stm32-mcus-products/what-does-quot-armabi-quot-mean/m-p/186698

2. keil 特有的吧?

_ARMABI is a Keil-specific #define. It isn't used in STM32CubeIDE. The toolchain within STM32CubeIDE comes with its own standard library files, you shouldn't need to copy the Keil ones over.
  https://community.st.com/t5/stm32cubeide-mcus/unknown-type-name-armabi/td-p/291050

printf函数的原型,printf()在 C 标准库函数中实质是一个宏,这个宏extern _ARMABI int printf是什么意思?

  https://zhidao.baidu.com/question/2056717816879546907.html

extern _ARMABI int printf(const char * __restrict /*format*/, ...) __attribute__((__nonnull__(1)));
请问这个宏是什么意思?能不能解释一下这个宏?宏不是用"#define"的吗?

追答

extern表示这是一个外部函数的声明;

_ARMABI 表示这是一个针对ARM的二进制接口

__attribute__((__nonnull__(1))) 表示调用函数时第一个参数不能为NULL,
__attribute__() 是用于“修饰”函数的,
__nonnull__(1) 表示第一个参数不为空。

int printf(const char * __restrict /*format*/, ...)

这一部分则是printf()函数的原型,后面的“…”表示这是一个可变参数的函数,即函数参数的数量、类型都可以变化的函数

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值