Georg Icking-Konert | 18 Apr 16:08 2014
Picon

Re: r/w order for STM8 16b registers (Maarten Brock)

Hello Maarten,

so far I observed it only for the ADC result register (ADC_DR) for read, and timer 3 compare register (TIM3_CCR) for write. The way I realized was simple: the ADC the result was skewed, and the TIM3 period was wrong. However, I didn’t dig deeper after I found out that changing the sequence helps.

At least for ADC_DR there is a hint in the STM8 reference manual (http://www.st.com/web/en/resource/technical/document/reference_manual/CD00190271.pdf, page 425): "The conversion results from ADC_DRH and ADC_DRL data registers must be read in a specific order to guarantee data coherency. This order depends on the data alignment“. For TIM3_CCR I couldn’t find any such hint :-(

As for automatically supporting it in SDCC I am skeptical:
1) apparently changing the alignment in the ADC also changes the read sequence (see above). And for the other registers I just don’t know —> how could you account for that?
2) if at all, I’d only support WORD read/write. Because when somebody performs bytewise r/w operation, he/she expects the compiler to do exactly that. They might be doing some advance trick (which is beyond me), and changing the sequence might do more harm than good

In my STM8 header file I will now implement WORD read and write macros for convenience. And if someone e.g. changes ADC alignment he/she can easily swap the order in the macro. However, that requires that this "feature“ is understood and well documented...

Talking of understood: do you have any idea how I can check any register without a debugger, let alone all? For the above mentioned it was plain obvious, because the STM8 clearly didn’t behave as expected. But there are too many 16b SFR registers with sometimes minute effect on the STM8 behavior to check them via their functionality alone. Any idea is appreciated!

Regards, Georg I.



------------------------------

Message: 7
Date: Fri, 18 Apr 2014 09:49:36 +0200 (CEST)
From: "Maarten Brock" <sourceforge.brock-HmBbmidbCcE@public.gmane.org>
Subject: Re: [Sdcc-user] r/w order for STM8 16b registers
To: sdcc-user-5NWGOfrQmneRv+LV9MX5ug@public.gmane.orge.net
Message-ID: <42447.82.161.160.72.1397807376.squirrel-tPCArUVCkRTz+pZb47iToQ@public.gmane.org>
Content-Type: text/plain;charset=iso-8859-1

Hello Georg,

Is this behaviour true for all 16 bit SFR's? Or is it different for every
other SFR? If it's always the same then maybe SDCC could take this into
account.

Maarten

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
JuanPi | 18 Apr 13:03 2014

MC18 --> SDCC

Dear all,

I managed to start testing the compilation of our library [1] with sdcc.
I managed to onvert some of the flags to the sdcc syntax.
I was wondering if aynbody has gone already through this process.

The command I am translating now is the compilation

- MC18:
  CFLAGS= -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -p=18F4550
-i$(DWENGOLIB) -I$(DWENGOHEAD) -I$(MCC_INCLUDE)

  $(MCC_C) $(CFLAGS) $< -fo $ <at> 

- SDCC:
   CFLAGS= -mpic16 --use-non-free -I$(DWENGOHEAD) -I$(MCC_INCLUDE)

   $(MCC_C) $(CFLAGS) $< -o $ <at> 

Has anybody already worked a transition manual?
Do not get me wrong, I will do this myself if needed. I am just
checking if somebody has already done it so I can catch up from there.

Thank you!

[1]: https://github.com/dwengovzw/Dwengo-library
--

-- 
Juan Pablo Carbajal
Engagement manager
www.dwengo.org

Follow us on:
Facebook: http://facebook.com/dwengo
Twitter:  <at> dwengo of http://twitter.com/dwengo
Youtube: http://www.youtube.com/user/Dwengovzw
Google RISE project: http://goo.gl/BD540
Chat: #dwengo in irc.freenode.net

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
Georg Icking-Konert | 18 Apr 09:12 2014
Picon

r/w order for STM8 16b registers

hi all,

it might be common knowledge in the community, but it sure was new to me (and took me some time to debug)…

As you know the STM8 is and 8-bit uC, so reading from or writing to 16b peripheral registers (SFR) takes place in 2 steps. And I found that the sequence of access matters for 16b peripheral registers (SFR), and is different for read and write:
  • write: byteH+byteL is ok, but byteL+byteH (or word write in C) fails
  • read: byteL+byteH (and word read in C) is ok, but byteH+byteL fails

I observed this behavior for SDCC v3.4 RC2, and also for Cosmic C-compiler 4.3.7Hope this note helps avoiding bugs, and saving debugging time. 

Have a nice day,  :-)
Georg I.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Maarten Brock | 11 Apr 11:21 2014
Picon

SDCC 3.4.0 released

Hello SDCC friends,

Today a new release of SDCC was made. We are now at version 3.4.0.
You can get it at:
http://sourceforge.net/projects/sdcc/files/

So what's new?
* New TLCS90 (Toshiba Z80 clone) target support
* New STMicroelectronics STM8 target support
* Support for named address spaces in ROM
* Detects supported devices by gputils when building SDCC

And of course numerous feature requests and bug fixes are included as 
well.

I hope you will enjoy using this new release.

Maarten Brock
SDCC 3.4.0 Release Manager

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
Georg Icking-Konert | 9 Apr 06:05 2014
Picon

Re: STM8 template project and header file

hi Maarten,

nice to be here, thanks! :-)

Actually these are only template projects for beginners (like me), not real sdcc contributions. The only exception might be the stm8 header file, which would probably make sense to provide together with sdcc. However, I am not sure if my implementation suits the standards and/or format which would be accepted by everybody.  

As a side remark: I just checked with Edward if I can upload my templates to his project http://sourceforge.net/projects/stm8samples/  So, hopefully, the projects will be more visible soon, and also be versioned properly. If Edward agrees, I’ll notify it here.

Greetings,
Georg I.


----------------------------------------------------------------------

Message: 1
Date: Sat, 05 Apr 2014 23:00:13 +0200
From: "Maarten Brock" <sourceforge.brock-HmBbmidbCcE@public.gmane.org>
Subject: Re: [Sdcc-user] STM8 template project and header file
To: sdcc-user-5NWGOfrQmneRv+LV9MX5ug@public.gmane.orge.net
Message-ID: <53406EDD.2902.40B31EF-pyega4qmqnTi5syyURg5tku17cZ23vLt@public.gmane.org>
Content-Type: text/plain; charset=ISO-8859-1

Hello Georg,

Welcome to the sdcc mailing list ;)

If you want to send a contribution to SDCC, please post it as a
patch in the tracker system. Here everyone can find and get it and
it may eventually end up in the SDCC distribution itself. Here's the
link to the patch tracker:

http://sourceforge.net/p/sdcc/patches/

Greetings,
Maarten

hi again,

the below link doesn?t work, sorry. Here?s the correct link: http://www.cream-tea.de/public/STM8_Template.zip

Regards, Georg



------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Georg Icking-Konert | 6 Apr 13:45 2014
Picon

Re: STM8 bootloader flash software

hello Georg O.,

sure, no problem. Actually I never bothered about license, yet. So how do I release something under a GPL?
Thanks a lot in advance!

Regards,
Georg I.

> Message: 5
> Date: Sun, 6 Apr 2014 09:52:05 +0200
> From: georg@...
> Subject: Re: [Sdcc-user] STM8 bootloader flash software
> To: sdcc-user@...
> Message-ID: <37f905673b973d66f178ff3fa396c700.squirrel@...>
> Content-Type: text/plain;charset=iso-8859-1
> 
>  <at> Georg Icking-Konert - will you release your Bootloader-App under a GPL
> License?
> 
> 
>> Hi,
>> 
>> my name is Georg (Georg O.) to make a difference ;) -
>> 
>> I also wrote a UART-Flasher utility for STM8 - it is based on stm32flasher
>> as the share a similar bootloader protocoll. I must admit that stm8flasher
>> is a bit of a hack and only tested on STM8S105C6 - so I am happy to here
>> that there is an alternative to it. When I find time I will try your
>> flashsoftware and maybe drop stm8flasher.
>> 
>> In any case here is the link:
>> http://sourceforge.net/p/oggstreamer/stm8flasher/ci/master/tree/
>> 
>> best wishes, Georg O.
>> 
>> 
>>> 
>>> Am 05.04.2014 um 19:36 schrieb Master Postfach <1860-218@...>:
>>> 
>>> hi,
>>> 
>>> in below contribution I wanted to share a Windows/Linux/MacOSX
>>> application
>>> which allows uploading code to the STM8 via the built-in boot loader
>>> (i.e.
>>> not via SWIM). It is similar to the "Flash Loader Demonstrator" by STM,
>>> but portable. Since attachments seem to be removed automatically, I've
>>> uploaded it to http://www.cream-tea.de/public/STM_BSL_flasher.zip  Hope
>>> somebody finds it useful...
>>> 
>>> Regards, Georg
>>> 

------------------------------------------------------------------------------
Georg Icking-Konert | 5 Apr 20:25 2014
Picon

Re: SDCC/STM8 questions

hi Philipp,

thanks a lot for your help! Here’s my current status:

1) sdcc IDE: I’ll check Eclipse and Code::Blocks, which were both proposed here

2) graphical debugging: I understand that graphical debugging via SWIM/ST-Link is not supported, yet. However, with printf working (see below), I can live with that

3) support for float: after I linked the file "stm8.lib“, float worked right away :-)

4) code in RAM: actually I don’t need it for performance but to log data to the program flash, because the EEPROM is too small for my needs. To my understanding the program flash of the STM8 doesn’t support execute-while-write, so I need the actual flash write&erase routines in RAM…? At least the Cosmic compiler (and STM8 boot loader) require that. The Cosmic compiler supports that via #pragma and linker settings. Can this be done in SDCC as well and, if yes, how? A small example would be highly welcome… ;-)

5) printf/sprintf support: yep, same story as float. Linking to "stm8.lib“ and implementing a custom putchar() did the job :-)

6) allocate flash segments: in the link Maarten provided, I also found the option to just allocate arrays with absolute address in source code. Actually I like that idea because it keeps everything together. Since the segment I for data logging, I first need to solve item 4)

7) far points for >64kB: when item 4) is solved, I’ll need to access >64kB memory space when reading out the data log. Would it work if I manually load the 24bit address to the respective STM8 register via inline assembler? Again, any help is highly appreciated! However, I’ll need to wait until I have something to read out… ;-)

Again, thanks a lot for your great support!

Georg


------------------------------

Message: 4
Date: Mon, 31 Mar 2014 10:09:03 +0200
From: Philipp Klaus Krause <pkk-dH2bkuHepfc@public.gmane.org>
Subject: Re: [Sdcc-user] SDCC/STM8 questions
To: sdcc-user-5NWGOfrQmneRv+LV9MX5ug@public.gmane.orge.net
Message-ID: <5339229F.4050901-dH2bkuHepfc@public.gmane.org>
Content-Type: text/plain; charset=windows-1252

Signierter PGP Teil
On 30.03.2014 00:41, Master Postfach wrote:
> hello all,
>
> after evaluating SDCC for STM8 for a few weeks now, I still have
> some questions. I hope they are simple, and that someone will
> answer them. For your support thanks a lot in advance!!! :-)  So,
> here?re my questions:
>
> * currently I use SDCC via an ASCII editor and a console. Is ok,
> but feels solo 80s? ;-)   Is there any *IDE with built-in support*
> or configurable for SDCC/STM8? Ideally with compiling, linking,
> upload and debug (see below wish list)

Someone did some work for Code::Blocks, but I didn't try it
http://www.mikrocontroller.net/topic/326808 (post in GErman, but there
shuld be English instructions in the download).

>
> * since I?m into physical computing, debugging via simulator is not
> a viable option. Is there a *debugger with GUI*, which supports
> SDCC and ST-Link (from STM8 discovery board)? If required, R-Link
> would also be ok

AFAIK, not yet.

>
> * does SDCC for STM8 also support *float operations*? I try to
> avoid float wherever possible, but sometimes it would come very
> handy, independent of speed and memory. In the (8051) manual it
> seems so, but I always get an error message when I try an operation
> with float numbers

float is supported. The stm8 port passes the regression tests,
incuding the tests of foat operations. There is no support for double
though: sdcc emits a warning for doubles and replaces them by floats.

>
> * how can I write *code to execute from RAM*? I need to log data
> to flash, but since the flash is single-ported, the actual flash
> operations have to be executed from RAM (or so I think).

According to my understanding of the stm8 architecture you should be
able to have both code and your data in flash (resulting in a few
pipeline stalls once in a while, which slow your code down a bit;
however AFAIK the RAM data bus is just 8 bits wide, so you'd get even
more pipeline stalls with code in RAM). But I haven't done something
like this before.

>
> * if *printf/sprintf supported* by SDCC/STM8? Of course each
> instance could be replaced somehow, but I?d rather not sieve
> through all my old projects...

printf() and sprintf() are supported.

>
> * how do I *specify flash segments/locations for the linker*? I
> need to reserve some part of the flash for data logging, but I
> don?t know how to tell the linker which

I don't use such functionality often, but AFAIR, the -b option
(possibly with some custom area for the reserved part) should help.

>
> * and, last but not least, *how can I define a far pointer* to a
> >64kB address (i.e. 24 or 32 bit)

Far pointers are not supported yet.

Philipp




------------------------------

Message: 5
Date: Mon, 31 Mar 2014 10:42:31 +0200 (CEST)
From: "Maarten Brock" <sourceforge.brock-HmBbmidbCcE@public.gmane.org>
Subject: Re: [Sdcc-user] SDCC/STM8 questions
To: sdcc-user-5NWGOfrQmneRv+LV9MX5ug@public.gmane.orge.net
Message-ID: <42876.82.161.160.72.1396255351.squirrel-tPCArUVCkRTz+pZb47iToQ@public.gmane.org>
Content-Type: text/plain;charset=iso-8859-1

Hi,

>> * how do I *specify flash segments/locations for the linker*? I
>> need to reserve some part of the flash for data logging, but I
>> don?t know how to tell the linker which
>
> I don't use such functionality often, but AFAIR, the -b option
> (possibly with some custom area for the reserved part) should help.

Have a look at this forum thread:
https://sourceforge.net/p/sdcc/discussion/1864/thread/d4bf46f1/

Maarten



------------------------------

Message: 6
Date: Mon, 31 Mar 2014 09:54:38 +0200
From: Sebastien Lorquet <sebastien-i/0epbAZHkZGWvitb5QawA@public.gmane.org>
Subject: Re: [Sdcc-user] SDCC/STM8 questions
To: sdcc-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Message-ID: <53391F3E.1080507-i/0epbAZHkZGWvitb5QawA@public.gmane.org>
Content-Type: text/plain; charset=ISO-8859-1

Signierter PGP Teil
hello

yes, SDCC can be integrated with code blocks. You can choose a "sdcc" compiler
type in the project settings.

The built-in option list may be a little outdated, but you can still add any
option by hand.

I have used that myself a few times with the PIC16 tols.

Best regards,

S?bastien Lorquet

Le 30/03/2014 20:17, Philipp Klaus Krause a ?crit :
> On 30.03.2014 20:04, Kustaa Nyholm wrote:
>>> Is there any *IDE with built-in support* or configurable for
>> SDCC/STM8? Ideally with compiling, linking, upload and debug (see below
>> wish list)
>
>
>> I use SDCC with Eclipse (CDT) as described here:
>
>> http://www.sparetimelabs.com/funwith08/funwith08.php
>
>> ...but I don't use debugger, would not be much any good with the kind of
>> software I write and the kind of debugging I need, good old printf is
>> all I need...
>
>> cheers Kusti
>
> Apparently someone made something for Code::Blocks at
> http://www.mikrocontroller.net/topic/326808, but haven't tried it myself
> (the post is in German, but the download should include English
> instructions).
>
> Philipp
>
>
> ------------------------------------------------------------------------------
>
>
>
_______________________________________________
> Sdcc-user mailing list Sdcc-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>


------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Georg Icking-Konert | 5 Apr 20:02 2014
Picon

Re: Sdcc-user Digest, Vol 94, Issue 1

hello Valentin,

actually I already had already stumbled across your flasher tool - great work! However, I needed a means to re-flash an STM8 within a closed box. This can be done by the "Flash Loader Demonstrator“ which is available via the STM homepage. It communicates via USB/COM-port with the built-in STM8 boot loader, and allows programming new firmware. Unfortunately it’s Windows-only.

Since I couldn’t find a portable tool (and the BSL protocol is REALLY simple), I developed a small utility. It works under Win, Linux and MacOS X, and allows re-flashing via USB/UART. I have uploaded the project with sources to http://www.cream-tea.de/public/STM_BSL_flasher.zip  

Here a few details:
- supported file formats are Intel hex (SDCC default) and Motorola S19 (Cosmic default). The S37 format, which can be specified for SDCC is not yet supported
- to compile just "make all? (Posix) or use DevCpp (Win)
- for usage just launch the SW with option “-h“
- for a list of available communication ports just double-click the SW
- communication needs communication between PC and STM8-UART. Unfortunately this is missing in the STM8 discovery board :-(
- the SW is self-contained and does not need admin rights or an installation. Just copy it to where it suits you best
for simplicity I compile the required STM8 flash w/e routines into the PC binary (see folder "STM8_Routines")

Have a nice day,
Georg


Message: 3
Date: Mon, 31 Mar 2014 11:45:33 +0700
From: Valentin Dudouyt <valentin.dudouyt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [Sdcc-user] STM8 bootloader flash software
To: sdcc-user-5NWGOfrQmneRv+LV9MX5ug@public.gmane.orge.net
Message-ID: <5338F2ED.4020806-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Content-Type: text/plain; charset="iso-8859-1"

On 30.03.2014 06:17, Georg Icking-Konert wrote:
> hello all,
>
> since a few weeks I'm evaluating SDCC for STM8, and I have to say I'm
> impressed! :-)  But while the compiler is portable, uploading the
> generated code to the STM8 is still quite complicated. Specifically I
> had to switch to Win running under VirtualPC, and then upload
> via "Flash Loader Demonstrator" (boot loader via USB), or the "Visual
> Programmer" (ST-Link via SWIM). Both applications are available on the
> STM homepage, but both are Win only.
>

Please check for https://github.com/vdudouyt/stm8flash.

Thanks


------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Georg Icking-Konert | 5 Apr 19:49 2014
Picon

Re: STM8 bootloader flash software

hello,

thanks a lot for you feedback on sdcc-STM8 IDE’s. I’ll check them out and see how I get along. But I understand that none of them allows graphical debugging via SWIM…?

Regards, Georg

Am 03.04.2014 um 22:03 schrieb sdcc-user-request <at> lists.sourceforge.net:

Send Sdcc-user mailing list submissions to
sdcc-user-5NWGOfrQmneRv+LV9MX5ug@public.gmane.orge.net

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/sdcc-user
or, via email, send a message with subject or body 'help' to
sdcc-user-request-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org

You can reach the person managing the list at
sdcc-user-owner-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Sdcc-user digest..."


Today's Topics:

   1. Re: SDCC/STM8 questions (Kustaa Nyholm)
   2. Re: SDCC/STM8 questions (Philipp Klaus Krause)
   3. Re: STM8 bootloader flash software (Valentin Dudouyt)
   4. Re: SDCC/STM8 questions (Philipp Klaus Krause)
   5. Re: SDCC/STM8 questions (Maarten Brock)
   6. Re: SDCC/STM8 questions (Sebastien Lorquet)
   7. Can't find asx8051 in sdcc distro (Michael Carter)


----------------------------------------------------------------------

Message: 1
Date: Sun, 30 Mar 2014 21:04:34 +0300
From: Kustaa Nyholm <Kustaa.Nyholm-agu7PpGpchVWk0Htik3J/w@public.gmane.org>
Subject: Re: [Sdcc-user] SDCC/STM8 questions
To: "sdcc-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org"
<sdcc-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Message-ID: <CF5E36F0.8EAE1%kustaa.nyholm-agu7PpGpchVWk0Htik3J/w@public.gmane.org>
Content-Type: text/plain; charset="us-ascii"

> Is there any IDE with built-in support or configurable for SDCC/STM8? Ideally with compiling, linking, upload and debug (see below wish list)


I use SDCC with Eclipse (CDT) as described here:

http://www.sparetimelabs.com/funwith08/funwith08.php

...but I don't use debugger, would not be much any good
with the kind of software I write and the kind of
debugging I need, good old printf is all I need...

cheers Kusti


________________________________
This e-mail may contain confidential or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. We will not be liable for direct, indirect, special or consequential damages arising from alteration of the contents of this message by a third party or as a result of any virus being passed on or as of transmission of this e-mail in general.
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 2
Date: Sun, 30 Mar 2014 20:17:15 +0200
From: Philipp Klaus Krause <pkk-dH2bkuHepfc@public.gmane.org>
Subject: Re: [Sdcc-user] SDCC/STM8 questions
To: sdcc-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Message-ID: <53385FAB.6060403-dH2bkuHepfc@public.gmane.org>
Content-Type: text/plain; charset=ISO-8859-1

Signierter PGP Teil
On 30.03.2014 20:04, Kustaa Nyholm wrote:
>> Is there any *IDE with built-in support* or configurable for
> SDCC/STM8? Ideally with compiling, linking, upload and debug (see
> below wish list)
>
>
> I use SDCC with Eclipse (CDT) as described here:
>
> http://www.sparetimelabs.com/funwith08/funwith08.php
>
> ...but I don't use debugger, would not be much any good with the
> kind of software I write and the kind of debugging I need, good old
> printf is all I need...
>
> cheers Kusti

Apparently someone made something for Code::Blocks at
http://www.mikrocontroller.net/topic/326808, but haven't tried it
myself (the post is in German, but the download should include English
instructions).

Philipp



------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Georg Icking-Konert | 5 Apr 19:38 2014
Picon

Re: STM8 bootloader flash software


Am 05.04.2014 um 19:36 schrieb Master Postfach <1860-218-53koH/AXb86i2/dY4+mD5w@public.gmane.org>:

hi,

in below contribution I wanted to share a Windows/Linux/MacOSX application which allows uploading code to the STM8 via the built-in boot loader (i.e. not via SWIM). It is similar to the "Flash Loader Demonstrator" by STM, but portable. Since attachments seem to be removed automatically, I've uploaded it to http://www.cream-tea.de/public/STM_BSL_flasher.zip  Hope somebody finds it useful...

Regards, Georg


------------------------------

Message: 2
Date: Sun, 30 Mar 2014 00:17:06 +0100
From: Georg Icking-Konert <georg-+RThwTSsD2wuZeo0DBJMuQ@public.gmane.org>
Subject: [Sdcc-user] STM8 bootloader flash software
To: sdcc-user-5NWGOfrQmneRv+LV9MX5ug@public.gmane.orge.net
Message-ID: <5D0C9A46-C9EB-459D-B85E-04601F2BF5BB-+RThwTSsD2wuZeo0DBJMuQ@public.gmane.org>
Content-Type: text/plain; charset="windows-1252"

hello all,

since a few weeks I?m evaluating SDCC for STM8, and I have to say I?m impressed! :-)  But while the compiler is portable, uploading the generated code to the STM8 is still quite complicated. Specifically I had to switch to Win running under VirtualPC, and then upload via "Flash Loader Demonstrator? (boot loader via USB), or the "Visual Programmer? (ST-Link via SWIM). Both applications are available on the STM homepage, but both are Win only.

At least for the first method I was able to develop a simple alternative. Attached please find v0.1 of a flash loader software communicating with STM8?s boot loader via USB. It has been successfully tested under MacOSX 10.9, Ubuntu and Windows 7. To compile just "make all? (Posix) or use DevCpp (Win). For usage just launch the SW with option "-h?. For a list of available ports just double-click the SW. The SW is self-contained and doesn?t need admin rights or an installation. Just copy it to where it suits you best.

Here a few development details:
for simplicity I included the required STM8 flash w/e routines into the binary (see folder ?STM8_Routines?)
supported file formats are Intel hex (SDCC default) and Motorola S19 (Cosmic default). The S37 format, which can be specified for SDCC is not yet supported

Thanks again and have a nice day,
Georg

PS: if you have problems with the tool, please let me know


-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: STM_BSL_flasher.zip
Type: application/zip
Size: 40492 bytes
Desc: not available
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Georg Icking-Konert | 5 Apr 19:27 2014
Picon

Re: STM8 template project and header file

hi,

in the meantime I found out how to reply to this mailing list - some things are just too simple… ;-)

Actually in below contribution I wanted to share a STM8 template project for SDCC and Cosmic compiler. It mainly sports a peripheral header file I wrote from the STM8 user manual. But apparently attachments are removed automatically in the mailing list…? 

Well, I now uploaded the STM8 template project to http://ftp.cream-tea.de/public/STM8_Template.zip  Hope it helps somebody else like SDCC helps me :-)

Regards, Georg



Message: 4
Date: Sat, 29 Mar 2014 23:56:15 +0100
From: Master Postfach <1860-218-53koH/AXb86i2/dY4+mD5w@public.gmane.org>
Subject: [Sdcc-user] STM8 template project and header file
To: sdcc-user-5NWGOfrQmneRv+LV9MX5ug@public.gmane.orge.net
Message-ID: <2F93944A-A648-4EDB-B782-C03380F158C0-53koH/AXb86i2/dY4+mD5w@public.gmane.org>
Content-Type: text/plain; charset="windows-1252"

hello all,

I was very thrilled when I found that SDCC is finally being ported to the STM8. That?s great news for me, because in the past I used the 4k version of Cosmic. The good news is that it?s free, but the size restriction often is a big hazzle? So, thanks again team! :-)

As a contribution I have attached a simple C project compatible with both SDCC and STVP/Cosmic. I will phase out the latter, but currently I have to stay compatible with my legacy projects.

The project contains simple examples for using GPIOs, ADC, I2C etc, but most importantly it contains a file "stm8s207.h? with all peripherals from the STM8 reference manual. I don?t know if it?s of use for anybody, but I haven?t found anything similar on the net, so maybe it is? Please feel free to use! I took special care when generating this file, but of course I cannot guarantee its bug-freeness or take responsibility for its correct function. 

Don?t be mislead by the name of the headerfile. Apparently ST has kept the registers fixed over a wide range of devices, because it seems to work flawlessly from the discovery board (32kB consumer) to a STM8AF62AA (128kB/CAN automotive).

To compile the code use SDCC with options "-mstm8 --std-sdcc99? (see _compile_run* and Makefile). To upload the code to the STM8
via COM-port under Windows, I used the "Flash Loader Demonstrator" from STM?s homepage. But as of today I got my own portable tool, which I will provide in a separate mail
via SWIM (STM8 Discovery has no UART/USB bridge), I use ST Visual Programmer. Unfortunately it?s also Win only :-(

Thanks again and have a nice day,
Georg

PS: if you have problems with the project, just let me know




-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: STM8_Template.zip
Type: application/zip
Size: 40822 bytes
Desc: not available
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

------------------------------------------------------------------------------


------------------------------

_______________________________________________
Sdcc-user mailing list
Sdcc-user-5NWGOfrQmneRv+LV9MX5ug@public.gmane.orge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user


End of Sdcc-user Digest, Vol 93, Issue 4
****************************************

------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Gmane