#pragma use

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

#pragma use

4,791件の閲覧回数
NeedHelp
Contributor I
Dear all,
I still do not understand how to use variable(s) declared using the #pragma DATA_SEG syntax. You are dealing with a novince programmer - needless to say - so please bare with me and my questions!
1. I want to store a bunch of variables in data memory inside my bootloader code like a int *, int [], char etc. at memory location(s) ALPHA, BETA, THETA.. etc (for argument sake lets assume these addresses are valid). 
My  bootloader invokes my RTOS code ( In Keil I simply do: ((void (code *) (void)) CVECT_BOOT)(); - the bootloader transfers control over to the RTOS residing at address location CVECT_BOOT - Still need to figure how to do this in CW but thats another question Ill be bothering you later with). Once inside my RTOS how do I access those same variables declared and defined in my bootloader? For this I am assuming I need to know the "physical" address location and not the "name" of my data segment?
2. What would I do if I needed to do the same thing but this time my information is in program memory and not in data memory? I want to share my decode and encode array for manchester encoding in program memory.  
 
Since my foundation is so shaky I would appreciate if you could suggest some books/notes as well.
Thanks.
NeedHelp - no kiddin!
ラベル(1)
タグ(1)
0 件の賞賛
返信
5 返答(返信)

1,964件の閲覧回数
ubhims
Contributor I
I'm assuming that you're using CodeWarrior for HC08.
 
Please refer to the Compiler Manual (Using the Compiler -> Compiler Pragmas section). It has good information on #pragma DATA_SEG.
 
-Mandeep
0 件の賞賛
返信

1,964件の閲覧回数
NeedHelp
Contributor I

I am using Metroweks Codewarrior and my target is a 8014. I have attached my Installed Pluggins file. Thanks.

 

Installed_Plugins1.txt

Message Edited by t.dowe on 2009-10-15 05:47 PM
0 件の賞賛
返信

1,964件の閲覧回数
trytohelp
NXP Employee
NXP Employee
Hi,
 
you have paosted another question how to put variable at specific address.
It seems to be the same isn't it ?
 
Pascal
0 件の賞賛
返信

1,964件の閲覧回数
NeedHelp
Contributor I
yes thank you now i know how to use the pragma notation. sorry bout multiple posts this is my first time using online help.
0 件の賞賛
返信

1,964件の閲覧回数
trytohelp
NXP Employee
NXP Employee
Hi,
 
Thanks for the feedback
Don't hesitate to contact us
 
Pascal
0 件の賞賛
返信