customize.ldr - Contains the definitions for start and size for FLASH, RAM, NVRAM, File System, etc…
(change FLASH_SIZE)
bootldr.dat - Contains all the definitions for the image generation during compile/link
(change MaxFileSize to a bigger value, because now your
system can support a bigger size)
Always recompile BSP and application every time you change those files.
What about BLBOOTLDR.DAT? The BSP Porting Guide states “…You must set the ramAddress in the bootldr.dat to the value of BOOTLOADER_CODE_START in the customize.ldr file…” However, since the RAM portion of the bootloader itself is going to be decompressed at the location specified by ramAddress in BLBOOTLDR.DAT (not BOOTLDR.DAT) shouldn’t this be the one to be modified?
Am I wrong, but it seems that if one doesn’t modify ramAddress in BLBOOTLDR.DAT (its default value is 0x00204000), I suspect that when the application is being decompressed to RAM that once it exceeds the 2M mark that it will start overwriting the RAM portion of the bootloader… (?)
Actually, we’ve confirmed that if your application image exceeds 2M in size uncompressed, that if you don’t modify BLBOOTLDR.DAT to move the RAM portion of the bootloader (and download ROM.BIN, of course) that it will indeed crash. Otherwise, the application decompression code will overwrite itself when it hits that mark.
I’m surprised there is no documentation regarding BLBOOTLDR.DAT anywhere!
You also need to increase the ramAddress value in blbootldr.dat to match how much you’ve increased your MAX_CODE_SIZE, otherwise you run the risk of your bootloader overwriting itself in RAM when it attempts to load the application image into RAM
I’m still confused. I think I’ll try to figure out how to get my code back under 2M and avoid this entirely if I can.
I’m not sure why this isn’t handled automatically in the first place. Setting MAX_CODE_SIZE should be sufficient, all the others should adjust accordingly, in a perfect world. In an even more perfect world, you wouldn’t even have to set MAX_CODE_SIZE.
I see now why my project was going over 2M. Simply create a new NET+OS project for the ME, select HTTP server and HTTPS server (which will automatically include SSL) and try to compile and it will fail. Removing HTTPS and the project compiles.