You are here: Home Documentation Tutorials Using I2C on the Make Contoller Board
Document Actions

Using I2C on the Make Contoller Board


This Tutorial is intended for: Electronics Hackers, Microcontroller Developers

Hardware and Software for I2C on the Make Controller Board.

All content on one page (useful for printing, presentation mode etc.)

  1. Hardware Hardware modifications for accessing I2C on the Make Controller Board
  2. Software Software for the I2C Interface
Attached files
 

Compiler issues - oops

Posted by Ross Wakelin at 2008-04-15 07:16
Hi Bob

Did you have to make any changes to get the twiapi.c to compile? I am having issues with the two ARM include files generating hundreds if not thousands of errors, all to do with some of the statements like EQU in those files.

Compiler issues - oops

Posted by Bob Faulk at 2008-04-16 01:13
It turns out I did change those two files. In ioat91sam7x256.h, I moved the else from line 2744 to the line before the end of the file so the assembly EQU's fell within the #if 0.
In lib_AT91SAM7X256.h, I changed the void parameter on some function prototypes. I don't believe this change was required; I was probably experimenting with compiler warnings. Here is the diff output. Hopefully this will work for you, as I will not be able to check the forum for a few days.
Regards,
Bob

[bobf@www ARM7_AT91SAM7S]$ diff lib_AT91SAM7X256.h ~/fw131/heavy/controller/freertos/portable/GCC/ARM7_AT91SAM7S/lib_AT91SAM7X256.h
60c60
< void (*newHandler)() ) // \arg address of the interrupt handler
---
> void (*newHandler) (void) ) // \arg address of the interrupt handler
135c135
< void (*Handler) (void) ) // \arg Interrupt Handler
---
> void (*Handler) () ) // \arg Interrupt Handler


[bobf@www ARM7_AT91SAM7S]$ diff ioat91sam7x256.h ~/fw131/heavy/controller/freertos/portable/GCC/ARM7_AT91SAM7S/ioat91sam7x256.h
2744c2744
<
---
> #endif
4697c4697
< #endif
---
>

Fixed!

Posted by Ross Wakelin at 2008-04-17 16:10
Thanks for the diffs Bob.
Moving the endif got rid of the errors and the compile/link
finished fine. I didn't bother with the void changes, they are
not necessary, but do get rid of a lot of warnings.
Nice work, much appreciated