Skip to content

onethinx/Onethinx_Project_Examples

Repository files navigation

🚀 Onethinx Project Examples 🚀

This folder contains several project examples for use with the Onethinx OTX-18 LoRa(WAN) module.

These projects combine the Visual Code setup for code editing with the magnificent PSoC Creator Schematic Editor & Design Wide Resources Editor for chip setup.

1. Preparation

  1. PSoC Creator installation
  1. Visual Studio Code + OTX Maestro extension installation

2. Configure the Chip Setup (IOs, peripherals etc.) using PSoC Creator

This step is only needed when you need to change the chip configuration.

  1. Start PSoC Creator
  2. Open the Onethinx_Creator.cywrk workspace (File >> Open >> Project/Workspace)
  3. The PSoC Schematic Editor and the Design Wide Resources can be accessed at the left 'Workspace Explorer' pane:
    ..Onethinx_Project_Examples\Example_X\Onethinx_Creator.cydsn\Onethinx_Creator.cywrk

    PSoC_Creator_Config
  4. After the changes to the chip configuration are done, build the Onethinx Creator project (Build >> Build Onethinx_Creator or Shift + F6)
  5. Make sure the project builds well from the output tab and the Creator_Postbuild has run:
    Creator_Postbuild
  6. The chip configuration is done and PSoC Creator may be closed.

3 Firmware Coding and Debugging (uses Visual Studio Code)

  1. Start Visual Studio Code
  2. Load the project by selecting the project folder (File >> Open Folder):
    For example: ....\Onethinx_Project_Examples\Example_HelloWorld
  3. The following buttons in the statusbar can be used to configure, build and debug the project. VScode Buttons
  4. As the project has not run on the PC before, it needs to be Clean-Reconfigured before it can be built. Hit the Clean-Reconfigure button from the status bar at the bottom of VS Code
  5. After successfull configuration (the terminal window will show: "Terminal will be reused by tasks, press..." when ready), the project can be Built and Launched from the debugger. Make sure the device is connected to the debugger and PC before launching the debug session
    Hit the Build-And-Launch button from the status bar at the bottom of VS Code to start programming and debugging the code.