Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>BGScript supportNew to Visual Studio Code? Get it now.
BGScript support

BGScript support

Szczepan Mejer

|
476 installs
| (0) | Free
BGScript support for VS Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

BGScript Support

A BGScript support extension for Visual Studio Code.

Features

  • Colorizer
  • Embedded build task with error parsing
  • Code snippets
  • Embedded function snippets

Supported modules

  • All Bluetooth Low Energy modules based on BLE API reference manual V1.6

Hints

  • To simplify usage of BLE112 and other Bluegiga Smart modules, use BGScript code below in order to flash BGScript programs via USB. You can also create custom task inside VS Code to flash the device with keyboard shortcut.

     dim ret_result, ret_data_size, ret_data(2)
     # watch for new data from USB CDC
     # NOTE! This function or something similar MUST remain in the BGScript to
     # allow access to DFU mode over USB CDC with a special trigger character
     event system_endpoint_watermark_rx(endpoint, data_len)
         call system_endpoint_rx(endpoint, data_len)(ret_result, ret_data_size, ret_data(0:ret_data_size))
         if ret_data(0:1) = $30 then # ASCII '0' is 0x30
             # reboot into DFU mode when 0x30 is received
             call system_reset(1)
         end if
     end
    

    I found it under this link, where you will also find configuration xmls. However, to use it, you will have to flash the hex with code above first. You can do so using CCDebugger device or using open-source Arduino solutions.

TODO's

  • A list of modules to be supported in the readme page. AFAIK, some functions could be copied from WIFI API reference manual - to be checked
  • Code suggestions for enumerations described in the documentation
  • Check documentation pieces used in embedded functions descriptions

Known Issues

No errors yet.

Release Notes

0.1.0 - Initial release

  • Support for BLE112 based on BLE API V1.6
  • BGScript colorizer for keywords, numbers, comments and strings
  • Simple code snippets (if, while, procedure, import)
  • Keyword-based (event, call) embedded functions snippets

Extension was created in GlobalLogic as a side project for one of the research projects. Visit GlobalLogic site to learn about this great company.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft