We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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).
Care explaining what will be the "dummy" character of this not-quite-main() function, and why you think you need something like that?
__main is different function, it unpacks the statics and later calls main
I want to update my firmware over the air.
So i want to try execute other function in the place of main().
And i want to try over write my code in internal flash via iap command.
But my current running operation system execution was stop when i erase all flash for updating code.
I already received .hex file via uart and write into internal flash.
But i failed to update in the place of old firmware.
Please give me any suggestion how can update firmware??
Please explain me how can i create dummy main() with different name?
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.
See Broeker's reply - you really do not need to do that! It is pointless!
http://www.catb.org/esr/faqs/smart-questions.html#goal
Md.Nasir said:I want to update my firmware over the air
So have you looked at how others do that?
It is a very common requirement indeed - there are plenty of examples on the interwebs.
Almost certainly, NXP themselves will have an example.
The lpc1768 was the very first MCU for mbed - so there will be solutions there.
Google "lpc1768 bootloader" and "lpc1768 firmware update", etc ...