Main Site Documentation

Can I use TinyCLR and VS 2017 with


#1

I purchased a bunch of parts a couple years ago approx and shortly after that .Net Micro Framework started to stagnate and I was busy anyway. As a seasoned software developer who originally trained in electronics I was keen to leverage my .Net knowledge and fiddle with gadgets once more. I did write some small utility stuff for writing to a display like it was a Console but was busy so shelved my work.

Here is a list of all that I have:

Gyro module SGYRO-GM-331 (Unopened)
Accel module ACCEL G248 (Unopened)
Load Module (can’t recall what that is!, unopened)
2 * FEZ Spider II v 1.0 Mainboard [SPDR2-GB-432]
SD Card Module
FEZ Raptor (G400 S v 1.1) Gadgeteer board
WiFi RS21 (1.2)
T43 Display Rev 1.2

So first question is am I able to leverage these and use them with TinyCLR?

If so what are the steps and where are the tools to get the CPU board firmware updated?

Thanks!


#2

Very speedy answer is Yes, you can.

A longer answer, is: Gyro, accel, T43 can work and mainboard Fez Spider II and Raptor can too.
For SD module, now, no FS are implemented, but if I can see GitHub correctly, sd could arrive very soon !

For Wifi, no tcp Library is ready, but I think it can be done.

That’s for you first question.


#3

For FEZ Spider II: http://docs.ghielectronics.com/hardware/legacy/gadgeteer/fez-spider-ii.html
For FEZ Raptor : http://docs.ghielectronics.com/hardware/legacy/gadgeteer/fez-raptor.html

Good update !


#4

Start here first http://docs.ghielectronics.com/hardware/legacy/gadgeteer/intro.html

The docs should have everything you need but we are also here to help.


#5

Thank you gentlemen.

It seems I must (or should) begin by getting the latest bootloader installed. To do that I installed the latest SAM-BA v 2.18 which is now installed.

When I start that app it lets me select only COM port 6 (my device FEZ Raptor) is actually connected via USB though?).

Trying to then connect leads to an error message box title “Invalid chip ID” with message “Can’t connect to at91sam9x35-ek”

Not sure how to proceed from here…

Update the “Invalid chip id” is almost certainly due to incorrect COM port because I can run FEZ Config and ping the board still - but only when I select USB, selecting the only other option COM 6 (which is the same as that listed when I use SAM-BA) tells me no device is connected.

So how do I associate COM ports and USB ports? I can find nothing helpful on the web…

In my PCs device manager it says COM7 is “Standard Serial over Bluetooth link”

Incidentally I’m hoping to work with VS 2017 for this.


#6

Open Device Manager. If you’re correctly in SAM-BA mode, a “Bossa port” or “GPS Camera” device will appear in the Serial Ports section. If you can still see the Raptor as a netmf device, you’re not in bootloader mode, check the documentation again :wink:


#7

Well I read somewhere about putting the board into “boot mode” but that was a general statement it wasn’t board specific and anyway I can’t now find any documentation!

I do not know if the FEZ Raptor can be put into boot mode using the three buttons provided or if I must ground some pin in some socket.

Also with respect to the FEZ Spider II that can be put into boot mode (I read somewhere) by setting two of the four DIP switches into “on” yet looking at the board I have no idea which side is “on” and there’s a small film of plastic over the dip switches, I don’t know if that must be peeled off or if it is somehow expected to be just lifted on one side, if so which side!

Finding documentation is a challenge I’m afraid as many of the older pages have “obsolete” or “please visit our new website” all over them and it really isn’t clear.

Please bear in mind I’m not a novice with electronics (I’ve had articles published in various magazine in the 80s) and I’m a very experienced software engineer as well with over a decade experience of .Net and C#, I’m just having trouble getting clear guidelines.

Incidentally I’m hoping to work with VS 2017 for this.

Thx


#8

You should not be on the old website at all. If you ever get there, please tell us where to fix that link.

Now, everything you need is on the new docs. Again, if a page didn’t have what you need then please let is know what page so we can improve. The docs are complete but very new so we might have missed something.

You have multiple boards so let’s start with one and let us help.


#9

So lets start at the fundamentals. You need to go to the Raptor page that @bauland linked earlier. From there, you can see most of the specifics about the Raptor you will need. The TinyCLR page is linked at the top of that, http://docs.ghielectronics.com/software/tinyclr/intro.html, and clearly talks about computer setup and device setup, so should walk you through the detail you need.


#10

Well this is very slow going I’m afraid. There are several things that cause confusion.

Setp 1 - I went here as instructed. We can see (it seems) that the terms “firmware” and “TinyCLR OS” are referring to the same thing, but at first glance one could think these are different components.

Anyway under Loading the Firmware we that bootloader v2 must be loaded (it says nothing about what one might observe if they didn’t do this) it then mentions that to “activate the bootloader” but doesn’t explain what it means to “activate” the boot loader.

Anyway at the bottom of the page are links to the G400 firmware and Loading the Firmware steps - but nothing about the bootloader which must be installed (v2) first !

Anyway on the side menu is a link to Bootloaders. On that page is another link to this page. But unfortunately on that page is nothing about getting the bootloader and installing it despite the fact that page is titled GHI Bootloader.

The problem here is that this page has a section titled GHI Bootloader so I read that as "Ahh that’s the one for me, I’m using GHI stuff - so I clicked that. But of course after jumping all over I eventually realize that the lower section SAM-BA Bootloader is (probably) what I need.

Nothing specifically here about Raptor or even G400 but press on…

It does say “If there is no such button, connect SPI1_MISO to ground instead. Keep the pin grounded for three seconds after power up or reset and then remove the connection from SPI1_MISO to ground.”

And that - it seems - is what gets me the COM port I need - I will try this next…


#11

I would like to suggest that a broad overview page be created that one that defines the terms clearly (bootloader, firmware - aka TinyCLR) and how these are related. Explain that different CPUs/Boards require different kinds of bootloaders and their installation is different.

Incidentally even though my Raptor has not been used for at least 18 months, when I run FEZ Config, connect to the board and reset the board I get this:

Loader (TinyBooter) version information:
4.3.6.0 on this computer.
4.3.6.0 on this device.
— The Loader (TinyBooter) is up to date. —

Firmware (TinyCLR) version information:
4.3.6.0 on this computer.
4.3.6.0 on this device.
— The Firmware (TinyCLR) is up to date. —
Please wait for the device to reboot… Done.

Those two “up to date” messages are - as I hope you can appreciate - causing me a lot of confusion.


#12

Let me try to help please but let me remind you that GHI has done a phenomenal job bringing its latest software to discontinued Gadgeteer products. Thousands of dollars put into this efforts and same goes into bringing these discontinued products to the new documentation. That said, the docs need some further improvements. This is all optional. You can continue to use the old Gadgeteer software today.

I recommend you uninstall anything NETMF and Gadgeteer from your PC. and everything from GHI. Then start by installing TinyCLR extension.

Let’s start with your FEZ Raptor. You will need to load the new bootloader V2 to it, just like everything else. Each product has its own way of doing this. Raptor is simply a G400 so the instructions are here http://docs.ghielectronics.com/hardware/scm/g400s.html#loading-bootloader-version-2

This is exactly how you would have loaded the old loader before. The steps are here http://docs.ghielectronics.com/software/tinyclr/loaders/sam-ba-bootloader.html

Once you have loaded the loader and you see a virtual COM port in the device manager then everything else is much easier after. Let us know if you got to this step.


#13

Thanks Gus and please don’t consider my posts as being critical of the technology or GHI, there is a certain amount of “tribal” knowledge I’m sure and I just need to muddle through.


#14

We are here to help and you if you pint out individual needed improvements you will also be helping us in improving the docs… then when it is all done, we can get together over a beer and chat about how great TinyCLR is :wink:


#15

While we’re on the subject is TinyCLR a custom CLR implementation? If so what is the equivalent of the .Net Framework here? I ask this because the CLR and the various framework class libraries are two distinct things in .Net and wondered what name you give to your framework?

Gotta say trying to ground Pin 8 of socket 11 is pretty fiddly - I’d hate to ground something I shouldn’t!


#16

Very intriguing. I shorted pins 8 and 10 of socket 11 (on the Raptor) and applied power, then waited for several seconds then removed the short.

I could then see the “Bossa Program Port (COM9)” port in the OS Device Manager (Ports) so I knew that was looking good.

Then I started SAM-BA v 2.18 and could see three ports in the dropdown:

\USBserial\COM9 (default choice)
COM7
COM9

I left that first default in place and selected at91sam9x35-ek as the board and left JLink timeout multiplier at 0 and pressed connect.

samba-1

I’ll have to follow your earlier suggestion and uninstall all of the old stuff and try this again…


#17

I’m back on this guys and may need help. I uninstalled anything and everything that looked related to this stuff. I have downloaded G400 Bootloader and then I downloaded SAM-BA. I also installed the VS 2017 extension as advised.

After downloading the SAM-BA I extracted all zipped contents, all this stuff is going into a folder simply named TinyCLR.

The sam-ba_3.2.1 sub folder contains various DLLs etc and sam-ba.exe. I have no idea what I am to do with sam-ba.exe, if I run it from a console window I can see that it accepts options but I see no mention of this in your instructions there seems to be no install or anything.


#18

OK I can see a .INF file in the sam-ba_3.2.1 sub folder, I’m going to install this…


#19

Odd, I right-clicked the .INF and select “Install” I then see a window asking permission to modify the system, I click OK and it vanishes with no visible indication that anything has happened.

Also in my device manager I see nothing relevant under USB or COM ports.


#20

We really need a detailed step by step guide for this, stating initial prerequisites. A single document with a step by step bullet list together with any oddities that may arise for any of the steps. I should be able to robotically follow such instructions to get running but everything is scattered around on different pages that themselves are not always clear…

Bear in mind I’m a very experienced Windows software developer with lots of experience with .Net and native windows development (services, mapped memory, OS object manipulation etc) I also have a pretty good knowledge of electronics having initially studied that and had stuff published in the 1980s - I’m just pointing out that I’m no novice so you know I’m not completely out of my depth!