How to link Emwin Library

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

How to link Emwin Library

1,657 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lintovincent88 on Tue May 05 03:08:46 MST 2015
Hi nxp,
  I would like add some graphics (3d buttons,image) in to my project.am using ssd1963 display.i heard that emwin library is free for nxp users.i downloaded the library but i didnt get how to link that library to my project.well my controller is LPC4088.




thanks and regards
Linto.
Labels (1)
0 Kudos
7 Replies

968 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Tue May 12 05:45:59 MST 2015
You are trying to link >2Mb of data (your images?) :
1. That is not going to fit in 64K of RAM, however hard you try
2. Regardless of RAM, it is not going to fit into the on-chip flash either (it copies from Flash to RAM at
startup - which you probably wouldn't want to do for image data anyway)

I think you need to go back to the drawing board on what you are trying to do.
0 Kudos

968 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lintovincent88 on Tue May 12 04:20:06 MST 2015
hi.,

   thanks for your reply., i think the library got linked, the old errors are not showing now.,but the new problem is RAM location overflow. why is it so? how can i solve this ?


This is the error i got :

Building target: touch_calibration_REV_B.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"E:\Workspace_NXPv.7.1\touch_calibration_REV_B\Emwin\emWin_library\LPCXpresso" -Xlinker --gc-sections -Xlinker -Map="touch_calibration_REV_B.map" -flto -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -T "touch_calibration_REV_B_Release.ld" -o "touch_calibration_REV_B.axf"  ./src/SSD1963.o ./src/cr_startup_lpc407x_8x.o ./src/graphics.o ./src/i2c_periph.o ./src/lpc_can.o ./src/main_0085.o ./src/pin_config.o  ./inc/debug_frmwrk.o ./inc/lcd_qvga_tft.o ./inc/lcd_qvga_tft_revPB1.o ./inc/lpc_adc.o ./inc/lpc_bod.o ./inc/lpc_clkpwr.o ./inc/lpc_crc.o ./inc/lpc_dac.o ./inc/lpc_gpio.o ./inc/lpc_i2c.o ./inc/lpc_i2s.o ./inc/lpc_iap.o ./inc/lpc_pinsel.o ./inc/lpc_pwm.o ./inc/lpc_ssp.o ./inc/lpc_systick.o ./inc/lpc_timer.o ./inc/lpc_uart.o ./inc/system_LPC407x_8x_177x_8x.o ./inc/usb_host_init.o  ./Emwin/emWin_header/GUIConf.o ./Emwin/emWin_header/GUI_X.o ./Emwin/emWin_header/LCDConf.o ./Emwin/emWin_header/LCD_X_8080_16.o   -lemWin_M4
c:/nxp/lpcxpresso_7.1.1_125/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: touch_calibration_REV_B.axf section `.bss' will not fit in region `RamLoc64'
c:/nxp/lpcxpresso_7.1.1_125/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: region `RamLoc64' overflowed by 2037448 bytes
E:\Workspace_NXPv.7.1\touch_calibration_REV_B\Emwin\emWin_library\LPCXpresso\libemWin_M4.a(GUI_Task.o): In function `GUI_Unlock':
GUI_Task.c:(.text.GUI_Unlock+0xa): undefined reference to `GUI_X_Unlock'
E:\Workspace_NXPv.7.1\touch_calibration_REV_B\Emwin\emWin_library\LPCXpresso\libemWin_M4.a(GUI_Task.o): In function `GUI_Lock':
GUI_Task.c:(.text.GUI_Lock+0xe): undefined reference to `GUI_X_GetTaskId'
GUI_Task.c:(.text.GUI_Lock+0x16): undefined reference to `GUI_X_Lock'
GUI_Task.c:(.text.GUI_Lock+0x1a): undefined reference to `GUI_X_GetTaskId'
GUI_Task.c:(.text.GUI_Lock+0x34): undefined reference to `GUI_X_GetTaskId'
E:\Workspace_NXPv.7.1\touch_calibration_REV_B\Emwin\emWin_library\LPCXpresso\libemWin_M4.a(GUI_Task.o): In function `GUITASK_Init':
GUI_Task.c:(.text.GUITASK_Init+0x32): undefined reference to `GUI_X_InitOS'
collect2.exe: error: ld returned 1 exit status
make: *** [touch_calibration_REV_B.axf] Error 1

16:46:28 Build Finished (took 14s.16ms)

0 Kudos

968 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri May 08 00:41:44 MST 2015
You need to add the library, itself, to you link options.

See
http://www.lpcware.com/content/faq/lpcxpresso/linking-third-party-libraries
0 Kudos

968 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lintovincent88 on Fri May 08 00:27:21 MST 2015
hi.,

**********************************************************************/
#include "lpc_gpio.h"
#include "lpc_clkpwr.h"
#include "bsp.h"
#include "lpc_ssp.h"
#include "lpc_pinsel.h"
#include "LPC407x_8x_177x_8x.h"
#include "i2c_periph.h"

#include "lpc_timer.h"
#include "lpc_adc.h"
#include "math.h"
#include "pin_config.h"

#include "lpc_uart.h"

#ifdef __BUILD_WITH_EXAMPLE__
#include "lpc_libcfg.h"
#else
#include "lpc_libcfg_default.h"
#endif /* __BUILD_WITH_EXAMPLE__ */


#include "lpc_types.h"

#include "usb.h"
#include "usbcfg.h"
#include "usbhw.h"
#include "usbcore.h"
#include "cdc.h"
#include "cdcuser.h"
#include "serial.h"
#include "vcomdemo.h"
#include"lpc_can.h"
#include "main_0085.h"
#include "SSD1963.h"
#include "graphics.h"
#include "font.h"

#include "GUI.h"

int main(void)
{

GUI_Init();

/*  program*/
}


when i call this gui_init iam getting this error.


12:52:47 **** Incremental Build of configuration Release for project touch_calibration_REV_B ****
make all
Building target: touch_calibration_REV_B.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"C:\nxp\emWin\emWin_library\LPCXpresso" -L"E:\Workspace_NXPv.7.1\touch_calibration_REV_B\Emwin\emWin_library\LPCXpresso" -Xlinker -Map="touch_calibration_REV_B.map" -Xlinker --gc-sections -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -T "touch_calibration_REV_B_Release.ld" -o "touch_calibration_REV_B.axf"  ./src/SSD1963.o ./src/cr_startup_lpc407x_8x.o ./src/graphics.o ./src/i2c_periph.o ./src/lpc_can.o ./src/main_0085.o ./src/pin_config.o  ./inc/debug_frmwrk.o ./inc/lcd_qvga_tft.o ./inc/lcd_qvga_tft_revPB1.o ./inc/lpc_adc.o ./inc/lpc_bod.o ./inc/lpc_clkpwr.o ./inc/lpc_crc.o ./inc/lpc_dac.o ./inc/lpc_gpio.o ./inc/lpc_i2c.o ./inc/lpc_i2s.o ./inc/lpc_iap.o ./inc/lpc_lcd.o ./inc/lpc_pinsel.o ./inc/lpc_pwm.o ./inc/lpc_ssp.o ./inc/lpc_systick.o ./inc/lpc_timer.o ./inc/lpc_uart.o ./inc/system_LPC407x_8x_177x_8x.o ./inc/usb_host_init.o  ./Emwin/emWin_header/GUIConf.o ./Emwin/emWin_header/GUI_X.o ./Emwin/emWin_header/LCDConf.o ./Emwin/emWin_header/LCD_X_8080_16.o ./Emwin/emWin_header/SIMConf.o  
./src/main_0085.o: In function `main':


E:\Workspace_NXPv.7.1\touch_calibration_REV_B\Release/../src/main_0085.c:106: undefined reference to `GUI_Init'
collect2.exe: error: ld returned 1 exit status
make: *** [touch_calibration_REV_B.axf] Error 1

12:52:49 Build Finished (took 1s.516ms)


i included the library path to my project.


/touch_calibration_REV_B/Emwin/emWin_header
/CMSIS_CORE_LPC407x_8x/inc
/${ProjName}/inc

0 Kudos

968 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nerd herd on Thu May 07 07:16:52 MST 2015
Hi lintovincent88,

When you download and install the pre-compiled EmWin libraries, you should have path such as "C:\NXP\EmWin\" on your computer. In this folder should contain the library that you should include in your project, as well as an emWin_header folder. Copy this entire folder into a directory close to your project and make sure you change your compiler settings to include a path to this folder. All of the source files inside this folder is needed for EmWin.
0 Kudos

968 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lintovincent88 on Wed May 06 20:22:18 MST 2015
hi,

  thank you.,i tried that but am getting this error

undefined reference to   "GUI_Init();"
undefined reference to    " GUI_DispString("Hello World!"); ".

i included GUI.h header file stlll getting this error ,don't know how.



0 Kudos

968 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Tue May 05 07:03:00 MST 2015
Hi Linto,
Yes pre-compiled library is free. Please visit emWin page at
http://www.lpcware.com/content/project/emwin-graphics-library

BSP packages show how to integrate library.

You can also look into porting guide at
http://www.lpcware.com/content/nxpfile/emwin-porting-guide-ea-lpc1788-bsp-keil-mcb1700-english-versi...
0 Kudos