Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 30, 2024, 06:41:18 06:41


Login with username, password and session length


Pages: [1]
Print
Author Topic: Self Bootloader  (Read 4035 times)
0 Members and 1 Guest are viewing this topic.
Help
Junior Member
**
Offline Offline

Posts: 37

Thank You
-Given: 33
-Receive: 0


« on: November 01, 2008, 06:10:15 18:10 »

Hi,

Currently i have success download the hex data to SRAM and running the program. Now I would like to save the CODE data on external eeprom whenever power is ON will automatically download the data to SRAM and start running the program without manualy set the /EA to GND.

I have found this method 8051 von Neumann Memory ( http://www.keil.com/download/docs/192.asp ). I'm not sure this method will solve the problem not.

Quote
void main (void)
{ load_vonNeumann_memory (); // Load VN memory

((void (code *) (void)) 0xE000) (); // Call function in VN memory

while (1) // Loop Forever { }
}

May i know this load_vonNeumann_memory (); function will be the bootloader portion? Download the hex data to SRAM. The next ((void (code *) (void)) 0xE000) (); function will be the external CODE execution start at 0xE000 address. Am i rite?

I have tested but no work. May be is the "Options for Target" Off-chip Code Memory and Off-chip Xdata memory setting is wrong.
Let say, my application code define is :-
Off-chip Code Memory: start = 0x0000, size = 0x4FFF
Off-chip Xdata memory: start = 0x5000, size = 0xAFFF
I'm using 2 32kB SRAM.

How can i do the setting on the 8051 von Neumann Memory?
If this method can't make it. Is there any other method to run the external code without doing the /EA to GND setting?

Thank you.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC