Depending on your compiler/linker you can specify a function as a "ram function". Look for a preprocessor directive for this and be sure to properly configure the linker - it must know where in flash to store the routine and where to copy it into RAM... -Art- _____ From: ateichtmann [mailto:arvid_teichtmann@...] Sent: Thursday, March 10, 2005 6:15 AM To: lpc2000@yahoogroups.com Subject: [lpc2000] Re: Execute Code in RAM? > > My question is, how code can be executed in RAM. > > How can i call a function in RAM? > > Simply: > void (*myfunc)(); > myfunc = (void (*)())0x40000000; > myfunc(); Sorry, does not work... The compiler does not like the second line. My problem is, that i don't know how to declare a function, whose address can be changed during runtime. How is the syntax of a working code? Regards Arvid Yahoo! Groups Sponsor ADVERTISEMENT <http://us.ard.yahoo.com/SIG=129lhicrf/M=298184.6018725.7038619.3001176/D=groups/S=1706554205:HM/EXP=1110547038/A=2593423/R=0/SIG=11el9gslf/*http:/www.netflix.com/Default?mqso=60190075> click here <http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S=:HM/A=2593423/rand=411689151> _____ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/lpc2000/ <http://groups.yahoo.com/group/lpc2000/> * To unsubscribe from this group, send an email to: lpc2000-unsubscribe@yahoogroups.com <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe> * Your use of Yahoo! Groups is subject to the Yahoo! <http://docs.yahoo.com/info/terms/> Terms of Service. [Non-text portions of this message have been removed]
Message
RE: [lpc2000] Re: Execute Code in RAM?
2005-03-10 by Messal, Art
Attachments
- No local attachments were found for this message.