This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Control does not come to application main loop

Hi All,
After long time I was trying to recompile and load the firmware in MCB2300 board and uversion 4.
This project was actually developed for a hardware which was developed based on MCB2300 board schematic and uversion 3.

To a maximum end i have copied the configuration of existing settings to uversion 4.

Now my problem is that program control does not reach main loop. I have a boot loader running. So here i have given the last few lines of boot loader code.

/* Run appliication at specified address */
static void cmd_run (char *par)
{
  int run_addr;
  U32 i;
  PFV fp;

  run_addr = DEFAULT_RUN_ADDR; // #define DEFAULT_RUN_ADDR      0x10000

  fp = (PFV)(run_addr);
  DEBUG_Printf("Run applicaiton at 0x%x...\n", run_addr);
  for (i=0x1000;i!=0; i--);
  (*fp)();
}

on-chip
IROM1 = 0x10000 0x80000

on-chip
Default IRAM1 = 0x40000040 0xFFC0 IRAM2 = 0x7FE00000 0x4000 NoInit

Can anyone point me what would be the problem here?

Parents Reply Children
  • No, actually I don't.

    The Keil sample code is filled with lousy pieces of trash that may end up totally destroying an unsuspecting users day some random day.

    That "tout" loop could potentially work better than your "i" loop, in case "tout" happens to be volatile. But the actual delay will still depend a lot on compiler settings and compiler version.

  • Hi thanks for your reply.

    I am wondering who is replying in "d kmr" name. But its not me.

    Why the delay loop before jumping to application? It is wrongfully implemented, anyway...
    As Per said its a delay time for serial printing. Serial message is very little useful. So less worry.

    Lets come to the real problem.
    Forgot to remap interrupt vectors? Look in your startup file/user manual for details.
    I have copied the LPC2300.s file from working project to here.
    But do i have to still lookin to this file?

    Or can i create another small project with my current project configurations and startup files?
    What else i should copy to my new project environment if i want to narrow down the issue?

  • "But do i have to still look in to this file?"

    Of course you do!

    Unless you know that the other project is identical to yours, you will have to check that the files meest the specific requirements of your new project.

    (of course, if the other project were identical to yours, you would just use that entire project as-is)

  • Define these macros in your assembly tab:

    REMAP RAM_INTVEC
    

  • Hi Tamir,
    Thanks for your reply. Defining that macro did not help. Even the original project is facing the same problem. Difference is old uvision3 now its uvision4. Hardware vice original controller is LPC2378 now also its same.

    I am wondering during this kind of migration what are things should be taken care.
    However i will spend time in LPC2300.s file to get more info.