Skip to content
bootloader
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

PSLab Firmware

Repository for the firmware of the Pocket Science Lab (PSLab) open hardware platform.

Build Status Gitter Mailing List Twitter Follow

PSLab is a tiny pocket science lab that provides an array of test and measurement instruments for doing science and engineering experiments. It comes with function or instruments like an oscilloscope, waveform generator, frequency counter, programmable voltage and current source and also as a data logger. Also available are the hardware schematics, the desktop application and an Android app. The website is at https://pslab.io.

Buy

Communication

Repository Structure

📦pslab-firmware
 ┣ 📂bootloader-host-application                
 ┃ ┣ 📜UnifiedHost-1.17.0-bin.zip               # GUI application for firmware updates
 ┃ ┣ 📜openjfx-11.0.2_osx-x64_bin-sdk.zip
 ┃ ┗ 📜run-host.sh                              # Script to open UnifiedHost GUI application
 ┣ 📂pslab-bootloader.X                         # PSLab Bootloader application
 ┃ ┣ 📂build                                    # Compiled source files
 ┃ ┣ 📂dist                                     # HEX and ELF files
 ┃ ┣ 📂mcc_generated_files                      # Source C++ files
 ┃ ┣ 📂nbproject
 ┃ ┣ 📜 ...
 ┃ ┣ 📜main.c                                   # Entry point to PSLab Bootloader
 ┃ ┗ 📜pslab-bootloader.mc3                     # Code configurator settings
 ┃ ..........................................................................................
 ┣ 📂pslab-core.X                               # PSLab Core application
 ┃ ┣ 📂build                                    # Compiled source files
 ┃ ┣ 📂dist                                     # HEX and ELF files
 ┃ ┃ ┣ 📜 ...
 ┃ ┃ ┗ 🔑pslab-core.X.production.hex            # Production HEX file
 ┃ ┣ 📂nbproject
 ┃ ┣ 📂bus                                      # Communication specific source files
 ┃ ┃ ┣ 📜 ...
 ┃ ┃ ┗ 📜i2c.c
 ┃ ┣ 📂helpers                                  # Supplementary functions
 ┃ ┃ ┣ 📜 ...
 ┃ ┃ ┗ 📜version.c
 ┃ ┣ 📂instruments                              # Instrument specific source files
 ┃ ┃ ┣ 📜 ...
 ┃ ┃ ┗ 📜multimeter.c
 ┃ ┣ 📂registers                                # PIC specific register entry files
 ┃ ┃ ┣ 📂comparators
 ┃ ┃ ┃ ┣ 📜 ...
 ┃ ┃ ┃ ┗ 📜ic1.c
 ┃ ┃ ┣ 📂 ...                                   # includes converters, memory, system
 ┃ ┃ ┣ 📂timers
 ┃ ┃ ┃ ┣ 📜 ...
 ┃ ┃ ┃ ┗ 📜tmr1.c
 ┃ ┣ 📂sdcard                                   # SD Card specific file handling source files
 ┃ ┣ 📜 ...
 ┃ ┣ 📜main.c                                   # Entry point to PSLab Core
 ┃ ┣ 📜commands.c                               # Entry point to function implementations
 ┃ ┗ 📜pslab-core.mc3                           # Code configurator settings
 ┣ 📜FirmwareFlowChart.drawio                   # Firmware flow diagram
 ┣ 📜LICENSE
 ┗ 📜README.md

Requirements

Development Environment

The source files in this repository were generated and developed using MPLAB X IDE V5.45. The latest version of this IDE can be downloaded from MPLAB-X-IDE page.

Compiler

The 16-bit microcontroller architecture uses XC-16 compiler and the source in this repository is compiled using XC16 compiler V1.70 and this can be downloaded from XC16 Compiler page.

Code Configurator

Bootloader configurations based on EZBL library and SD card functionalities based on FatFS library are configured using Microchip Code Configurator (MCC). The version used in this repository is V4.0.2 and it can be downloaded from MCC page.

Programmer

The compiled source will generate a .hex file that can be uploaded into the microcontroller using a compatible programmer. PiCKit3 In-Circuit Debugger is used during development and it is available to purchase in many online stores

Unified Bootloader

Compiled EZBL compatible .hex files can be uploaded into the microcontroller using a direct USB connection using a special GUI application; Unified Bootloader. This standalone application can be downloaded from Unified Bootloader page.

It might not be straightforward to run this application. Java and JavaFX libraries are required as pre-requisites and they can be downloaded from Gluonhq page and installation instructions are available at OpenJFX Docs page. Extract the lib folder into /usr/local/openjfx/ directory to use the supplimentary shell file to execute the GUI application.

More resources on ezbl integration can be found from this video and for UART configuration settings, refer to the following figure.

EZBL UART Settings

Branch Policy

  • The bootloader branch contains the new firmware version that enables on-site firmware updates over a USB connection. PRs are merged to this branch and tested on an ongoing basis.
  • The development branch holds the legacy firmware version.
  • The master branch holds the stable version of the project and merges the development branch regularly after it is tested thouroughly.

Available Software

Either use the hardware with the PSLab desktop app or the PSLab Android app. PSLab python repository contains the source code to interface this firmware with PSLab desktop application.

License

The library is free and open source software licensed under the Apache License 2.0. The copyright is owned by FOSSASIA.