Newsgroup: it.hobby.elettronica.digitale
Titolo: Eclipse e ARM LM

Ciao,
ho dovuto formattare urgentemente il pc e sto procedendo al ripristino 
dei vari tool, aggiornandoli alle nuove versioni.
Come sempre mi scontro con i Luminary Micro :)
Allora ho:
- scaricato Eclipse + CDT
- installato il compilatore (CodeSourcery EABI Lite)
- installato StellarisWare
- aggiunto in Eclipse lo zylincdt
Domande:
1) devo compilare le librerie StellarisWare? Con che cosa, MinGW?
2) come faccio a dire a Eclipse che voglio usare la toolchain della 
CodeSourcery? Non mi compare nell'elenco...
3) dove trovo il file OpenOCD.exe necessario per connettersi alla scheda 
di programmazione?
Grazie!
Marco

 di programmazione?
Le risposte le ho trovate qui:
http://www.matthewkendall.com/freesoftware/stellaris-toolchain
Mi sono bloccato in un errore apparentemente assurdo nel Makefile.
Non mi trova gli include, eppure mi sembra di averli configurati 
correttamente. Questo è il makefile:
PART=LM3S1918
ROOT=C:/Programmi/StellarisWare/
BINARY_NAME=Thunder_n_Lightning
LINKER_SCRIPT=standalone.ld
include ${ROOT}/makedefs
IPATH=${ROOT}
all: ${COMPILER}
all: ${COMPILER}/$(BINARY_NAME).axf
clean:
	@rm -rf ${COMPILER} ${wildcard *~}
	@echo DONE
${COMPILER}:
	@mkdir ${COMPILER}
${COMPILER}/$(BINARY_NAME).axf: ${COMPILER}/main.o
${COMPILER}/$(BINARY_NAME).axf: ${COMPILER}/startup.o
${COMPILER}/$(BINARY_NAME).axf: ${COMPILER}/AD5663.o
${COMPILER}/$(BINARY_NAME).axf: ${COMPILER}/ff.o
${COMPILER}/$(BINARY_NAME).axf: ${COMPILER}/wave.o
${COMPILER}/$(BINARY_NAME).axf: ${COMPILER}/timerUtils.o
${COMPILER}/$(BINARY_NAME).axf: ${COMPILER}/ustdlib.o
${COMPILER}/$(BINARY_NAME).axf: ${COMPILER}/random.o
${COMPILER}/$(BINARY_NAME).axf: ${ROOT}/driverlib/${COMPILER}/libdriver.a
ENTRY=ResetISR
ifneq (${MAKECMDGOALS},clean)
-include ${wildcard ${COMPILER}/*.d} __dummy__
endif
nel main.c richiamo gli header Stellaris, come ad esempio:
#include "inc/hw_memmap.h"
che sono effettivamente presenti nella cartella:
C:/Programmi/StellarisWare/inc
eppure il compilatore mi restituisce l'errore "no such file or directory".
C'è un errore evidente?
Marco

 C'è un errore evidente?
Prova a modificare la direttiva IPATH con 
IPATH+=${ROOT}
Domani posso girarti il makefile che uso di solito, fai un fischio se ti 
serve. 

 serve.
Mi faresti un favore, anche se temo ci sia qualcosa che mi sfugge perché 
anche io avevo in giro il makefile che usavo prima e funzionava a dovere.
Probabilmente è cambiato qualcosa nella reinstallazione ma non riesco a 
vedere cosa.
Marco

 Niente, fa la stessa cosa.
Nel makedefs che viene incluso utilzza la variabile OUTFOLDER, che nel
makefile non viene inizializzata. Prova a sancire, ad esempio:
 OUTFOLDER=${shell pwd}
Di seguito ti allego il mio makefile per giocare con l'applicazione demo al
percorso /boards/ek-lm3s6965/enet_lwip:
ifdef DEBUG
OUT_FOLDER = bin/debug
else
OUT_FOLDER = bin/release
endif
CURRENT_FOLDER=${shell pwd}
DRIVERLIB_FOLDER= SW-LM3S-4423
#
# Include the common make definitions.
#
include makedefs
BINARY_NAME=lm3s6965
LINKER_SCRIPT=standalone.ld
ENTRY=ResetISR
#########################################################
#Add aditional compilser flags
#########################################################
CFLAGS+=-D GCC_ARMCM3_LM3S6965 -D sprintf=usprintf -D snprintf=usnprintf -D
printf=UARTprintf
CPPFLAGS+=-D GCC_ARMCM3_LM3S6965 -D sprintf=usprintf -D snprintf=usnprintf -D
printf=UARTprintf
#########################################################
#VPATH contains all the source files path
#########################################################
#Application
VPATH=.
VPATH+=./lib
VPATH+=./user
#utils
VPATH+=../${DRIVERLIB_FOLDER}/utils
VPATH+=../${DRIVERLIB_FOLDER}/boards/ek-lm3s6965/drivers/
VPATH+=../${DRIVERLIB_FOLDER}/third_party/fatfs/src/
VPATH+=../${DRIVERLIB_FOLDER}/third_party/fatfs/port/
VPATH+=../${DRIVERLIB_FOLDER}/third_party/lwip-1.3.0
VPATH+=../${DRIVERLIB_FOLDER}/third_party/lwip-1.3.0/src/include/lwip
VPATH+=../${DRIVERLIB_FOLDER}/third_party/lwip-1.3.0/src/core
VPATH+=../${DRIVERLIB_FOLDER}/third_party/lwip-1.3.0/src/api
VPATH+=../${DRIVERLIB_FOLDER}/third_party/lwip-1.3.0/apps/httpserver_raw
#########################################################
#IPATH contains all the header files path
#########################################################
#Application
IPATH=.
IPATH+=./lib
IPATH+=./user
#utils
IPATH+=../${DRIVERLIB_FOLDER}/utils
IPATH+=../${DRIVERLIB_FOLDER}/boards/ek-lm3s6965/
#driverlib
IPATH+=../${DRIVERLIB_FOLDER}
IPATH+=../${DRIVERLIB_FOLDER}/driverlib
IPATH+=../${DRIVERLIB_FOLDER}/inc
IPATH+=../${DRIVERLIB_FOLDER}/third_party/
IPATH+=../${DRIVERLIB_FOLDER}/third_party/lwip-1.3.0/apps
IPATH+=../${DRIVERLIB_FOLDER}/third_party/lwip-1.3.0/src/include
IPATH+=../${DRIVERLIB_FOLDER}/third_party/lwip-1.3.0/src/include/ipv4
IPATH+=../${DRIVERLIB_FOLDER}/third_party/lwip-1.3.0/ports/stellaris/include
# Add the include file paths to CFLAGS.
INCLUDES=${patsubst %,-I%,${subst :, ,${IPATH}}}
#########################################################
# The default rule
#########################################################
all: makedir
all: ${OUT_FOLDER}/$(BINARY_NAME).elf
#########################################################
# The rule to clean out all the build products.
#########################################################
clean:
	@rm -rf ${OUT_FOLDER} settings
	@rm -rf ${wildcard *~} ${wildcard *.Bak} ${wildcard *.dep}
	@echo DONE
#########################################################
# The rule to create the target directory.
#########################################################
makedir:
	@mkdir -p ${OUT_FOLDER}
	@echo " --> WORKING DIR=${CURRENT_FOLDER} " 
	@echo 
	@echo " -----------------------------------------------------------"
#########################################################
#Objects from sources
#########################################################
#Application
${OUT_FOLDER}/${BINARY_NAME}.elf: ${OUT_FOLDER}/startup.o
${OUT_FOLDER}/${BINARY_NAME}.elf: ${OUT_FOLDER}/rit128x96x4.o
${OUT_FOLDER}/${BINARY_NAME}.elf: ${OUT_FOLDER}/SoftTimer.o
${OUT_FOLDER}/${BINARY_NAME}.elf: ${OUT_FOLDER}/run_led.o
${OUT_FOLDER}/${BINARY_NAME}.elf: ${OUT_FOLDER}/key.o
${OUT_FOLDER}/${BINARY_NAME}.elf: ${OUT_FOLDER}/run_led.o
${OUT_FOLDER}/${BINARY_NAME}.elf: ${OUT_FOLDER}/enet_lwip.o
${OUT_FOLDER}/${BINARY_NAME}.elf: ${OUT_FOLDER}/lmi_fs.o
${OUT_FOLDER}/${BINARY_NAME}.elf: ${OUT_FOLDER}/ff.o
${OUT_FOLDER}/${BINARY_NAME}.elf: ${OUT_FOLDER}/mmc-ek-lm3s6965.o
${OUT_FOLDER}/${BINARY_NAME}.elf: ${OUT_FOLDER}/lwiplib.o
${OUT_FOLDER}/${BINARY_NAME}.elf: ${OUT_FOLDER}/httpd.o
#Utils
${OUT_FOLDER}/${BINARY_NAME}.elf: ${OUT_FOLDER}/ustdlib.o
${OUT_FOLDER}/${BINARY_NAME}.elf: ${OUT_FOLDER}/uartstdio.o
#########################################################
#Libraries
#########################################################
#Libraries
ifdef DEBUG
${OUT_FOLDER}/${BINARY_NAME}.elf:
./${DRIVERLIB_FOLDER}/driverlib/debug/libdriver.a
else
${OUT_FOLDER}/${BINARY_NAME}.elf:
./${DRIVERLIB_FOLDER}/driverlib/release/libdriver.a
endif
#########################################################
# Include the automatically generated dependency files.
#########################################################
-include ${wildcard ${OUT_FOLDER}/*.d} __dummy__

 endif
anche io avevo questo segmento ma andando ora a guardare le nuove 
librerie non ho le cartelle debug e release. Ma sotto la cartella 
StellarisWare ho driverlib/gcc/libdriver.a
Di tutti i file oggetto però ho la versione .o e .d che dovrebbero 
essere appunto release e debug. La libreria invece è una sola... cosa 
significa?
Le ho compilate con un make all.
Ciao e grazie ancora
Marco