cancel
Showing results for 
Search instead for 
Did you mean: 

Which libraries should I add to the project?

Arman Ilmak
Senior
Posted on March 16, 2018 at 20:36

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 REPLIES 4
henry.dick
Senior II
Posted on March 16, 2018 at 21:19

'

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

only add the ones that you need.

Posted on March 16, 2018 at 21:59

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.

Posted on March 16, 2018 at 22:26

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 17, 2018 at 01:45

'

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'.