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.
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
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)
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.
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.
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â
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 .
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
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?