You can chat about native SDK questions and issues here.

User avatar
By lethe
#57865
cmarrin wrote:Thanks. I've seen those and they do pretty much what all the others do, which is they write two binaries, one at 0x00000 and the other at 0x40000. Sometimes the second file is written to 0x10000. I don't see how those addresses relate to the address in my .ld file. And I don't see why it's writing 2 files. I assume the first is a boot loader. But where is it coming from?

From what I understand, the first file (always flashed at 0x0) contains the bootloader (for OTA builds) and the code that remains in RAM permanently. The other file (0x10000) contains the code loaded on demand from flash (irom0_0_seg in the ld script).

Note that the linker script specifies memory locations, not flash sectors. 1MB of the flash chip is memory mapped starting at 0x40200000, so the irom location is 0x40210000 in the ld script instead of 0x10000.
User avatar
By cmarrin
#57899 That makes sense. But there are two things I don't get. Why 2 separate files? The binary esptool is able to write a single file, which makes uploading simpler. And second, where is that boot loader coming from? I don't see anywhere they're specifying a boot loader file. The binary esptool lets you specify it.

Then there's the last issue, which is, I've tried using esptool.py to make a .bin file and then I uploaded the two files to the device and it didn't work at all. I suppose that's the biggest reason I'm using both. But I would like to understand where I'm going wrong
User avatar
By Solomon Candy
#57970 Also I should mention, I get the same error when I make, I just use two makefiles. I let one make till the error, which is where it's trying to make binary file from elf file. I then use the second makefile which I have named 'bin-make' as such:

Code: Select allmake -f bin-make


And the other makefile makes it to completion, I then use a third make to upload the file because i like to keep that function separate but you can do both these jobs of binary creation and uploading in your second makefile. I kinda did this so I can come back to the original makefile one day and work out what's wrong but I haven't gotten to that yet.