There was no attached file, I assume that would’ve had the error you are seeing.
Regardless, what you have there is a reasonable way to get .data padded to 8 byte alignment. Linker script is the right place to make that happen. > On 24. Aug 2022, at 18.08, 范姜徐霖 <jackfa...@gmail.com> wrote: > > I try to port ble_app program to my board from bsp/hifive1. > I found something wrong at srodata alignment. (see attached file) > the .data section size is 0x94, and the following .srodata section is > alignment at 2**3 > so .sordata section start at 0x98. 4-bytes are skipped. > we do not always have this error, it depends. > I guess it happen at ".data section size is not 8-byte alignment" > > I modify the hifive1.ld to make sure .data section size is 8-byte alignment. > ---------------------- > .data : > { > *(.data .data.*) > *(.gnu.linkonce.d.*) > . = ALIGN(8); <------------------------I add this line > } >dtcm AT>itcm > -------------------------- > > dont know is there anything missing? > > Jack >