Pinmap not found for peripheral error for external led blinking circuit with Nucleo F303RE

Hello I am trying to make a blinking led circuit externally. Here is my code.

#include “mbed.h”

DigitalOut myled(PC_7);

int us = 500;

int main()

{

while (true) {

    myled = 1;

    wait_us(us);

    myled = 0;

    wait_us(us);

}

}

If I use myled = 1 and myled = 0 with wait time I get this error.
++ MbedOS Error Info ++
Error Status: 0x80010130 Code: 304 Module: 1
Error Message: pinmap not found for peripheral
Location: 0x8004F57
Error Value: 0xFFFFFFFF
For more info, visit: mbedos-error
– MbedOS Error Info –

++ MbedOS Error Info ++
Error Status: 0x80010130 Code: 304 Module: 1
Error Message: pinmap not found for peripheral

If you can educate me and help me with this code it would be much appreciated.
Thanks

Hi,

please, provide also MbedOS version and tool what you use.
For good code formatting in your post use these symbols ``` before and after your code.

BR, Jan