Understanding the Odroid-Go

Post Reply
CyCl0ne
Posts: 3
Joined: Sun Jan 06, 2019 8:55 pm
languages_spoken: english, german
ODROIDs: odroid-go
Contact:

Understanding the Odroid-Go

Unread post by CyCl0ne » Mon Jan 07, 2019 7:22 am

Hi,
first of all, thank you very much for this cool gadget. i wanted to get more into this whole thing and stumbling about lots of problems the last days. maybe someone could enlighten me.

* due to the missing springboard i couldnt compile my own play-fw to understand the build process, it could have been nice to include it as a .bin to make things easier to understand and mybe some kind of shell script which uses then the mkfw which produces the final .fw file. same for the firmware compiling, i stumbled there on a .sh script which seems to build the .img, a little doc would help (to learn to fish :D )

After digging in the ESP Docs, i read that the standard bin files include: bootloader.bin yourapplication.bin.
RomBootloader->loads at 0x1000 bootloader.bin -> loads your application which is linked to rtos
From the odroid i learned that you just use the bootloader in your firmware startup, but not in the go-play and that the bootloader.bin should go at 0x1000 but your firmware flashes at 0x0. ok? so from my assumptions you do the following:
RomBootloader->loads at 0x1000 bootloader.bin-> loads your Firmware, which flashes the .fw into a partition of the flash, sets it active -> reset->
RomBootloader->loads at 0x1000 bootloader.bin-> loads the active partition (springboard)

am i correct with my assumptions? i wonder how pressing the button i return to the firmware menu?! and how you flash at 0x0 and not 0x1000?

Oh and while we are at it about strange explanations:
https://wiki.odroid.com/odroid_go/extract_esp32_img

what does this guide tell me? i extract a bin file from the flash just to create an img and then send it back to flash? why should i do this?

crashoverride
Posts: 4313
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: Understanding the Odroid-Go

Unread post by crashoverride » Tue Jan 08, 2019 9:18 pm

CyCl0ne wrote:
Mon Jan 07, 2019 7:22 am
due to the missing springboard i couldnt compile my own play-fw to understand the build process
This is not supported. The emulators can be individually compiled using standard esp-idf procedures (make). A compiled emulator can then be uploaded to the ODROID-GO using the provided "flashapp.sh" script included with each emulator. There are future plans to allow the emulators to be used "stand alone" (each its own .fw):
https://github.com/OtherCrashOverride/go-play/issues/79
CyCl0ne wrote:
Mon Jan 07, 2019 7:22 am
i wonder how pressing the button i return to the firmware menu?! and how you flash at 0x0 and not 0x1000?
The bootloader is provided by the esp-idf SDK. During boot, it will check the state of GPIO pins (the buttons) and select a partition to boot from based on it (firmware/application).

The .img is an image of the entire used flash contents. Therefore, it flashes at 0x0.
CyCl0ne wrote:
Mon Jan 07, 2019 7:22 am
what does this guide tell me? i extract a bin file from the flash just to create an img and then send it back to flash? why should i do this?
It documents the procedure for making an exact copy of ODROID-GO flash for backup purposed. It demonstrates reading the flash to create the image and using the image to restore the flash in the ODROID-GO.

CyCl0ne
Posts: 3
Joined: Sun Jan 06, 2019 8:55 pm
languages_spoken: english, german
ODROIDs: odroid-go
Contact:

Re: Understanding the Odroid-Go

Unread post by CyCl0ne » Thu Jan 10, 2019 7:03 am

Hey Crash,
thanks for your time, yesterday i was digging another 3-4hours reading the ISA, ESP docs etc. so im now more enlightend and now know what you are hacking here. the mkimg is just a copy all .bin into one file with the correct "fill" of 0xff in the empty spaces. so kind of an "iso-image" for the flash, nice idea! :-)

Why you want to discard the springboard idea? its cool and you could even supply one of the three springboards from users. i dont mind having the sources of the springboard, but from the technical understanding, it makes life easier to learn if the compiliation process is 1:1 of a file you flash, but this is just my 5 cents on this topic.
or at least document this partition gambling and why the result of an own make is different from a .fw/.img file ;-) to understand what you are doing here.

On the other hand, ESP-IDF doesnt do it easier from docu side. From my ARM/x86 Baremetal coding i know what a bin file is, until i noticed yesterday that the bin file from esp32 is completly something different with an own header. I thought it was their linker script producing this, but after some google i found that all is extracted from the elf file with their esptool and smashed into a .bin file. this was kind of new to me, but explained the code in their bootloader more, where they load everything into the apropiate iram/dram/rtc etc. (Was wondering how they could manage this from a normal flat .bin file, normally i assumed they just do something like you with the img, and producing a bin file with 0x3fff 0000 - 0x4fff ffff and pump it into ram.

So digging here more and more into the ESP32 world i notice lots of self written tools smashing things into the hardware, i like this approach ;-)

Cheers
C.

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 2 guests