Run code off SD card?

I certainly wouldn't say "no", but as usual, if you have to ask the question...

because you can run code off an SD card, just not directly.

If it is not directly it is not running code off an SD card.
You can't run code off an SD card.

Maybe you want to ask the question,
Can I store code on an SD card and use that to load it into the arduino to run.
The answer to that is "not without considerable difficulty"

Maybe you want to ask the question,
Can I store code on an SD card and use that to load it into the arduino to run.
The answer to that is "not without considerable difficulty"

Well the uMMC bootloader does that with reasonable ease (mind you it does have another processor sorting a lot of the stuff out and a modified bootloader).

If it is not directly it is not running code off an SD card.
You can't run code off an SD card.

I'd say bitlash is code and you can run bitlash using an arduino off of an SD card. Why's that not direct?

I'd say bitlash is code

And I would say it is not.

And I would say it is not.

I suppose that depends upon your definition of code. I presume you're talking specifically source code.

Wikipedia says:

In computer science, source code (commonly just source or code) is any collection of statements or declarations written in some human-readable computer programming language. Source code is the mechanism most often used by programmers to specify the actions to be performed by a computer.

With that definition, I'd say bitlash is code.

Or is your definition more like:

A text listing of commands to be compiled or assembled into an executable computer program

(Also specifically 'source code')
I suppose bitlash isn't really assembled - they're more instructions or commands but then I'd say that html is also instructions/commands and not really assembled/compiled.

"Hey, where did that code you are running come from"

"It came off the SD card"

not much point in arguing semantics.

bitlash is code. It isn't binary machine language, but it absolutely is code and can make the CPU do stuff.

Code you run in flash that was loaded off SD card is also a reasonable interpretation.

But nobody has really explained WHY this is even necessary. I can think of a few hypotheticals but I'm not going there. I want to hear what problem the OP is really trying to solve.

I have thought of a few reasons for wanting to be able to do something similar (but not quite what has been posted).

bitlash is code.

No it is not. It is text that gets interpreted.

You might as well call sensory data code as it is read by a program and the program changes its behavior depending on the sensory input.

Grumpy_Mike - so what is your definition of code? (source code?)

No it is not. It is text that gets interpreted.

Yes but so is all code - javascript is simply human readable text that gets interpreted...

(source code?)

No source code isn't code - it is the source of the code hence the name!
Code is machine instructions. Source code is the source, used by a compiler, to produce code.
Bitlash is just text that is interpreted by another program, it is not code.

Ahh but that's what most people refer to when talking about code - you're just being pedantic.

Bitlash is therefore source code yes?

C++ is then not code but still source code?

Are we happy now? :smiley:

Ahh but that's what most people refer to when talking about code

Doesn't stop them from being wrong does it, just because a lot of people are wrong.

Glad we agree now...

:smiley:

Living up to your name tonight - didn't want to let us down :wink:

bytecode=pcode=portable code. If you put logic on the sd card, it is code. It doesn't matter if it is interpreted or run as-is through the cpu. It doesn't matter if the codes are human readable like a programming language.

Maybe you are thinking of machine code? a specific name for code that is compiled/assembled?

This is a vastly different scenario than plain data.

Ok war over - yes it's possible to both load hex onto an arduino and run a type of text based code (source code perhaps) from an SD card but it is not possible with the current hardware architecture to load programs directly off of an SD card, using the SD card as external flash memory for them.

Well, that was certainly an interesting discussion to follow!

http://diy.elektroda.eu/uprog-maly-szybki-przenosny-programator-avr-z-sd/?lang=en
Oooh look what just came up :slight_smile:

Oh, that is nice! Awesome way to update embedded systems.

lol, I'm still trying to get over the commenters avatar