Basic Understanding of where G120 Pins are mapped to hardware

Have a Cobra II eco with socket 5 (u type) connected to rs232 module.
We are implementing NON gadgeteer code to communicate with a PC.

To instantiate a serial port these references are required:

The constructor can then be called as follows and I have a working serial port.

System.IO.Ports.SerialPort = new System.IO.Ports.SerialPort(“COM1”, 115200, System.IO.Ports.Parity.None, 8, System.IO.Ports.StopBits.One);

Where do the CPU pins (P0.3/RXD1 & P0.2/TXD1) get mapped to COM1?

Pins are mapped inside firmware code. You can take a look how it is done by installing NETM Porting Kit

So the references point to Microsoft code…How does GHI modify these assemblies?
Will porting kit point this out? Where is firmware source at?

@ mhardy - When we create the firmware for the G120, we map the pins to COM1. We do not make those sources public though, as andre.m pointed out. The C# assemblies you are using call into the native code we compile for the firmware.

Hi John -

Where does the firmware reside, i.e. is it part of the SDK, is it pre-loaded into flash?
What’s the name of the file(s).

The reason I ask is because we are building a board based on G120 and I need to figure out how to get all the peripherals working, such as:

2-serial ports
1-can port
1-sd card
1-USB client
1-USB host
11-digital inputs
2-digital outputs
4-analog inputs

@ mhardy - You can find the firmware under C:\Program Files (x86)\GHI Electronics\GHI NETMF v4.3 SDK\Firmwares\G120. It is part of our SDK and you load it onto your device when an update is available.

You can find guides to all of the peripherals you mentioned under

@ mhardy - Although you may already be doing this… One way to help you would be to use the Pin out table in the G120 manual ( ) and also the schematic for the FEZ Cobra II Eco ( ) The names map to the available NETMF peripherals. The datasheet may also be of help – search internet for LPC1788.

Its pretty easy to use G120 in your custom board, and I find the Brochure to be most helpful for pin mappings

I just completed my custom board, my reasoning for using the G120 was because its easily hand solderable. Will post in creations section once I get more XP, not allowed yet.

btw. its a not ideal system…

1 Like

Good job! Looking forward to see your creation.


Thanks, the brochure is very handy, wish I knew about it prior to laying out our board!