commit 5f30b130876455b28786bfef79b6adb1914e848b Author: Ondřej Hruška Date: Sat Jun 23 01:32:12 2018 +0200 initial diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..687d236 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.map +.sass-cache +.idea/ diff --git a/_footer.php b/_footer.php new file mode 100644 index 0000000..437fa96 --- /dev/null +++ b/_footer.php @@ -0,0 +1,6 @@ + + diff --git a/_header.php b/_header.php new file mode 100644 index 0000000..235c1b0 --- /dev/null +++ b/_header.php @@ -0,0 +1,39 @@ + 'What is GEX', + "features" => 'Features', + "platforms" => 'Platforms', + "downloads" => 'Downloads', + "contact" => 'Get Involved', +]; +?> + + + + GEX - <?= $pages[$curpage] ?> + + + + + + +
+ +
diff --git a/contact.php b/contact.php new file mode 100644 index 0000000..0ba10f7 --- /dev/null +++ b/contact.php @@ -0,0 +1,24 @@ + + +
+
+

How to Contribute

+ +

+ GEX is open-source, and I want it to grow beyond the current one-man-show. + A GitHub mirror of most of the GEX + repositories is available and regularly updated to match the upstream. + Feel free to send pull requests or issues to these repos. +

+ +

Contact

+ +

+ You can reach me by e-mail at ondra@ondrovo.com, + or send me a message on Mastodon (GNU Social compatible): @MightyPork@dev.glitch.social +

+
+
+ + + diff --git a/convert.sh b/convert.sh new file mode 100755 index 0000000..ac7796d --- /dev/null +++ b/convert.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +php contact.php > public/contact.html +php downloads.php > public/downloads.html +php features.php > public/features.html +php index.php > public/index.html +php platforms.php > public/platforms.html + +cp -r img public/ +cp -r css public/ +cp -r js public/ + +echo "Done." diff --git a/css/application.css b/css/application.css new file mode 100644 index 0000000..a188d2d --- /dev/null +++ b/css/application.css @@ -0,0 +1,93 @@ +html, body { + width: 100%; + height: 100%; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + color: #333; + font-size: 16pt; + margin: 0; + padding: 0; } + +body { + overflow-y: scroll; } + +*, *::before, *::after { + box-sizing: border-box; } + +a { + color: #005e5e; + text-decoration: none; } + a:hover { + color: #001d5e; + text-decoration: none; } + +section, header, footer { + width: 100%; } + section > *, header > *, footer > * { + max-width: 850px; + margin: 0 auto; + padding: 10pt 0; } + +section, header { + border-bottom: 4px solid darkcyan; } + section h1:first-child, header h1:first-child { + margin-top: .4em; } + +section + section { + border-bottom: none; } + section + section > * { + border-bottom: 2px dashed rgba(0, 139, 139, 0.5); } + +section:last-of-type { + border-bottom: 4px solid darkcyan; } + section:last-of-type > * { + border-bottom: 0 none; } + +header .Title { + font-size: 40pt; + font-weight: bold; + letter-spacing: 2pt; } +header .Subtitle { + font-size: 24pt; } + +nav a { + padding-right: 10pt; + padding-left: 10pt; + border-right: 2px solid darkcyan; } + nav a:first-child { + padding-left: 0; } + nav a:last-child { + border-right: 0 none; } + nav a.active { + font-weight: bold; } + +h1 a { + opacity: .3; + margin-left: 6pt; } + h1 a:hover { + opacity: .6; } + +p { + text-align: justify; } + +h2 { + font-size: 110%; } + +footer { + text-align: left; + font-size: 12pt; + color: #066; + opacity: .5; + font-style: italic; } + +section img { + max-width: 100%; } + +div.center { + text-align: center; } + +div.aside { + float: right; + margin-left: 16pt; + margin-bottom: 16pt; } + +/*# sourceMappingURL=application.css.map */ diff --git a/css/application.scss b/css/application.scss new file mode 100644 index 0000000..b822fe8 --- /dev/null +++ b/css/application.scss @@ -0,0 +1,132 @@ +$fg: #333; +$bg: #fff; + +html, body { + width: 100%; + height: 100%; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + color: $fg; + font-size: 16pt; + margin: 0; padding: 0; +} + +body { + overflow-y: scroll; +} + +*, *::before, *::after { + box-sizing: border-box; +} + +a { + color: #005e5e; + text-decoration: none; + + &:hover { + color: #001d5e; + text-decoration: none; + } +} + +section, header, footer { + width: 100%; + > * { + max-width: 850px; + margin: 0 auto; + padding: 10pt 0; + } +} + +section, header { + border-bottom: 4px solid darkcyan; + + h1:first-child { + margin-top: .4em; + } +} + +section + section { + border-bottom: none; + + > * { + border-bottom: 2px dashed rgba(darkcyan, .5) + } +} + +section:last-of-type { + border-bottom: 4px solid darkcyan; + + > * { + border-bottom: 0 none; + } +} + +header { + .Title { + font-size: 40pt; + font-weight: bold; + letter-spacing: 2pt; + } + + .Subtitle { + font-size: 24pt; + } +} + +nav a { + padding-right: 10pt; + padding-left: 10pt; + + border-right: 2px solid darkcyan; + + &:first-child { + padding-left: 0; + } + + &:last-child { + border-right: 0 none; + } + + &.active { + font-weight: bold; + } +} + +h1 a { + opacity: .3; + margin-left: 6pt; + + &:hover { + opacity: .6; + } +} + +p { + text-align: justify; +} + +h2 { + font-size: 110%; +} + +footer { + text-align: left; + font-size: 12pt; + color: #066; + opacity: .5; + font-style: italic; +} + +section img { + max-width: 100%; +} + +div.center { + text-align: center; +} + +div.aside { + float: right; + margin-left: 16pt; + margin-bottom: 16pt; +} diff --git a/downloads.php b/downloads.php new file mode 100644 index 0000000..c44ad92 --- /dev/null +++ b/downloads.php @@ -0,0 +1,69 @@ + + +
+
+

Thesis

+ +

+ I've developed the hardware prototypes and the original firmware (1.0) for my Master's Thesis. + The thesis text may be used as a manual for this firmware version. +

+ +

+ Thesis PDF + attachments +

+
+
+ +
+
+

Firmware

+ +

+ Pre-compiled firmware images are stored in the + GEX binaries repository. +

+ +

Source Code

+ +

+ GEX is open-source, all its repositories can be found at git.ondrovo.com/gex. + Important firmware repositories: +

+ + +
+
+ +
+
+

PC Libraries

+ +

+ The protocol is described in the GEX Thesis, which should be enough to port it to any language. + Two libraries were developed as a proof of concept: +

+ + +
+
+ +
+
+

Custom Hardware

+ +

+ The GEX hardware is open source, too. + The PCBs are drawn in Altium, but the respository includes gerber files and PDFs to make it more accessible. +

+
+
+ + + diff --git a/features.php b/features.php new file mode 100644 index 0000000..ff92bb6 --- /dev/null +++ b/features.php @@ -0,0 +1,58 @@ + + +
+
+

Features

+ +

+ The project started as a STM32 alternative to BusPirate, offering access to the many + hardware peripherals of STM32 microcontrollers. The firmware is modular, composed of + functional blocks (“units”) that may be activated and configured by the user through + INI configuration files. Those files are stored inside the module and edited + programmatically, or with a text editor on a virtual FAT16 USB disk. +

+ +

+ GEX is used as a GPIO header for the PC, except besides GPIO it also supports a range + of hardware buses, and several analog features. The device is configured for a particular + hardware setup, but the control script runs on the host PC. This lets you build graphical + applications above the low level control code with PyQt or other toolkits, process + data with NumPy or SciPy, and more. When needed, the Python library may be called from + within MATLAB, too. +

+ +

Connection

+ +

+ GEX can be connected through USB (CDC/ACM - virtual COM port), by a hardware UART, or + wirelessly, using a nRF24L01+ transceiver module. +

+ +

Hardware Functions

+ +

+ The firmware version 1.0 for STM32F072 contains the following key features: +

+ +
    +
  • Direct GPIO pin access +
  • SPI master +
  • I²C master +
  • UART/USART +
  • 1-Wire master (including the search algorithm) +
  • PWM output +
  • Frequency and duty cycle measurement +
  • ADC with oscilloscope-like features +
  • DAC (analog output) with waveform generation based on DDS +
+ +

+ Some features (specifically the analog ones) are experimental and exhibit various + limitations. These will be addressed in a later firmware version, possibly as a full + rewrite. +

+
+
+ + + diff --git a/img/bode.png b/img/bode.png new file mode 100644 index 0000000..bcb8104 Binary files /dev/null and b/img/bode.png differ diff --git a/img/gexen.jpg b/img/gexen.jpg new file mode 100644 index 0000000..05f257a Binary files /dev/null and b/img/gexen.jpg differ diff --git a/img/zero.jpg b/img/zero.jpg new file mode 100644 index 0000000..19f3e66 Binary files /dev/null and b/img/zero.jpg differ diff --git a/index.php b/index.php new file mode 100644 index 0000000..93c4523 --- /dev/null +++ b/index.php @@ -0,0 +1,33 @@ + + +
+
+

What is GEX

+ +

+ GEX is a general purpose input/output device that attaches to a PC or laptop. + The module, controlled by a Python or C program running on the host PC, provides easy + access to on-chip peripherals and low level functions implemented by the firmware. +

+ +

+ The platform is designed for quick hardware prototyping, tinkering, automation, and measurements. + In addition to custom hardware, the firmware can run on STM32 development boards, + which makes it accessible to everyone. Even better, a version for the eBay-popular + STM32F103 Bluepill board is planned. +

+ +
+ GEX Zero v1 +
+ +

+ You can try GEX right now, perhaps with one of the pre-built firmware images, but keep in mind + that it is still under development and despite having version 1.0.0, it is closer to + beta than a stable release. In particular, the API may change in backward-incompatible ways + (obviously accompanied by a minor version bump). +

+
+
+ + diff --git a/js/utils.js b/js/utils.js new file mode 100644 index 0000000..f04ccf3 --- /dev/null +++ b/js/utils.js @@ -0,0 +1,29 @@ +function headingAnchors(self_link_text) { + self_link_text = self_link_text || '#'; + var headings = document.querySelectorAll('h1'); + + for (var i = 0; i < headings.length; i++) { + var e = headings[i]; + if (!e.id) { + var tc = e.textContent; + tc = tc.replace(/[^a-z0-9-]/gi, '-') + .replace(/-{2,}/gi, '-') + .replace(/-+$/gi, '') + .toLowerCase(); + + e.id = tc; + } + + var a = document.createElement('a'); + a.href = '#' + e.id; + a.target = "_self"; + a.textContent = self_link_text; + + e.appendChild(a); + } + + // Scroll to the given hash + var h = location.hash; + location.hash = ''; + location.hash = h; +} diff --git a/platforms.php b/platforms.php new file mode 100644 index 0000000..1a797fe --- /dev/null +++ b/platforms.php @@ -0,0 +1,26 @@ + + +
+
+

Supported Platforms

+ +

+ The original GEX firmware targets the STM32F072 microcontroller, which is used in the + two custom hardware modules; you can see some of these in the photo below. In the future + I hope to port it to STM32F103, and later to STM32F303 or others. A reimplementation + for the ESP32 is also an exciting possibility, though it would be even more challenging. +

+ +

+ The PC libraries were written and tested on Linux. The Python library should be portable + to other systems, as it uses PySerial and PyUSB, but I didn't try it. +

+ +
+ Photo fo several GEX prototypes +
+
+
+ + + diff --git a/public/.gitignore b/public/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/public/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore