Home arrow Support arrow Forums

Luminary Micro Forums

<< Start < Prev 1 2 3 4 5 6 7 8 Next > End >>

femtotech

Expert Boarder

2008/07/02 12:27

Re:CodeSourcery, DriverLib and first steps

Ok, I got it.

I'll try to follow your advice. I admit I find quite difficult to configure Eclipse from zero.
Maybe I can see how it's configured by the evaluation version and then try to do the same.

Regards
Marco

login or register to reply

ravaz

Platinum Boarder

2008/07/02 13:33

Re:CodeSourcery, DriverLib and first steps

Try to follow this procedure (hope can be helpful for other forum users having the same troubles):



Eclipse+CDT:

http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/ganymede/R/ eclipse-cpp-ganymede-win32.zip
Download the file and unzip it in a folder of your preference.
You must add the Zylin embedded CDT, just use the help->update in eclipse, add the following update site http://www.zylin.com/zylincdt and install it.



Cygwin:

http://www.cygwin.com/
Download the installer and run it using the defaults.
The make file provided with cygwin has a problem with windows path. You can use the cs-make provided with codesourcery lite or replace the cygwin one with http://www.cmake.org/files/cygwin/make.exe
Ensure you have "C:/cygwin/bin" in the path.



Codesourcery:

http://www.codesourcery.com/gnu_toolchains/arm/portal/subscription?@template=lite
Download and install using the defaults. Ensure you have "C:/Program Files/CodeSourcerySourcery G++ Lite/bin" in the windows path.



OpenOCD:

http://openfacts.berlios.de/index-en.phtml?title=Open_On-Chip_Debugger
I didn't find an updated vesion of OpenOCD working for cortex in binary form (the one in FreeRTOS is very old). For that reason I build one from sources and I also added a new command called cond_write_image, this command is used to downlaod the image to the flash if not already present (diff file included in the archive).

An archive file with a preconfigured eclipse workspace and the OpenOCD binary can be downloaded there:

http://www.mediafire.com/?mmnth9cw99n.


Let us know about your progress in order to update/correct this procedure.



Regards

Post edited by: ravaz, at: 2008/07/23 16:40

login or register to reply

cb1

Platinum Boarder

2008/07/02 13:50

Re:CodeSourcery, DriverLib and first steps

Hi ravaz,

We forum users owe you our thanks for your detailed, caring posts. They are appreciated. (my group still doesn't have the "stomach" to move from IAR/Keil - sometimes ones time/mental health reduce the appeal of "free") Appears a nice market for a "complete" installation - just download the zip file - everything pre-designed and done correctly.

login or register to reply

femtotech

Expert Boarder

2008/07/02 16:57

Re:CodeSourcery, DriverLib and first steps

ravaz wrote:
Try to follow this procedure (hope can be helpful for other forum users having the same troubles):


Thank you very much for sharing this guide!
I'm sure I can't do the dance without.

I followed your notes step-by-step and all seems ok.

The problem is Eclipse don't know I have the Stellaris CodeSourcery installed... If I create a new project I can't see this toolchain listed. How to tell Eclipse I want to use CodeSourcery?


A question. You wrote:


target remote localhost:3333
monitor flash cond_write_image erase "path to your bin file" 0 bin


That means every time I want to debug a different project I need to change the path manually?
Is there a variable that points to the bin file automatically after a build?

Thanks again
Marco

login or register to reply

ravaz

Platinum Boarder

2008/07/02 23:12

Re:CodeSourcery, DriverLib and first steps

You will not use the project wizard anymore, cause this is part of the non-free features of codesourcery. In place you can use standart make file project. Here is a fully functional example of eclipse workspace http://www.mediafire.com/?mmnth9cw99n.

The project hello world is working with the lm3s6965 evaluation kit.


For the debugin you will ned to create a new launcher with a different path for each project.



Regards

Post edited by: ravaz, at: 2008/07/23 15:48

login or register to reply

femtotech

Expert Boarder

2008/07/04 15:29

Re:CodeSourcery, DriverLib and first steps

3)Normally adding the header in the include path and the library in the library path should be enough

I still can't build successfully driverlib examples due to "undefined reference" errors.

I'm trying the ek-lm3s6965_revchello sample program.
I added the following paths:


Project properties -> C/C++ Build -> GCC C Compiler -> Directories -> Include Paths:
"C:ProgrammiCodeSourceryDriverLibboardsek-lm3s6965_revchello"



Project properties -> C/C++ Build -> GCC C Linker -> Libraries -> Library Search Paths:
"C:ProgrammiCodeSourceryDriverLibsrcsourcerygxx"
"C:ProgrammiCodeSourceryDriverLibboardsek-lm3s6965_revchellosourcerygxx"


Tried also *gcc.

The compile command is:

arm-stellaris-eabi-gcc -I"C:ProgrammiCodeSourceryDriverLibboardsek-lm3s6965_revchello" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"hello.d" -MT"hello.d" -o"hello.o" "../hello.c"


No errors.

The linker command is:

arm-stellaris-eabi-gcc -L"C:ProgrammiCodeSourceryDriverLibsrcsourcerygxx" -L"C:ProgrammiCodeSourceryDriverLibboardsek-lm3s6965_revchellosourcerygxx" -T lm3s6965-rom-hosted.ld -o"sample"

This exits with the following errors:


C:Documents and SettingsMarcoworkspacesampleDebug/../hello.c:68: undefined reference to `SysCtlClockSet'
C:Documents and SettingsMarcoworkspacesampleDebug/../hello.c:74: undefined reference to `RIT128x96x4Init'
C:Documents and SettingsMarcoworkspacesampleDebug/../hello.c:79: undefined reference to `RIT128x96x4StringDraw'
C:Documents and SettingsMarcoworkspacesampleDebug/../hello.c:84: undefined reference to `DiagExit'


Surely I miss something, but I can't see where.
May you help me, please?

Thanks in advance
Marco

login or register to reply
<< Start < Prev 1 2 3 4 5 6 7 8 Next > End >>