EASy68K  
It is currently Sat Apr 04, 2020 5:17 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Thu Feb 23, 2006 8:53 pm 
Offline

Joined: Thu Feb 23, 2006 3:25 pm
Posts: 6
Location: Connecticut
Hi Folks,
I picked up an old M68000 based Cpu System (VME Bus) that has on it a:
-6840 Programable Timer
-SCN2681 Rs232 Chip
-512k x 8 Static Ram
-512k x 8 Flash Memory
-Altera EP1810 PLD

Since this CPU board is part of a system, the other boards I have
that plug into the MotherBoard are an Analog Bd (ADC, DAC) and a
Stepper Motor Driver Bd. All communication was/is done through RS232.

I don't have access to the Firmware Source Code but I can get the Memory Map. My thought was to erase the Flash Memory and write my own Monitor code for the CPU.

I have assembly language experience but only with a Rom Monitor already running. I can't find any detailed info that explains the Startup Sequence for the M68000. What happens or needs to happen when power is turned on?

I understand that the CPU starts out at $00000 but after that, what do
I need to have in the Flash Rom at $00000? How do I initialize the board ?

At what point can I jump to my Monitor code (when its written)? Is there a book that describes the Startup Sequence? I'm rambling....

Appreciate any help,
Steve


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 24, 2006 12:19 am 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
Quote:
My thought was to erase the Flash Memory and write my own Monitor code for the CPU.

First thing to do is copy the contents of the Flash ROM because it contains code that works that you can refer to when yours doesn't. 8^)=

Quote:
What happens or needs to happen when power is turned on?

What happens is that the longword at $00000000 is loaded into ths stack pointer (a7) and the longword at $00000004 is loaded into the program counter and the processor starts executing code from that address.

Quote:
How do I initialize the board ?

You'll need to setup the 2681 and probably the 6840, an example of how to do that is in the Flash ROM.

Quote:
At what point can I jump to my Monitor code (when its written)? Is there a book that describes the Startup Sequence?

You can jump to your monitor code once the board is initialized. The best description of how to start up your board is probably in its ROM. How about grabbing a copy of it and posting it where it can be looked at?

Lee.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 24, 2006 1:08 pm 
Offline

Joined: Thu Feb 23, 2006 3:25 pm
Posts: 6
Location: Connecticut
Lee,
Thanks for the reply.

I need to ask some dumb questions:
1.
Quote:
What happens is that the longword at $00000000 is loaded into ths stack pointer (a7) and the longword at $00000004 is loaded into the program counter and the processor starts executing code from that address.

Does the CPU perform these two operations (internally hard-coded) or do I write the code (move instructions) to make these happen at some other address location?

2.
Quote:
You can jump to your monitor code once the board is initialized. The best description of how to start up your board is probably in its ROM. How about grabbing a copy of it and posting it where it can be looked at?

I don't have access to the Firmware (code). The Flash Roms are split (Even and Odd). I don't have a disassembler (I'll search for a Freeware Version today).

I have access to an eeprom programmer, I can try reading the Roms into a file.

This is my first experience with embedded programming, sorry for the dumb questions.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 24, 2006 4:56 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
Quote:
Does the CPU perform these two operations (internally hard-coded)

Yes it does, just have your source with these two values set at the start. E.g.

Code:
stack_top         EQU   $0800             * in RAM somewhere

                  ORG   BASE              * start address for the ROM(s)

Vec_stack
      dc.l  stack_top                     * initial stack pointer
Vec_start
      dc.l  startup                       * initial program counter


Quote:
I have access to an eeprom programmer, I can try reading the Roms into a file.

Or two files. If you do merge the two into one file make sure the byte order is correct, even then odd. PC based utilities to split/join files like this tend to do it the other way round.

Quote:
I don't have a disassembler (I'll search for a Freeware Version today).

A disassembler can be a usefull tool in a monitor, it can be used to disassemble the instructions as you're tracing through them much like when you trace through code in EASy68K.

Lee.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 24, 2006 5:24 pm 
Offline

Joined: Thu Feb 23, 2006 3:25 pm
Posts: 6
Location: Connecticut
Thanks Lee,

The picture is starting to come into focus, its starting to makes sense.

Thanks again.

Steve


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 24, 2006 8:42 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
Let us know if you manage to dump the ROMs. I'm interested to see what's in them. I'm sure others here are too.

Lee.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 10, 2006 7:17 pm 
Offline

Joined: Thu Feb 23, 2006 3:25 pm
Posts: 6
Location: Connecticut
Hi Lee,
I was able to download the two Flash chips (Even,Odd) into the Programmer separately but couldn't figure out how to combine them into one file. Is it possible to read both Odd and Even Flash into the Programmer memory, aligned properly, then save as one file to disk? Seems like it should be doable.

No documentation with the Programmer.

I found out that the Instrument System that these boards are used in is still in Production so I can't post the Flash Firmware without the risk of getting sued.

I dug up a partial memory map of the system (not all addresses) and used the Easy68k to simulate some code. I can output the code into a Motorola S-Record from the Easy68K but I can't figure out how to split the output into Odd and Even to reburn the Flash.

Still have some things to work out.

Steve


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 11, 2006 2:16 am 
Offline

Joined: Tue Nov 15, 2005 7:58 am
Posts: 129
Location: Oregon, USA
Steve_K wrote:
I was able to download the two Flash chips (Even,Odd) into the Programmer separately but couldn't figure out how to combine them into one file.

Is it possible to read both Odd and Even Flash into the Programmer memory, aligned properly, then save as one file to disk? Seems like it should be doable.

...I can output the code into a Motorola S-Record from the Easy68K but I can't figure out how to split the output into Odd and Even to reburn the Flash...

No documentation with the Programmer.

It might be something the programming soft/firmware can do intrinsically, but usually there's a utility that comes with the programmer that will convert to/from 2-way (for 16 bit) or 4-way (for 32 bit) formats. If you don't have it, there are lots of freeware versions. It's also very easy to code one, but either way you'll need to know the format of the records you're reading and writing. Do you have S-records, or Intel hex, or binary, or something else?

Steve_K wrote:
I found out that the Instrument System that these boards are used in is still in Production so I can't post the Flash Firmware without the risk of getting sued.

IANAL, and I dunno where you are, but AFAIK here in the US of A, a copyright on code doesn't keep you from reading the code, or even from copying the algorithms. It basically just means that (with some "Fair Use" exceptions) you can't copy the actual code into anything you're going to sell, or that would otherwise compete with the copyright owner. Licensing (if you agreed to any) may add additional restrictions, like how many copies you can have, if you can disassemble it, or with whom you may share it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group