EMX to G120E Error a3000000

Hi
I converted a old EMX project to G120E in 2 steps:
Step 1: adapt for .net 4.1> 4.3, tested on EMX with .net 4.3: OK.
Step 2: adapt for G120E (changed only some IO pin names).
Log when deploying to G120E:
Create TS.

Loading start at a0e6945c, end a0e988f0

Assembly: mscorlib (4.3.1.0) Assembly: Microsoft.SPOT.Native (4.3.1.0) Assembly: Microsoft.SPOT.Security.PKCS11 (4.3
.1.0) Assembly: System.Security (4.3.1.0) Assembly: Microsoft.SPOT.Hardware (4.3.1.0)
Assembly: Microsoft.SPOT.Graphics (4.3.1.0) Assembly: Microsoft.SPOT.TinyCore (4.3.1.0)
Assembly: Microsoft.SPOT.IO (4.3.1.0) Assembly: System.IO (4.3.1.0) Assembly: Microsoft.SPOT.Hardware.Usb (4.3.1.0)
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.3.1.0) Assembly: Microsoft.SPOT.Touch (4.3.1.0)
Assembly: Microsoft.SPOT.Ink (4.3.1.0) Assembly: Microsoft.SPOT.Hardware.PWM (4.3.1.0)
Loading Deployment Assemblies.

Attaching deployed file.
Assembly: Hardware (1.0.0.0) Attaching deployed file.
Assembly: GHI.Hardware (4.3.8.1) Attaching deployed file.
Assembly: System.Xml.Legacy (4.3.1.0) Attaching deployed file.
Assembly: GHI.Glide (4.3.8.1) Attaching deployed file.
Assembly: GHI.Pins (4.3.8.1) Resolving.

Link failure: some assembly references cannot be resolved!!

Assembly: Hardware (1.0.0.0) needs assembly ‘Classes’ (1.0.0.0)
Assembly: Hardware (1.0.0.0) needs assembly ‘Global’ (1.0.0.0)
Assembly: GHI.Glide (4.3.8.1) needs assembly ‘System.Xml’ (4.3.1.0)
Error: a3000000

The program ‘[1] Micro Framework application: Managed’ has exited with code 0 (0x0).
Waiting for debug commands…

I seem to be missing something. On the EMX not. All references have the right version.
A new small Glide Hello World! project runs fine on the G120.

Please help

1 Like

what firmware version do you have deployed on the G120? Capture a screenshot from Fez Config.

The error is in:

[quote]Assembly: Hardware (1.0.0.0) needs assembly ‘Classes’ (1.0.0.0)
Assembly: Hardware (1.0.0.0) needs assembly ‘Global’ (1.0.0.0)[/quote]
which are three assemblies from your code. Looks like you’ve not compiled a dependent project or something.

[quote]Assembly: GHI.Glide (4.3.8.1) needs assembly ‘System.Xml’ (4.3.1.0)[/quote] looks like you also need another assembly included.

Hi Brett,
My last reply seems to have disappeared.
Thanks for the quick reply.
The G120 has the default firmware ( img included).
The assemblies from my code and system.xml are present. Since the project works on the EMX it must be complete.
The linker woluld complain if not.
Dig

the project is telling you what is missing.

[quote]Link failure: some assembly references cannot be resolved!!

Assembly: Hardware (1.0.0.0) needs assembly ‘Classes’ (1.0.0.0)
Assembly: Hardware (1.0.0.0) needs assembly ‘Global’ (1.0.0.0)
Assembly: GHI.Glide (4.3.8.1) needs assembly ‘System.Xml’ (4.3.1.0)
Error: a3000000
[/quote]
It cannot resolve “Classes” and “Global” and “System.XML”.

[quote]Assembly: mscorlib (4.3.1.0) Assembly: Microsoft.SPOT.Native (4.3.1.0) Assembly: Microsoft.SPOT.Security.PKCS11 (4.3
.1.0) Assembly: System.Security (4.3.1.0) Assembly: Microsoft.SPOT.Hardware (4.3.1.0)
Assembly: Microsoft.SPOT.Graphics (4.3.1.0) Assembly: Microsoft.SPOT.TinyCore (4.3.1.0)
Assembly: Microsoft.SPOT.IO (4.3.1.0) Assembly: System.IO (4.3.1.0) Assembly: Microsoft.SPOT.Hardware.Usb (4.3.1.0)
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.3.1.0) Assembly: Microsoft.SPOT.Touch (4.3.1.0)
Assembly: Microsoft.SPOT.Ink (4.3.1.0) Assembly: Microsoft.SPOT.Hardware.PWM (4.3.1.0)
Loading Deployment Assemblies.

Attaching deployed file.
Assembly: Hardware (1.0.0.0) Attaching deployed file.
Assembly: GHI.Hardware (4.3.8.1) Attaching deployed file.
Assembly: System.Xml.Legacy (4.3.1.0) Attaching deployed file.
Assembly: GHI.Glide (4.3.8.1) Attaching deployed file.
Assembly: GHI.Pins (4.3.8.1) Resolving.
[/quote]
nowhere in the second list do those assemblies appear. System.XML.Legacy appears, but that’s not System.XML. And nowhere is your “Classes” and “Global”.

There’s no question here, you need to resolve these three assembly missing errors

Hi Brett,
I cannot understand why these items are missing.
These items are refrenced (see project layout).
They are present when I deploy the project to an EMX. How do they disappear when I deploy the code to the G120?
Can I send you the project ?
Dig

sure, happy to take a look at it and test deploy to Cobra and Cobra 2 (EMX and G120). Zip it up and put it somewhere (my Hotmail address is in my profile if you want to share to me in OneDrive or something)

PS: I’d try clean building from scratch too…

It may happen when you deploy on different hardwares. I used to observe this on EMX and G400. I tought it was due to incremental deployment where libs are ok on a platform due to a previous deployment but not on the other one. Please clean your solution and rebuild it all. This should be better then.

1 Like

I’m pretty sure that I have seen the a3000000 error with regards to different hardware and would suggest you try @ leforban’s fix or start with a new project and copy over your source files.

Hi Brett.
I started with a clean project. In the beginning (with only a hello world) it went OK. At a certain point i had to pull in most of the sources. Then the error came up.
I will send the code.
Thanks

If this comes from a clean project, I would suspect you are not targeting the same sdk (i mean the sdk in your device is not the same than the one installed on your computer) This can work if portion of SDK is the same but as soon as your application start to use version dependant portion of the lib this fails… Try to reinstall the firmware sdk on your device. This can also come from low level such as tiny booter…

Hi all
Brett : can you send me your mailaddress for the link? I cannot send you a private message. (need 100 points?)
I reprogrammed several times the G120 complete with bootloader and 4.3 firmware. (the only one on my PC).
This erases everything on the module if I am right. So no problems with incremental delpoying.
Rebuilding the complete project also does not help.

1 Like

You should be able to DM him now as you are over 100pts.

2 Likes

Just thought I’d post an update here to keep everyone across it

I have the project file, and can confirm that VS doesn’t appear to build the dependencies correctly. Have done the usual clean ups (clean project, rebuild) and everything looks fine from the setup side, but the deployment error still happens. I checked deployed assemblies in MFDeploy, I can see the ones listed in the link failures are not listed.

I can see in the MSBuild logs that for example the System.Xml assembly is listed, but that is one that never makes it to the deployment.

[quote]1> Primary reference “System.Xml, Version=4.3.1.0, Culture=neutral, PublicKeyToken=null”.
1> Resolved file path is “C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\System.Xml.dll”.
1> Reference found at search path location “{TargetFrameworkDirectory}”.
1> For SearchPath “{TargetFrameworkDirectory}”.
1> Considered “C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\System.Xml.winmd”, but it didn’t exist.
1> This reference is not “CopyLocal” because it’s in a Frameworks directory.
1> The ImageRuntimeVersion for this reference is “v4.0.30319”.
[/quote]

I can see when CSC is called, that the assembly is passed in as an option
/reference:“C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\System.Xml.dll”

I’m digging deeper…

Hi Brett
I am glad to hear you have the same experience.
Do you have any idea why the EMX works (at least downloading succeeds), and the G120 not?
VS does not know for what platform it is compiling.
Dig

I am betting your EMX project is in a different project to the one you gave me, right?

I think you’ve just passed the size of the assembly that your app generates. The mfwindowapplication2.pe file that needs to be deployed is 1.4mb in size.

Assuming you do have a different app for EMX, have a look and see if the size is smaller. I wonder if you might be able to clean up some of the resources you’ve added, to shrink the app? Otherwise you may need to separate some of the code into a different class.

If you don’t have a different app, and you really just update the G120 pins to EMX pins in your current project then deploy that and it works, there may be some difference in the size they can take - but longer term I think splitting the code is the way to make sure that you don’t fall foul of the issue at some random time in the future.

Edit: I am still trying to prove the size issue by modding the project and deploying to the emulator, but if you can split out code or shrink resources and see if that helps, and it works, I’ll stop :slight_smile: .

OK I have tested it against the Emulator and can’t get it to fail to deploy, but I had to make many changes to eliminate the GHI hardware specifics (pin definitions, RTC). The app doesn’t work (i2c fails) but that’s expected. Cut the assembly size into smaller chunks

Hi Brett,
I deploy exactly same G120 project to an EMX. Since the pinlayout is different i get a runtime-error when the app wants to do something with the pins. That is as expected, but deploying works fine.
Cutting the app into chuncks is hard to do.
We can do a test without some bitmaps to decrease the code. I did with 140k less-> no effect.
How do i know the codesize?
I expect that if the app gets too big i get a clear error instead of the undocumented a30000000.
I cannot find the exact amount of usrFlash in the EMX ( 4Mb - about 1Mb)

By the way:
Since we run a bit out of time:
Can you put the code in a G400 module?
Since the EMX is working slow for our application ( and I don’t expect the G120 is much faster) we could change our hardeware for the G400.
Dig

@ Dig Kleppe - for commercial designs, it maybe best if you chat directly with GHI over the phone about your needs. It is a free consultation service.

GHI has confirmed the error: The G120 has 100kb less userflash than the EMX. Our code does not fit.
So a300000 means “does not fit”. I had expected a bit more clear error.
It is not possible for us to shrink the code. So we have a problem.
Any suggestions?

the a3000000 error can come from many reason. And yes not enough memory can be such a reason. I am surprised by your assumption saying that your code can not be shrinked. Why are you saying that? are you sure your code can not be optimized to decrease its memory footprint? did you try to obfuscate it?