Basically, they are same , but if you put them into different contexts, the two have slight different. For example, if someone asks "你吃早饭了吗?" The answer should be "(是的)我吃早饭了“,but not“我吃了早饭” if someone asks"你吃饭了吗?“ The answer could be "我只吃了早饭(I only had breakfast, no brunch, no high tea, but maybe it's 6pm now)” Hope this helps.