Reply by florianschrbr January 25, 20052005-01-25

Hi Daniel!

Now your sourcecode works!

Thanks
Florian
>
> Hmm, your trying to write code to an area wich is write protected by
> TwinPeeks. Did you have any documentation regarding your board an
> TwinPeeks? If you have one look at the Chapter where TwinPeeks and
> redirected interrupts are described. The adress 0xFFE0 is the
> interrupt jump point for the TC7 interrupt. I've looked into the
> example and have no idea why this example uses the TC7 interrupt.
>
> Try this simple example and tell how it works:
> ====================================================================
>
> #include <hcs12dp256.h> //--> Insert your processor include here
> // should be <mc9s12d64.h>
> #include <stdio.h>
>
> int putchar(char c){
> while((SCI0SR1 & 0x80) == 0);
> SCI0DRL = c;
> return c;
> }
>
> int getchar(void){
> while((SCI0SR1 & 0x20) == 0);
> return SCI0DRL;
> }
>
> void main(void){
> printf("Hello World!\r\n");
> }
>
> ====================================================================
>
> This Example don't use any interrupts and should run with TwinPeeks.
> If you want to use interrupts with TwinPeeks you first have to
> redirect the necessary interrupt vectors to a RAM Location.
>
> Greets Daniel. >
> --- In , "florianschrbr" <florianschrbr@y...>
> wrote:
> >
> > Hello Cyrill, hello Daniel!
> >
> > I downloaded the OC-Console and it works better, but there is
> always
> > an error!
> > Here is my .S19 file:
> >
>
S1238000CF100016804887CE08008E080227056A000820F6CE80C1CD08008E80C12706
> > 18FE
> >
>
S12380200A307020F516802A20FECC001A16804D2006CC803B16808920F83D48656C6C
> > 6FC1
> >
>
S123804020576F726C640A001D0016073D3B34B775EC027C00C0C60C7B00C3B757301B
> > 82C3
> >
>
S12380603D3B34B775FC0800270CE603C10A2606CC000D1680611F00C480FB180D0300
> > C7F0
> >
>
S1238080E60387B757301B823D3B34B7751B9ECC00006C1E2016ED02E64087168061EC
> > 1ED7
> >
>
S12380A0C300016C1EEC02C300016C02ED02E74026E4CC000A168061CC0001B757301B
> > 82B9
> >
>
S12380C03DFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
> > FF7E
> >
>
S123FFE0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF80
> > 009B
> > S9030000FC
> >
> > Thats an simple helloworld application from the example folder in
> > icc12!
> > After erasing my flash and downloading the file, following error
> > appears in OC-Console:
> > Write error at FFE0
> >
>
3E>S123FFE0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
> > F80009B
> > 3E>
> >
> > Have you any idea?
> >
> > Thanks for the great help!
> > Florian
> > >
> > > Can you sent me your File.s19
> > >
> > > or show how it looks like you can open it with
> > > notepad and copy paste it.and perhaps the code you are compiling
> > >
> > >
> > > http://www.seattlerobotics.org/encoder/jun99/dougl.html
> > >
> > > tells something about the s record
> > >
> > > The manual tells something about
> > > The monitor is processing each S-Record line seperately. If the
> last
> > > address of such an S-Record is even, the 2nd byte to form a
> complete
> > > word is missing. TwinPEEKs will append an $FF byte in this case,
> so
> > > it
> > > is able to perform the word write.
> > > The problem occurs, if the byte stream continues with the
> following
> > > S-Record line.
> > > To avoid this problem, it is necessary to align all S-Record
data
> > > before programming. This can be done using the freely available
> > > Motorola Tool SRECCVT:
> > > SRECCVT -m 0x00000 0xfffff 32 -o <outfile> <infile>
> > > A detailed description of this tool is contained in the SRECCVT
> > > Reference Guide (PDF).
> > >
> > > SAME as
> > > daniel winkler says .
> > >
> > > You get one star * what means one line has been sent
> > > Before loading into non-volatile memory (Flash EEPROM), this
> > > kind of memory must always be erased. Also, only word writes can
> be
> > > used in this case. It may be required to prepare S-Record data
> > > accordingly,
> > > before it can be downloaded (see instructions above).
> > > The sending terminal program (such as OC-Console) must wait for
> > > the acknowledge byte (*), before starting the transmission of
> > another
> > > line. This way, the transmission speed of both sides (PC and
MCU)
> > are
> > > synchronized.
> > >
> > > Try a other file
> > >
> > > let me know if you have any succes
> > > and don't give up !
> > >
> > > Cyrill



Reply by florianschrbr January 24, 20052005-01-24

O.k., i copied the sourcecode in my icc12 and try them to compile.
following error in icc12:

C:\icc\bin\imakew -f test.mak
icc12w -o test -LC:\icc\lib\ -btext:0x8000 -bdata:0x0800 -
bextcode:0.0x1FFFF -dinit_sp:0x1000 -fmots19 @test.lk -lc12p
unknown file type @test.lk, passed to linker
!ERROR unknown file type '
C:\icc\bin\imakew.exe: Error code 1

i have no idea why? do you have a idea?

thanks and king regards
florian
Done: there are error(s). Exit code: 1
>
> Hmm, your trying to write code to an area wich is write protected by
> TwinPeeks. Did you have any documentation regarding your board an
> TwinPeeks? If you have one look at the Chapter where TwinPeeks and
> redirected interrupts are described. The adress 0xFFE0 is the
> interrupt jump point for the TC7 interrupt. I've looked into the
> example and have no idea why this example uses the TC7 interrupt.
>
> Try this simple example and tell how it works:
> ====================================================================
>
> #include <hcs12dp256.h> //--> Insert your processor include here
> // should be <mc9s12d64.h>
> #include <stdio.h>
>
> int putchar(char c){
> while((SCI0SR1 & 0x80) == 0);
> SCI0DRL = c;
> return c;
> }
>
> int getchar(void){
> while((SCI0SR1 & 0x20) == 0);
> return SCI0DRL;
> }
>
> void main(void){
> printf("Hello World!\r\n");
> }
>
> ====================================================================
>
> This Example don't use any interrupts and should run with TwinPeeks.
> If you want to use interrupts with TwinPeeks you first have to
> redirect the necessary interrupt vectors to a RAM Location.
>
> Greets Daniel. >
> --- In , "florianschrbr" <florianschrbr@y...>
> wrote:
> >
> > Hello Cyrill, hello Daniel!
> >
> > I downloaded the OC-Console and it works better, but there is
> always
> > an error!
> > Here is my .S19 file:
> >
>
S1238000CF100016804887CE08008E080227056A000820F6CE80C1CD08008E80C12706
> > 18FE
> >
>
S12380200A307020F516802A20FECC001A16804D2006CC803B16808920F83D48656C6C
> > 6FC1
> >
>
S123804020576F726C640A001D0016073D3B34B775EC027C00C0C60C7B00C3B757301B
> > 82C3
> >
>
S12380603D3B34B775FC0800270CE603C10A2606CC000D1680611F00C480FB180D0300
> > C7F0
> >
>
S1238080E60387B757301B823D3B34B7751B9ECC00006C1E2016ED02E64087168061EC
> > 1ED7
> >
>
S12380A0C300016C1EEC02C300016C02ED02E74026E4CC000A168061CC0001B757301B
> > 82B9
> >
>
S12380C03DFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
> > FF7E
> >
>
S123FFE0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF80
> > 009B
> > S9030000FC
> >
> > Thats an simple helloworld application from the example folder in
> > icc12!
> > After erasing my flash and downloading the file, following error
> > appears in OC-Console:
> > Write error at FFE0
> >
>
3E>S123FFE0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
> > F80009B
> > 3E>
> >
> > Have you any idea?
> >
> > Thanks for the great help!
> > Florian
> > >
> > > Can you sent me your File.s19
> > >
> > > or show how it looks like you can open it with
> > > notepad and copy paste it.and perhaps the code you are compiling
> > >
> > >
> > > http://www.seattlerobotics.org/encoder/jun99/dougl.html
> > >
> > > tells something about the s record
> > >
> > > The manual tells something about
> > > The monitor is processing each S-Record line seperately. If the
> last
> > > address of such an S-Record is even, the 2nd byte to form a
> complete
> > > word is missing. TwinPEEKs will append an $FF byte in this case,
> so
> > > it
> > > is able to perform the word write.
> > > The problem occurs, if the byte stream continues with the
> following
> > > S-Record line.
> > > To avoid this problem, it is necessary to align all S-Record
data
> > > before programming. This can be done using the freely available
> > > Motorola Tool SRECCVT:
> > > SRECCVT -m 0x00000 0xfffff 32 -o <outfile> <infile>
> > > A detailed description of this tool is contained in the SRECCVT
> > > Reference Guide (PDF).
> > >
> > > SAME as
> > > daniel winkler says .
> > >
> > > You get one star * what means one line has been sent
> > > Before loading into non-volatile memory (Flash EEPROM), this
> > > kind of memory must always be erased. Also, only word writes can
> be
> > > used in this case. It may be required to prepare S-Record data
> > > accordingly,
> > > before it can be downloaded (see instructions above).
> > > The sending terminal program (such as OC-Console) must wait for
> > > the acknowledge byte (*), before starting the transmission of
> > another
> > > line. This way, the transmission speed of both sides (PC and
MCU)
> > are
> > > synchronized.
> > >
> > > Try a other file
> > >
> > > let me know if you have any succes
> > > and don't give up !
> > >
> > > Cyrill




Reply by Daniel Winkler January 24, 20052005-01-24

Hmm, your trying to write code to an area wich is write protected by
TwinPeeks. Did you have any documentation regarding your board an
TwinPeeks? If you have one look at the Chapter where TwinPeeks and
redirected interrupts are described. The adress 0xFFE0 is the
interrupt jump point for the TC7 interrupt. I've looked into the
example and have no idea why this example uses the TC7 interrupt.

Try this simple example and tell how it works:
====================================================================

#include <hcs12dp256.h> //--> Insert your processor include here
// should be <mc9s12d64.h>
#include <stdio.h>

int putchar(char c){
while((SCI0SR1 & 0x80) == 0);
SCI0DRL = c;
return c;
}

int getchar(void){
while((SCI0SR1 & 0x20) == 0);
return SCI0DRL;
}

void main(void){
printf("Hello World!\r\n");
}

====================================================================

This Example don't use any interrupts and should run with TwinPeeks.
If you want to use interrupts with TwinPeeks you first have to
redirect the necessary interrupt vectors to a RAM Location.

Greets Daniel.
--- In , "florianschrbr" <florianschrbr@y...>
wrote:
>
> Hello Cyrill, hello Daniel!
>
> I downloaded the OC-Console and it works better, but there is
always
> an error!
> Here is my .S19 file:
>
S1238000CF100016804887CE08008E080227056A000820F6CE80C1CD08008E80C12706
> 18FE
>
S12380200A307020F516802A20FECC001A16804D2006CC803B16808920F83D48656C6C
> 6FC1
>
S123804020576F726C640A001D0016073D3B34B775EC027C00C0C60C7B00C3B757301B
> 82C3
>
S12380603D3B34B775FC0800270CE603C10A2606CC000D1680611F00C480FB180D0300
> C7F0
>
S1238080E60387B757301B823D3B34B7751B9ECC00006C1E2016ED02E64087168061EC
> 1ED7
>
S12380A0C300016C1EEC02C300016C02ED02E74026E4CC000A168061CC0001B757301B
> 82B9
>
S12380C03DFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
> FF7E
>
S123FFE0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF80
> 009B
> S9030000FC
>
> Thats an simple helloworld application from the example folder in
> icc12!
> After erasing my flash and downloading the file, following error
> appears in OC-Console:
> Write error at FFE0
>
3E>S123FFE0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
> F80009B
> 3E>
>
> Have you any idea?
>
> Thanks for the great help!
> Florian
> >
> > Can you sent me your File.s19
> >
> > or show how it looks like you can open it with
> > notepad and copy paste it.and perhaps the code you are compiling
> >
> >
> > http://www.seattlerobotics.org/encoder/jun99/dougl.html
> >
> > tells something about the s record
> >
> > The manual tells something about
> > The monitor is processing each S-Record line seperately. If the
last
> > address of such an S-Record is even, the 2nd byte to form a
complete
> > word is missing. TwinPEEKs will append an $FF byte in this case,
so
> > it
> > is able to perform the word write.
> > The problem occurs, if the byte stream continues with the
following
> > S-Record line.
> > To avoid this problem, it is necessary to align all S-Record data
> > before programming. This can be done using the freely available
> > Motorola Tool SRECCVT:
> > SRECCVT -m 0x00000 0xfffff 32 -o <outfile> <infile>
> > A detailed description of this tool is contained in the SRECCVT
> > Reference Guide (PDF).
> >
> > SAME as
> > daniel winkler says .
> >
> > You get one star * what means one line has been sent
> > Before loading into non-volatile memory (Flash EEPROM), this
> > kind of memory must always be erased. Also, only word writes can
be
> > used in this case. It may be required to prepare S-Record data
> > accordingly,
> > before it can be downloaded (see instructions above).
> > The sending terminal program (such as OC-Console) must wait for
> > the acknowledge byte (*), before starting the transmission of
> another
> > line. This way, the transmission speed of both sides (PC and MCU)
> are
> > synchronized.
> >
> > Try a other file
> >
> > let me know if you have any succes
> > and don't give up !
> >
> > Cyrill




Reply by florianschrbr January 24, 20052005-01-24

Hello Cyrill, hello Daniel!

I downloaded the OC-Console and it works better, but there is always
an error!
Here is my .S19 file:
S1238000CF100016804887CE08008E080227056A000820F6CE80C1CD08008E80C12706
18FE
S12380200A307020F516802A20FECC001A16804D2006CC803B16808920F83D48656C6C
6FC1
S123804020576F726C640A001D0016073D3B34B775EC027C00C0C60C7B00C3B757301B
82C3
S12380603D3B34B775FC0800270CE603C10A2606CC000D1680611F00C480FB180D0300
C7F0
S1238080E60387B757301B823D3B34B7751B9ECC00006C1E2016ED02E64087168061EC
1ED7
S12380A0C300016C1EEC02C300016C02ED02E74026E4CC000A168061CC0001B757301B
82B9
S12380C03DFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FF7E
S123FFE0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF80
009B
S9030000FC

Thats an simple helloworld application from the example folder in
icc12!
After erasing my flash and downloading the file, following error
appears in OC-Console:
Write error at FFE0
3E>S123FFE0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
F80009B
3E>

Have you any idea?

Thanks for the great help!
Florian
>
> Can you sent me your File.s19
>
> or show how it looks like you can open it with
> notepad and copy paste it.and perhaps the code you are compiling > http://www.seattlerobotics.org/encoder/jun99/dougl.html
>
> tells something about the s record
>
> The manual tells something about
> The monitor is processing each S-Record line seperately. If the last
> address of such an S-Record is even, the 2nd byte to form a complete
> word is missing. TwinPEEKs will append an $FF byte in this case, so
> it
> is able to perform the word write.
> The problem occurs, if the byte stream continues with the following
> S-Record line.
> To avoid this problem, it is necessary to align all S-Record data
> before programming. This can be done using the freely available
> Motorola Tool SRECCVT:
> SRECCVT -m 0x00000 0xfffff 32 -o <outfile> <infile>
> A detailed description of this tool is contained in the SRECCVT
> Reference Guide (PDF).
>
> SAME as
> daniel winkler says .
>
> You get one star * what means one line has been sent
> Before loading into non-volatile memory (Flash EEPROM), this
> kind of memory must always be erased. Also, only word writes can be
> used in this case. It may be required to prepare S-Record data
> accordingly,
> before it can be downloaded (see instructions above).
> The sending terminal program (such as OC-Console) must wait for
> the acknowledge byte (*), before starting the transmission of
another
> line. This way, the transmission speed of both sides (PC and MCU)
are
> synchronized.
>
> Try a other file
>
> let me know if you have any succes
> and don't give up !
>
> Cyrill




Reply by Cyrill January 21, 20052005-01-21

Can you sent me your File.s19

or show how it looks like you can open it with
notepad and copy paste it.and perhaps the code you are compiling http://www.seattlerobotics.org/encoder/jun99/dougl.html

tells something about the s record

The manual tells something about
The monitor is processing each S-Record line seperately. If the last
address of such an S-Record is even, the 2nd byte to form a complete
word is missing. TwinPEEKs will append an $FF byte in this case, so
it
is able to perform the word write.
The problem occurs, if the byte stream continues with the following
S-Record line.
To avoid this problem, it is necessary to align all S-Record data
before programming. This can be done using the freely available
Motorola Tool SRECCVT:
SRECCVT -m 0x00000 0xfffff 32 -o <outfile> <infile>
A detailed description of this tool is contained in the SRECCVT
Reference Guide (PDF).

SAME as
daniel winkler says .

You get one star * what means one line has been sent
Before loading into non-volatile memory (Flash EEPROM), this
kind of memory must always be erased. Also, only word writes can be
used in this case. It may be required to prepare S-Record data
accordingly,
before it can be downloaded (see instructions above).
The sending terminal program (such as OC-Console) must wait for
the acknowledge byte (*), before starting the transmission of another
line. This way, the transmission speed of both sides (PC and MCU) are
synchronized.

Try a other file

let me know if you have any succes
and don't give up !

Cyrill



Reply by Daniel Winkler January 21, 20052005-01-21

Now i got it - you use the terminal program thats build in in ICC12. I
never get the file transfer to work with this terminal programm. You
should use OCConsole. You can get it here:

http://elmicro.com/files/occonsole_v30.zip

With this program i never had any problems. Before it works you must
change the setting for the Handshake sequence to "#42". You find this
setting under the "File Transfer" Options.

Any other terminal program will surely also do it.

Greets Daniel.

--- In , "florianschrbr" <florianschrbr@y...>
wrote:
>
> hello cyrill!
>
> thanks for help!
>
> i use ICC12 and i have no idea how to send the hello.s19 file as
text
> file? can i set this in option?
> is it possible to send the file with terminal-programm?
>
> thanks
> florian
> >
> > Loading...
> > *
> > Invalid S-Record!
> >
> >
> > I think your doing every thing fine you are only
> > loading it as a wrong file don't load it as a
> > binary file or what ever just as a text file
> >
> > file-name.s19 load as text.
> >
> > cyrill



Reply by Cyrill January 21, 20052005-01-21

hello

I haven't got the same version as you
and a other hc12 but I use a standard windows terminal
program to download mine file's
with this terminal program I have several options to download it
and when I try a other option It also doesn't work
But I see you get already 1 star *
so you'r close .


Reply by florianschrbr January 21, 20052005-01-21

hello cyrill!

thanks for help!

i use ICC12 and i have no idea how to send the hello.s19 file as text
file? can i set this in option?
is it possible to send the file with terminal-programm?

thanks
florian
>
> Loading...
> *
> Invalid S-Record! > I think your doing every thing fine you are only
> loading it as a wrong file don't load it as a
> binary file or what ever just as a text file
>
> file-name.s19 load as text.
>
> cyrill




Reply by Cyrill January 21, 20052005-01-21

Loading...
*
Invalid S-Record! I think your doing every thing fine you are only
loading it as a wrong file don't load it as a
binary file or what ever just as a text file

file-name.s19 load as text.

cyrill




Reply by Cyrill January 21, 20052005-01-21

How exactly do you download your code to the hc12 ?

1. You start your monitor program
it finds the hc12 and twinpeeks ?
2 then you use the command L ?
to load a s.19 file ?
;->l
Loading...
******

3. you load s.19 as a text file ?
for you must load it as a text file
(I don't mean file-name.txt )
when you see those stars ******loading is succes.

4 start with g 0800 or with the number where your program starts in
memory
;->g 0800
Executing 0800..

Perhaps only this command 3E what you give is wrong
this is what I get
;->3e
Unknown command (H for Help)!
;->3E>
This is garbage!
;->3E>1
This is garbage!
;->

or are your typing in this whole s.19 file ?
;->3E>S10E8000CF100016804887CE08008EC9
This is garbage!

good luck ! Cyrill