Arduino.h and wiring_digital.c problem.

alvesjc,

the portOutputRegister(..) currently is returning the actual value of the port register instead of its address.

may you try this:

P_LED = &portOutputRegister(digitalPinToPort(13));

using the & to obtain the address of portOutputRegister.

BTW the definition for RwReg is:

typedef volatile uint32_t RwReg;