I bought an STM8 discovery board, and I'm now trying to get a working toolchain.
I found the stm8 examples on github. They start out with a #include <stm8l.h>, which sdcc cannot find. And neither can I.
So where is this header supposed to come from?
I don't know here the header file is supposed to come from. But AFAIK, Valentin just craeted it manually from the datasheet. I've seen it, and it just contains a few #define lines for some I/O ports he used. It is in no way complete. All the lines just look like
#define PE_ODR *(unsigned char*)0x5014
#define PE_IDR *(unsigned char*)0x5015
#define PE_DDR *(unsigned char*)0x5016
#define PE_CR1 *(unsigned char*)0x5017
#define PE_CR2 *(unsigned char*)0x5018
etc. Unless your board uses the same processor as Valentin's, you'd need to rewrite these according to you processors's datasheet anyway.
P.S.: The lines probably will make his blinky example work on an STL8L-Discovery.
P.P.S.: Sourceforge messes up any code posted on this forum (or tracker items). Maybe there is a way to post code and disable the markup bullshit; I don't know it.
I took the liberty to modify your post and escape the # in front of the defines.
To post code you must indent it with TAB or at least 4 spaces. To escape you prepend a backslash (e.g. \# or \_).
Thanks. I added a few more escapes to make the * visible. Do you know if there is a way to turn the markup off for the forums and tracker by default?
No, I cannot find any option for that.
Maybe you should post a feature request at SF for that.
You might want to try my setup with SDCC and Code::Blocks (under Windows):
Works like a charm and is free of charge (SDCC and Code::Blocks are open source, the STM toolchain and their flash tool aren't).
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.