Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC

Ads

Discussion Groups

Discussion Groups | 68HC12 | "Reference Only" sections in Metrowerks MOT V1.2

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

"Reference Only" sections in Metrowerks MOT V1.2 - Guillermo F. Molina - Mar 1 11:01:00 2003

Hi all,

Does any of you know how to create a kind of "reference only" sections with MOT V1.2 Metrowerks Compiler & Linker.
With "reference only" I mean sections were the linker calculates the object addresses but does not generate any code. For example, for objects placed in an external I2C eeprom, I need to know the object addresses but I don't need any space allocation, I use to do this in the 2500AD assembler using "reference only" sections.
I know about the Metrowerks "NO_INIT" sections and I use them to define internal EEPROM, but these kind of sections can't overlap.
Maybe there is a very simple way to do this in C, but I don't imagine it.
Any suggestion will be appreciated.
Thanks in advance,

Regards,

Guillermo Molina.
Buenos Aires.
ARGENTINA

[Non-text portions of this message have been removed]





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )


RE: "Reference Only" sections in Metrowerks MOT V1.2 - Erich Styger - Mar 6 3:06:00 2003

Here is how you can call a function and accessing an object
without allocating it:

#define erase ((void(*)(void))(0xfc06))
#define MyAbsVar (*(char*)(0x1344))

void main(void) {
erase(); /* call function at address 0xfc06 */
MyAbsVar = 5; /* store at address 0x1344 */
}

Erich

> -----Original Message-----
> From: Guillermo F. Molina [mailto:]
> Sent: Samstag, 1. Marz 2003 17:02
> To:
> Subject: [68HC12] "Reference Only" sections in Metrowerks MOT V1.2 > Hi all,
>
> Does any of you know how to create a kind of "reference only"
> sections with MOT V1.2 Metrowerks Compiler & Linker.
> With "reference only" I mean sections were the linker calculates
> the object addresses but does not generate any code. For example,
> for objects placed in an external I2C eeprom, I need to know the
> object addresses but I don't need any space allocation, I use to
> do this in the 2500AD assembler using "reference only" sections.
> I know about the Metrowerks "NO_INIT" sections and I use them to
> define internal EEPROM, but these kind of sections can't overlap.
> Maybe there is a very simple way to do this in C, but I don't imagine it.
> Any suggestion will be appreciated.
> Thanks in advance,
>
> Regards,
>
> Guillermo Molina.
> Buenos Aires.
> ARGENTINA >
>
> [Non-text portions of this message have been removed] >
> --------------------------------------------------------
> To unsubscribe from this group, send an email to: > To learn more about Motorola Microcontrollers, please visit
> http://www.motorola.com/mcu





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

RE: "Reference Only" sections in Metrowerks MOT V1.2 - Daniel Friederich - Mar 6 6:45:00 2003

- PAGED sections are NO_INIT sections which are allowed to overlap. Use it instead of the NO_INIT.
- I think you can also change the linker messages to link anyway, even if NO_INIT's do overlap.

Bye

Daniel > -----Original Message-----
> From: Erich Styger [mailto:]
> Sent: Thursday, March 06, 2003 9:06
> To:
> Subject: RE: [68HC12] "Reference Only" sections in Metrowerks MOT V1.2 > Here is how you can call a function and accessing an object
> without allocating it:
>
> #define erase ((void(*)(void))(0xfc06))
> #define MyAbsVar (*(char*)(0x1344))
>
> void main(void) {
> erase(); /* call function at address 0xfc06 */
> MyAbsVar = 5; /* store at address 0x1344 */
> }
>
> Erich
>
> > -----Original Message-----
> > From: Guillermo F. Molina [mailto:]
> > Sent: Samstag, 1. Marz 2003 17:02
> > To:
> > Subject: [68HC12] "Reference Only" sections in Metrowerks MOT V1.2
> >
> >
> > Hi all,
> >
> > Does any of you know how to create a kind of "reference only"
> > sections with MOT V1.2 Metrowerks Compiler & Linker.
> > With "reference only" I mean sections were the linker calculates
> > the object addresses but does not generate any code. For example,
> > for objects placed in an external I2C eeprom, I need to know the
> > object addresses but I don't need any space allocation, I use to
> > do this in the 2500AD assembler using "reference only" sections.
> > I know about the Metrowerks "NO_INIT" sections and I use them to
> > define internal EEPROM, but these kind of sections can't overlap.
> > Maybe there is a very simple way to do this in C, but I don't imagine it.
> > Any suggestion will be appreciated.
> > Thanks in advance,
> >
> > Regards,
> >
> > Guillermo Molina.
> > Buenos Aires.
> > ARGENTINA
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> > --------------------------------------------------------
> > To unsubscribe from this group, send an email to:
> >
> >
> > To learn more about Motorola Microcontrollers, please visit
> > http://www.motorola.com/mcu
> >
> >
> >
> >
> >
> >
>
> --------------------------------------------------------
> To unsubscribe from this group, send an email to: > To learn more about Motorola Microcontrollers, please visit
> http://www.motorola.com/mcu >





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

RE: "Reference Only" sections in Metrowerks MOT V1.2 - Guillermo F. Molina - Mar 7 15:16:00 2003

Dear Daniel and Erich,

Thank you very much for your help.

I will try to setup the linker to use overlaping NO_INIT sections and see what happens.

Regards,
Guillermo.

On 6 Mar 2003 at 12:45, Daniel Friederich wrote:

> - PAGED sections are NO_INIT sections which are allowed to overlap. Use it instead of the NO_INIT.
> - I think you can also change the linker messages to link anyway, even if NO_INIT's do overlap.
>
> Bye
>
> Daniel > > -----Original Message-----
> > From: Erich Styger [mailto:]
> > Sent: Thursday, March 06, 2003 9:06
> > To:
> > Subject: RE: [68HC12] "Reference Only" sections in Metrowerks MOT V1.2
> >
> >
> > Here is how you can call a function and accessing an object
> > without allocating it:
> >
> > #define erase ((void(*)(void))(0xfc06))
> > #define MyAbsVar (*(char*)(0x1344))
> >
> > void main(void) {
> > erase(); /* call function at address 0xfc06 */
> > MyAbsVar = 5; /* store at address 0x1344 */
> > }
> >
> > Erich
> >
> > > -----Original Message-----
> > > From: Guillermo F. Molina [mailto:]
> > > Sent: Samstag, 1. Marz 2003 17:02
> > > To:
> > > Subject: [68HC12] "Reference Only" sections in Metrowerks MOT V1.2
> > >
> > >
> > > Hi all,
> > >
> > > Does any of you know how to create a kind of "reference only"
> > > sections with MOT V1.2 Metrowerks Compiler & Linker.
> > > With "reference only" I mean sections were the linker calculates
> > > the object addresses but does not generate any code. For example,
> > > for objects placed in an external I2C eeprom, I need to know the
> > > object addresses but I don't need any space allocation, I use to
> > > do this in the 2500AD assembler using "reference only" sections.
> > > I know about the Metrowerks "NO_INIT" sections and I use them to
> > > define internal EEPROM, but these kind of sections can't overlap.
> > > Maybe there is a very simple way to do this in C, but I don't imagine it.
> > > Any suggestion will be appreciated.
> > > Thanks in advance,
> > >
> > > Regards,
> > >
> > > Guillermo Molina.
> > > Buenos Aires.
> > > ARGENTINA
> > >
> > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > >
> > >
> > > --------------------------------------------------------
> > > To unsubscribe from this group, send an email to:
> > >
> > >
> > > To learn more about Motorola Microcontrollers, please visit
> > > http://www.motorola.com/mcu
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> > --------------------------------------------------------
> > To unsubscribe from this group, send an email to:
> >
> >
> > To learn more about Motorola Microcontrollers, please visit
> > http://www.motorola.com/mcu
> >
> >
> >
> >
> > --------------------------------------------------------
> To unsubscribe from this group, send an email to: > To learn more about Motorola Microcontrollers, please visit
> http://www.motorola.com/mcu >




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )