Working on Interops

I’ve successfully ported TinyCLR 0.7.0 to my good old STM32 Mikromedia Board from Mikroelektronika and it works fine.
Now, the board is rich of peripherals and specifically it has LCD Display attached.
The display is SSD1963 chip driven. The guys at Mikroe doesn’t use FSMC bus and so it needs specific driver. I have the old c++ code I wrote in the MF 4.2 era as Interop.
Now I’m playing with TinyCLR Interops and Native API to see what to do.

The question: the native .c/.h code generated by VS2017 has an #include <TinyCLR_Interop.h> that I can’t find on github repo. I’m missing something? I remember that include file in the porting kit of MF 4.x …

2 Likes

Have you checked both the “Generate native stubs for internal methods” and the “Generate bare native stubs” checkboxes?

1 Like

Thank you John … It seems I haven’t checked both checkbox!! Now I have “bare” native code.
I will start experimenting…

1 Like

My managed code and native code.

Enjoy!

3 Likes

Thank you @matsujirushi, that’s very useful starting point.

No videos no pictures? :slight_smile:

@Gus_Issa It’s short video. :sunglasses:
https://twitter.com/matsujirushi12/status/946743644089806848

I announced that how to porting in .NET geek meeting.

And I have meeting next weekend. creating slides now.:blush:

5 Likes

Thanks to some sample code from @matsujirushi I’ve mostly done porting TinyCLR 0.7.0 to Mikromedia Board for STM32F4. I’m working on LCD Display and the base drawing functions are implemented and working … News soon…

2 Likes

Very cool. Which board are we taking about?

The board is Mikromedia Plus for STM32 (STM32F407ZG)

2 Likes

Beautiful board!

It’s very good board, but very expansive …
I’ve ported code to 0.8.0. Still work in progress…

static void Main()
 {
            Mikroe_MMB_LCD myLcd = new Mikroe_MMB_LCD();
            myLcd.Init();
            Debug.WriteLine("Testing...");
            myLcd.ClearScreen(Color.Black);
            myLcd.DrawRect(1, 1, 479, 271, Color.Green);
            myLcd.DrawLine(2, 150, 479, 150, Color.White);
            var s = "Hello World!";
            myLcd.DrawText(s, (ushort) s.Length, 80, 40, Color.Red);
            s = "From TinyCLR!";
            myLcd.DrawText(s, (ushort) s.Length, 80, 50, Color.Red);
            myLcd.DrawRect(75, 38, 120, 30, Color.Blue);
            //DrawGauge(myLcd, 25, 25, 100, Color.Red, 50.0F, 0.0F, 100.0F);
}

3 Likes