On Wed, Aug 22, 2012 at 12:43 PM, Robert Henig <rhe...@redwoodsys.com> wrote: > Hi JM, > > This is exactly what we do. The bootloader I speak of is the copy-load > program you refer to. Since our code is more then 1/2 the available space in > the MSP we have an external EEPROM. The bootloader checks there to see if > there is code ready for upgrade on startup. The bootloader implements an I2C > driver to do it's job. It's that driver that is shared that I would like to > call from mspgcc compiled code. The bootloader was compiled using the IAR > compiler. > > When I get a chance I'm going to look into the __attribute__ suggestion the > Jessy Frey suggested. If I find a working solution I'll post it. >
Before you spend too much time on that: as the maintainer of mspgcc for the last two years, I don't think there's any way to do what you want within the compiler. There is no facility for alternative calling conventions in the msp430 back-end. regparm exists as an attribute only for the x86 back-end. I would follow the stub approach suggested by Chris, with wrappers for each of the functions in the untouched I2C driver. Peter > Bob. > > > On Aug 22, 2012, at 4:15 AM, JMGross wrote: > >> - to ensure that the device is always in a workable state, the area of the >> copy-load including the interrupt table is never replaced. Application and >> its vector table are placed below the copy-loader. interrupt calls are >> forwarded (introducing 5 clock cycles additional ISR latency) > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users