Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation on MKFW #20

Open
cycl0ne opened this issue Jan 6, 2019 · 1 comment
Open

Documentation on MKFW #20

cycl0ne opened this issue Jan 6, 2019 · 1 comment

Comments

@cycl0ne
Copy link

cycl0ne commented Jan 6, 2019

Hi,
is there a documentation on the mkfw tool? Just from the source:
usage: %s description tile type subtype length label binary [...]

Its not so selfexplaining. Also from the Wiki, you have two "examples" without any comments what you are doing there:
./mkfw test tile.raw 0 16 1048576 app Hello_World.ino.bin
and
./mkfw test tile.raw 0 16 1048576 app Weather_Station.ino.bin 1 130 1048576 "spiffs" spiffs.bin

It would be cool if there was a little bit more explaination on the wiki:
https://wiki.odroid.com/odroid_go/arduino_app

It would be nice if these question could be easily answered on the wiki:

  • What is the purpose of mkfw? (And please not a short sentence like: mkfw is for making a firmware (.fw) file)
  • Is the length fixed? in both examples you use the value 1048576
  • What is type/subtype for?
  • What is label for?

Maybe a whole new page on the wiki explaining your "bootloader/firmware", what it does, how the memory map is looking like and what you do with the mkfw tool and how you integrae yourself next to the bootloader/freertos of the ESP32 SDK. This would be awesome for anyone using the odroid-go platform to develop some stuff. Better than reverse engeneering all stuff.

@OtherCrashOverride
Copy link
Owner

is there a documentation on the mkfw tool?

There is a brief description here:
https://forum.odroid.com/viewtopic.php?f=159&t=31314#p229855

Also from the Wiki, you have two "examples" without any comments what you are doing there:

The wiki is owned and maintained by HardKernel (HK).

What is the purpose of mkfw?

The 'mkfw' tool allows an ESP32 esp-idf application to be packaged for use with the odroid-go-firmware (this repo). It encapsulates the program binary and flash partition metadata into a single file allowing the ODROID-GO to "self flash" without an external PC.

Is the length fixed?

The length specifies the partition size required by the application. It may be larger than the program binary and must be a 64K aligned size due to flash page requirements. It is limited by the amount of free flash space available (15MB on ODROID-GO).

What is type/subtype for?

This is the esp-idf defined partition type and subtype. The values are defined by the esp-idf and subject to change by Espressif. The current values can be found here:
https://github.com/OtherCrashOverride/esp-idf/blob/08f2c8f266b30f1c32d201ca8520c6322111fe1a/components/spi_flash/include/esp_partition.h#L34-L79

What is label for?

The label is the text description displayed by the odroid-go-firmware (this repo) when the .fw file is selected.

Maybe a whole new page on the wiki explaining your "bootloader/firmware", what it does, how the memory map is looking like and what you do with the mkfw tool and how you integrae yourself next to the bootloader/freertos of the ESP32 SDK.

The odroid-go-firmware uses the esp-idf provided bootloader unmodified. Its purpose is to self flash the device. It is not active or resident in memory when an application is in use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants