ProMicro Won't Restart After Successfully Downloading & Running

I have a project that I have developed on a UNO but as I’m wanting to compact the physical size so I tried running it on a ProMicro.
Code previously developed on UNO downloads & runs OK while ProMicro is connected to IDE but when I disconnect this now programmed ProMicro to another port or external power pack of the correct voltage the code won’t run.

To simplify the debugging I downloaded ‘Blink’ to the ProMicro and it runs fine flashing the inbuilt LED but when I take this now programmed ProMicro and plug it into another USB code won’t run.

Linking the ProMicro normally internally held HIGH Reset pin to Ground won’t reset. Could be that USB serial port no longer connected ??? Don’t know ???

Any help appreciated ???

If the sketch waits for the USB port to be ready (Serial), it will get stuck in an infinite loop when there is no computer USB connection. Comment out the code and see if it will run. The ProMicro has a 32u4 microcontroller so the Serial port is native USB, not UART.

void setup()
{
    ...
    while (!Serial);
    ...
}

If this does not help, post your code.

Update: ProMicro does not have a reset button so use a wire to connect RST to ground.

*** SOLVED - ProMicro (a sparkfun clone) does not like LED_BUILTIN ****

Look at the code below which is just an amendment to the standard Blink example:

When using LED_BUILTIN which I understand to be portable between all Arduino I have the problem. use a different constant name and all OK

// original code from http://www.arduino.cc/en/Tutorial/Blink as follows:

//int LED_BUILTIN = 17;
int RXLED = 17;

void setup() {
// initialize digital pin LED_BUILTIN as an output.
// pinMode(LED_BUILTIN, OUTPUT);
pinMode(RXLED, OUTPUT);
}

void loop() {
// digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(RXLED, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
// digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
digitalWrite(RXLED, LOW); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
}

The initial sections are for posting in English. If you want to post in other languages scroll down to find an appropriate one (some suggestions highlighted):

quangvhome:
The initial sections are for posting in English. If you want to post in other languages scroll down to find an appropriate one (some suggestions highlighted):

?????????????? quangnhome what is your point ?????