Content originally posted in LPCWare by xultz on Mon Apr 14 07:01:04 MST 2014
Thank you very much for the reply.
Maybe I'm drinking too much coffee, I though LPC1768 as the mBed processor, and type LPC2168, and I have no idea where that code come from :)
I understand that probably (I didn't check it yet) I'll need to modify the code to change the port for a led in the mBed board. My first duty was trying to compile the example code as it is, and is successful, modify it to work on the mBed, but it failed on the first step.
So, I downloaded all the LPCOpen examples.
I built the lpc_board_nxp_lpcxpresso_1769 code, and here is the result:
Building file: ../src/board.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_LPCOPEN -DCORE_M3 -I"C:\Users\christian\Documents\LPCXpresso_7.1.1_125\workspace\lpc_chip_175x_6x\inc" -I"C:\Users\christian\Documents\LPCXpresso_7.1.1_125\workspace\lpc_board_nxp_lpcxpresso_1769\inc" -Og -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m3 -mthumb -specs=redlib.specs -MMD -MP -MF"src/board.d" -MT"src/board.d" -o "src/board.o" "../src/board.c"
../src/board.c: In function 'Board_I2C_Init':
../src/board.c:267:2: warning: enumeration value 'I2C_NUM_INTERFACE' not handled in switch [-Wswitch]
switch (id) {
^
Finished building: ../src/board.c
Building file: ../src/board_sysinit.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_LPCOPEN -DCORE_M3 -I"C:\Users\christian\Documents\LPCXpresso_7.1.1_125\workspace\lpc_chip_175x_6x\inc" -I"C:\Users\christian\Documents\LPCXpresso_7.1.1_125\workspace\lpc_board_nxp_lpcxpresso_1769\inc" -Og -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m3 -mthumb -specs=redlib.specs -MMD -MP -MF"src/board_sysinit.d" -MT"src/board_sysinit.d" -o "src/board_sysinit.o" "../src/board_sysinit.c"
Finished building: ../src/board_sysinit.c
Building file: ../src/lpc_phy_smsc87x0.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_LPCOPEN -DCORE_M3 -I"C:\Users\christian\Documents\LPCXpresso_7.1.1_125\workspace\lpc_chip_175x_6x\inc" -I"C:\Users\christian\Documents\LPCXpresso_7.1.1_125\workspace\lpc_board_nxp_lpcxpresso_1769\inc" -Og -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m3 -mthumb -specs=redlib.specs -MMD -MP -MF"src/lpc_phy_smsc87x0.d" -MT"src/lpc_phy_smsc87x0.d" -o "src/lpc_phy_smsc87x0.o" "../src/lpc_phy_smsc87x0.c"
Finished building: ../src/lpc_phy_smsc87x0.c
Building target: liblpc_board_nxp_lpcxpresso_1769.a
Invoking: MCU Archiver
arm-none-eabi-ar -r "liblpc_board_nxp_lpcxpresso_1769.a" ./src/board.o ./src/board_sysinit.o ./src/lpc_phy_smsc87x0.o
c:\nxp\LPCXpresso_7.1.1_125\lpcxpresso\tools\bin\arm-none-eabi-ar.exe: creating liblpc_board_nxp_lpcxpresso_1769.a
Finished building target: liblpc_board_nxp_lpcxpresso_1769.a
make --no-print-directory post-build
Performing post-build steps
arm-none-eabi-size "liblpc_board_nxp_lpcxpresso_1769.a" ; # arm-none-eabi-objdump -h -S "liblpc_board_nxp_lpcxpresso_1769.a" >"liblpc_board_nxp_lpcxpresso_1769.lss"
text data bss dec hexfilename
1072 0 0 1072 430board.o (ex liblpc_board_nxp_lpcxpresso_1769.a)
156 0 0 156 9cboard_sysinit.o (ex liblpc_board_nxp_lpcxpresso_1769.a)
576 0 18 594 252lpc_phy_smsc87x0.o (ex liblpc_board_nxp_lpcxpresso_1769.a)
I built the lpc_chip_175x_6x code, and here is the result: (just the last lines)
make --no-print-directory post-build
Performing post-build steps
arm-none-eabi-size "liblpc_chip_175x_6x.a" ; # arm-none-eabi-objdump -h -S "liblpc_chip_175x_6x.a" >"liblpc_chip_175x_6x.lss"
text data bss dec hexfilename
404 0 0 404 194adc_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
4792 0 0 4792 12b8can_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
80 0 0 80 50chip_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
760 0 0 760 2f8clock_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
0 0 0 0 0cmp_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
0 0 0 0 0crc_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
56 0 0 56 38dac_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
0 0 0 0 0eeprom_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
0 0 0 0 0emc_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
528 0 4 532 214enet_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
1348 96 8 1452 5acgpdma_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
0 0 0 0 0gpio_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
0 0 0 0 0gpioint_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
1620 84 120 1824 720i2c_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
720 0 0 720 2d0i2s_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
408 0 0 408 198iap.o (ex liblpc_chip_175x_6x.a)
128 0 0 128 80iocon_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
0 0 0 0 0lcd_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
156 0 0 156 9cpmu_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
360 0 0 360 168ring_buffer.o (ex liblpc_chip_175x_6x.a)
92 0 0 92 5critimer_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
388 0 0 388 184rtc_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
0 0 0 0 0sdc_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
0 0 0 0 0sdmmc_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
468 0 0 468 1d4spi_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
1084 0 0 1084 43cssp_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
172 0 12 184 b8stopwatch_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
20 0 0 20 14sysctl_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
260 0 0 260 104sysinit_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
128 0 0 128 80timer_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
1036 0 1 1037 40duart_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
44 0 0 44 2cwwdt_17xx_40xx.o (ex liblpc_chip_175x_6x.a)
And when I try to built the periph_blinky code, I still get the error:
Building target: periph_blinky.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -Xlinker -Map="periph_blinky.map" -Xlinker --gc-sections -mcpu=cortex-m3 -mthumb -T "periph_blinky_Release.ld" -o "periph_blinky.axf" ./example/src/cr_startup_lpc175x_6x.o ./example/src/sysinit.o ./example/src/systick.o -llpc_board_nxp_lpcxpresso_1769 -llpc_chip_175x_6x
c:/nxp/lpcxpresso_7.1.1_125/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -llpc_board_nxp_lpcxpresso_1769
c:/nxp/lpcxpresso_7.1.1_125/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -llpc_chip_175x_6x
collect2.exe: error: ld returned 1 exit status
make: *** [periph_blinky.axf] Error 1
Any clues?