ST意法半导体
直播中

梁若莲

8年用户 187经验值
私信 关注
[问答]

IAR编译器使用stm8s系列应该将哪些库添加到项目中?

你好。
我正在尝试使用IAR编译器开始使用stm8s系列,我不是很擅长。
因此,对于第一个项目,只是试图打开和关闭一个LED,看看是否一切都好。
我之前在ARM MCU中使用过Keil,起初我编译器问我是否要添加启动文件。
所以每次我按下是按钮,一切都很好。
但是IAR没有这样做。
所以我想知道我应该在项目中添加哪些库?
我必须提到我只是使用寄存器而不是任何标准库。
我正在使用的MCU是STM8S105k4t6。

以上来自于谷歌翻译


以下为原文




Hello.
I'm trying to get started with stm8s series with IAR compiler that I'm not very good at.
So for the first project just trying to on and off a single LED to see if everything is ok or not.
I used Keil before this in ARM MCUs, that at first I the compiler asked me if I want to add the startup file or not.
So every time I pushed the yes button and everything was ok.
But IAR does not do this.
So I wanted to know what libraries should I add to the project?
I have to mention that I'm just using the registers and not any standard libraries.
The MCU I'm working with is an STM8S105k4t6.

回帖(4)

冬妮

2018-11-16 10:42:17

所以我想知道我应该在项目中添加哪些库?
只添加你需要的那些。

以上来自于谷歌翻译


以下为原文




'
So I wanted to know what libraries should I add to the project?'

only add the ones that you need.
举报

梁若莲

2018-11-16 10:58:55
问题是我不知道哪些库是必需的,哪些库不是。
我只知道iostm8s.h很重要,因为它有寄存器描述。
我只是想知道哪些是必要的,如果没有它们,MCU将无法正常工作。

以上来自于谷歌翻译


以下为原文




The problem is that I don't know which libraries are necessary and which are not.
I just know that iostm8s.h is important because it has the register descriptions.
I just wanted to know which are the necessity that without them the MCU will not work appropriately.
举报

符伯峪

2018-11-16 11:04:04
包含文件本身不是库。
如果缺少定义,编译器将不会关闭。
如果源和库不为所有相互调用的函数提供代码,则链接器将不会关闭。

以上来自于谷歌翻译


以下为原文




Include files are not inherently libraries.
The compiler will not get closure if defines are missing.
The linker will not get closure if the source and libraries do not provide code for all the functions which call each other.
举报

冬妮

2018-11-16 11:11:22

我只是想知道哪些是必要的,如果没有它们,MCU将无法正常工作。
你不需要让mcu工作。库可以帮助您的代码,但它们绝不是“必要的”。

以上来自于谷歌翻译


以下为原文




'
I just wanted to know which are the necessity that without them the MCU will not work appropriately.'

you need absolutely nothing for the mcu to work. libraries are there to help your code but they are by no means 'necessary'.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分