Hello all, Preliminary version of SPI test cases are now working with emulator through runtime. It took quit long for me to figure out multiple definition rule, right order of dependencies in makefile and also how to merge spi library compilation into Runtime/make/app.mk. @Pekka I made little changes in the runtime coding with regard to testing and compatibility with library scripts. It would be good to go through these changes together, may be after your summer holidays. I will inform you till Monday about SPI testing (after thorough testing). BR, Asif. On Fri, Jul 4, 2014 at 8:48 AM, Pekka Nikander <pekka.nikander@xxxxxx> wrote: > > On 2014–07–03, at 20:09 , Asif Sardar <engr.asif.sardar@xxxxxxxxxxxxxx> > wrote: > > > I was compiling the SPI from library by including the .o files inside > the app.mk e.g. following lines added > > > > APP_OBJS ?= main.o $(APP).o $(VARIANT).o wiring_digital.o > wiring_digital_pinMode.o ellduino_Serial.o ellduino_spi.o SPIClass.o > spiStruct.o > > > > VPATH += $(TOP)cores/arduelli $(TOP)variants/$(VARIANT) > $(TOP)libraries/SPI > > > > Also, I splitted the wiring_digital.h and wiring_digital_pinmode.h into > there own source (.c) files to avoid multiple declaration, because the > SPIClass.h is also including the wiring_digital.h using the digitalWrite > and pinMode functions. The files are attached to the e-mail. > > > > Still I am getting following error: > > > > ellduino_spi.o: In function `SPIClass::begin(unsigned char) const': > > > /home/asif/Ell-i-Working-Directory/Ell-i-Software-Development/Runtime/stm32/build/../libraries/SPI/./SPIClass.h:81: > undefined reference to `digitalWrite' > > ellduino_spi.o: In function `SPIClass::activate_ss(unsigned char)': > > > /home/asif/Ell-i-Working-Directory/Ell-i-Software-Development/Runtime/stm32/build/../libraries/SPI/./SPIClass.h:183: > undefined reference to `digitalWrite' > > ellduino_spi.o: In function `SPIClass::deactivate_ss(unsigned char)': > > > /home/asif/Ell-i-Working-Directory/Ell-i-Software-Development/Runtime/stm32/build/../libraries/SPI/./SPIClass.h:184: > undefined reference to `digitalWrite' > > > > Any good ideas? > > For a quick fix, try changing the order of the objects in the command > line. If that does not help, then I guess SPIClass.h is referring to > digitalWrite as a C++ function while it is declared as a C function, or > something similar. Please check how the files get included and if there > are any warnings. > > --Pekka > > -- *With Best Regards,Asif Sardar.+358 43 8265795*