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

How to create dummy main() function in Keil?

I am using lpc1768 MCU and id keiluvesion4.

I want to create dummy main() function with different name like mains().

And i want to execute my dummy mains() function. 

In startup file i replaced __main into __mains.

But compiler give error.

Undefined symbol mains (referred from sartuplpc17xx.o).

Parents
  • None of that will be helped in any way by changing the names of functions. 

    Flash over-the-air means you will eventually have between two and three separate programs in the device: the currently running application, optionally a more-or-less complete new one in the process of loaded from the air, and a bootloader that decides which of the other two is which.  For that to work, you need some assistance from the hardware (vector table base switching, and/or a full MMU).  It may require building the code with position independency features for that.

Reply
  • None of that will be helped in any way by changing the names of functions. 

    Flash over-the-air means you will eventually have between two and three separate programs in the device: the currently running application, optionally a more-or-less complete new one in the process of loaded from the air, and a bootloader that decides which of the other two is which.  For that to work, you need some assistance from the hardware (vector table base switching, and/or a full MMU).  It may require building the code with position independency features for that.

Children
No data