elf2hex icon indicating copy to clipboard operation
elf2hex copied to clipboard

Add offset option to freedom-bin2hex script for supporting SPI flash

Open kenzhang82 opened this issue 5 years ago • 4 comments

In freedom e310 arty kit, the bootROM doesn't jump to the base address of the SPI flash address, but with an offset, add the offset option such that 0's are prepend.

kenzhang82 avatar Apr 11 '20 08:04 kenzhang82

@palmer-dabbelt can you please review this?

kenzhang82 avatar Apr 11 '20 08:04 kenzhang82

An issue with this approach, is you will overwrite the existing contents prior to you program offset. Consider the following;

[---------------- FLASH MEMORY ------------------------]
| [ FPGA bits ] -- [ BootROM ] --- [ User Program ] ---|
[------------------------------------------------------]

Prepend with leading 0s will overwrite the FPGA bits region

bsousi5 avatar Apr 13 '20 19:04 bsousi5

@palmer-dabbelt can you please review this?

Palmer doesn't work at SiFive anymore (😢) so you'd be hard pressed to get his review on this. (Palmer, if you do see the notification, hello! Hope you're well!) Bunnaroath and I are the maintainers of Freedom E SDK.

nategraff-sifive avatar Apr 13 '20 20:04 nategraff-sifive

Hi @nategraff-sifive, thanks for letting me know that Palmer doesn't work at SiFive anymore.

Hi @bsousi5, thanks for the review and feedback, I wonder how we should go handle the case of RTL simulation where the FPGA bitstream and bootROM doesn't really matter. Maybe add a simulation mode option to the script?

kenzhang82 avatar Apr 13 '20 22:04 kenzhang82