Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Even with NASA and Mars on SpaceX's horizon, serial entrepreneur Elon Musk says he plans to stay put at electric carmaker Tesla.

"I'll continue to be involved with Tesla as far into the future as I can possibly tell...," he said during an interview on CNBC'S "Closing Bell" on Tuesday. "I feel good about being able to produce a compelling mass-market car in the next three years."

Sign up for Science news delivered to your inbox

Tesla shares closed more than 3 percent higher on Tuesday, but edged lower in after-hours trading. (Click here to see what the stock is doing now.)

As his other venture, SpaceX, vies against established players such as Boeing for a big NASA contract, Musk said his firm will just keep going, even if the contract falls through. He noted that SpaceX's progression would be slowed down if the U.S. government doesn't choose the company's Dragon V2 as the next crew carrier to the International Space Station.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"It's possible that we may not win the commercial crew contract. ... We'll do our best to continue on our own, with our own money," Must said. "We would not be where we are today without the help of NASA."

Focused on Mars

For now, he says the company is focused on creating technology that with enable large groups of people to travel to Mars.

"I'm hopeful that the first people could be taken to Mars in 10 to 12 years, I think it's certainly possible for that to occur," he said. "But the thing that matters long term is to have a self-sustaining city on Mars, to make life multiplanetary."

He acknowledged that the company's plans were too long-term to attract many hedge fund managers, which makes it hard for SpaceX to go public anytime soon.

"We need to get where things a steady and predictable," Musk said. "Maybe we're close to developing the Mars vehicle, or ideally we've flown it a few times, then I think going public would make more sense."

Dragon V2 unveiled

SpaceX, which was just named No. 1 on CNBC's second annual CNBC Disruptor 50 list, recently unveiled the Dragon V2, a spacecraft that it hopes will carry NASA astronauts to the International Space Station as soon as 2016.

That announcement came about two weeks after Russia said it would bar the U.S. from using Russian-made rocket engines to launch military satellites.

Since the end of the U.S. space shuttle program, Russian Soyuz spacecraft have been the only way astronauts can get to the space station.

— Karma Allen, CNBC.com