Yuri Petriaev

CW for ColdFire 6.4, target MCF5307, conversion problem MBAR to register *

Discussion created by Yuri Petriaev on Jun 25, 2007
Latest reply on Jul 5, 2007 by Yuri Petriaev

I have following statement that does not compile:

volatile register MCF5307_IMM *imm = &__MBAR;

Where : ___MBAR        = ADDR(sim); defined in lcf file.

The error states: Error   :

 illegal implicit conversion from 'unsigned long *' to
'volatile MCF5307_IMM *'
led.c line 40       volatile register MCF5307_IMM *imm = &__MBAR;

Any idea why it does not compile?

As long as it's register, it should not have a problem.

Thank you.

 

Outcomes