This is the mail archive of the
mailing list for the eCos project.
Trouble porting to MPC565
- From: "Fritiofson, Andreas" <andreas dot fritiofson at newmad dot se>
- To: <ecos-devel at ecos dot sourceware dot org>
- Date: Fri, 29 Sep 2006 12:42:35 +0200
- Subject: Trouble porting to MPC565
I'm in the process of porting eCos to a MPC565 based board. It's more or less a simple 565 with no external memory. I've copied the cme555 port as a start and modified not much more than the memory layout and the base address of the serial ports used in hal_diag.c. I've come to a point where i get the redboot prompt at startup and i can write commands to it. If I write a non-existant command i get the reply "Invalid command" as expected. However, if i type a valid command, such as 'help' redboot crashes immediately upon pressing enter.
With the wiggler i have i can locate the point of the crash to mon_write_char (which apparantely worked fine before). It seems that my hal_virtual_vector_table has been corrupted, causing mon_write_char to read the IF_PUTC vector from an incorrect location and jump out to nowhere.
I'm not sure how to proceed. If you have any ideas or pointers on how to find the cause of the corruption i'd be grateful. I turned on CYGPKG_INFRA_DEBUG but it only gave me an infinite stream of "ASSERT FAIL: var_intr.hcyg_hal_interrupt_set_level() Invalid priority" at startup. That seems to be another (unrelated?) problem.
The debugging capabilities i get with the wiggler is not impressive as i cannot even set a breakpoint. I am limited to single-stepping and running until an exception occurs (partly because the code is in rom, partly because the OCD Commander software is incompetent, partly because the gdb interface doesn't support hardware breakpoints). How do people do this?