[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Question

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 8
Thread images: 1

File: Arduboy-2[1].jpg (304KB, 640x799px) Image search: [Google]
Arduboy-2[1].jpg
304KB, 640x799px
When you compile and upload a sketch to an arduino (or arduboy) what does the raw format of that data look like? A binary sequence that is read by the microchip, right?

Could you theoretically have micro usb game "cartridges" that can load a compiled game onto the arduboy without having to connect it to the arduino IDE on a PC?
>>
You'd have to have some sort of bootloader in the flash that reads the raw contents of the micro usb and puts them into RAM for use by the arduino
>>
>>57104142
I thought the bootloader was already on the chip.
>>
>>57104082
There are SD card shields for Arduino, try loading offa that. You can probably use the program ROM space on the AVR chip but why? It's precious and limited.
>>
>>57104518
It is, but the bootloader that's there is just a piece of code that knows how to talk to your PC to burn the program to the MCU's flash. For what you want to be possible you'd either need a microUSB device that pretends it's a PC running the software required to flash the MCU or rather to have some storage device and then have the bootloader flash the MCU by reading from the storage device. For the latter to even work the MCU needs to support USB host/OTG functionality, not sure if that's the case at all.
>>
>>57104518
Well, a bootloader is basicly just a program in ROM or some other non-volatile medium that tells the computer what to do immediately after startup.

The Arduino bootloader just sets up serial communication for the chip, flashes some LEDs and enables some pullup resistors.
>>
>>57104518
on the Arduino yes
if you are using the Atmel chips directly you don't need the bootloader
you jump directly to the entry point of your code
>>
It's easy, but you may need to work a little to get this to happen correctly.

You can write a sketch in Arduino that will look for some external EEPROM, or SD card, and then what you do it you copy the executable code from you external memory directly into RAM space, but be careful not to write over the area you are currently using to actually load the code, and then when you are done copying the program into ram simply do a direct jump to the location of the first instruction.

For example your boot loader may run at say 0x800000 you know that your boot loader code stops around 0x801000, you could then directly copy byte for byte the executable you want to run in 0x801000 and so on. Then when you are done copying just write a little assembly that jumps the instruction counter right to your instruction.

Though here is the big problem. Atmel and a lot of micro-controllers expect you to run your code from the internal executable flash space. You don't really want to be overwriting the flash in your micro over and over again, it will wear down like an SSD, now you can execute right from RAM but you don't have that much RAM to store most application, so it's a bit tricky.
Thread posts: 8
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.