LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Targeting LabVIEW to MCB2140 board using Microprocessor SDK problem

Good day,

I am trying to port an ARM target to LabVIEW. The target is a 32bit uC LPC2148, more exactly a MCB2140 board. I have followed the "LabVIEW Embedded for ARM Porting Guide - Chapter 2: Integration of LabVIEW and Keil Toolchains" and I have a problem with building the library from the "LVAnalysis.Uv2" project. I mention that I have used the "lpc3180solutions" folder from which I have modified the files from Chapter3 as mentioned. The problem is the builder cannot find the "memory.h" file. I am using Keil uVision v4.03 and LabVIEW 2009.

 

Thank you! 

0 Kudos
Message 1 of 32
(4,812 Views)

Hi MihaiC,

 

I just wanted to confirm, are you using the LabVIEW Embedded module for ARM, or the LabVIEW Embedded module for Microprocessor SDK?

 

Regards,
Claire Reid
National Instruments
0 Kudos
Message 2 of 32
(4,756 Views)

Hello ClaireR,

I only had Microprocessor SDK module installed, after installing the ARM module I've managed to build the library and create a project for the MCB2140 target. However I have problems with running even the simplest code.

I had to modify the "STARTUP.S: Startup file for Philips LPC2000" with:

 

IMPORT  Undef_Handler

                IMPORT  SWI_Handler

                IMPORT  PAbt_Handler

 

;Undef_Handler   B       Undef_Handler

;SWI_Handler     B       SWI_Handler

;PAbt_Handler    B       PAbt_Handler

 

 so I could build the project.

 

Secondly in the Options for target "LabVIEW" panel, I don't know if I should use as in the LPC3180 example, the following:

1. RAM_INTVEC, REMAP options in the ASM tab

2. Ext_RAM.ini and Clock.ini, as they do not exist for the MCB2140, in Keil folder

 

When I Run the Main.VI the target is started, the code is running just for a couple of seconds, but the Numeric Indicator doesn't increment.

uVision reports an error :

 

*** error 57: illegal address (0x00000024)

BS 0x23E8, 1

 

0x0000040C  2AFFFFFE  BCS       0x0000040CC - dissasembly

 

The code I am running is the one from the Chapter 2: Integration of LabVIEW and Keil Toolchains

 

I also mention the debugger that I'm using is a KEIL ULINK.

 

Thank you! 

 

0 Kudos
Message 3 of 32
(4,745 Views)

Hi MihaiC,

 

Sorry for the delay, I have been speaking with R&D about this.

 

Please try the following:

1. Navigate to C:\Keil\ARM\Boards\Keil\MCB2140\RTX_Blinky, and open the Blinky.uvs example in Microvision. Build the example. Then go to Debug»Start/Stop Debug Session, then run the example. Does this work fine? If so, you can take the .s file and the RTX_config.c file from this project.

2. One this to also note is the porting guide is meant to be an example of how to port to a board, but does not mean that everything will match up exactly for different boards.

 

Let me know if you run into issues running the RTX_blinky example, if so, we might want to create a service request so we aren't troubleshooting this issue over the forums.

 

 

Regards,
Claire Reid
National Instruments
0 Kudos
Message 4 of 32
(4,716 Views)

Hi ClaireR,

 

I have built and run the RTX_blinky example from Keil and works fine. But still no success with running the LabVIEW project.

I have taken the .s and .c files from the RTX_Blinky, I have included the LVConfig.h in the .c file but I receive the same error. 

In the project, I have included beside the RTX_Config and Startup files, File_Config.c and TargetInit.c from  "..Targets\Keil\Embedded\RealView\Generic\LPC2378\Template\System".

 

The code runs for a couple of seconds and then: 

 

 

*** error 57: illegal address (0x00000028)

BS 0x2384, 1

 

The PC stops at 0x000003F4  

 

0x000003F4  2AFFFFFE  BCS       0x000003F4

 

Thank you! 

 

 

 

0 Kudos
Message 5 of 32
(4,687 Views)

So what I am finding about Error 57 might not relate to what is happening but thought I would send it your way: ARM: MEMORY MISMATCH ERRORS DURING LOAD

 

Can you send me a screen shot of your folder heirachy from your project?

Regards,
Claire Reid
National Instruments
0 Kudos
Message 6 of 32
(4,671 Views)

Also, in Chapter 2 of the porting guide is says:

 "To port an ARM target to LabVIEW, the target must support the RTX Real-Time Kernel. For an ARM target to support live front panel debugging, the target must also work with the Real-Time Agent module.

 

To determine if your target already supports the RTX Real-Time Kernel, browse to the \Keil\ARM\Startup directory, then browse to the folder that corresponds to the manufacturer of your ARM microcontroller. If there is an RTX_Conf*.c file for your target, then the RTX Real-Time Kernel has already been ported for your ARM device. If no such file exists, skip to chapter 4 for more information on the RTX Real-Time Kernel and a guide for porting RTX to your ARM microcontroller."

 

I didn't see a RTX_Conf*.c  file for the LPC2140 in the C:\Keil\ARM\Startup\NXP folder. Did you follow the steps in Chapter 4.

 

Also did you follow the steps in chapter 5?

Regards,
Claire Reid
National Instruments
0 Kudos
Message 7 of 32
(4,664 Views)

Indeed, in the C:\Keil\ARM\Startup\NXP folder there is no RTX config file for the LPC2148, but in C:\Keil\ARM\Startup\Philips are RTX_Conf_LPC21xx.c and Startup.s

The uC manufacturer is Philips so I guess these files are suitable. Secondly, I ran the RTX_Blinky project from Keil which worked, and it uses the RTX Kernel.

I've compared the 2 RTX_Config files, the one from  C:\Keil\ARM\Startup\Philips and from Keil RTX_Blinky and they are the same.

 

In conclusion I haven't followed the Chapter 4 & 5 tutorial. Am I missing something? 

 

I've attached the screenshot of the LabVIEW project.

 

 

0 Kudos
Message 8 of 32
(4,655 Views)

Sorry, you aren't missing something... I just looked in the wrong folder.

 

I am currently working on porting to this board. I am running into some issues and am working with R&D. I will attach  my files once I get it to work.

Regards,
Claire Reid
National Instruments
0 Kudos
Message 9 of 32
(4,634 Views)

Hi ClaireR,

 

I have been out of town for 2 weeks so I couldn't work any longer on the porting. 

Have you managed to make it work?

 

Thank you!

 

0 Kudos
Message 10 of 32
(4,513 Views)