Giter Site home page Giter Site logo

Comments (5)

rohitk-singh avatar rohitk-singh commented on May 25, 2024

Hi,
Actually, the header file by @vdudouyt is for STM8L series. And you are using STM8S series. It probably just-works for LED Blinky and simpler projects, but would fail for peripherals with different memory mapped addresses.

from sdcc-examples-stm8.

midnight-wonderer avatar midnight-wonderer commented on May 25, 2024

I don't even know there is l serie exist. That why I don't understand the l suffix of file name. Totally beginner.

from sdcc-examples-stm8.

BobRyan530 avatar BobRyan530 commented on May 25, 2024

I've modified the header to match the stm8s series.
https://github.com/BobRyan530/stm8s/blob/master/stm8s.h

Note that I renamed the USART_xx registers to UART_xx to match the datasheet. Other than that some of the register values were adjusted but the names remain the same.

from sdcc-examples-stm8.

midnight-wonderer avatar midnight-wonderer commented on May 25, 2024

@BobRyan530 nice work
I actually maintain my own version of stm8s header for the time being.
https://github.com/MidnightWonderer/stm8-header
I defined only what I use, though.
If you interested I can add what you use via pull request.
I try to conform to the datasheet and the original header as possible so I use base addresses and offsets.
stm8l is actually welcome too I just haven't use it yet.

from sdcc-examples-stm8.

BobRyan530 avatar BobRyan530 commented on May 25, 2024

from sdcc-examples-stm8.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.