tenbaht / sduino

An Arduino-like programming API for the STM8
http://tenbaht.github.io/sduino/
GNU Lesser General Public License v2.1
351 stars 217 forks source link

Any chance for STM7? #132

Open SanZamoyski opened 3 years ago

SanZamoyski commented 3 years ago

Hi!

I got into my hands over 10 boards with STM7 (72C334). I think it might be good for some of my projects. Generally, I'm using Arduino IDE ALOT, so it would be awesome to use it to program those boards. I'm familiar with ISP etc. As far as I know, STM8 is extended STM7. That's why I'm asking here.

Best regards!

roybaer commented 2 years ago

The underlying compiler, SDCC, does not have a backend for ST7. Therefore, I do not see any chance of it happening.

SanZamoyski commented 2 years ago

How about this one: https://sourceforge.net/projects/sdccstm/ ?

roybaer commented 2 years ago

The most recent update to that code base appears to be from January 2013. Most of it even appears to be from January 2011, i.e. it is absolutely ancient and in unknown unmaintained condition. By comparison, SDCC's official STM8 backend is three years younger than that and has been actively maintained ever since.

SanZamoyski commented 2 years ago

Yes, I've seen that. But let's be honest - it's an old mcu. Probably, there is very little chance for anything better. The question is: is there a lot of work to extend this to STM7?

roybaer commented 2 years ago

Probably a lot more than you would want to invest.

SanZamoyski commented 2 years ago

Can You explain a little?

roybaer commented 2 years ago

Well, for starters you would at least need the entire hardware abstraction code for the peripherals, i.e. you would actually have to rewrite all of the libraries or at least significant parts thereof. Then you need board support. Since there are definitely no ST7 boards already in the code base, you would need board descriptions for your hardware. You would also need a way to program it. Stm8flash and stm8gal are – big surprise – for STM8, only.

All of this assumes the best-case scenario, i.e. that the old SDCC fork for ST7 actually works, does so reliably, produces adequate code and supports all relevant features. I am not so sure about that.

Incidentally, you may have noticed that I am not the maintainer of this repository but only an occasional contributor. This project is not particularly active, so if you want new functionality, you will basically have to add it yourself.