You might want to try my setup with SDCC and Code::Blocks (under Windows): http://blog.podstuff.de/setup-codeblocks-for-stm8s-discovery/...