To me this gen is already lost, but Nintendo can convince people to pick up the system to complement one of the other two systems. If they expand their library and add more IPs that deviate from what they're currently providing - while continuing to focus on what they do best - I think it will pay them dividends in the long run. They need to diversify their stable.
They have to come out of their shell. Hardshid (or necessity) tends to breed innovation. Nintendo has to adapt to the current realities and get with the program.
Marketing is VERY important. To me, one of the biggest issues with the Cube was the child like image that was attached to it. Nintendo needs to shed this from the Wii U. I thought the GC was great but it was presented (or at least interpreted) as a system for children, and that drove people to the PS2 and XB.
Playstation = The Beast from the East

Sony + Nintendo = WIN! PS3 + PSV + PS4 + Wii U + 3DS







