03-15-2010 06:18 AM
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!
03-19-2010 08:43 AM
Hi MihaiC,
I just wanted to confirm, are you using the LabVIEW Embedded module for ARM, or the LabVIEW Embedded module for Microprocessor SDK?
03-19-2010 09:47 AM
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!
03-22-2010 03:00 PM
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.
03-23-2010 06:04 PM
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!
03-24-2010 04:40 PM
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?
03-24-2010 04:59 PM
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?
03-25-2010 03:42 AM
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.
03-25-2010 03:32 PM
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.
04-14-2010 03:36 PM
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!