CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

place and execute program in user defined memory block

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
mmentink



Joined: 06 Sep 2005
Posts: 0

View user's profile Send private message

place and execute program in user defined memory block
PostPosted: Tue Sep 06, 2005 6:27 am     Reply with quote

Hello guys,

I'm trying to implement a wireless system, that needs to be upgraded wireless.

For that, I came up with this solution:

A kind of "bootloader" connects with the server and downloads a user program. After downloading the program, it places the code (C code) on a specific memory position, to where it jumps and executes.

For this, I need to be able to tell the compiler that the code should be executed (and formatted) from a certain position.

C does have Malloc and Calloc, and things like Long jump, but how do I use that to place functions in a certain memory block??

I'm programming using CCS PCW 3.160 for a Pic18F252

Any help would be greatly appreciated.

greets,

Matthijs
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Tue Sep 06, 2005 9:15 am     Reply with quote

Search the forum for bootloader and #org
Ttelmah
Guest







PostPosted: Tue Sep 06, 2005 9:35 am     Reply with quote

And just add, that 'Malloc, and Calloc', have nothing to do with program memory allocation. They are data memory allocation commands...

Best Wishes
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Tue Sep 06, 2005 11:07 am     Reply with quote

On a pic, data and program memory space are separate. Program memory cannot be run from data memory.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group