The above posted code works great on my 2378 board. However, I’ve attempted to modify it and now it no worky. I’ve been racking my head trying to figure out what’s gone wonky.
I currently get error(s) similar to this, followed by a bunch of others messages, when I compile the project “LPC_LCD-ADC_Sample”.
ADC.c:150: warning: implicit declaration of function ‘InitSpi’
ADC.c:150: warning: nested extern declaration of ‘InitSpi’
Eventually these warning turn into this.
c:/gccfd/yagarto/bin/…/lib/gcc/arm-elf/4.2.2/…/…/…/…/arm-elf/bin/ld.exe: BFD
(GNU Binutils) 2.18 assertion fail …/…/binutils-2.18/bfd/elf32-arm.c:6532
C:\gccfd\projects\LPC_LCD-ADC_merged/ADC.c:178: dangerous relocation: (null)
collect2: ld returned 1 exit status
Looks like I didn’t do the declaration correctly. I see them in the .h files perhaps I don’t call for the .h file in the correct location. Or perhaps I’ve buggered the make file some how and the .o files can’t see each other or something. Not really sure what changed from the LCD file to this one and caused the problem. I also don’t know how to fix it.
At the below link are three projects I’m working with.
http://jaredharvey.com/temp/projects_2009-08-29.zip
I’m compiling with the prepackage collection of windows based compiler tools that came with the 2378 board. This includes eclipse Version: 3.4.1 Build id: M20080911-1700, arm-elf-gcc (GCC) 4.2.2, and flash magic.
LPC_LCD_Sample is the slightly modified project from the above posted code and it displays a custom message on the LCD screen. This has been only slightly modified.
LPC_ADC_Sample is a modified copy of a project at a winarm page. It was orginally for a LPC21XX chips, I replaced the LPC21XX.h file with LPC23XX, and it appears to compile. I think it runs. It is to large for RAM so it runs from ROM. It also uses the Thumb mode compression. I found that code here and is also public domain.
http://www.siwawi.arubi.uni-kl.de/avr_p … #gcc_stdio
LPC_LCD-ADC_Sample is a copy of LPC_ADC_Sample, with bits of the LCD code copied and pasted into the orginal sample code.
It does not compile. I have no need for the UART stuff. I seem to recall ADC is defined in there. So I have to keep it, but I’d be willing to remove it from the make file if I can.
My goal is to get the accelerometer displaying on the LCD.
Any help will be much appreciated, and thanks in advance.