cancel
Showing results for 
Search instead for 
Did you mean: 

Starting with St7 Assembler

dekrijger
Associate II
Posted on December 08, 2006 at 03:59

Starting with St7 Assembler

4 REPLIES 4
dekrijger
Associate II
Posted on November 30, 2006 at 04:53

Hi All,

I'm interested in learning to program ST7 in assembler, but I can not get started. Even if I follow examples given in the Assembler-Linker manual exacly to the letter, or try to build examples that come with ST7 Visual Develop 3.1.1 (~\st7toolset\asm\asmdemo\demo1.asm), I get errors:

>No information on start address of class 'rom'

It has something to do with the ''segment 'rom''' statement in the example source code, I think. But then, nothing seems to be wrong with the examples, and all other source codes I see also go ahead with ''segment 'rom''', etc..

Can somebody explain to me what is going on here?

Regards,

Sjef.

peterwrigley9
Associate II
Posted on December 01, 2006 at 10:35

Hi sjef,

It looks like the linker is having problems. You will need to define a ROM segment for the code to be put into on the micro. This will mean setting up the start address and so on.

It's more likely that your linker is not set up correctly. Which toolchain are you using? Have you told STVD which link file to use? There should be one in with your code somewhere.

Cheers

pjr
Associate II
Posted on December 04, 2006 at 13:43

Looks like the problem is with the order of source files in the workspace. By default STVD orers files alphabetically. Right click the Source Files folder in the workspace. An option in that menu is ''Add sorted elements''. Uncheck this option. Then move the st72311n4.asm file before ( above ) the demo1.asm file ( in the Source Files folder ). The assembler processes files in the order they appear in the source files folder. And since the segment definitions are in st72311n4.asm that file needs to be processed before the segments are used ( in the demo1.asm file ).

pjr

dekrijger
Associate II
Posted on December 08, 2006 at 03:59

Hi prw, prj,

I can assemble source without problems now. After reading the linker manual I started defining the segments right there in demo1.asm, and that worked. After reading prj's post, I accidently opened the demo workspace and there I saw st72311n4.asm - opened it and found the segment definitions in there. Previous time, I created a new project and added demo1.asm to the source list. So I omitted st72311n4.asm

Thank you both - things are much clearer now.

Regards,

Sjef.