Nevermind... I found out that the problem was when the 2nd Application tried to set the VPB clock again. I just skip that setting in the 2nd app and it all works great! --- In lpc2000@yahoogroups.com, givc@y... wrote: > Hi everyone, > > In the project I'm working on, I'm loading two separate applications > to the LPC2119 Flash, the first one is the Boot Application and the > 2nd is the Main Application. I make the final binary file with a > small App I made. > > The Boot App is in first two sectors and the Main App has 13 sectors > available from 3rd to 15th sector(not at the very beginning of 3rd > sector because I save App Version, App Size and Checksum first and > then the Main App Code). > > #define APPLICATION_ADDRESS ((unsigned char*) 0x00004010) > #define APPLICATION_VERSION_ADDRESS ((unsigned long*) 0x00004000) > #define APPLICATION_SIZE_ADDRESS ((unsigned long*) 0x00004004) > #define APPLICATION_CHECKSUM_ADDRESS ((unsigned short*) 0x00004008) > > From the BootApp the MainApp is called this way: > > (defined and declared at the beginning) > typedef void (*tFuncP)(); > > (In Main() function...) > tFuncP pFunction; > > pFunction = (tFuncP)(APPLICATION_ADDRESS); > (*pFunction)(); > > Ok, when I call the MainApp, the program restarts itself and the > BootApp is executed again. DOES ANYONE KNOWS IF THERE'S SOMETHING > TRICKY TO DO BEFORE BE ABLE TO CALL ANOTHER APPLICATION?? > > Both Applications have their own entry file(in asm) and I'm using > MEMMAP to remap the vector table to the base of RAM. Before the > MainApp is called i copy their first 64 bytes to the base of RAM so > it has the MainApp Vector table. > > Hope somebody can help me... > > Thanks in advance!
Message
Re: Working with two Applications (Boot and MainApp)
2004-07-29 by givc@yahoo.com
Attachments
- No local attachments were found for this message.