Problems getting CANopen_onChip example project for LPC11C24 to work

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problems getting CANopen_onChip example project for LPC11C24 to work

701 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mk1 on Tue Aug 13 07:27:01 MST 2013
Hi all,

I have recently purchased an LPCXpresso board for the LPC11C24 in order to test the on-chip CANopen drivers. However, I am unable to get it to build.

I am trying to use the CANopen_onChip example project. I included the CMSIS files from "C:\nxp\LPCXpresso_5.2.4_2122\lpcxpresso\Examples\NXP\LPC1000\LPC11xx" but am still getting a multitude of errors and warnings (below).

Surely I must be doing something wrong as I am guessing the examples for a demo board should "just work" - but I have never used the LPCXpresso IDE before and so I am struggling to find my way around.

Can anyone provide any insight to get the CAN demo up and running??

I am also not sure if the ROM regions are already reserved in the example - is this done, or how do I do it?

Thanks!



15:14:45 **** Incremental Build of configuration Debug for project CANopen_onChip ****
make all 
Building file: ../src/cr_startup_lpc11.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p00_LPC11xx -I"D:\_SVN\LPCXpresso\workspace\CANopen_onChip\CMSISv2p00_LPC11xx\inc" -Os -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/cr_startup_lpc11.d" -MT"src/cr_startup_lpc11.d" -o "src/cr_startup_lpc11.o" "../src/cr_startup_lpc11.c"
Finished building: ../src/cr_startup_lpc11.c
 
Building file: ../src/main.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p00_LPC11xx -I"D:\_SVN\LPCXpresso\workspace\CANopen_onChip\CMSISv2p00_LPC11xx\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/main.d" -MT"src/main.d" -o "src/main.o" "../src/main.c"
../src/main.c:31:1: warning: return type defaults to 'int' [-Wreturn-type]
../src/main.c: In function '__BSS':
../src/main.c:37:1: error: parameter 'rom' is initialized
../src/main.c:42:1: error: parameter 'ClkInitTable' is initialized
../src/main.c:45:1: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:45:1: warning: (near initialization for 'ClkInitTable') [enabled by default]
../src/main.c:57:1: error: parameter 'callbacks' is initialized
../src/main.c:70:1: error: parameter 'myConstOD' is initialized
../src/main.c:72:2: warning: braces around scalar initializer [enabled by default]
../src/main.c:72:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:72:2: warning: initialization makes pointer from integer without a cast [enabled by default]
../src/main.c:72:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:72:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:72:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:72:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:72:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:72:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:72:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:73:2: warning: braces around scalar initializer [enabled by default]
../src/main.c:73:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:73:2: warning: initialization makes pointer from integer without a cast [enabled by default]
../src/main.c:73:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:73:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:73:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:73:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:73:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:73:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:73:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:73:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:73:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:74:2: warning: braces around scalar initializer [enabled by default]
../src/main.c:74:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:74:2: warning: initialization makes pointer from integer without a cast [enabled by default]
../src/main.c:74:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:74:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:74:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:74:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:74:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:74:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:74:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:74:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:74:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:75:2: warning: braces around scalar initializer [enabled by default]
../src/main.c:75:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:75:2: warning: initialization makes pointer from integer without a cast [enabled by default]
../src/main.c:75:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:75:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:75:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:75:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:75:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:75:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:75:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:75:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:75:2: warning: (near initialization for 'myConstOD') [enabled by default]
../src/main.c:86:1: error: parameter 'myOD' is initialized
../src/main.c:88:2: warning: braces around scalar initializer [enabled by default]
../src/main.c:88:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:88:2: warning: initialization makes pointer from integer without a cast [enabled by default]
../src/main.c:88:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:88:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:88:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:88:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:88:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:88:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:88:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:89:2: warning: braces around scalar initializer [enabled by default]
../src/main.c:89:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:89:2: warning: initialization makes pointer from integer without a cast [enabled by default]
../src/main.c:89:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:89:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:89:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:89:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:89:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:89:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:89:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:89:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:89:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:90:2: warning: braces around scalar initializer [enabled by default]
../src/main.c:90:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:90:2: warning: initialization makes pointer from integer without a cast [enabled by default]
../src/main.c:90:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:90:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:90:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:90:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:90:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:90:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:90:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:90:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:90:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:91:2: warning: braces around scalar initializer [enabled by default]
../src/main.c:91:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:91:2: warning: initialization makes pointer from integer without a cast [enabled by default]
../src/main.c:91:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:91:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:91:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:91:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:91:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:91:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:91:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:91:2: warning: excess elements in scalar initializer [enabled by default]
../src/main.c:91:2: warning: (near initialization for 'myOD') [enabled by default]
../src/main.c:95:29: error: storage class specified for parameter 'myCANopen'
../src/main.c:95:1: error: parameter 'myCANopen' is initialized
../src/main.c:109:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
../src/main.c:131:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
../src/main.c:138:36: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
../src/main.c:145:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
../src/main.c:150:64: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
../src/main.c:158:83: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
../src/main.c:166:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
../src/main.c:95:29: error: declaration for parameter 'myCANopen' but no such parameter
../src/main.c:86:13: error: declaration for parameter 'myOD' but no such parameter
../src/main.c:82:10: error: declaration for parameter 'param' but no such parameter
../src/main.c:81:10: error: declaration for parameter 'fw_ver' but no such parameter
../src/main.c:80:10: error: declaration for parameter 'device_id' but no such parameter
../src/main.c:79:10: error: declaration for parameter 'error_register' but no such parameter
../src/main.c:70:18: error: declaration for parameter 'myConstOD' but no such parameter
../src/main.c:57:15: error: declaration for parameter 'callbacks' but no such parameter
../src/main.c:54:10: error: declaration for parameter 'CANOPEN_sdo_exp_write' but no such parameter
../src/main.c:53:10: error: declaration for parameter 'CANOPEN_sdo_exp_read' but no such parameter
../src/main.c:50:6: error: declaration for parameter 'CAN_error' but no such parameter
../src/main.c:49:6: error: declaration for parameter 'CAN_tx' but no such parameter
../src/main.c:48:6: error: declaration for parameter 'CAN_rx' but no such parameter
../src/main.c:42:10: error: declaration for parameter 'ClkInitTable' but no such parameter
../src/main.c:39:13: error: declaration for parameter 'msg_obj' but no such parameter
../src/main.c:37:7: error: declaration for parameter 'rom' but no such parameter
../src/main.c:31:22: error: declaration for parameter 'CAN_driver_memory' but no such parameter
../src/main.c:217:1: error: expected '{' at end of input
../src/main.c:217:1: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [src/main.o] Error 1

15:14:49 Build Finished (took 4s.579ms)

0 Kudos
Reply
2 Replies

638 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mk1 on Wed Aug 14 00:53:38 MST 2013
Hmm.. just replied but it's not showing up - hopefully this won't now double post..

I am unable to follow those instructions since that zip file is not available on the nxp website. I am redirected to http://www.nxp.com/techzones/microcontrollers-techzone/news.html.

However, I was able to download LPC11xx-LPCXpresso-CMSIS-updateV1_01_0.zip from this site so hoped that this would also work.

I have now found NXP_LPCXpresso11C24_2011-01-27.zip so will use that instead of the ones in the instructions.

It appears to now build - thank you!!

However, in the readme file, it says to reserve the memory block for the drivers - is this already setup? I cannot see any reference in the project properties.

When I try to debug on the board, I get no CAN message out so I guess there is still something wrong. I have moved jumper SJ2 over and am supplying +5V to TP_ALT_VCAN.
0 Kudos
Reply

638 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Aug 13 09:52:39 MST 2013
Did you follow the Getting Started guide for importing Example Projects (Chapter 5)? For the CanOpen example, you need to import Examples\NXP\LPC1000\LPC11xx\NXP_LPCXpresso11C24_2011-01-27.zip
0 Kudos
Reply