EmbDev.net

Forum: ARM programming with GCC/GNU tools Anybody have a linker script for the LPC1768?


von KennyB (Guest)


Rate this post
useful
not useful
I'm lost! Can't seem to find one. I'm modifying existing ones (LPC17xx) 
based on the memory in the 1768 and I can't get it to vector off and run 
code! I spent years working with the LPC2124 and LPC2138 and never had 
this problem! I developed entire UAV autopilots around these chips. In 
hindsight, I guess I had a good linker to start with because I never had 
to learn this part.

Or reading on this stuff? I'm willing to RTFM.

von Martin Thomas (Guest)


Rate this post
useful
not useful
Examples including Linker-Scripts and startup codes are in the package 
"lpc17xx.cmsis.driver.library.zip" available from nxp.com

Please note that the examples for GNU might use some specials from the 
Codesourcery G++ Lite package (_start from library which seems to copy 
.data and init .bss before calling main()) and might not work with other 
precompiled packages of the GNU toolchain.

von KennyB (Guest)


Rate this post
useful
not useful
Well I got a hold of a similar download

but instead it was named:

"lpc17xx.cmsis.library.zip"

I couldn't get it to work. I'm going to try what you pointed me to now.

von KennyB (Guest)


Rate this post
useful
not useful
This section in make.rules.environment should be pointing to the header 
files, but the compiler is still puking on that.

FWLIB_DIR     =$(BUILD_ROOT)/$(FWLIB)
FWLIB_SRC_DIR =$(FWLIB_DIR)/source
FWLIB_INC_DIR =$(FWLIB_DIR)/include

I can go through and add full paths to the #includes to get past this, 
but I know that is not the right way.


**** Build of configuration Debug for project CMSIS_gnu ****

make all
Building file: ../Examples/WDT/RESET/wdt_reset_test.c
Invoking: ARM Windows GCC C Compiler
arm-elf-gcc -O0 -Wall 
-Wa,-adhlns="Examples/WDT/RESET/wdt_reset_test.o.lst" -c 
-fmessage-length=0 -MMD -MP -MF"Examples/WDT/RESET/wdt_reset_test.d" 
-MT"Examples/WDT/RESET/wdt_reset_test.d" -mcpu=cortex-m3 -mthumb -g3 
-gdwarf-2 -o"Examples/WDT/RESET/wdt_reset_test.o" 
"../Examples/WDT/RESET/wdt_reset_test.c"
../Examples/WDT/RESET/wdt_reset_test.c:19:25: error: lpc17xx_wdt.h: No 
such file or directory
In file included from ../Examples/WDT/RESET/wdt_reset_test.c:20:
../Examples/WDT/RESET/lpc17xx_libcfg.h:23:23: error: lpc_types.h: No 
such file or directory
In file included from ../Examples/WDT/RESET/wdt_reset_test.c:20:
../Examples/WDT/RESET/lpc17xx_libcfg.h:139: error: expected ')' before 
'*' token
../Examples/WDT/RESET/wdt_reset_test.c:21:28: error: lpc17xx_pinsel.h: 
No such file or directory
../Examples/WDT/RESET/wdt_reset_test.c:22:26: error: debug_frmwrk.h: No 
such file or directory
../Examples/WDT/RESET/wdt_reset_test.c:23:26: error: lpc17xx_gpio.h: No 
such file or directory
../Examples/WDT/RESET/wdt_reset_test.c:40: error: expected '=', ',', 
';', 'asm' or '__attribute__' before 'menu1'
../Examples/WDT/RESET/wdt_reset_test.c:52: error: expected '=', ',', 
';', 'asm' or '__attribute__' before 'info1'
../Examples/WDT/RESET/wdt_reset_test.c:53: error: expected '=', ',', 
';', 'asm' or '__attribute__' before 'info2'
../Examples/WDT/RESET/wdt_reset_test.c: In function 'c_entry':
../Examples/WDT/RESET/wdt_reset_test.c:70: warning: implicit declaration 
of function 'debug_frmwrk_init'
../Examples/WDT/RESET/wdt_reset_test.c:73: warning: implicit declaration 
of function '_DBG'
../Examples/WDT/RESET/wdt_reset_test.c:73: error: 'menu1' undeclared 
(first use in this function)
../Examples/WDT/RESET/wdt_reset_test.c:73: error: (Each undeclared 
identifier is reported only once
../Examples/WDT/RESET/wdt_reset_test.c:73: error: for each function it 
appears in.)
../Examples/WDT/RESET/wdt_reset_test.c:76: warning: implicit declaration 
of function 'WDT_ReadTimeOutFlag'
../Examples/WDT/RESET/wdt_reset_test.c:77: warning: implicit declaration 
of function '_DBG_'
../Examples/WDT/RESET/wdt_reset_test.c:77: error: 'info1' undeclared 
(first use in this function)
../Examples/WDT/RESET/wdt_reset_test.c:79: warning: implicit declaration 
of function 'WDT_ClrTimeOutFlag'
../Examples/WDT/RESET/wdt_reset_test.c:81: error: 'info2' undeclared 
(first use in this function)
../Examples/WDT/RESET/wdt_reset_test.c:85: warning: implicit declaration 
of function 'WDT_Init'
../Examples/WDT/RESET/wdt_reset_test.c:85: error: 'WDT_CLKSRC_IRC' 
undeclared (first use in this function)
../Examples/WDT/RESET/wdt_reset_test.c:85: error: 'WDT_MODE_RESET' 
undeclared (first use in this function)
../Examples/WDT/RESET/wdt_reset_test.c:87: warning: implicit declaration 
of function 'WDT_Start'
../Examples/WDT/RESET/wdt_reset_test.c: At top level:
../Examples/WDT/RESET/wdt_reset_test.c:108: error: expected ')' before 
'*' token
make: *** [Examples/WDT/RESET/wdt_reset_test.o] Error 1

von KennyB (Guest)


Rate this post
useful
not useful
When I call make from the command line (but there is such a directory :( 
):

C:\work\eclipse\CMSIS_gnu>make
C:/work/eclipse/CMSIS_gnu/makesection/tools/echo "Building" Drivers 
"support pac
kage source ->" \
        C:/work/eclipse/CMSIS_gnu/Drivers/source
/usr/bin/sh:  C:/work/eclipse/CMSIS_gnu/Drivers/source: No such file or 
director
y
make: *** [fwlib] Error 1

C:\work\eclipse\CMSIS_gnu>

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.