Updating MonoBrickFirmware.dll

HomeForumsMonoBrick EV3 FirmwareUpdating MonoBrickFirmware.dll

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3987
    Author Image
    Dirk Stichling
    Participant

    Hi.

    I installed the latest MonoBrick image and way able to write an own small application against the MonoBrickFirmware.dll that I downloaded before.

    Afterwards I tried to load the latest source code of the firmware and built it myself (the reason was, that I wanted to play WAV files and that seems to be not supported in the binary firmware). Building the firmware worked well and also building my application against the new MonoBrickFirmware.dll.

    Then I copied my exe and the new MonoBrickFirmware.dll to /home/root/apps, logged in to EV3 and tried to run it. But it did not work:

    root@EV3:~/apps# mono Projekt2.exe
    Missing method .ctor in assembly /home/root/apps/MonoBrickFirmware.dll, type System.Runtime.Versioning.TargetFrameworkAttribute
    Can’t find custom attr constructor image: /home/root/apps/MonoBrickFirmware.dll mtoken: 0x0a0000f7

    Unhandled Exception:
    mono() [0x108e18]
    mono() [0x109208]
    mono() [0x109eec]
    mono() [0x10ad14]
    mono(mono_arm_throw_exception+0xf0) [0x15cdfc]

    [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type ‘System.Runtime.Versioning.TargetFrameworkAttribute’ from assembly ‘MonoBrickFirmware’.
    at Projekt2.R2D2..ctor () [0x00000] in <filename unknown>:0
    at Projekt2.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
    root@EV3:~/apps#

    Thanks,
    Dirk

    #3988
    Author Image
    Dirk Stichling
    Participant

    Hi.

    I did some more investigations. I updated both StartupApp.exe and MonoBrickFirmware.dll in /usr/local/bin. Afterwards I rebooted and EV3 booted correctly. However, when I tried to start my application I still got the same error. Then I created a new Console Project within the MonoBrick solution and put all my stuff into that. And now it works. But I still do not know why it doesn’t work with the projects that lives in it’s own solution.

    Dirk

    #3997
    Author Image
    Anders Søborg
    Keymaster

    Hi

    Thanks for using MonoBrick firmware!

    I am not sure if I understand your problem correctly. But in order to create your own project you need to add a reference to the firmware dll. Then you need to make sure that the dll is copied to the output folder. When you “transfer/copy” the program to the brick – you need to make sure that the dll is also copied. Otherwise there will be a mismatch between the dll that was used for compiling the program and the dll that is used at runtime…

    Anders

    #4004
    Author Image
    Dirk Stichling
    Participant

    Hi.

    I think I did everything exactly as you described above. However, I still get the error mentioned above. But currently that isn’t a real problem for me because everything works fine as long as my project is part of the MonoBrick solution. That is ok for me at the moment.

    Thanks,
    Dirk

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Posted in

Make a donation