Having multiple links or dropout groups on menu

I'm designing a menu and I have two ideas. The menu is a bootstrap stacked tabs style menu.

The first idea is to have a category that you click on and it opens a secondary menu with the links related to the category.

The second is to have all the links on the main menu bar. The problem with the second option is that the height of the menu is limited.

From a usability standpoint, is having a secondary menu recommended? Or should I try as hard as possible to fit all my links on the primary menu?