Closed fenugrec closed 2 years ago
incidentally, looking at disasm for good build, there's already a _start
function that initializes BSS (bss_start to bss_end) with memset
. Still looking into what part of newlib-nano would handle initialized data - I think we have redundancy in startup.c that we could get rid of.
I think the problem is the too large data
section. See https://github.com/candle-usb/candleLight_fw/pull/141 for a fix.
Fixed in 59896b65fdd588fed40cc4d9efec00d21f04ad31 via #141 . We still need to initialized .rodata because newlib will not do that for us (it does clear BSS though)
.rodata
is read only data, right? Does it live in the ROM?
.rodata
is read only data, right? Does it live in the ROM?
my bad, I meant the initialized RAM stuff, .data
My patch replaced the 32-bit manual copy loop by a memcpy()
, which takes length in bytes. So everything should be fine?
So everything should be fine?
Yes. We can't get rid of startup.c , but it should work now.
see description in https://github.com/candle-usb/candleLight_fw/pull/135#issuecomment-1317912852