Skip to main content
21 events
when toggle format what by license comment
May 23, 2017 at 12:37 history edited CommunityBot
replaced http://stackoverflow.com/ with https://stackoverflow.com/
May 14, 2015 at 17:41 vote accept Paul Terwilliger
May 12, 2015 at 10:49 answer added Élie timeline score: 1
Oct 11, 2014 at 5:23 comment added microtherion @jfpoilpret sorry about the byte code thing. Should not post when fatigued. I believe you're right about the bootloader restriction, but who says a compiler can't live (at least in part) in the bootloader section. Besides, OP was talking about Arduino Due, to which rather different rules may apply.
Oct 11, 2014 at 4:36 comment added jfpoilpret @microtherion, there are more locations in Arduino libraries that use dynamic allocation, the first that comes to my mind is String, which is why I avoid using String like the plague.
Oct 11, 2014 at 4:34 comment added jfpoilpret @microtherion only code in the bootloader are can write code to the rest of the Flash (I think there are some ugly tricks to work around that but it is NOT advised, event by Atmel I believe). Regarding intermediate bytecode writing to SRAM, actually this is exactly what I was saying!
Oct 11, 2014 at 3:52 comment added microtherion @AnnonomusPenguin yes it does, but because RAM is so scarce, the use of dynamic allocation is extremely rare. I think there might be only a single malloc in all Arduino libraries: github.com/arduino/Arduino/blob/…
Oct 11, 2014 at 3:47 comment added microtherion @jfpoilpret, I don’t think the answer is that clear cut: First, every Arduino boot loader can and does modify program memory. Second, a compiler could compile to byte code in RAM, instead of machine code.
Oct 11, 2014 at 3:21 answer added Anonymous Penguin timeline score: 2
Oct 11, 2014 at 3:11 comment added Anonymous Penguin I'm curious now: does Arduino support dynamic memory allocation with pointers like in standard C++?
Oct 10, 2014 at 19:56 comment added jfpoilpret If you want to compile and run code from Arduino to Arduono, then the answer is simple: you can't. What you can potentially do however is parse a command line and get a series of lower-level instructions (a kind of bytecode like in Java) and then interpret them. But that's quite complex work, though.
Oct 10, 2014 at 19:30 comment added BrettFolkins Do you want the arduino to run the code afterward? You can't edit code memory while running on an AVR. What you may want instead is to write a very simple interpreter for some language you write to the SD card.
Oct 10, 2014 at 19:24 review Close votes
Oct 11, 2014 at 3:07
Oct 10, 2014 at 18:55 comment added Chris Stratton Posting the same question on multiple sites is not permitted. Arduino is C++, but beware you have fairly extreme memory limitations. Ordinarily one would want to do any compiling on the device where the text is being provided, and put only the distilled result into the limited resources of the traditional Arduino board.
Oct 10, 2014 at 18:11 answer added microtherion timeline score: 2
Oct 10, 2014 at 17:49 comment added Paul Terwilliger Yes I do. I want to be able to insert an SD card with the code and I want the arduino to compile it.
Oct 10, 2014 at 17:29 comment added microtherion Do you want to run your compiler on the Arduino ? That seems a bit odd.
Oct 10, 2014 at 17:03 comment added Paul Terwilliger That's the only answer I've gotten so far. If that continues to be the only answer then I'll have to find something else for the Arduino
Oct 10, 2014 at 16:50 comment added BrettFolkins Arduino has full c++ language support, but does not have the standard library, so if your c++ answer is "use std::vector<type>" you will need to find or write a separate vector implementation. Outside of implementation, the answers should be the same.
Oct 10, 2014 at 16:34 review First posts
Oct 10, 2014 at 18:15
Oct 10, 2014 at 16:29 history asked Paul Terwilliger CC BY-SA 3.0