Anyone tried codebender?

Status
Not open for further replies.

stevech

Well-known member
https://codebender.cc/

Browser based Arduino code editing and compile with their compiler, then it pulls down the .hex and pushes to the Arduino via COMn or Ethernet.

I tried to use it, but it required I have an Arduino/bootloader connected, which I don't have.
I wanted to use it, and see if they let you set the compiler options so I could target a Teensy 3, or get it to save or push the .hex to a Teensy 2.

I did use mbed's on-line (Keil) compiler. It was OK, not great for the advanced user.

But Code Bender would be great for students, aspiring geeks, etc, as there's no IDE to install.

If Code Bender works for Teensy 2's loader, and could work for Teensy 3, it could enlarge the user base by eliminating the need for the IDE on the user's PC (windows, Linux are supported by their browser plugin for Firefox, Chrome, IE). Not sure how Teensyduino could integrate with the server-side compiler.
 
hey stevech,
i'm Vasilis from codebender. unfortunately, we don't support the teensy yet, but to be honest, the only reason we don't do it yet is because we need to check out exactly what changes the teensyduino makes to the arduino cores, and add those changes to our compiler infrastructure. and we simply didn't have the time to do that yet :D

that said, if anyone is interested in helping out, i'd be more than glad to work on it :)
 
Teensy boards utilize a download from PJRC called Teensyduino, supporting the Teensy 2's that are AVR's with built-in USB and a USB-based bootloader that's similar to but independent of an Ardino-specific bootloader. Teensyduino's download also supports the Teensy 3's which are Freescale ARM processors. Teensyduino download also gets Teensy's very nicely done downloader for the PC side which integrated with the IDEs and supported on Windows, Linux, Apple. Paul (brains of the place) has, in Teensyduino, a library of many of the more popular Arduino libraries and these support the Teensy 2 AND the Teensy 3 ARM based boards. The libraries include many more sophisticated libraries made possible by Teensy 3.1, e.g., chibiOS and FreeRTOS, and user doing huge LED displays.

Paul/PJRC also sell a few very nice teensy piggy-back boards ("shields is a misnomer), including ethernet, Xbee, audio, and others.

The Arduino IDE is used. Or optionally, lots of us use other IDEs such as Atmel Studio 6.1 (MS Visual Studio), Eclipse, Notepad++, emBlocks, and others.
Teensyduino drops in underneath the standard Arduino 1.0.5 installation (Ardino 1.5.x is planned when the Arduino community makes some key decisions).

Hope this overview helps.

An on-line compiler/IDE has a great place in this experimenter/student world, esp. the latter.
 
Last edited:
Supporting Teensy in Codebender would require quite some work....

The core library is the simplest part, just copy it. Teensy's core library has relatively little code in common with Arduino's core library, so I would not recommend trying to use Arduino's code for Teensy. Especially for Teensy 3.X, you really need my core library, since it's a completely different chip than any Arduino board. The USB, serial and other peripherals are unlike any Atmel parts, so Arduino's code absolutely can not work on Teensy3.

Teensy uses its own HID-based protocol for programming. It's quite different from all the other Arduino compatible boards, which implement serial devices for programming. There are 2 ways you might incorporate Teensy's upload protocol. There's an open source command line loader, which might be the easiest way. You could also try using the proprietary GUI-based loader, which has some command line control programs. That's what the Teensyduino installer puts into hardware/tools. Just launch the GUI, then you can open a file with teensy_post_compile, and set the loader to "auto" mode (where it will automatically program the next Teensy that reboots). The teensy_reboot program will find a Teensy (if it's running code previously made with Teensyduino) and ask it to reboot to programming mode.

The core library for Teensy supports several different USB options. It also lets you choose the CPU speed, and for the modes that implement a USB keyboard, you can choose the keyboard layout. In Arduino, the Teensyduino installer patches the Tools menu, adding "USB Type", "CPU Speed" and "Keyboard Layout". Ultimately the settings from those menus just change -D flags to the compiler. Does Codebender have a way to let the user choose these settings?

Another complexity to fully supporting Teensy is the Arduino Serial Monitor in non-serial modes. The USB types without serial have a custom HID interface that's used to emulate serial. You can use Serial.print() even when implementing a MIDI device. The output is sent to that HID interface. Teensyduino installs a program named teensy_gateway which is run when a Teensy is programmed in those modes. The Arduino Serial Monitor is patched to open a localhost-only connection to the gateway program (since Java natively supports TCP/IP but not USB), and then gateway program talks to the HID interface and relays data back and forth. To the end user, it looks like Serial.print() always "just works", but under the hood the Arduino Serial Monitor is actually talking to that gateway program which is listening for HID packets.

Over the next year, I plan to release a LOT of new features on Teensy 3.1. So many more things are now possible, with the larger memory and more powerful peripherals (and honestly, Arduino Due is similarly capable, if only anyone were to really invest the time+effort). The new audio library is only the beginning. For non-Arduino tools, these developments could turn into quite a lot of maintenance. If you do go to the trouble of supporting Teensy in Codebender, please communicate with me and I'll try to help as best I can.
 
@tzikis
The Teensy adaptations for IDEs like Visual Studion/Visual Micro, Eclipse, don't alter the core code, they just use GCC in the same manner as does the Arduino Java IDE. Avoids all that work.
 
Status
Not open for further replies.
Back
Top