-->
Page 1 of 1

eboot questions

PostPosted: Mon Jan 11, 2016 8:24 am
by elFallino
Hi,

I am playing around with eboot for fun and learning purposes.
I think that I mostly understand what the bootloader is doing, but not how the boot-process itself is working.

Things I did:

I changed eboot so it *should* boot a ROM at 0x80000 (0x40280000) from SPI. That does not work.
So I guess there is something I miss. I also added some uart output to see what it is doing.

I did some changes to Arduino's boards.txt so I can select my "own" ESP8266 variant that uses a modified linker script. This should create a binary that is located at 0x80000. At least uploading this rom does not overwrite a rom that is located at 0x00000;


So my questions are:

- how to check if the rom is really located at 0x80000?
- what else must be done to boot from any adress > 0x00000

Many thanks in advance.

Re: eboot questions

PostPosted: Wed Jan 13, 2016 12:19 pm
by elFallino
Found the problem and solved it. I was linking the rom to a specific address but did not upload it load it to that address.

Now I am trying to get the Arduino IDE to create a bin file with my program without adding eboot to it.
Else I would loading another instance of eboot which would end in a loop ob bootloaders loading each other.

I have this command line for esptool added to boards.txt:

generic.menu.FlashSize.4M.recipe.objcopy.hex.pattern="{runtime.tools.esptool.path}/{compiler.esptool.cmd}" -eo "{build.path}/{build.project_name}.elf" -bo "{build.path}/{build.project_name}.bin" -bm {build.flash_mode} -bf {build.flash_freq} -bz {build.flash_size} -bs .text -bs .data -bs .rodata -bc -ec

It is building a binary that Arduino is uploading. But it does not run. It is raising exceptions. If I have Arduino uploading a Binary including the standard eboot bootloader, my modified one is able to load this rom at the given address (but is ending in the loop where both bootloaders are loading each other).


I guess that again there is something I am missing. Either the command line above is not correct OR adding the eboot.elf to the bin file is doing something that is now lacking.


I think igrr could point me to the right thing but (for good reasons I understand) he disabled PMs :mrgreen:

Re: eboot questions

PostPosted: Fri Jan 15, 2016 4:08 pm
by elFallino
Again I found the problem by myself.

I have linked the ROM to 0x02000 and uploaded it to 0x2000 BUT I had to link it to 0x2010 and upload it ti 0x2000 because within the first 16 Bytes (0x10) there are the image and section headers. Sometimes I just need to think twice. :mrgreen: