Release Build problems LPCOpen Lpc11U68

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

Release Build problems LPCOpen Lpc11U68

Jump to solution
2,491 Views
jDrum
Contributor III

I am trying to implement a release version of my LPCOpen program.  In the debug configuration I am able to properly download the program to my custom PCB using a Link II interface.

So far, I changed the project configuration to Release and did a build all command.  No errors were reported.

I am using the MCUXpresso IDE and have tried the various Run commands from various places. 

The error I am getting is     
Error starting process.
Cannot run program "C:\nxp\workspace\demos_switch_blinky\Debug\demos_switch_blinky.axf": Launching failed.  It repeats the message three times.

The Debug and the Release directories in the project are similar, but the first item

"demos_switch_blinky.axf -[arm/le] "  is missing from the Release directory.

How do I get it there?

I am reading the two makefiles now.

jDrum

Labels (1)
Tags (2)
0 Kudos
1 Solution
2,373 Views
jDrum
Contributor III

Hello again.

The answer to the problem is that the Run command from the MCU IDE does not support the LPCopen.

There is a GUI flash tool.  It is not found from any of the IDE menus, but it does have an icon.

From there, the debug version can be put into flash.  In principle, the release *axf file can also be flashed.

jDrum

View solution in original post

Tags (1)
0 Kudos
9 Replies
2,397 Views
jDrum
Contributor III

Hello again.  Two weeks later:

We tried to do the release build once again. 

The project workspace was moved to a fresh directory and the previous suggestions have been implemented.

The release build was done for the project, the chip and the board projects.  All compiled with zero errors and warnings.

 The last two paragraphs in the build were:

//*************************************

Building target: no2son.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"C:\Users\John\Documents\4 Sondes\workspace\lpc_chip_11u6x\Release" -L"C:\Users\John\Documents\4 Sondes\workspace\lpc_board_nxp_lpcxpresso_11u68\Release" -Xlinker -Map="no2son.map" -Xlinker --gc-sections -Xlinker --allow-multiple-definition -mcpu=cortex-m0 -mthumb -T "no2son_Release.ld" -o "no2son.axf" ./src/I2C.o ./src/PressTemp.o ./src/clock.o ./src/cr_startup_lpc11u6x.o ./src/crp.o ./src/l_UART.o ./src/l_ad.o ./src/main.o ./src/mtb.o ./src/sysinit.o -llpc_board_nxp_lpcxpresso_11u68 -llpc_chip_11u6x
Finished building target: no2son.axf

make --no-print-directory post-build
Performing post-build steps
arm-none-eabi-size "no2son.axf"; # arm-none-eabi-objcopy -O binary "no2son.axf" "no2son.bin" ; checksum -p LPC11U68 -d "no2son.bin";
text data bss dec hex filename
28184 68 2344 30596 7784 no2son.axf

18:07:11 Build Finished. 0 errors, 0 warnings. (took 2s.206ms)

//****************************************************

The lpc11u68 was connected by using a Link2.  It works for the debug version.

Do we need to do a release version for the Link2 as well?  Probably has a 43xx chip.

The run release command (green triangle) builds the release version again but does not launch. (the first time, it tried to launch but reported it could not.)

The "problems page" lists two errors and five warnings. 

//*****************************************************

Description Resource Path Location Type
fatal error: chip.h: No such file or directory board.h /lpc_board_nxp_lpclink2_4370/inc line 35 C/C++ Problem

Description Resource Path Location Type
make: *** [src/subdir.mk:23: src/board.o] Error 1 lpc_board_nxp_lpclink2_4370 C/C++ Problem

//**************************************************************

Any suggestions?

jDrum

Tags (1)
0 Kudos
2,382 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello jDrum,

 Release version is directly program version, can't debug. 

 

BR

Alice

0 Kudos
2,378 Views
jDrum
Contributor III

Hello @Alice_Yang 

I guess the question is:  How do I get the release program into my LPC11U68? Why does the run command not work?

I guess that I am too used to Microchip computers.  When I want the program to stay as it is for the next power up, (but without debug capability) I use the run command from the IDE.

I've considered using Flash Magic but this is really a round-about-solution and it would still involve the Link2 since I don't have the USB or the extra RS232 wire installed on the PCB.

jDrum

0 Kudos
2,374 Views
jDrum
Contributor III

Hello again.

The answer to the problem is that the Run command from the MCU IDE does not support the LPCopen.

There is a GUI flash tool.  It is not found from any of the IDE menus, but it does have an icon.

From there, the debug version can be put into flash.  In principle, the release *axf file can also be flashed.

jDrum

Tags (1)
0 Kudos
2,453 Views
jDrum
Contributor III

Further progress on problem:

We have given up on building a release version and are working at getting the debug version to work again.

We have noticed two additional problems that might be causing the program upload problems.

1.  A second PCB  with a LPC11U68 was tested.  We were able to upload  one of the saved versions of the program.  We suspect that the chip on the first PCB had locked out the upload capability.  We are searching for a previous post on how to unlock it. Do you know where it is?

2.  In looking at the project file tree in the NXP workspace, we found several redundant copies of the source directory and debug directories in the project.  We suspect that the cause was that there were two XML project files in the project!

With the exporting of the files for backup purposes, the files grew quite large.

We are now cleaning the workspace to get rid of the extra files. 

jDrum

 

 

0 Kudos
2,447 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello jDrum,

1) About the "clocked out " chip, you can try to enter ISP mode, then use Flash Magic to erase all.

Delete ".metadata" folder under Workspace of IDE, then connect board to download and debug again.

2)About Release, you can change from below:

Alice_Yang_0-1638860517146.png

Pay attention, if your project bases on LPCopen lib, LPCopen chip and board libraries also need change to Release when compile. 

 

BR

Alice

0 Kudos
2,471 Views
jDrum
Contributor III

More progress (?) :

We tried switching back to the previously working debug build.  Now it won't run.

So, we are doing a manual build on all of the items that we changed for the release build.  I hope it works.

The architecture for LPCOpen/MCUXresso  is very strange.  In some ways it is very powerful, but the IDE certainly doesn't support often used procedures such as changing to the release build.  Other IDEs are able to to that with a single click.

jDrum

0 Kudos
2,466 Views
jDrum
Contributor III

Response #3:

Tried debug build again.  Several message boxes during the launch.

The console reported the following:

MCUXpresso IDE RedlinkMulti Driver v11.3 (Jan 11 2021 16:41:13 - crt_emu_cm_redlink build 9)
Found part description in XML file LPC11U6x.xml
Reconnected to existing LinkServer process.
Probe Firmware: LPC-LINK2 CMSIS-DAP V5.361 (NXP Semiconductors)
Serial Number: KZB4BYKS
VID:PID: 1FC9:0090
USB Path: \\?\hid#vid_1fc9&pid_0090&mi_00#7&217425a0&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
Failed on connect: Em(01). Cannot find MEM-AP selected by core index (check target power)
Connected&Reset. Was: NotConnected. DpID: 0BC11477. CpuID: 00000000. Info: <None>
Last stub error 0: OK
Last sticky error: 0x0 AIndex: 0
No debug bus (MemAp) selected
DAP Speed test unexecuted or failed
Debug protocol: SWD. RTCK: Disabled. Vector catch: Enabled.
(100) Target Connection Failed

 

Any hint on what to do next?

jDrum

0 Kudos
2,489 Views
jDrum
Contributor III

Update on my progress.

We manually did a release build on the board project and the chip project.

Going back to the target project, we did another build. 

At this point the Release folder now has an axf entry, but that entry still has the debug icon.

The binary folder has two identical axf entries, each with the same debug icon.

The lauch error message box is still the same:

Error starting process.
Cannot run program "C:\nxp\workspace\demos_switch_blinky\Debug\demos_switch_blinky.axf": Launching failed
Cannot run program "C:\nxp\workspace\demos_switch_blinky\Debug\demos_switch_blinky.axf": Launching failed
Cannot run program "C:\nxp\workspace\demos_switch_blinky\Debug\demos_switch_blinky.axf": Launching failed

jDrum

 

0 Kudos