Castillo's mental competency has been questioned because he's received treatment for mental issues over the past two years, but the judge said - after reading the evaluations of psychiatrists - Castillo is able assist in his defense.
Castillo has pleaded not guilty by reason of insanity to all the charges against him.
Investigators say Castillo was armed with pipe bombs, ammunition and two shotguns when he showed up on the campus of Orange High School on August 30, 2006. He was able to get past school security and shoot into a window on campus. A bullet grazed one student and glass cut another before he was stopped.
Castillo admitted to the crimes in video footage and police say he also talked about the shootings as he was being arrested.
Castillo told police, "He made me suffer all his life. Someone had to put him out of his misery" - an apparent reference to his father.
When an officer asked, "What did he do to you?"
Castillo replied, "He abused me and my family. He was abused too."
An Orange High School student who was at the school the day of the shooting recalled the event. "I heard gunshots and everybody was running, saying, 'Oh my God. Oh my God.'"
Since his arrest, Castillo has been at Central Prison awaiting trial.
Investigators have said Castillo was obsessed with the 1999 Columbine, Colo., high school massacre and sent an e-mail to the Columbine principal before the North Carolina attack.