A BUGswarm connector for Renesas 8- and 16-bit microcontrollers.
Pull request Compare This branch is 14 commits behind buglabs:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
board
gen
redpine
swarmlibs
bugswarm-renesas.Buglabs.mtud
bugswarm-renesas.mtpj
function.Html
macro.Html
r_lk.dr
readme.markdown

readme.markdown

bugswarm-renesas:

A bugswarm connector for Renesas 8- and 16-bit microcontrollers. This code turns a compatible evaluation board into a real-time internet enabled device. Once the connector is deployed to a device, the device will automatically connect to the bugswarm platform and share it's peripherals using a standardized API. This enables developers to create applications for the evaluation board in a wide variety of languages, without needing to download an SDK or physical access to the device.

Supported Boards

  • RL78/G13 Demonstration Kit (YRDKRL78G13)
    • Redpine companion WiFi Card (RS-RL78G13-2200CC)

How to use an RL78/G13 board that has already been programmed

  1. Set up a wireless access point, or Mifi tether with the SSID renesasdemo and password renesaspsk. The wireless security can be WPA1 or WPA2 Personal. See the deployment instructions below to connect to a different ESSID.
  2. (Optional) Connect a laptop or cellphone to this wireless access point, verify it can connect and verify that it has internet connectivity.
  3. Make sure that Switch 2 of SW5 is set to the up or 'On' position. See the quick start guide for more details.
  4. Using a USB Micro cable, connect the RL78 board to a USB power source. This can be a PC, Laptop, or USB wall charger.
  5. The demo board will take several seconds to connect to the wireless access point. When it has successfully connected, LED6 (the green led to the left of the LCD screen) will blink.
  6. Navigate to buglabs.github.com/bugswarm-renesas/
  7. Wait a few seconds and then click on the Select an RL78/G13 board to view" dropdown menu
  8. Select the entry that matches the MAC address printed on the Wifi Companion card, and hit Go!
  9. The graphs should update with data as it is sent by the RL78 board.

See the troubleshooting section below if board does not appear in the list, or data is not produced.

How to Deploy the connector to an RL78/G13 demo board

  1. Download and install the newest version of CubeSuite+ from the following link
  2. Open CubeSuite
  3. Download the newest version of the bugswarm connecter from this repository link
  4. Extract the zip file to a reasonable location, like My Documents/CubeSuite/bugswarm-renesas/
  5. Within CubeSuite, select File -> Open and navigate to bugswarm-renesas.Buglabs.mtud within the directory from the previous step.
  6. In the pane on the left hand side of the application, double click on the file rsi_global.h within the redpine folder.
  7. The board is configured to connect to ESSID renesasdemo with password renesaspsk. If you would like to change these settings, modify the variables PSK, SCAN_SSID, and JOIN_SSID accordingly
  8. Log in to demo.bugswarm.com
  9. Click on the New Resource button
  10. Fill out the "Name" field with a unique value, such as the MAC address printed on the redpine companion card
  11. Fill out the "Description" field with "RL78/G13 Demonstration Board"
  12. Click on "Create"
  13. Click on the "My Swarms" tab.
  14. Select the "Renesas Demo" swarm.
  15. Click the "Edit" button.
  16. Find the resource that was created previously in the right hand side of the screen, and click on the grey "producer" button (do NOT select the "consumer" button).
  17. Click on the "Update" button.
  18. In the next screen, find the resource we just created and copy the text next to the ID: label.
  19. In the CubeSuite IDE, double click on the file r_main.c within the gen folder.
  20. Replace the text immediately following const char resource_id[] = with the ID copied from the bugswarm webpage, similarly in quotes.
  21. Connect the Redpine Wifi Card to the App header slot on the RL78/G13 board (See this Diagram). The components on the wifi card should be facing inwards.
  22. On the RL78G13 demo board, make sure that switch 2 on SW5 is in the downward (or 'Off') position. See the quick start guide for more details.
  23. Connect the RL78G13 demo board to the PC using a USB cable
  24. Within CubeSuite, press the button. The project should compile and deploy to the demo board.
  25. When the download has completed, the screen should change and should highlight a single line in r_main.c in yellow. When this happens, press the key.
  26. The application should start running.

Troubleshooting

If the RL78 demonstration board does not appear or remain online, you will need to connect to a serial console on the demo board.

  1. Obtain an RS232 to USB converter
  2. Connect the RS232 adapter to the RS232 port on the RL78 demontration board, and into a computer or laptop.
  3. Open a serial terminal emulator like HyperTerm or Putty and connect to the USB-Serial port. Use Baud rate 115200, 8 bits, no parity, 1 stop bit, and no hardware flow control. Here is an example tutorial
  4. Press the Reset button on the RL78 demo board, and observe the serial output
  5. Reproduce the error, and copy/paste all of the relevant serial output into pastebin.com. press "Submit".
  6. Contact buglabs support, and provide the URL of the pastebin website.

Relevant Documentation