Hello,
The LPC1769 code (usbd_lib_cdc_uart) from LPCOpen 2.1.0 is running in Debug mode on my dev kit just fine. However when I try to compile it into Release build I get this error:
What are we missing?
The entire error reads like this:
18:11:49 **** Incremental Build of configuration Release for project usbd_lib_cdc_uart **** make -r -j4 all Building target: usbd_lib_cdc_uart.axf Invoking: MCU Linker arm-none-eabi-gcc -nostdlib -L"C:\Users\Durgesh\Documents\MCUXpressoIDE_10.3.0_2200\workspace\lpc_chip_175x_6x\libs" -Xlinker -Map="usbd_lib_cdc_uart.map" -Xlinker --gc-sections -mcpu=cortex-m3 -mthumb -T "usbd_lib_cdc_uart_Release.ld" -o "usbd_lib_cdc_uart.axf" ./example/src/cdc_desc.o ./example/src/cdc_main.o ./example/src/cdc_uart.o ./example/src/cr_startup_lpc175x_6x.o ./example/src/sysinit.o -llpc_board_nxp_lpcxpresso_1769 -llpc_chip_175x_6x -lusbd_175x_6x_lib c:/nxp/mcuxpressoide_10.3.0_2200/ide/plugins/com.nxp.mcuxpresso.tools.win32_10.3.0.201811011841/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -llpc_board_nxp_lpcxpresso_1769 c:/nxp/mcuxpressoide_10.3.0_2200/ide/plugins/com.nxp.mcuxpresso.tools.win32_10.3.0.201811011841/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -llpc_chip_175x_6x collect2.exe: error: ld returned 1 exit status make: *** [makefile:32: usbd_lib_cdc_uart.axf] Error 1 18:11:49 Build Finished (took 196ms)
解決済! 解決策の投稿を見る。
Hi Zhang,
I was able to resolve this matter completely. My set configurations was not set to Release build hence the libraries were not in the release build mode. I wasn't able to understand what you meant to say earlier but now everything is resolved.
Thank you for your support.
Neel.
Hi
It's right you need build all libs under release mode also.
This is because, when you build application project in release mode, the liker needs link lib files under libraries' "release" folder. see below screenshot. Thus we need make sure those release version lib files have been generated already.
Have a great day,
Jun Zhang
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hello,
Tried as suggested. Still the same situation.
See screenshots below:
Am I doing something wrong?
Please advice.
Thanks
Hi Neel,
When you import library and application project, please check if you checked "copy projects to workspace".
Please go to your workspace to check if the entire library folders exists.
Especially you need check if the .lib file is correctly generated under \Release folder?
I have tested libraries with application under release mode, there is no build error from my side.
Have a great day,
Jun Zhang
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Dear Zhang,
Yes we have copied the projects to the workspace.
Furthermore, we do see that the library folder doesn't exist. See screenshots below:
So yes, seems like we have located the problem.
Can you please suggest how to get this resolved?
We are using LPCOpen 2.1 which was imported from within the MCUExpresso 10.3.
Please advice.
Thanks
Neel.
Hi
So you didn't build lib projects in release mode successfully.
I just recorded a video for you. Please do the same on your side.
After build, see if library files are generated under the release folder as I did in my video.
Have a nice day,
Jun Zhang
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Zhang,
Please share the video.
Neel.
I just attached. Please check.
Hello,
We did the same thing as you suggested. The code that you are suggesting also works fine with Release mode for us but the uart_rb code doesn't compile with Release mode.
See attached video.
Thanks
Neel.
Hi Neel
Dropbox is block on my side, so I can't watch it.
There is no uart_rb demo but I found periph_uart_rb project under lpcopen folder. I built it in release mode, there is no error.
See attached video.
Have a great day,
Jun Zhang
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Please check this video Zhang.
What should I do to get rid of this error? Please advice.
Thanks
Hi,
please check two points:
1. I didn't see you rebuild lib lpc_board_nxp_lpcxpresso_1769, Please rebuild it in release mode also.
2.Please keep only these 3 projects in your IDE project view window. lpc_board_nxp_lpcxpresso_1769, lpc_chip_175x_6x, periph_uart_rb.
Have a great day,
Jun Zhang
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Zhang,
I was able to resolve this matter completely. My set configurations was not set to Release build hence the libraries were not in the release build mode. I wasn't able to understand what you meant to say earlier but now everything is resolved.
Thank you for your support.
Neel.
You need to build the libraries in Release mode as well.