cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrading to the STM8 Assembler question

daveroffey9
Associate II
Posted on July 04, 2011 at 09:33

After having written a time consuming and reasonably eloquent request about this subject, only to have it rejected and erased, I'll make a shorter attempt.

Is it not possible to have straight forward assembler templates and .asm .inc files for the STM8 as was for product in the ST7 range? All product that I have designed in the past many years (ST driven...lemaitreltd.com) has used this format, which I am very comfortable with. My research has found no support for this at all. I would really like to continue using ST devices for the very sound reasons I made the decision to use them initially.

Having formats like this would not only be a very easy inclusion, relating to the powers within the ST team skillset, but would be very helpful for those of us who desire this approach to development, and assist in the inevitable learning curve that will always exist.

 

I am aware of the advantages that C can envelop, but for my requirements, I presently prefer to have detailed and confident function awareness and would like to continue being in this position. Your advice would be appreciated as it would assist in the directional decisions I have to make.

Many Regards

Dave Roffey

 
4 REPLIES 4
fggnrc2
Associate II
Posted on July 05, 2011 at 07:43

Dave,

I don't understand what you mean for ''assembler templates and .asm .inc files''.

I code my STM8 firmware in assembler and my main development tool is STVD which supports both STM8 and ST7.

My projects are split in many .asm and .inc files and I use auto-generated code (is this an assembler template?) only for bug reporting projects.

STVD may be improved, but, in my opinion, assembler templates aren't as important as some features I need.

For example, STM8 assembler can't compute a difference between two addresses which lie in different segments. There are some workarounds, but I prefer to use a constant and check its value when the assembler builds the absolute listing of each source.

I code this check as:

 #IFDEF ADDR_CHECK

 #IF ( MyConstant ne $abc )

 %OUT Error: wrong MyConstant value

 END

 #ENDIF

 #ENDIF

To make this hack work, I need to edit the .stp file with an external editor and add -D ADDR_CHECK in some places because STVD doesn't allow me edit the Post-Link commands of a project.

My code uses also many segments, which I define in the ''Link'' properties of a project. Sometime I need their starting (or ending) address, but STVD writes this data only for the RAM0, RAM and STACK segment.

Regards

EtaPhi

daveroffey9
Associate II
Posted on July 05, 2011 at 10:17

Hi EtaPhi,

Thanks for the reply EtaPhi. I think I have found the problem here. For some reason the install of the new STVD has created problems, and the directory of assembly .asm and .inc files are still the old STVD7 ones, so it appeared that STM8 .asm and .inc were not available, giving me the impression that all work must be done using C.

I am still having an issue with the build process, so I will do a clean install and go from there.

Thanks again

Dave Roffey

daveroffey9
Associate II
Posted on July 06, 2011 at 08:34

Hi again EtaPhi,

I have one more question if I may.

Previous ST7 projects build ok as expected.

If I do a test.

Set up a for STM8105 for instance, mapping file present, main asm file present. STM8s105c_s asm and inc files present. When I build it, the Post Link path gets corrupted with a garbage characters. Then says it can't find the exe file (which of course it won't do).

Any help would be appreciated.

Dave 

daveroffey9
Associate II
Posted on July 07, 2011 at 10:58

Well....... the answer found...... Program corruption.......

In the post link section the abslist name was corrupted

Running in batch or dos window all goes well... what a waste of time.