RLPLite & Keil uVision for Cerbuino Bee

I have a project that requires signal processing at usec levels, and selected the Cerbuino Bee for the task.

The siganl processing is the easy part - the difficulty is getting anything to compile using Keil uVision4.

I am trying the example in the RLPLite pages ( http://wiki.tinyclr.com/index.php?title=RLPLite_Demo ), and cannot get a .bin file.

The messages from uVision are :-

Build target ‘Target 1’
linking…
.\Project1.sct(1): error: L6229E: Scatter description .\Project1.sct is empty.
.\Project1.sct: Error: L6372E: Image needs at least one load region.
Target not created

The uVision Linker control strings are :-

–cpu Cortex-M4 *.o
–scatter “.\Project1.sct”

and the addresses for R/O Base and R/W Base are 0x2001A000 and 0x2009A000 respectively.

The RLP Demo pages do not complete the instructions for setting these parameters, nor for creating the .bin file, and Keil suggest that these may be incorrect for a Cortex M4 SOC, and the default clock is 12MHz, and not 16Mhz as per the Cerbuino board (is the board over-clocking the processor, or is the 16MHz clock not associated directly with the processor?). Keil also suggest using another board that is much more expensive.

Images from the Keil uVision system can be supplied.

Can anyone shed any light on this please?

If I remember correctly, we do not use scatter files. Instead, set the addresses in the project options.

Welcome to the community.

There are at least two typos in my original question.

  1. the Cerbuino Bee runs at 168Mhz (not 16Mhz as stated originally twice), and the Keil MicroVision default is 128MHz (not 12MHz as stated).

  2. From Gus, I will try setting the addresses in the Target and set the flag in the Linker to use the Target settings.

Keil support in the UK got me out of the problem, and the code now compiles.

I now know the speed setting for the target machine (my original figures were all wrong).

Next task is to get it to run via RLPLite.

Gus, would you like me to write up a new RLPLite page just for the FEZ Cerbuino Bee, to enable compilation via Keil MicroVision?

2 Likes

I am not Gus :slight_smile: (he’s got more hair) but I will take the liberty and say it would be great if you provided that. In fact as I read the sentence “Keil support in the UK got me out of the problem, and the code now compiles” I immediately thought to myself I hope you are going to share the info with us.

And, welcome to the community!

Any contributions are much apreciated. Please add a page to the wiki and we all can improve later as needed.

Thanks Gus, I will put up a page when I have finished this project.

Next question, I am missing something here with RLPLite Demo. The example uses

  Add the following assemblies/references to your project if they are not already included:

     GHIElectronics.OSH.NETMF.Hardware
     GHIElectronics.OSH.NETMF.Native
     Microsoft.SPOT.Hardware
     Microsoft.SPOT.Native
     mscorlib 

 Add the following using statements to your program file:

 using System;
 using Microsoft.SPOT;
 using Microsoft.SPOT.Hardware;
 using GHIElectronics.OSH.NETMF.Native;
 using GHIElectronics.OSH.NETMF.Hardware.LowLevel;

This must have been updated at some stage, but I cannot find a reference to any such changes. Can you point me to them please?

They were changed going from 4.1 to 4.2. Looks like we forgot to update that page :slight_smile:

You need

and the library references sound at http://www.ghielectronics.com/support/dotnet-micro-framework

Thanks Gus.

AddressSpace problem fixed in GHI.OSHW.Hardware.LowLevel Namespace, but cannot find

Resources as used in " byte[] binfile = Resources.GetBytes(Resources.BinaryResources.RLPLite); ",

It would be good to get this working!

Your help would be appreciated again please.

resources.getbytes is a core netmf component. Are you saying it doesn’t work, or you just can’t resolve it?

The Way you would get GetBytes to show is when you have a binary resources added to your resources file…

Now in your Solution Explorer Double click on Resources.resx which would open the designer click on Add Resource which will show the Dialog Window find RLPLite file and click Open, if you don’t see your file make sure you change Text File (…) to All Files… now the new file should show in the designer. click it and check the Property Window and make sure its type is set to binary. click save and go back to your code and voila…

Thanks Brett for the reply.

Microsoft Visual C# 2010 Express in Microsoft .NET Micro Framework SDK v4.2 Version 4.2.0.0 is giving :-

Error 1 The name ‘Resources’ does not exist in the current context C:\Documents and Settings\Ian\My Documents\Visual Studio 2010\Projects\RLPLiteSpeedTest1\RLPLiteSpeedTest1\Program.cs 20 30 RLPLiteSpeedTest1

when building :-

using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHI.OSHW.Hardware.LowLevel;
using GHI.OSHW.Native;

namespace RLPLiteTestProgram
{
public class Program
{
public static void Main()
{
const int ARRAYSIZE = 100000;
float TotalTime = 0;
uint TickStart = 0;
uint TickEnd = 0;
int ret = 0;

        byte[] binfile = Resources.GetBytes(Resources.BinaryResources.RLPLite);
        AddressSpace.Write(0xa0000000, binfile, 0, binfile.Length);

This from the RLPLite Demo page at GHI Electronics – Where Hardware Meets Software

The settings in Visual C# for the Solution Explorer are :-

GHI.OSHW.Hardware
GHI.OSHW.Native
Microsoft.SPOT.Hardware
Microsoft.SPOT.Native
mscorlib
System

Is something missing here?

@ Ian - Did you follow the steps outlined by Jay Jay earlier in this thread? It sounds like you might not have added the resulting bin file as a resource to your C# project.

To Jay Jay & taylorza, thanks for your help here, I seem to be fighting too many small problems, and all this is new to me.

I added the RLPLite.bin to the resources as per the Demo instructions, and it is listed.

See this screen shot.

@ Ian - Can you show a screenshot of the resources.resx file open in the designer.

Could you also paste the code of Resources.Designer.cs?

As your project’s name is different from the namespace in the file shown, the Resource class could be created in a different namespace.
If so, then you could either:

  • change the default namespace in the project’s properties
  • add the namespace with using ;

You could also let Visual Studio add the using statement by hovering the mouse over Resources in the code and expand the little something, that will appear unter the class name. Alternatively you can expand that context menu by putting the cursor on Resources in the code and hit SHIFT+ALT+F10.

And just in case: pressing only SHIFT+ALT (without F10)might change the keyboard layout for Visual Studio. If you ever find yourself with a different keyboard layout just hit SHIFT+ALT again. It took me two years to figure out why my keyboard layout constantly switches from german to english and back.

EDIT: And I think the address space for cerb-family starts at 0x2001A000.
0xA0000000 is for the Hydra, I think.

1 Like

@ MarkusFriedel - Good catch on the namespace. That might well be the issue.

To MarkusFriedel & taylorza

Thanks for the help with this. I tried the approach of getting the Visual Studio to expand the “Resources” in the code, and the picture shows what I got back.

I tried debugging it, and got the results shown - not sure where next?

Good spot on the address being for the FEZ Hydra! Thanks - I missed that one! You can see that I corrected it in the program.

The help that I have received is much appreciated, and a lot more than I have seen from other communities with other problems. Thanks.

The namespace was the problem, and the default namespace was used, see the picture below.

This from the properties for the project.

Now to tackle the Exception problem if you can help please.

To andre.marschalek,

Thanks for the reply. Yes, that was the message produced. The solution was to correct the namespace name, as suggested by taylorza and MarkusFriedel (see their posts)>

But thanks for the reply.

Now moving on the Exception error, which is produced by the emulator, and after Deploy, and looking at the other posts showing the same error (lots of them!) I haven’t yet found a solution. Is it a problem in the .NETMF? Or am I talking rubbish? (Please reply politely!).