cancel
Showing results for 
Search instead for 
Did you mean: 

Using GPIO Library

jonathonmcmullan
Associate
Posted on February 12, 2013 at 23:04

I'm learning how to use ST micros (after years of using PICs) and I am struggling to integrate the GPIO files. I added the stm8s_gpio.c to my project and this fixed the UNRESOLVED EXTERNAL errors however now I get a C000 and C014 error stating that ''vu8'' is undefined.

What is a ''vu8'' and do I need to declare it somewhere else? I have attached my project file if that would be helpful.

Thanks

JM
2 REPLIES 2
jdf25252
Associate II
Posted on February 13, 2013 at 17:59

vu8 along with a bunch of other useful typedefs are in stm8s_type.h.  Of course it doesn't seem to be included by any other headers.

I don't find the Firmware lib to add any value.  If you've been doing PICs for years you know uP peripherals by now and the ''help'' offered by the lib isn't very useful.  I use stm8s.h to define all my I/O and just write the registers directly.

jdf

johnjohn9107
Associate II
Posted on September 04, 2013 at 11:43

I'm having a similar problem. Having eventually found the Hardware I/O Port register map, the Raisonance compiler doesn't recognise the labels, instead it seems to have defined a load of supposedly helpful readable C functions to do what was a really simple job.

Classic 'C' complicating to the point of uselessnes.

Is it just me that hates C? It's like trying to drive your car by sitting in the back seat and using two brooms to reach the controls.

With the Cosmic compiler on an ST7 the line:-

 switches=PBDDR; actually read the port into the variable switches... simple eh? Not so easy with Raisonance. The only reason I went away from Cosmic is they denied all knowledge of us having paid for their software and when the PC went down, treated us like ***t implying we'd pirated it in the first place! I vowed to go elsewhere.

Del